diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 048f7607ed..e48c16e336 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,6 +7,7 @@ /types/a11y-dialog/ @Goyatuzo /types/abbrev/ @BendingBender /types/abs/ @AyaMorisawa +/types/abs-svg-path/ @LiamMartens /types/absolute/ @AyaMorisawa /types/abstract-leveldown/ @MeirionHughes @danwbyrne /types/acc-wizard/ @cyrilschumacher @@ -50,7 +51,8 @@ /types/add-zero/ @Roaders /types/adhan/ @skymunn /types/adlib/ @Esri @MikeTschudi -/types/adm-zip/ @jvilk @abner @BendingBender +/types/adm-zip/ @jvilk @abner @BendingBender @mattsains +/types/adobe__es-modules-middleware/ @peterblazejewicz /types/adone/ @s0m3on3 @maxveres /types/aes-js/ @federicobond /types/aframe/ @devpaul @bertoritger @twastvedt @@ -128,7 +130,7 @@ /types/amqplib/ @mnahkies @abreits @nfantone @zelein /types/analytics-node/ @fongandrew @thomasthiebaud /types/anchor-js/ @xt0rted -/types/angular/ @diegovilar @thorn0 @calebstdenis @leonard-thieu @scipper +/types/angular/ @diegovilar @thorn0 @calebstdenis @leonard-thieu @scipper @peterblazejewicz /types/angular-agility/ @rolandzwaga /types/angular-animate/ @michelsalib @adidahiya @rasch @codyschaaf /types/angular-aria/ @chivesrs @@ -216,6 +218,7 @@ /types/apex.js/ @y13i /types/api-error-handler/ @tkrotoff /types/apicache/ @danielsogl +/types/apicalypse/ @susam-projects /types/apigee-access/ @CasperSkydt /types/apimocker/ @uchilaka /types/apollo-codegen/ @bradleyayers @kostspielig @@ -277,12 +280,12 @@ /types/assertsharp/ @brunolm /types/assets-webpack-plugin/ @kryops /types/astring/ @nkappler -/types/async/ @borisyankov @kern0 @Penryn @fenying @pascalmartin @Dmitri1337 @erossignon @Juliiii +/types/async/ @borisyankov @kern0 @Penryn @fenying @pascalmartin @Dmitri1337 @erossignon @Juliiii @brendtumi /types/async-busboy/ @hirochachacha /types/async-cache/ @BendingBender /types/async-eventemitter/ @patarapolw /types/async-iterable-stream/ @DanielRose -/types/async-lock/ @elisee @afharo @rhymmor +/types/async-lock/ @elisee @afharo @rhymmor @humulus /types/async-polling/ @Goldsmith42 /types/async-retry/ @albertywu @MeLlamoPablo @rafsawicki /types/async-stream-emitter/ @DanielRose @@ -301,7 +304,7 @@ /types/atmosphere.js/ @toedter @Mory1879 @Scipion /types/atob/ @johngeorgewright /types/atob-lite/ @gr2m -/types/atom/ @GlenCFL @smhxx @lierdakil +/types/atom/ @GlenCFL @smhxx @lierdakil @aminya /types/atom-keymap/ @GlenCFL /types/atom-mocha-test-runner/ @GlenCFL /types/atpl/ @soywiz @@ -327,6 +330,7 @@ /types/await-timeout/ @szhu /types/awesomplete/ @webbiesdk @bmdixon @tbekolay @chrislopresto /types/aws-iot-device-sdk/ @niik @mlamp +/types/aws-kcl/ @vshlos @foqal /types/aws-lambda/ @darbio @skarum @StefH @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase @repl-chris @aneilbaboo @jeznag @louislarry @dpapukchiev @ohookins @trevor-leach @jagregory @dalen @loikg @skyzenr @redlickigrzegorz @juancarbonel @pwmcintyre @alex-bolenok-centralreach @marianzange @apepper /types/aws-param-store/ @jasonthomasgray @nathanoertel /types/aws-regions/ @Deadarius @@ -344,6 +348,7 @@ /types/azure-kusto-data/ @armanio123 /types/azure-mobile-services-client/ @dmorosinotto /types/azure-sb/ @Azure +/types/b-spline/ @Rupertofly /types/b2a/ @PatPL /types/b64-lite/ @JasonHK /types/b_/ @outring @@ -360,6 +365,8 @@ /types/babel__code-frame/ @mohsen1 @ForbesLindesay /types/babel__core/ @yortus @marvinhagemeister @mgroenhoff @Jessidhia /types/babel__generator/ @yortus @johnnyestilles @mgroenhoff @khell @Lyanbin +/types/babel__plugin-transform-runtime/ @slavafomin +/types/babel__preset-env/ @slavafomin /types/babel__standalone/ @PlayMa256 /types/babel__template/ @yortus @marvinhagemeister @mgroenhoff /types/babel__traverse/ @yortus @marvinhagemeister @rpetrich @mgroenhoff @dlgrit @@ -389,6 +396,7 @@ /types/barbellweights/ @evelijn /types/barcode/ @pvomhoff /types/bardjs/ @TepigMC +/types/baretest/ @roryokane /types/base-64/ @dolanmiu /types/base16/ @alechill /types/base64-arraybuffer/ @jbencook @@ -405,7 +413,7 @@ /types/batch-stream/ @drudge /types/battery-level/ @BendingBender /types/bayes-classifier/ @jasonharrison -/types/bazinga-translator/ @alexndlm +/types/bazinga-translator/ @alexndlm @peterblazejewicz /types/bchaddrjs/ @ealmansi /types/bcp-47/ @cjbarth /types/bcp-47-match/ @cjbarth @@ -415,6 +423,7 @@ /types/bdfjs/ @jeremejevs /types/beanstalkd/ @SomaticIT /types/beanstalkd-worker/ @SomaticIT +/types/bearcat-es6/ @xinxinran0221010 /types/beats/ @urish /types/bech32/ @micksatana /types/behavior3/ @carrrywu @@ -483,15 +492,17 @@ /types/boom/v3/ @rogatty /types/bootbox/ @vbortone @konpikwastaken @kanup @icereed @trodi @stannynuytkens @renjfk /types/bootpag/ @rdeneau -/types/bootstrap/ @denisname +/types/bootstrap/ @denisname @peterblazejewicz /types/bootstrap/v3/ @borisyankov @denisname /types/bootstrap-3-typeahead/ @AndersonFriaca /types/bootstrap-colorpicker/ @aleksandar-manukov /types/bootstrap-datepicker/ @borisyankov @jannikkeye -/types/bootstrap-fileinput/ @CheCoxshall +/types/bootstrap-fileinput/ @CheCoxshall @peterblazejewicz +/types/bootstrap-filestyle/ @mustafasalahuldin /types/bootstrap-growl-ifightcrime/ @AndersonFriaca /types/bootstrap-maxlength/ @danmana /types/bootstrap-menu/ @superheri +/types/bootstrap-multiselect/ @mustafasalahuldin /types/bootstrap-notify/ @niemyjski @mouse0270 @robert-voica /types/bootstrap-select/ @LKay /types/bootstrap-slider/ @dbeckwith @leonard-thieu @@ -511,10 +522,11 @@ /types/bpmn-moddle/ @haydos89 /types/brace-expansion/ @BendingBender /types/braces/ @vemoo @mrmlnc -/types/brainhubeu__react-carousel/ @jackall3n +/types/brainhubeu__react-carousel/ @jackall3n @sinchang /types/braintree/ @smrubin @sharno @acdr @sedenardi /types/braintree-web/ @chlela /types/braintree-web-drop-in/ @saoudrizwan +/types/braintree__sanitize-url/ @krzysztofzuraw /types/breeze/ @borisyankov /types/bresenham/ @Chnapy /types/bricks.js/ @kondi @@ -526,10 +538,11 @@ /types/browser-bunyan/ @PaulLockwood @kryops /types/browser-fingerprint/ @LKay /types/browser-harness/ @scriby +/types/browser-image-compression/ @Donaldcwl /types/browser-or-node/ @jussikinnula /types/browser-pack/ @TeamworkGuy2 /types/browser-report/ @JTOne123 -/types/browser-resolve/ @marionebl +/types/browser-resolve/ @marionebl @peterblazejewicz /types/browser-sync/ @joeskeen @aznnomness @yuma84 /types/browser-sync-webpack-plugin/ @dsifford /types/browserify/ @AndrewGaspar @jvilk @leonard-thieu @LinusU @@ -538,7 +551,7 @@ /types/bs58/ @chrootsu @BendingBender /types/bs58/v3/ @chrootsu /types/bser/ @claasahl -/types/bson/ @horiuchi @CaselIT @justingrant +/types/bson/ @horiuchi @CaselIT @justingrant @lirbank /types/btoa/ @johngeorgewright @bricka /types/btoa-lite/ @gr2m /types/buble/ @Kocal @@ -547,6 +560,7 @@ /types/buffer-crc32/ @BendingBender /types/buffer-equal/ @Bartvds /types/buffer-from/ @burnnat +/types/buffer-json/ @chroventer /types/buffer-reader/ @nrlquaker /types/buffer-split/ @ciffelia /types/buffer-xor/ @danwbyrne @@ -586,12 +600,14 @@ /types/cal-heatmap/ @RetroChrisB /types/calendar/ @ffflorian /types/calidation/ @ArrayKnight +/types/callback-to-async-iterator/ @me /types/caller/ @ignocide /types/callsite/ @newclear /types/calq/ @eirikhm /types/camelcase-keys-deep/ @englund0110 /types/camo/ @lucasmciruzzi /types/camunda-external-task-client-js/ @MacRusher @hados99 +/types/can-autoplay/ @vborodulin /types/cancan/ @Vincent-Pang /types/caniuse-api/ @davecardwell /types/caniuse-lite/ @mutech @@ -602,8 +618,9 @@ /types/canvaskit-wasm/ @ashlanderr /types/capitalize/ @frederickfogerty /types/capture-console/ @AustonZ -/types/carbon-components-react/ @kalbert312 +/types/carbon-components-react/ @kalbert312 @sgregoire @matchilling /types/carbon__colors/ @vpicone +/types/carbon__icon-helpers/ @metonym /types/carbon__icons-react/ @metonym /types/carbon__layout/ @vpicone /types/carbon__motion/ @vpicone @@ -630,10 +647,10 @@ /types/ccapture.js/ @samalexander /types/center-align/ @claasahl /types/centra/ @twooster -/types/cesium/ @Zuzon @hnipps @szechyjs @golyalpha @KeyboardSounds @soyarsauce @jrafidi @morgansierrasnyder @crocsx +/types/cesium/ @Zuzon @hnipps @szechyjs @golyalpha @KeyboardSounds @soyarsauce @jrafidi @morgansierrasnyder @crocsx @peterblazejewicz /types/cfenv/ @jordanadams /types/cfn-response/ @ivoisbelongtous -/types/chai/ @jedmao @Bartvds @AGBrown @olivr70 @mwistrand @joshuakgoldberg @shaunluttin @Naktibalda @micksatana @ErikSchierboom @bparan @CXuesong +/types/chai/ @jedmao @Bartvds @AGBrown @olivr70 @mwistrand @joshuakgoldberg @shaunluttin @Naktibalda @micksatana @ErikSchierboom @bparan @CXuesong @joeykilpatrick /types/chai/v2/ @Bartvds @AGBrown /types/chai-almost/ @kclnn /types/chai-arrays/ @clementprevot @@ -643,6 +660,7 @@ /types/chai-enzyme/ @asvetliakov /types/chai-fs/ @dimitardanailov /types/chai-fuzzy/ @Bartvds +/types/chai-html/ @adjerbetian /types/chai-jest-snapshot/ @mattvperry /types/chai-jquery/ @kazimanzurrashid /types/chai-json-schema/ @ulrichheiniger @@ -658,15 +676,15 @@ /types/chai-xml/ @jedigo /types/chalk-animation/ @BendingBender /types/chalk-pipe/ @jedmao -/types/chance/ @cbowdon @brikou @cafesanu @colbywhite @NewDark90 +/types/chance/ @cbowdon @brikou @cafesanu @colbywhite @NewDark90 @jacobez /types/change-case-object/ @jameschao /types/change-emitter/ @iskandersierra /types/changelog-parser/ @adamzerella /types/chardet/ @Gebatzens @samhinshaw /types/charm/ @Xananax /types/charset/ @cspotcode -/types/chart.js/ @anuti @FabienLavocat @KentarouTakeda @larrybahr @mernen @josefpaij @danmana @guillaume-ro-fr @archy-bold @braincore @frabnt @alexdor @mahnuh @Conrad777 @adripanico @wertzui @lekoaf @ElianCordoba @indigolain @ricardo-mello @rnicholus @mrjack88 @canoceto @nobu222 @Marcoru97 -/types/chartist/ @mtgibbs @psimonski @affilnost @sunnyrjuneja @raudabaugh +/types/chart.js/ @anuti @FabienLavocat @KentarouTakeda @larrybahr @mernen @josefpaij @danmana @guillaume-ro-fr @archy-bold @braincore @frabnt @alexdor @mahnuh @Conrad777 @adripanico @wertzui @lekoaf @ElianCordoba @indigolain @ricardo-mello @rnicholus @mrjack88 @canoceto @nobu222 @Marcoru97 @tonybadguy +/types/chartist/ @mtgibbs @psimonski @affilnost @sunnyrjuneja @raudabaugh @borrajo /types/chartmogul-node/ @chartmogul /types/chayns/ @HenningKuehl /types/check-error/ @Seally @@ -675,7 +693,7 @@ /types/checkstyle-formatter/ @mhegazy /types/checksum/ @rogierschouten /types/cheerio/ @blittle @wmaurer @umarniz @LiJinyao @chennakrishna8 @AzSiAz @nwtgck -/types/chess.js/ @JacobFischer +/types/chess.js/ @JacobFischer @zacnomore /types/chessboardjs/ @sliverb @davidmpaz /types/child-process-promise/ @TheDSCPL /types/chmodr/ @BendingBender @@ -701,10 +719,11 @@ /types/ckeditor__ckeditor5-core/ @denisname /types/ckeditor__ckeditor5-engine/ @denisname /types/ckeditor__ckeditor5-utils/ @denisname +/types/clamp/ @adamzerella /types/clamp-js/ @Hikariii /types/clamp-js-main/ @sinziananicolae /types/clarinet/ @corno -/types/classnames/ @adidahiya @JKillian @seansfkelley @mradamczyk @marvinhagemeister @joshmccullough @uhyo +/types/classnames/ @adidahiya @JKillian @mradamczyk @marvinhagemeister @joshmccullough @uhyo /types/cldrjs/ @RamanBut-Husaim @gcastre /types/clean-css/ @tkrotoff @GolaWaya /types/clean-css/v3/ @tkrotoff @@ -752,7 +771,7 @@ /types/code/ @prashaantt /types/codeflask/ @holwech /types/codegen.macro/ @charlee -/types/codemirror/ @mihailik @nrbernard @Pr1st0n @rileymiller @toddself @ysulyma @azoson +/types/codemirror/ @mihailik @nrbernard @Pr1st0n @rileymiller @toddself @ysulyma @azoson @kylesferrazza /types/codependency/ @morphatic /types/coffeeify/ @tkQubo /types/coinbase/ @rogierschouten @@ -853,7 +872,7 @@ /types/consul/ @chrootsu @vadim-v /types/consumable-stream/ @DanielRose /types/contains-path/ @BendingBender -/types/content-disposition/ @bomret +/types/content-disposition/ @bomret @peterblazejewicz /types/content-range/ @bricka /types/content-type/ @horiuchi @BendingBender /types/contentful-resolve-response/ @antonkarsten @@ -945,7 +964,7 @@ /types/crumb/ @lenovouser @SimonSchick /types/cryptex/ @brownstein /types/cryptiles/ @awendland -/types/crypto-js/ @misak113 +/types/crypto-js/ @misak113 @maximlysenko /types/cryptojs/ @giabao /types/cryptr/ @rrogowski /types/cson/ @stpettersens @@ -964,6 +983,8 @@ /types/cssesc/ @djcsdy /types/cssnano/ @odnamrataizem /types/csso/ @screendriver @erik-kallen +/types/cssom/ @ExE-Boss +/types/cssstyle/ @ExE-Boss /types/csurf/ @horiuchi /types/csv2json/ @dex4er /types/csvrow/ @codeanimal @@ -976,7 +997,7 @@ /types/current-git-branch/ @VladimirGrenaderov @maxbogus /types/cuss/ @peterblazejewicz /types/custom-error-generator/ @thmiceli -/types/custom-functions-runtime/ @OfficeDev @akrantz @Zlatkovsky @mscharlock @davidchesnut +/types/custom-functions-runtime/ @OfficeDev @akrantz @mscharlock @davidchesnut /types/cwd/ @BendingBender /types/cwise/ @taoqf /types/cwise-compiler/ @taoqf @@ -986,7 +1007,7 @@ /types/cyberblast__webserver/ @cyberblast /types/cybozulabs-md5/ @pine613 /types/cypress-axe/ @wKovacs64 -/types/cypress-cucumber-preprocessor/ @aleccool213 @falconertc +/types/cypress-cucumber-preprocessor/ @aleccool213 @falconertc @jp7677 /types/cypress-image-snapshot/ @Keysox /types/cytoscape/ @phreed @wy193777 @ypconstante @janniclas @cerberuser @gsbelarus @peterjferrarotto @spaxe @appleparan /types/d/ @BendingBender @@ -1033,6 +1054,7 @@ /types/d3-selection/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3-selection-multi/ @gustavderdrache @borisyankov /types/d3-shape/ @tomwanzek @gustavderdrache @borisyankov @denisname +/types/d3-simple-slider/ @johnwalley /types/d3-time/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3-time-format/ @tomwanzek @gustavderdrache @borisyankov /types/d3-timer/ @tomwanzek @gustavderdrache @borisyankov @denisname @@ -1078,7 +1100,7 @@ /types/datejs/ @rupertavery /types/daterangepicker/ @SirMartin @smasala @nertzy /types/dav/ @ToastHawaii -/types/dayzed/ @samhh +/types/dayzed/ @samhh @hustonf /types/db-migrate-base/ @nickiannone /types/db-migrate-pg/ @nickiannone /types/db.js/ @cgwrench @@ -1121,7 +1143,7 @@ /types/denodeify/ @joaomoreno /types/deoxxa-content-type/ @pine613 /types/depd/ @danny8002 @BendingBender -/types/dependency-tree/ @joscha +/types/dependency-tree/ @joscha @adjerbetian /types/deployjava/ @cyrilschumacher /types/deprecate/ @Toilal /types/deps-sort/ @TeamworkGuy2 @@ -1150,6 +1172,7 @@ /types/diacritics/ @otociulis /types/dialog-polyfill/ @rubenswieringa /types/dialogflow-fulfillment/ @nightillusions @slowtick @diegodalbosco @MTRNord +/types/dice-coefficient/ @nicholaiii /types/dicer/ @GoupilRobin @BendingBender /types/didyoumean/ @jamesgeorge007 /types/diff/ @vvakame @szdc @moc-yuto @BendingBender @@ -1167,7 +1190,7 @@ /types/dirname-regex/ @BendingBender /types/dirty-chai/ @dex4er /types/discontinuous-range/ @OiCMudkips -/types/discord-rpc/ @jasonhaxstuff @lolPants @dylhack +/types/discord-rpc/ @jasonhaxstuff @lolPants @dylhack @k3rn31p4nic /types/discourse-sso/ @championswimmer /types/dispatchr/ @Ragg- /types/disposable-email-domains/ @geoffreak @@ -1180,14 +1203,13 @@ /types/dnssd/ @angelmerino @Maxr1998 /types/doccookies/ @jonegerton /types/docker-events/ @ciffelia -/types/dockerode/ @seikho @nlaplante @isac322 @lazarusx @meisenzahl @thegecko @CameronDiver @p4sca1 +/types/dockerode/ @seikho @nlaplante @isac322 @lazarusx @meisenzahl @thegecko @CameronDiver @p4sca1 @stuartthomson /types/docopt/ @giggio /types/doctrine/ @rictic /types/document-ready/ @Jack-Works /types/documentdb/ @NoelAbrahams @brettferdosi @ctstone @yifanwu /types/documentdb-server/ @lith-light-g /types/documentdb-session/ @DanielRosenwasser -/types/docx-templates/ @mathe42 /types/dogapi/ @olebedev /types/doge-seed/ @BendingBender /types/dojo/ @vansimke @@ -1277,6 +1299,7 @@ /types/eases/ @MathiasPaumgarten /types/easy-api-request/ @DeadAlready /types/easy-jsend/ @DeadAlready +/types/easy-rbac/ @adamzerella /types/easy-session/ @DeadAlready /types/easy-table/ @nikeee /types/easy-xapi/ @DeadAlready @@ -1285,7 +1308,7 @@ /types/ebml/ @AppLover69 /types/ebongarde-root/ @Ebongarde /types/eccrypto/ @randomnerd -/types/echarts/ @xieisabug @AntiMoron @liveangela @Ovilia @iRON5 @bilalucar @tmtron @dwhitney @ruixuel +/types/echarts/ @xieisabug @AntiMoron @liveangela @Ovilia @iRON5 @bilalucar @tmtron @dwhitney @ruixuel @robert-wettstaedt /types/ecma-proposal-math-extensions/ @ksm2 /types/ecore/ @michael-whi /types/ecurve/ @mhegazy @@ -1317,6 +1340,7 @@ /types/electron-settings/v2/ @leonard-thieu /types/electron-spellchecker/ @unindented /types/electron-window-state/ @rhysd +/types/element-closest/ @hikiko4ern /types/element-resize-detector/ @saranshkataria @franklixuefei /types/element-resize-event/ @rogierschouten @plgregoire /types/elementtree/ @dwieeb @@ -1325,46 +1349,46 @@ /types/elm/ @thSoft /types/elo-rank/ @apavlinovic /types/elv/ @garyaparker -/types/email-templates/ @cyrilschumacher @gurisko @blankstar85 @vesse -/types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia @mike-north @BryanCrotaz +/types/email-templates/ @cyrilschumacher @gurisko @blankstar85 @vesse @qqilihq +/types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia @mike-north @BryanCrotaz @jamescdavis @dfreeman /types/ember/v2/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia @mike-north /types/ember/v1/ @jedmao -/types/ember-data/ @dwickern @mike-north @chriskrycho +/types/ember-data/ @dwickern @mike-north @chriskrycho @jamescdavis @dfreeman /types/ember-data/v2/ @dwickern @mike-north @chriskrycho /types/ember-data__adapter/ @mike-north @chriskrycho @dfreeman @jamescdavis /types/ember-data__model/ @mike-north @chriskrycho @dfreeman @jamescdavis -/types/ember-data__serializer/ @me @dfreeman @jamescdavis @mike-north -/types/ember-data__store/ @me @dfreeman @jamescdavis @mike-north -/types/ember-feature-flags/ @tansongyang @mike-north +/types/ember-data__serializer/ @chriskrycho @dfreeman @jamescdavis @mike-north +/types/ember-data__store/ @chriskrycho @dfreeman @jamescdavis @mike-north +/types/ember-feature-flags/ @tansongyang @mike-north @dfreeman @chriskrycho @jamescdavis /types/ember-feature-flags/v3/ @tansongyang @mike-north -/types/ember-mocha/ @dwickern @simonihmig @mike-north -/types/ember-modal-dialog/ @tansongyang @mike-north +/types/ember-mocha/ @dwickern @simonihmig @mike-north @dfreeman @chriskrycho @jamescdavis +/types/ember-modal-dialog/ @tansongyang @mike-north @dfreeman @chriskrycho @jamescdavis /types/ember-modal-dialog/v2/ @tansongyang @mike-north -/types/ember-qunit/ @dwickern @mike-north @scalvert @dfreeman +/types/ember-qunit/ @dwickern @mike-north @scalvert @dfreeman @chriskrycho @jamescdavis /types/ember-qunit/v2/ @dwickern @mike-north -/types/ember-resolver/ @dfreeman @mike-north +/types/ember-resolver/ @dfreeman @mike-north @chriskrycho @jamescdavis /types/ember-resolver/v4/ @dfreeman @mike-north -/types/ember-test-helpers/ @dwickern @mike-north +/types/ember-test-helpers/ @dwickern @mike-north @chriskrycho @jamescdavis @dfreeman /types/ember-test-helpers/v0/ @dwickern @mike-north -/types/ember-testing-helpers/ @chriskrycho -/types/ember__application/ @mike-north -/types/ember__array/ @mike-north -/types/ember__component/ @mike-north -/types/ember__controller/ @mike-north -/types/ember__debug/ @mike-north -/types/ember__engine/ @mike-north -/types/ember__error/ @mike-north -/types/ember__object/ @mike-north -/types/ember__ordered-set/ @chriskrycho -/types/ember__polyfills/ @mike-north +/types/ember-testing-helpers/ @chriskrycho @jamescdavis @dfreeman @mike-north +/types/ember__application/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__array/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__component/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__controller/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__debug/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__engine/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__error/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__object/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__ordered-set/ @chriskrycho @mike-north @dfreeman @jamescdavis +/types/ember__polyfills/ @mike-north @chriskrycho @dfreeman @jamescdavis /types/ember__routing/ @mike-north @chriskrycho @dfreeman @jamescdavis -/types/ember__runloop/ @mike-north @scalvert -/types/ember__service/ @mike-north -/types/ember__string/ @mike-north -/types/ember__template/ @mike-north -/types/ember__test/ @mike-north -/types/ember__test-helpers/ @dfreeman @jamescdavis @mike-north -/types/ember__utils/ @mike-north +/types/ember__runloop/ @mike-north @scalvert @chriskrycho @dfreeman @jamescdavis +/types/ember__service/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__string/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__template/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__test/ @mike-north @chriskrycho @dfreeman @jamescdavis +/types/ember__test-helpers/ @dfreeman @jamescdavis @mike-north @chriskrycho +/types/ember__utils/ @mike-north @chriskrycho @dfreeman @jamescdavis /types/emissary/ @vvakame /types/emoji-flags/ @tdukart /types/emoji-js/ @jasondibenedetto @@ -1420,8 +1444,8 @@ /types/escape-regexp/ @jewbre /types/escodegen/ @simondel /types/escpos/ @rayosu @g3rrydanc3 -/types/eslint/ @pmdartus @j-f1 @saadq @JasonHK -/types/eslint-plugin-prettier/ @ikatyang +/types/eslint/ @pmdartus @j-f1 @saadq @JasonHK @bradzacher +/types/eslint-plugin-prettier/ @ikatyang @JounQin /types/eslint-scope/ @mysticatea /types/eslint-visitor-keys/ @mysticatea /types/esm/ @Richienb @@ -1471,7 +1495,7 @@ /types/expo-mixpanel-analytics/ @martintreurnicht /types/expo__status-bar-height/ @dawnmist /types/expo__vector-icons/ @incleaf @robertying -/types/express/ @borisyankov @CMUH @puneetar +/types/express/ @borisyankov @CMUH @puneetar @dfrankland /types/express-actuator/ @etruta /types/express-async-wrap/ @remyoudemans /types/express-boom/ @Nox-404 @@ -1503,7 +1527,7 @@ /types/express-mongo-sanitize/ @ericbyers /types/express-mung/ @cyrilschumacher @levibostian /types/express-myconnection/ @Cellule -/types/express-mysql-session/ @Akim95 @mathe42 +/types/express-mysql-session/ @Akim95 @mathe42 @Ionaru /types/express-ntlm/ @forivall /types/express-oauth-server/ @atd-schubert /types/express-paginate/ @AmirTugi @@ -1518,9 +1542,9 @@ /types/express-routemap/ @icopp /types/express-routes-versioning/ @weffe /types/express-sanitized/ @cjbarth -/types/express-serve-static-core/ @borisyankov @19majkel94 @kacepe @micksatana @samijaber @aereal @JoseLion @dwrss +/types/express-serve-static-core/ @borisyankov @19majkel94 @kacepe @micksatana @samijaber @aereal @JoseLion @dwrss @andoshin11 /types/express-session/ @horiuchi @jacobbogers @builtinnya @ry7n @fiznool @peterblazejewicz -/types/express-sitemap-xml/ @ffflorian +/types/express-sitemap-xml/ @ffflorian @peterblazejewicz /types/express-slow-down/ @jdforsythe @joshhendo /types/express-socket.io-session/ @AylaJK /types/express-sslify/ @bengry @@ -1552,7 +1576,7 @@ /types/facebook-pixel/ @noctishsu @VictorHom /types/facepaint/ @DogPawHat @antonsamper @timswalling /types/factory-girl/ @stackbuilders @sestrella @elcuy @OlivierKamers -/types/faker/ @bensw @basp @Kuniwak @mattbishop @testica +/types/faker/ @bensw @basp @Kuniwak @mattbishop @testica @TastefulElk /types/faker/v3/ @Kuniwak /types/falafel/ @delprzemo /types/falcor/ @Quramy @lukerielley @@ -1566,6 +1590,7 @@ /types/farbtastic/ @EnableSoftware /types/fast-chunk-string/ @yoursunny /types/fast-html-parser/ @rollercodester +/types/fast-isnumeric/ @peterblazejewicz /types/fast-json-stable-stringify/ @BendingBender /types/fast-levenshtein/ @mizunashi-mana /types/fast-list/ @BendingBender @@ -1606,6 +1631,7 @@ /types/feathersjs__socketio-client/ @j2L4e /types/feedme/ @codeanimal /types/feedparser/ @cortopy +/types/feflow__cli/ @nikewu /types/fetch-jsonp/ @tkrotoff /types/fetch-mock/ @asvetliakov @tamird @merrywhether @chrissinclair @matttennison @quentinbouygues @mtsmfm @captain-igloo @ChenNima @dobogo /types/fetch-mock/v6/ @asvetliakov @tamird @merrywhether @chrissinclair @matttennison @quentinbouygues @mtsmfm @@ -1613,6 +1639,7 @@ /types/ffi/ @loyd @waitingsong /types/ffi-napi/ @keerthi16 @KiranNiranjan /types/ffmpeg/ @Buzzertech +/types/ffmpeg-concat/ @weslenng /types/ffmpeg-static/ @iamstevetran /types/ffmpeg.js/ @VladimirGrenaderov @maxbogus /types/ffprobe-static/ @iamstevetran @@ -1632,12 +1659,16 @@ /types/fill-pdf/ @westy92 /types/filter-invalid-dom-props/ @icopp /types/final-form-focus/ @huan086 +/types/final-form-set-field-data/ @hikiko4ern +/types/final-form-set-field-touched/ @hikiko4ern /types/finalhandler/ @chrootsu @hbomark /types/finch/ @DavidSichau /types/find/ @andypyrope /types/find-cache-dir/ @BendingBender @peterblazejewicz /types/find-cache-dir/v2/ @BendingBender +/types/find-config/ @itslukej /types/find-down/ @ffflorian +/types/find-exec/ @peterblazejewicz /types/find-package-json/ @BendingBender /types/find-parent-dir/ @ikatyang /types/find-project-root/ @ikatyang @@ -1751,6 +1782,7 @@ /types/ftp/ @rogierschouten @TooTallNate /types/ftpd/ @rogierschouten /types/ftps/ @chrispanag +/types/fullcalendar__vue/ @nadershamma /types/fullname/ @kayahr /types/fullpage.js/ @jodiwarren /types/function-bind/ @ExE-Boss @ljharb @@ -1772,7 +1804,7 @@ /types/gapi.analytics/ @gatsbimantico /types/gapi.auth2/ @flawless2011 /types/gapi.calendar/ @tkrotoff -/types/gapi.client/ @Bolisov +/types/gapi.client/ @Maxim-Mazurok /types/gapi.client.acceleratedmobilepageurl/ @Bolisov /types/gapi.client.adexchangebuyer/ @Bolisov /types/gapi.client.adexchangebuyer2/ @Bolisov @@ -1852,7 +1884,7 @@ /types/gapi.client.oslogin/ @Bolisov /types/gapi.client.pagespeedonline/ @Bolisov /types/gapi.client.partners/ @Bolisov -/types/gapi.client.people/ @Bolisov +/types/gapi.client.people/ @Maxim-Mazurok /types/gapi.client.photoslibrary/ @Maxim-Mazurok /types/gapi.client.playcustomapp/ @Bolisov /types/gapi.client.playmoviespartner/ @Bolisov @@ -1907,6 +1939,7 @@ /types/gapi.youtube/ @sgtfrankieboy /types/gapi.youtubeanalytics/ @sgtfrankieboy /types/gaussian/ @scttcper +/types/gaze/ @adamzerella /types/gc-stats/ @vfernandestoptal /types/gdal/ @andreidigori /types/geetest/ @plantain-00 @@ -1926,7 +1959,8 @@ /types/geolite2/ @ffflorian /types/geometry-dom/ @nakakura /types/geopattern/ @Gaelan -/types/gestalt/ @serranoarevalo @joshgachnang @calvinchhour +/types/geopoint/ @vargind +/types/gestalt/ @serranoarevalo @joshgachnang @calvinchhour @zifahm /types/get-caller-file/ @ajafff /types/get-certain/ @BendingBender /types/get-emoji/ @BendingBender @@ -1938,9 +1972,10 @@ /types/getenv/ @impankratov /types/getos/ @BendingBender /types/getpass/ @claasahl +/types/gettext-parser/ @looorent /types/gettext.js/ @jucrouzet @FlorianSchwingenschloegl /types/gfc/ @BendingBender -/types/gh-pages/ @DanielRosenwasser +/types/gh-pages/ @DanielRosenwasser @peterblazejewicz /types/ghauth/ @Leko /types/ghost-storage-base/ @thde /types/gifffer/ @gatimus @@ -1953,6 +1988,7 @@ /types/git-branch-is/ @peterblazejewicz /types/git-config/ @stpettersens /types/git-config-path/ @BendingBender +/types/git-diff-parser/ @qfox /types/git-raw-commits/ @JasonHK /types/git-repo-name/ @BendingBender /types/git-rev-sync/ @khoi-fish @@ -2000,7 +2036,9 @@ /types/globalize/ @gcastre @afromogli @bryanforbes /types/globalize-compiler/ @iclanton /types/globalthis/ @ExE-Boss +/types/globalyzer/ @peterblazejewicz /types/globjoin/ @g-rath +/types/globrex/ @peterblazejewicz /types/globule/ @durad /types/glue/ @garfty /types/glue/v4/ @gjednaszewski @@ -2011,7 +2049,7 @@ /types/google-apps-script/ @PopGoesTheWza /types/google-apps-script-oauth2/ @dhayab /types/google-cloud__datastore/ @beaulac @ogawa0071 @ThomasdenH -/types/google-cloud__kms/ @ben-tbotlabs @caiertl +/types/google-cloud__kms/ @ben-tbotlabs @caiertl @carboncollins /types/google-cloud__tasks/ @ifiokjr /types/google-cloud__text-to-speech/ @benhjames /types/google-ddns/ @mickdekkers @@ -2035,7 +2073,7 @@ /types/google__markerclustererplus/ @enanox @mxl /types/googlemaps/ @cgwrench @Silver-Connection @nertzy @xaolas @mrmcnerd @martincostello @svenkreiss @bolatovumar @gauthierm @captain-igloo @demensky @life777 @simonhaenisch @gshigeto @Bat-Orshikh /types/googlemaps.infobubble/ @Dashue -/types/googlepay/ @Fluccioni @Radu-Raicea @fstanis @ozotek @mumpo +/types/googlepay/ @Fluccioni @Radu-Raicea @fstanis @ozotek @mumpo @socsieng /types/got/ @BendingBender @LinusU @ikokostya @stijnvn @wingsbob @ryanwilsonperkin @phawxby @ivywit @Huachao /types/got/v8/ @BendingBender @LinusU @ikokostya /types/graceful-fs/ @Bartvds @BendingBender @@ -2135,6 +2173,7 @@ /types/gulp-jspm/ @peterjuras /types/gulp-less/ @k-kagurazaka /types/gulp-load-plugins/ @joeskeen +/types/gulp-minify/ @tscpp /types/gulp-minify-css/ @k-kagurazaka /types/gulp-minify-html/ @tkrotoff /types/gulp-modernizr/ @remisery @@ -2171,6 +2210,7 @@ /types/gulp-watch/ @tkrotoff /types/gulp-zip/ @dudeofawesome @robertbullen /types/gun/ @Jack-Works +/types/gunzip-maybe/ @hexf /types/gyronorm/ @evanshortiss /types/gzip-js/ @rhysd /types/h2o2/ @jasonswearingen @AJamesPhillips @garthk @@ -2194,6 +2234,7 @@ /types/hapi__b64/ @ffflorian /types/hapi__basic/ @AJamesPhillips @saboya @lenovouser /types/hapi__bell/ @SimonSchick @lenovouser +/types/hapi__call/ @saboya /types/hapi__catbox/ @jasonswearingen @AJamesPhillips @saboya @lenovouser /types/hapi__catbox-memcached/ @btmorex /types/hapi__catbox-memory/ @SimonSchick @lenovouser @@ -2206,7 +2247,7 @@ /types/hapi__hawk/ @ffflorian /types/hapi__inert/ @nycdotnet @AJamesPhillips @lenovouser /types/hapi__joi/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @dankraus @wanganjun @rafaelkallis @aconanlai @zaphoyd @thewillg @SimonSchick @afharo @lenovouser @AnandChowdhary @myovchev @RecuencoJones @freisenhauer @legraphista @SimchaWood -/types/hapi__mimos/ @AJamesPhillips @lenovouser +/types/hapi__mimos/ @AJamesPhillips @lenovouser @LinusU /types/hapi__nes/ @NoHomey @saboya @lenovouser /types/hapi__podium/ @AJamesPhillips @lenovouser /types/hapi__shot/ @AJamesPhillips @SimonSchick @lenovouser @@ -2233,6 +2274,7 @@ /types/hat/ @tup1tsa @myovchev /types/haversine/ @screendriver @danvk /types/hbs/ @davidm77 +/types/hcaptcha__react-hcaptcha/ @msutkowski /types/hdkey/ @LogvinovLeon @TvrtkoM /types/he/ @sedwards2009 @lokidokicoki /types/headroom/ @hakubo @@ -2281,7 +2323,9 @@ /types/hosted-git-info/ @OiyouYeahYou @Ovyerus /types/hostile/ @AndrewLeedham /types/howler/ @xperiments @alien35 @nicholashza @cjurango +/types/hoxy/ @TrueLecter /types/hpp/ @kryops +/types/html-encoding-sniffer/ @ExE-Boss /types/html-entities/ @xstoudi /types/html-minifier/ @tkrotoff @rikuayanokozy /types/html-minifier/v1/ @tkrotoff @@ -2318,7 +2362,7 @@ /types/http-server/ @plantain-00 /types/http-string-parser/ @pine613 /types/httperr/ @yortus -/types/hubot/ @dirk @KeesCBakker @eeemil +/types/hubot/ @dirk @KeesCBakker @eeemil @jphenow /types/hubspot-pace/ @borislavjivkov /types/human-date/ @ricosandyca /types/human-interval/ @paulmelnikow @@ -2361,6 +2405,7 @@ /types/iferr/ @segayuu /types/iframe-resizer/ @arminbaljic /types/ifvisible/ @VladimirGrenaderov @maxbogus +/types/igdb-api-node/ @susam-projects /types/ignite-ui/ @IgniteUI /types/ignore-styles/ @tai2 /types/ignore-walk/ @MasterOdin @@ -2408,6 +2453,7 @@ /types/ink-table/ @lukostry /types/ink-testing-library/ @MancunianSam /types/ink-text-input/ @lukostry +/types/inline-critical/ @cherryblossom000 /types/inline-css/ @philipisapain /types/inline-style-prefixer/ @ahz @dpetrezselyova @franklixuefei /types/input-moment/ @timia2109 @@ -2422,7 +2468,7 @@ /types/integer/ @Morfent /types/integrate-adaptive-simpson/ @aimee-gm /types/intercept-stdout/ @pdcastro -/types/intercom-client/ @jineshshah36 @peping @mikhail-monchak @cdoe +/types/intercom-client/ @jineshshah36 @peping @mikhail-monchak @cdoe @malithrw /types/intercom-web/ @fongandrew @salbahra @onatm @bingo4508 /types/intercomjs/ @spencerwi /types/interface-datastore/ @me @@ -2456,6 +2502,7 @@ /types/is-absolute/ @BendingBender /types/is-alphanumerical/ @vutran /types/is-array/ @pine +/types/is-base64/ @thewilkybarkid /types/is-blank/ @heygambo /types/is-buffer/ @rokt33r /types/is-callable/ @nieltg @@ -2515,13 +2562,14 @@ /types/istanbul-lib-hook/ @jason0x43 /types/istanbul-lib-instrument/ @jason0x43 /types/istanbul-lib-report/ @jason0x43 @zache -/types/istanbul-lib-source-maps/ @jason0x43 +/types/istanbul-lib-source-maps/ @jason0x43 @sridharmallela /types/istanbul-middleware/ @hookclaw /types/istanbul-reports/ @jason0x43 /types/istextorbinary/ @BendingBender /types/it-all/ @nlisgo /types/it-pushable/ @yoursunny /types/ityped/ @DanielRosenwasser +/types/iv-viewer/ @robert-wettstaedt /types/ix.js/ @Igorbek /types/jackrabbit/ @elvisvoer /types/jade/ @panuhorsmalahti @@ -2554,9 +2602,10 @@ /types/jbinary/ @tbureck /types/jcanvas/ @rogierschouten /types/jdataview/ @RReverser -/types/jest/ @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @ahnpnl @joshuakgoldberg @UselessPickles @r3nya @hotell @sebald @andys8 @antoinebrault @favna @gstamac @ExE-Boss @quassnoi @Belco90 @tonyhallett @ycmjason @devanshj +/types/jest/ @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @ahnpnl @joshuakgoldberg @UselessPickles @r3nya @hotell @sebald @andys8 @antoinebrault @favna @gstamac @ExE-Boss @quassnoi @Belco90 @tonyhallett @ycmjason @devanshj @pawfa @regevbr /types/jest/v16/ @NoHomey @jwbay @ExE-Boss /types/jest-axe/ @JoshuaKGoldberg @erbridge +/types/jest-cucumber-fusion/ @pjoe /types/jest-dev-server/ @ifiokjr /types/jest-environment-puppeteer/ @joshuakgoldberg @ifiokjr @favna /types/jest-expect-message/ @mike-d-davydov @@ -2590,7 +2639,7 @@ /types/jpm/ @github-account-because-they-want-it /types/jqgrid/ @lokeshpeta /types/jqrangeslider/ @qcz -/types/jquery/ @leonard-thieu @borisyankov @choffmeister @Steve-Fenton @Diullei @tasoili @jasons-novaleaf @seanski @Guuz @ksummerlin @basarat @nwolverson @derekcicerone @AndrewGaspar @seikichi @benjaminjackman @s093294 @JoshStrobl @johnnyreilly @DickvdBrink @King2500 @terrymun +/types/jquery/ @leonard-thieu @borisyankov @choffmeister @Steve-Fenton @Diullei @tasoili @jasons-novaleaf @seanski @Guuz @ksummerlin @basarat @nwolverson @derekcicerone @AndrewGaspar @seikichi @benjaminjackman @s093294 @JoshStrobl @johnnyreilly @DickvdBrink @King2500 @terrymun @martin-badin /types/jquery/v2/ @choffmeister @Steve-Fenton @Diullei @tasoili @jasons-novaleaf @seanski @Guuz @ksummerlin @basarat @nwolverson @derekcicerone @AndrewGaspar @seikichi @benjaminjackman @s093294 @JoshStrobl @DickvdBrink @King2500 @leonard-thieu /types/jquery/v1/ @choffmeister @Steve-Fenton @Diullei @tasoili @jasons-novaleaf @seanski @Guuz @ksummerlin @basarat @nwolverson @derekcicerone @AndrewGaspar @seikichi @benjaminjackman @s093294 @JoshStrobl @DickvdBrink @King2500 @leonard-thieu /types/jquery-ajax-chain/ @humana-fragilitas @@ -2601,6 +2650,7 @@ /types/jquery-countdown/ @AndersonFriaca /types/jquery-countto/ @AndersonFriaca /types/jquery-cropbox/ @PerKastman +/types/jquery-cropper/ @mustafasalahuldin /types/jquery-deferred/ @TekuConcept /types/jquery-deparam/ @patsissons /types/jquery-drawer/ @pine @@ -2659,7 +2709,7 @@ /types/jquery.dropotron/ @cyrilschumacher /types/jquery.dynatree/ @fdecampredon /types/jquery.elang/ @sumegizoltan -/types/jquery.fancytree/ @alphaleonis @abedi-ir @niikoo @Nitecube +/types/jquery.fancytree/ @alphaleonis @abedi-ir @niikoo @Nitecube @hosni /types/jquery.filtertable/ @totpero /types/jquery.finger/ @maxackley /types/jquery.flagstrap/ @felipedgarcia @@ -2732,11 +2782,12 @@ /types/js-string-escape/ @viralpickaxe /types/js-to-java/ @skyitachi /types/js-url/ @pine +/types/js-worker-search/ @pbalogh /types/js-yaml/ @Bartvds @sclausen @ExE-Boss /types/js.spec/ @mattbishop /types/jsbn/ @Evgenus @al2xed /types/jschannel/ @yitzchok @McFlat -/types/jscodeshift/ @brieb @bjacobel +/types/jscodeshift/ @brieb @bjacobel @willtn /types/jscrollpane/ @qcz /types/jsdeferred/ @minodisk /types/jsdoc-to-markdown/ @adamzerella @peterblazejewicz @@ -2747,7 +2798,7 @@ /types/jsend/ @CaselIT /types/jsesc/ @Bartvds @Lyanbin /types/jsfl/ @soywiz -/types/jsforce/ @dolanmiu @netes @amphro @tnoonan-salesforce @whiteabelincoln @borys-kupar @catalandres @kenhuman @douglascayers +/types/jsforce/ @dolanmiu @netes @amphro @tnoonan-salesforce @whiteabelincoln @borys-kupar @catalandres @kenhuman @douglascayers @Arlodotexe /types/jsftp/ @xyleen /types/jsgraph/ @rosinbum /types/jshamcrest/ @dharkness @@ -2785,8 +2836,8 @@ /types/json_ml/ @pluma /types/jsonabc/ @ffflorian /types/jsonapi-serializer/ @chiangf -/types/jsoneditor/ @alejo90 @errietta @adamvig -/types/jsoneditor-for-react/ @joshuakgoldberg +/types/jsoneditor/ @alejo90 @errietta @adamvig @joepkockelkorn +/types/jsoneditor-for-react/ @joshuakgoldberg @joepkockelkorn /types/jsoneditoronline/ @vbortone /types/jsonfile/ @dbowring @BendingBender /types/jsonfile/v4/ @dbowring @@ -2861,8 +2912,10 @@ /types/kamailio-kemi/ @bonan /types/kap-plugin/ @connor4312 /types/karma/ @tkrotoff @43081j @devoto13 @peterblazejewicz +/types/karma/v4/ @tkrotoff @43081j @devoto13 @peterblazejewicz /types/karma/v3/ @tkrotoff @43081j @devoto13 @peterblazejewicz /types/karma/v1/ @tkrotoff @43081j +/types/karma-brief-reporter/ @peterblazejewicz /types/karma-browserify/ @peterblazejewicz /types/karma-browserstack-launcher/ @peterblazejewicz /types/karma-chai/ @JayAndCatchFire @@ -2874,16 +2927,23 @@ /types/karma-env-preprocessor/ @peterblazejewicz /types/karma-firefox-launcher/ @peterblazejewicz /types/karma-fixture/ @evictor @afshawnlotfi +/types/karma-html-detailed-reporter/ @peterblazejewicz /types/karma-ie-launcher/ @peterblazejewicz /types/karma-jasmine/ @michelsalib @peterblazejewicz /types/karma-jasmine-html-reporter/ @peterblazejewicz +/types/karma-jasmine-spec-tags/ @peterblazejewicz +/types/karma-jsdom-launcher/ @peterblazejewicz /types/karma-json-preprocessor/ @peterblazejewicz /types/karma-json-to-file-reporter/ @peterblazejewicz /types/karma-junit-reporter/ @peterblazejewicz +/types/karma-material-reporter/ @peterblazejewicz /types/karma-mocha/ @peterblazejewicz /types/karma-mocha-reporter/ @peterblazejewicz +/types/karma-parallel/ @peterblazejewicz /types/karma-remap-coverage/ @peterblazejewicz +/types/karma-snapshot/ @peterblazejewicz /types/karma-spec-reporter/ @peterblazejewicz +/types/karma-summary-reporter/ @peterblazejewicz /types/karma-webpack/ @mtraynham /types/katex/ @mrand01 @knguyen0125 @dreamerblue @s-weigand @sapphi-red /types/kcors/ @Xstoudi @izayoiko @@ -2901,12 +2961,12 @@ /types/keymaster/ @nitram509 /types/keymirror/ @jfahrenkrug /types/keypress.js/ @rcchen -/types/keystonejs__adapter-knex/ @thekevinbrown +/types/keystonejs__adapter-knex/ @thekevinbrown @abhijithvijayan /types/keystonejs__adapter-mongoose/ @thekevinbrown @tclain /types/keystonejs__apollo-helpers/ @thekevinbrown @tclain /types/keystonejs__app-admin-ui/ @thekevinbrown @tclain /types/keystonejs__app-graphql/ @thekevinbrown @tclain -/types/keystonejs__app-next/ @thekevinbrown @tclain +/types/keystonejs__app-next/ @thekevinbrown @tclain @abhijithvijayan /types/keystonejs__app-nuxt/ @thekevinbrown @tclain /types/keystonejs__app-static/ @thekevinbrown @tclain /types/keystonejs__auth-passport/ @thekevinbrown @@ -2914,7 +2974,7 @@ /types/keystonejs__email/ @thekevinbrown @tclain /types/keystonejs__fields/ @thekevinbrown @tclain /types/keystonejs__file-adapters/ @thekevinbrown -/types/keystonejs__keystone/ @thekevinbrown @tclain +/types/keystonejs__keystone/ @thekevinbrown @tclain @abhijithvijayan /types/keystonejs__list-plugins/ @thekevinbrown @tclain /types/keystonejs__logger/ @thekevinbrown @tclain /types/keystonejs__oembed-adapters/ @thekevinbrown @@ -3045,6 +3105,7 @@ /types/latinize/ @GiedriusGrabauskas /types/latlon-geohash/ @rimig /types/launchpad/ @rictic +/types/layui-layer/ @943297456 /types/layzr.js/ @shermendev /types/lazy-brush/ @ksocha /types/lazy-property/ @jank1310 @@ -3079,7 +3140,7 @@ /types/leaflet.awesome-markers/ @sebek64 /types/leaflet.awesome-markers/v0/ @Odrin @sebek64 /types/leaflet.featuregroup.subgroup/ @drtomato -/types/leaflet.fullscreen/ @wcomartin +/types/leaflet.fullscreen/ @wcomartin @danmana /types/leaflet.gridlayer.googlemutant/ @ernest-rhinozeros /types/leaflet.heat/ @onderceylan /types/leaflet.icon.glyph/ @BePo65 @@ -3115,6 +3176,7 @@ /types/lexicographic-integer/ @me /types/libnpmsearch/ @ChaosinaCan /types/libpq/ @Lodin +/types/libqp/ @webstech /types/librato-node/ @jgeurts /types/libsodium-wrappers/ @ffflorian /types/libsodium-wrappers-sumo/ @ffflorian @@ -3151,11 +3213,13 @@ /types/loadable__webpack-plugin/ @skovy /types/loader-runner/ @e-cloud /types/loader-utils/ @Perlmint @TotooriaHyperion +/types/loadicons/ @peterblazejewicz /types/loadjs/ @screendriver @azizhk /types/loadware/ @ALyman /types/lobibox/ @itboy87 /types/local-dynamo/ @Sicilica /types/local-storage/ @tup1tsa +/types/locale/ @forivall /types/localized-countries/ @coderslagoon /types/localizejs-library/ @salbahra /types/localtunnel/ @vladhrapov @noamalffasy @@ -3471,6 +3535,7 @@ /types/loopback/ @kattsushi @enko @sequoia @drmikecrowe @karimsa /types/loopback-boot/ @kattsushi /types/loopbench/ @BendingBender +/types/looper/ @jacobbubu /types/lory.js/ @kubosho @milkisevil /types/lossless-json/ @andrevmatos /types/lovefield/ @freshp86 @zackzeno @@ -3482,11 +3547,11 @@ /types/lscache/ @Chris-Martinezz @c-py /types/ltx/ @PJakcson @BendingBender /types/luaparse/ @stpettersens @thomasfn @teoxoy @zaoqi -/types/lucene/ @bengry +/types/lucene/ @bengry @HugoMuller /types/lunr/ @seantanly @hokiegeek /types/lunr/v0/ @sebastian-lenz /types/lusca/ @crutchcorn @builtinnya -/types/luxon/ @colbydehart @FourwingsY @jsiebern @mastermatt @pietrovismara @dawnmist @ycmjason @mdanka @Aitor1995 +/types/luxon/ @colbydehart @FourwingsY @jsiebern @mastermatt @pietrovismara @dawnmist @ycmjason @mdanka @Aitor1995 @peterblazejewicz /types/lwip/ @AyaMorisawa /types/lyric-parser/ @wkl007 /types/lyricist/ @DadUndead @@ -3513,7 +3578,7 @@ /types/mangopay2-nodejs-sdk/ @ifiokjr /types/map-to-obj/ @JasonHK /types/mapbox/ @anahkiasen @Fluccioni -/types/mapbox-gl/ @dobrud @patrickr @macobo @dmytro-gokun @LiamAttClarke @life777 @mklopets +/types/mapbox-gl/ @dobrud @patrickr @macobo @dmytro-gokun @LiamAttClarke @life777 @mklopets @amxfonseca /types/mapbox-gl-leaflet/ @agorshkov23 /types/mapbox__geo-viewport/ @fnberta /types/mapbox__geojson-area/ @n0nick @@ -3527,7 +3592,8 @@ /types/mapsjs/ @davismj /types/mariasql/ @bennett000 /types/mark.js/ @renjfk @RomanGotsiy @LucianBuzzo @blackstarzes -/types/markdown-it/ @rapropos +/types/markdown-draft-js/ @yurist38 +/types/markdown-it/ @rapropos @duduluu /types/markdown-it-anchor/ @seryl /types/markdown-it-container/ @hronex /types/markdown-it-lazy-headers/ @knom @@ -3538,6 +3604,7 @@ /types/markdownlint/ @ark120202 /types/marked/ @worr @BendingBender @CrossR @mwickett @htkzhtm @ezracelli /types/marked-terminal/ @bkendall +/types/markedjs__html-differ/ @peterblazejewicz /types/marker-animate-unobtrusive/ @viskin /types/markitup/ @drillbits /types/marko/ @darkwebdev @@ -3548,6 +3615,7 @@ /types/massive/v3/ @swissspidy @clarenceh /types/match-media-mock/ @asvetliakov /types/match-sorter/ @claasahl @chrisru @rriski +/types/matchdep/ @tpluscode /types/material-design-lite/ @bradzacher /types/material-ui/ @ngbrown @theigor @alitaheri @herrmanno @DaIgeb @allienna @schlesingermatthias @InsidersByte @artyomsv @dan-j @minodisk @samwalshnz @reggino /types/material-ui-datatables/ @coding2012 @@ -3581,18 +3649,19 @@ /types/material__top-app-bar/ @BrentDouglas @ckosti /types/materialize-css/ @huww98 @MaximBalaganskiy @MonizDave @broccoliarchy @SnowyLeopard /types/materialize-css/v0/ @eriklieben @leonyu @SinghSukhdeep @jfcere @scote @LiadIdan +/types/math-expression-evaluator/ @adamzerella /types/math-random/ @Richienb /types/math-sign/ @djcsdy /types/math-trunc/ @djcsdy /types/math3d/ @laszlojakab @jimsmart /types/mathjax/ @rolandzwaga -/types/mathjs/ @siavol @andnp @bradbesserman @pawkrol @charlee +/types/mathjs/ @siavol @andnp @bradbesserman @pawkrol @charlee @mark-wiemer /types/matrix-appservice-bridge/ @huan -/types/matrix-js-sdk/ @huan +/types/matrix-js-sdk/ @huan @andrevmatos /types/matter-js/ @piranha771 @hasparus @dwhinham @slikts /types/mcrypt/ @pluma /types/mcustomscrollbar/ @flurg -/types/md5/ @arcdev1 @jprogrammer +/types/md5/ @arcdev1 @jprogrammer @peterblazejewicz /types/md5-file/ @BamButz /types/mdast/ @lujun2 /types/mdns/ @reppners @@ -3617,6 +3686,7 @@ /types/merge-descriptors/ @danny8002 /types/merge-env/ @BendingBender /types/merge-images/ @BendingBender +/types/merge-img/ @peterblazejewicz /types/merge-objects/ @Richienb /types/merge-stream/ @k-kagurazaka @tomxtobin @daniel-zazula @djcsdy /types/merge2/ @tkrotoff @smac89 @@ -3628,7 +3698,7 @@ /types/mess/ @Nemo157 /types/messenger/ @derekcicerone /types/metalsmith/ @brian-lagerman -/types/meteor/ @barbatus @fullflavedave @orefalo @dagatsoin @birkskyum @ardatan @stefanholzapfel @andrei-markeev @lmachens @gunn @alesn @perbergland @nicu-chiciuc @ebroder +/types/meteor/ @barbatus @fullflavedave @orefalo @dagatsoin @birkskyum @ardatan @stefanholzapfel @andrei-markeev @lmachens @gunn @alesn @perbergland @nicu-chiciuc @ebroder @radekmie /types/meteor-accounts-phone/ @DAB0mB /types/meteor-astronomy/ @Deadly0 /types/meteor-collection-hooks/ @twastvedt @@ -3639,7 +3709,7 @@ /types/meteor-roles/ @vangorra @mattmm3d /types/meteor-universe-i18n/ @mathewmeconry @radekmie /types/method-override/ @santialbo -/types/methods/ @cprecioso +/types/methods/ @cprecioso @michelbitter /types/metric-suffix/ @davidm77 /types/meyda/ @eramdam @hughrawlinson /types/mfiles/ @avonwyss @@ -3662,9 +3732,9 @@ /types/milkcocoa/ @odangosan /types/millisecond/ @xeoneux /types/mime/ @jedigo @dhritzkiv -/types/mime-db/ @AJamesPhillips +/types/mime-db/ @AJamesPhillips @LinusU /types/mime-types/ @Perlmint -/types/mimos/ @AJamesPhillips +/types/mimos/ @AJamesPhillips @LinusU /types/min-document/ @ifiokjr /types/min-indent/ @BendingBender /types/mina/ @lhk @mattanja @kant2002 @@ -3688,12 +3758,13 @@ /types/mixpanel/ @hjellek @Manduro /types/mixpanel-browser/ @karlos1337 @RicardoRodrigues /types/mixto/ @vvakame -/types/mjml/ @aahoughton @marpstar @eiskalteschatten +/types/mjml/ @aahoughton @marpstar @eiskalteschatten @emrah88 /types/mjml-react/ @henrinormak /types/mkcert/ @asachin96 /types/mkdirp/ @Bartvds @mrmlnc /types/mkpath/ @optical /types/ml-levenberg-marquardt/ @m93a +/types/mobile-messaging-cordova/ @kostap13 @tjuric /types/mobx-apollo/ @pselden /types/mocha/ @kazimanzurrashid @otiai10 @jt000 @enlight @cspotcode @1999 /types/mocha-each/ @magnostherobot @nmay231 @@ -3703,6 +3774,7 @@ /types/mocha-sugar-free/ @ExE-Boss /types/mochaccino/ @thomas-p /types/mock-aws-s3/ @bluehatbrit +/types/mock-express-request/ @me /types/mock-fs/ @Nemo157 @tkqubo @Seally /types/mock-knex/ @jessezhang91 @scttcper /types/mock-raf/ @djpereira @@ -3726,13 +3798,14 @@ /types/moment-round/ @jacobbaskin /types/moment-shortformat/ @whatasoda /types/moment-strftime2/ @dex4er -/types/moment-timezone/ @michelsalib @alanblins @asermax @borys-kupar +/types/moment-timezone/ @michelsalib @alanblins @asermax @borys-kupar @pristinesource /types/money-math/ @taoqf /types/mongo-sanitize/ @CedricCazin @penumbra1 -/types/mongodb/ @CaselIT @alanmarcell @bitjson @dante-101 @mcortesi @EnricoPicci @AJCStriker @julien-c @daprahamian @denys-bushulyak @BastienAr @sindbach @geraldinelemeur @jishi @various89 @angela-1 @lirbank @hector7 @floric @erikc5000 @Manc @jloveridge @ranguna @HosseinAgha @albertossilva @Rauno56 @peterblazejewicz @LinusU +/types/mongodb/ @CaselIT @alanmarcell @bitjson @dante-101 @mcortesi @EnricoPicci @AJCStriker @julien-c @daprahamian @denys-bushulyak @BastienAr @sindbach @geraldinelemeur @jishi @various89 @angela-1 @lirbank @hector7 @floric @erikc5000 @Manc @jloveridge @ranguna @HosseinAgha @albertossilva @Rauno56 @peterblazejewicz @LinusU @taxilian @xamgore @avaly /types/mongodb/v2/ @CaselIT @alanmarcell @bitjson @dante-101 @mcortesi +/types/mongodb-queue/ @FiveOFive /types/mongodb-uri/ @mernxl -/types/mongoose/ @horiuchi @lukasz-zak @Alorel @jendrikw @ethanresnick @vologab @jussikinnula @ondratra @alfirin @idandrd @various89 @Fazendaaa @NormanPerrin @stablio @emmanuelgautier @frontendmonster @mingchen @penumbra1 @orblazer @HughKu @niuware @vladmel1234 @jloveridge @grimmer0125 @richarddd @ToucheSir @borfig @dinodeSimon @anthony-kenikh @iamchathu @lkho @tomyam1 @nephix @rlaace423 @ChazEpps +/types/mongoose/ @horiuchi @lukasz-zak @Alorel @jendrikw @ethanresnick @vologab @jussikinnula @ondratra @alfirin @idandrd @various89 @Fazendaaa @NormanPerrin @stablio @emmanuelgautier @frontendmonster @mingchen @penumbra1 @orblazer @HughKu @niuware @vladmel1234 @jloveridge @grimmer0125 @richarddd @ToucheSir @borfig @dinodeSimon @anthony-kenikh @iamchathu @lkho @tomyam1 @nephix @rlaace423 @ChazEpps @avaly @JanNemcik @cl3dson @richardsimko /types/mongoose/v4/ @simonxca @horiuchi @lukasz-zak @murbanowicz @bodinsamuel /types/mongoose-auto-increment/ @AyaMorisawa /types/mongoose-autopopulate/ @rann91 @@ -3742,11 +3815,11 @@ /types/mongoose-lean-virtuals/ @isaacdecoded /types/mongoose-mock/ @jt000 /types/mongoose-paginate/ @linusbrolin @simonxca -/types/mongoose-paginate-v2/ @linusbrolin @simonxca @woutgg @oktapodia @ChazEpps +/types/mongoose-paginate-v2/ @linusbrolin @simonxca @woutgg @oktapodia @ChazEpps @gamsterx /types/mongoose-promise/ @simonxca /types/mongoose-seeder/ @Crevil /types/mongoose-sequence/ @linusbrolin -/types/mongoose-simple-random/ @rsxdalv +/types/mongoose-simple-random/ @typescript-bot /types/mongoose-unique-validator/ @stevehipwell /types/mongorito/ @pinguet62 /types/mongration/ @soulthreads @@ -3766,7 +3839,9 @@ /types/mozjpeg/ @hikoma /types/mpromise/ @sgkim126 /types/mri/ @shiftkey @j-f1 +/types/mrz/ @forivall /types/ms/ @danny8002 +/types/ms.macro/ @ckknight /types/msgpack-lite/ @endel @efokschaner /types/msgpack5/ @wokim @heycalmdown /types/msnodesql/ @borisyankov @SomaticIT @@ -3807,7 +3882,7 @@ /types/mustache-express/ @BendingBender /types/mutexify/ @maistho /types/mv/ @nenadalm -/types/mysql/ @wjohnsto @kacepe @kpping @jdmunro +/types/mysql/ @wjohnsto @kacepe @kpping @jdmunro @sedenardi /types/mysql-import/ @bengry /types/mz/ @ThomasHickman @ExE-Boss /types/n-readlines/ @merrickking @@ -3838,6 +3913,7 @@ /types/nconf/ @jedigo @jmthibault @ew73 /types/ncp/ @bartvds @belemaire @ExE-Boss /types/ndarray/ @pawsong @taoqf +/types/ndjson/ @yoursunny /types/ndn-js/ @yoursunny /types/nearley/ @deltaidea @BendingBender /types/neat-csv/ @calamitizer @@ -3901,7 +3977,7 @@ /types/noble/ @swook @shantanubhadoria @lukel99 @bioball @keton @thegecko @claytonkucera /types/noble-mac/ @swook @shantanubhadoria @lukel99 @bioball @keton @thegecko /types/nodal/ @charrondev -/types/node/ @Microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @btoueg @brunoscheufler @smac89 @tellnes @touffy @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @ajafff @islishude @mwiktorczyk @mohsen1 @n-e @octo-sniffle @galkin @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @ZaneHannanAU @samuela @kuehlein @j-oliveras @bhongy @chyzwar @trivikr @nguymin4 @yoursunny @qwelias @ExE-Boss @Ryan-Willpower +/types/node/ @Microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @btoueg @brunoscheufler @smac89 @tellnes @touffy @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @ajafff @islishude @mwiktorczyk @mohsen1 @n-e @octo-sniffle @galkin @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @samuela @kuehlein @j-oliveras @bhongy @chyzwar @trivikr @nguymin4 @yoursunny @qwelias @ExE-Boss @Ryan-Willpower @peterblazejewicz /types/node/v12/ @Microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @btoueg @brunoscheufler @smac89 @tellnes @touffy @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @ajafff @islishude @mwiktorczyk @mohsen1 @n-e @octo-sniffle @galkin @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @ZaneHannanAU @samuela @kuehlein @j-oliveras @bhongy @chyzwar @trivikr @nguymin4 @yoursunny @qwelias @ExE-Boss /types/node/v11/ @Microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @btoueg @brunoscheufler @smac89 @tellnes @touffy @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @ajafff @islishude @mwiktorczyk @mohsen1 @n-e @octo-sniffle @galkin @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @ZaneHannanAU @jeremiergz @samuela @kuehlein @j-oliveras @bhongy @ivansieder @nguymin4 @ExE-Boss /types/node/v10/ @Microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @brunoscheufler @smac89 @tellnes @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @ajafff @islishude @mwiktorczyk @mohsen1 @n-e @octo-sniffle @galkin @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @ZaneHannanAU @jeremiergz @samuela @kuehlein @j-oliveras @bhongy @nguymin4 @ExE-Boss @@ -3913,7 +3989,9 @@ /types/node/v0/ @Microsoft @DefinitelyTyped /types/node-7z/ @erkie /types/node-abi/ @ffflorian +/types/node-apple-receipt-verify/ @serinuntius /types/node-array-ext/ @Beng89 +/types/node-browser-history/ @arindamdawn /types/node-calendar/ @luzianz /types/node-cleanup/ @agadar /types/node-crate/ @gjednaszewski @@ -3925,9 +4003,9 @@ /types/node-easy-cert/ @SomaticIT /types/node-emoji/ @jonestristand @styu @rimiti /types/node-expat/ @winston01 -/types/node-fetch/ @torstenwerner @nikcorg @vinaybedre @kyranet @AndrewLeedham @JasonLi914 @wilsonianb @southpolesteve @ExE-Boss @alexandrusavin @OmgImAlexis +/types/node-fetch/ @torstenwerner @nikcorg @vinaybedre @kyranet @AndrewLeedham @JasonLi914 @wilsonianb @southpolesteve @ExE-Boss @alexandrusavin @OmgImAlexis @kbkk /types/node-fibers/ @caryhaynie -/types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 @beenotung @joeflateau @Apologiz @timhwang21 @supaiku0 @andersk @saschazar21 @rogierschouten @aseevia +/types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 @beenotung @joeflateau @Apologiz @timhwang21 @supaiku0 @andersk @saschazar21 @rogierschouten @aseevia @wiktor-k /types/node-gcm/ @horiuchi /types/node-geocoder/ @rosek86 /types/node-getopt/ @kcauchy @@ -3946,11 +4024,14 @@ /types/node-mailjet/ @Nikola-Andreev /types/node-memwatch/ @Kroisse /types/node-mysql-wrapper/ @kataras -/types/node-notifier/ @tkQubo @loryman +/types/node-notifier/ @tkQubo @loryman @peterblazejewicz +/types/node-notifier/v5/ @tkQubo @loryman /types/node-observer/ @CwjXFH /types/node-openload/ @saschazar21 /types/node-os-utils/ @bacali95 +/types/node-pdftk/ @ascariandrea /types/node-persist/ @spencerwi @samuelthomas2774 +/types/node-phpass/ @DefinitelyTyped /types/node-polyglot/ @timjk @liamross @pmmmwh /types/node-powershell/ @rodrigoff /types/node-pushnotifications/ @menushka @jaulz @@ -3966,9 +4047,10 @@ /types/node-snap7/ @heilingbrunner /types/node-sprite-generator/ @Perlmint /types/node-ssdp/ @OrionNebula +/types/node-ssh/ @yoursunny /types/node-static/ @Morfent /types/node-statsd/ @alexturek @convoyinc -/types/node-telegram-bot-api/ @ammuench @agadar @Dabolus @Kallu609 @XC-Zhang @adityathebe +/types/node-telegram-bot-api/ @ammuench @agadar @Dabolus @Kallu609 @XC-Zhang @adityathebe @MiklerGM /types/node-timecodes/ @ra-gg /types/node-uuid/ @jeffmay /types/node-vagrant/ @MasterOdin @@ -4024,6 +4106,7 @@ /types/npm-packlist/ @ajafff /types/npm-paths/ @BendingBender /types/npm-registry-fetch/ @ChaosinaCan +/types/npm-registry-fetch/v4/ @ChaosinaCan /types/npm-registry-package-info/ @ffflorian /types/npm-run/ @manuth /types/npm-user-packages/ @BendingBender @@ -4081,12 +4164,14 @@ /types/oblo-util/ @Oblosys /types/oboe/ @optical /types/observe-js/ @herrmanno +/types/obsolete-web/ @peterblazejewicz /types/oclazyload/ @rolandzwaga /types/ofe/ @Morfent -/types/office-js/ @OfficeDev @Zlatkovsky @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT @sumurthy -/types/office-js-preview/ @OfficeDev @Zlatkovsky @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT @sumurthy -/types/office-runtime/ @OfficeDev @Zlatkovsky @mscharlock @davidchesnut @AlexJerabek @sumurthy @rick-kirkham +/types/office-js/ @OfficeDev @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT @sumurthy +/types/office-js-preview/ @OfficeDev @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT @sumurthy +/types/office-runtime/ @OfficeDev @mscharlock @davidchesnut @AlexJerabek @sumurthy @rick-kirkham /types/offline-js/ @cgwrench +/types/offscreen-canvas/ @peterblazejewicz /types/offscreencanvas/ @kayahr @ova2 /types/oibackoff/ @geoffreak /types/oidc-token-manager/ @rosieks @@ -4108,6 +4193,9 @@ /types/onionoo/ @BendingBender /types/ontime/ @Hirse /types/open-graph/ @ffflorian +/types/open-wc__testing-karma/ @peterblazejewicz +/types/open-wc__testing-karma-bs/ @peterblazejewicz +/types/open-wc__webpack-import-meta-loader/ @peterblazejewicz /types/openapi-factory/ @runebaas /types/opener/ @tikurahul /types/openfin/ @chrisbarker @rdepena @whyn07m3 @licui3936 @tomer-openfin @@ -4124,7 +4212,7 @@ /types/openlayers/ @osechet @wb14123 @mylen @iamthechad @danmana @yairtawil @pierremarc @hauke96 @gberaudo /types/openlayers/v3/ @osechet @matthiasdailey-ccri /types/openlayers/v2/ @bolhovsky -/types/openpgp/ @errietta @damonpam @po5i @ecamellini @SardineFish @nwtgck +/types/openpgp/ @errietta @damonpam @po5i @ecamellini @SardineFish @nwtgck @vansergen /types/openssi-websdk/ @arner /types/openstack-wrapper/ @sanjaymadane /types/opentok/ @westy92 @CatGuardian @pronebird @@ -4140,7 +4228,7 @@ /types/oracledb/v3/ @Bigous @connorjayfitzgerald /types/orchestrator/ @tkQubo @TeamworkGuy2 /types/orderedmap/ @bradleyayers -/types/orientjs/ @saeedtabrizi +/types/orientjs/ @saeedtabrizi @aleksey-rezvov /types/original/ @wcarson /types/os-homedir/ @mhegazy /types/os-service/ @magginichi @@ -4152,8 +4240,10 @@ /types/ospec/ @maranomynet @spacejack @isiahmeadows /types/osrm/ @DenisCarriere /types/osrs-json-api/ @kylemiller3 +/types/ot/ @christianalfoni @CompuIves @MichaelDeBoey /types/ouibounce/ @LiquidPL /types/overlayscrollbars/ @KingSora +/types/overload-protection/ @dornfeder /types/owasp-password-strength-test/ @stephtr /types/owl.carousel/ @igorissen @KennethanCeyer /types/owlcarousel/ @dpiatkowski @@ -4161,9 +4251,11 @@ /types/p-loading/ @renjfk /types/p2/ @clark-stevenson @jramstedt @JellyAlex /types/p5/ @p5-types @Zalastax +/types/pa11y/ @adamzerella /types/package-info/ @ffflorian /types/packery/ @piraveen @hanssens /types/pacote/ @ChaosinaCan +/types/pacote/v9/ @ChaosinaCan /types/pad-left/ @Richienb /types/page/ @43081j /types/pager__jackrabbit/ @dagams @@ -4187,7 +4279,9 @@ /types/parse/v1/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas /types/parse-author/ @remcohaszing /types/parse-color/ @ajcrites +/types/parse-duration/ @richardsimko /types/parse-filepath/ @BendingBender +/types/parse-full-name/ @n8Guy /types/parse-git-config/ @leonard-thieu @deltaidea @BendingBender /types/parse-git-config/v2/ @leonard-thieu @deltaidea /types/parse-github-url/ @ajafff @@ -4215,7 +4309,7 @@ /types/parsecurrency/ @cristianrgreco /types/parseurl/ @bomret /types/parsimmon/ @Bartvds @mizunashi-mana @bcherny @bvanreeven @leonard-thieu @MrJohz @caasi -/types/passport/ @horiuchi @enaeseth @theigor @tlaziuk @danielpa9708 @kstiehl @vaskevich +/types/passport/ @horiuchi @enaeseth @theigor @tlaziuk @unindented @kstiehl @vaskevich /types/passport-anonymous/ @0x6368656174 /types/passport-auth0/ @johnbendi @iamvishnusankar @duncanhall @karlhorky /types/passport-azure-ad/ @ShekharNain @@ -4232,6 +4326,7 @@ /types/passport-google-oauth20/ @yasupeke @ezintz @ngtan @acerbic /types/passport-http/ @krizalys @tlaziuk @cjbarth @jamesadarich /types/passport-http-bearer/ @isman-usoh +/types/passport-instagram/ @sagar7993 /types/passport-jwt/ @jindev @stbychkov /types/passport-kakao/ @Park9eon @zerocho /types/passport-linkedin-oauth2/ @andrewvetovitz @@ -4239,7 +4334,7 @@ /types/passport-local-mongoose/ @linusbrolin /types/passport-microsoft/ @skrud /types/passport-naver/ @Park9eon @zerocho -/types/passport-oauth2/ @pasieronen @WangZishi @EduardoAC @ivan94 +/types/passport-oauth2/ @pasieronen @WangZishi @EduardoAC @ivan94 @daphnesmit /types/passport-oauth2-client-password/ @akaNightmare /types/passport-oauth2-refresh/ @daphnesmit @btorresgil /types/passport-remember-me-extended/ @AylaJK @@ -4268,18 +4363,22 @@ /types/paystack/ @sheghun /types/pbf/ @cschwarz /types/pbkdf2/ @timonegk +/types/pdf-fill-form/ @lodi-g /types/pdf-image/ @nicklatkovich +/types/pdf-viewer-reactjs/ @ansu5555 /types/pdf2image/ @taoqf /types/pdfjs-dist/ @jbaldwin @1999 /types/pdfkit/ @erichillah @she11sh0cked -/types/pdfmake/ @m1llen1um @radziksh @evolkmann @andipaetzold @nmummau +/types/pdfmake/ @m1llen1um @radziksh @evolkmann @andipaetzold @nmummau @jeralm /types/pdfobject/ @nielsboogaard /types/pebblekitjs/ @makotokw /types/peer-dial/ @RealTYPICAL /types/pegjs/ @vvakame @SrTobi @siegebell +/types/pell/ @Lunrtick /types/pem/ @tony19 @DethAriel /types/pem-jwk/ @alessiopcc /types/pendo-io-browser/ @aaronbeall +/types/perfy/ @peterblazejewicz /types/permit/ @jannikkeye /types/persona/ @Nycto /types/pet-finder-api/ @ncipollina @@ -4310,6 +4409,7 @@ /types/photoswipe/ @hellochar @PikachuEXE /types/php-serialize/ @blurfx /types/physijs/ @gyohk +/types/pi-camera/ @ataberkylmz /types/pi-spi/ @marcel-ernst /types/pica/ @hmtylmz /types/pick-deep/ @ElliottCampbellJHA @eheikes @@ -4327,33 +4427,34 @@ /types/pinkyswear/ @chances /types/pino/ @psnider @BendingBender @screendriver @paambaati @alferpal @mortiy @lummish @raoulus @Cooryd @AdamVig @austin-beer @Pegase745 /types/pino/v3/ @psnider -/types/pino-http/ @screendriver @jdforsythe @tough-griff +/types/pino-http/ @screendriver @jdforsythe @tough-griff @yorch /types/pino-multi-stream/ @JakeGinnivan /types/pino-std-serializers/ @connorjayfitzgerald /types/pinterest-sdk/ @adamburmister /types/pinyin/ @wanganjun /types/piwik-tracker/ @lbguilherme -/types/pixelmatch/ @iamolegga +/types/pixelmatch/ @iamolegga @peterblazejewicz /types/pixl-xml/ @evanshortiss /types/pizzip/ @Slessi /types/pkcs7-padding/ @svetkomir /types/pkgcloud/ @dantman @ScriptSmith @heuperman /types/pkijs/ @microshine /types/places/ @ghizlanelotfi -/types/plaid-link/ @afholderman +/types/plaid-link/ @afholderman @brolaugh /types/platform/ @JakeH /types/playerframework/ @ricardosabino /types/playmusic/ @nickp10 /types/pleasejs/ @nakakura /types/plist/ @higuri -/types/plotly.js/ @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart @szechyjs @MercifulCode @soorajpudiyadath @jonfreedman @meganrm @milesjos @skippercool @zeroyoichihachi @mtadams007 @marnett-git +/types/plotly.js/ @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart @szechyjs @MercifulCode @soorajpudiyadath @jonfreedman @meganrm @milesjos @skippercool @zeroyoichihachi @mtadams007 @marnett-git @peterblazejewicz @brammitch @blizzardjessica /types/plugapi/ @BNedry /types/plugin-error/ @rogierschouten /types/plupload/ @patrickbussmann /types/pluralize/ @ukyo @karol-majewski /types/plurals-cldr/ @ChaosinaCan +/types/png-img/ @peterblazejewicz /types/png.js/ @ffflorian -/types/pngjs/ @jason0x43 @ffflorian +/types/pngjs/ @jason0x43 @ffflorian @peterblazejewicz /types/pngquant-bin/ @hikoma /types/pnpapi/ @arcanis /types/podcast/ @nikeee @malob @@ -4385,7 +4486,9 @@ /types/portscanner/ @douglasduteil /types/postal/ @lokeshpeta @myitcv /types/postcss-calc/ @huan086 +/types/postcss-custom-properties/ @peterblazejewicz /types/postcss-icss-values/ @huan086 +/types/postcss-import/ @remcohaszing /types/postcss-load-config/ @bmatcuk /types/postcss-modules-extract-imports/ @huan086 /types/postcss-modules-local-by-default/ @huan086 @@ -4393,10 +4496,11 @@ /types/postcss-modules-scope/ @huan086 /types/postcss-modules-values/ @bmatcuk /types/postcss-nested/ @VorontsovMaxim +/types/postcss-reporter/ @peterblazejewicz /types/postcss-url/ @lenovouser /types/poster-image/ @ffflorian /types/postlight__mercury-parser/ @malob -/types/postman-collection/ @kbuzby +/types/postman-collection/ @kbuzby @XVincentX /types/postmate/ @wcarson /types/pouch-redux-middleware/ @charrondev /types/pouchdb/ @AGBrown @geppy @fredgalvao @@ -4422,6 +4526,7 @@ /types/power-assert-formatter/ @vvakame /types/powerapps-component-framework/ @jopursle @ghurlman /types/powerbi-visuals-tools/ @zBritva @Microsoft +/types/pre-suf/ @peterblazejewicz /types/preact-i18n/ @ltetzlaff /types/precise/ @codeanimal /types/precond/ @olsio @@ -4430,11 +4535,14 @@ /types/preloadjs/ @endel /types/prelude-ls/ @AyaMorisawa /types/prettier/ @ikatyang @ifiokjr @ffflorian @sosukesuzuki +/types/prettier-linter-helpers/ @JounQin /types/prettier-package-json/ @djcsdy /types/pretty/ @adamzerella /types/pretty-hrtime/ @BendingBender +/types/pretty-quick/ @peterblazejewicz /types/pretty-time/ @adamzerella /types/preval.macro/ @huan086 +/types/primus/ @tellnes /types/priorityqueuejs/ @geoffreak /types/prismic-dom/ @nickw444 @sbilstein @douglasnomizo @henrymyers /types/prismjs/ @RunDevelopment @ExE-Boss @eriklieben @andrewiggins @mmiszy @@ -4443,6 +4551,7 @@ /types/procfs-stats/ @cyrilschumacher /types/proclaim/ @adamzerella /types/progress/ @sebastian-lenz +/types/progress-bar-webpack-plugin/ @peterblazejewicz /types/progress-stream/ @mickdekkers /types/progressbar/ @atd-schubert /types/progressjs/ @zaneli @@ -4479,7 +4588,7 @@ /types/prompt-sync/ @MugeSo /types/prompt-sync-history/ @MugeSo /types/promptly/ @danrspencer @alexilyaev -/types/prompts/ @Berkays @danielpa9708 @kamontat @theweirdone @whoaa512 +/types/prompts/ @Berkays @unindented @kamontat @theweirdone @whoaa512 /types/prop-types/ @DovydasNavickas @ferdaber @eps1lon /types/proper-lockfile/ @qlonik @LinusU @ulrichb /types/proper-url-join/ @jsamr @@ -4574,7 +4683,7 @@ /types/radix64/ @huan086 /types/raf/ @BenLorantfy /types/raf-schd/ @adambrgmn -/types/ramda/ @TheHandsomeCoder @donnut @mdekrey @mrdziuban @sbking @afharo @teves-castro @1M0reBug @hojberg @samsonkeung @angeloocana @raynerd @moshensky @ethanresnick @deftomat @blimusiek @biern @rayhaneh @rgm @drewwyatt @jottenlips @minitesh @krantisinh @pirix-gh @brekk @nemo108 @jituanlin @Philippe-mills @Saul-Mirone +/types/ramda/ @TheHandsomeCoder @donnut @mdekrey @sbking @afharo @teves-castro @1M0reBug @hojberg @samsonkeung @angeloocana @raynerd @moshensky @ethanresnick @deftomat @blimusiek @biern @rayhaneh @rgm @drewwyatt @jottenlips @minitesh @krantisinh @pirix-gh @brekk @nemo108 @jituanlin @Philippe-mills @Saul-Mirone @Nicholaiii /types/random/ @sandersn @kijowski /types/random-boolean/ @BendingBender /types/random-bytes/ @me @@ -4589,8 +4698,9 @@ /types/range_check/ @ItsMajestiX /types/rangyinputs/ @ersimont /types/ranjs/ @problem233 -/types/raphael/ @CheCoxshall +/types/raphael/ @CheCoxshall @blutorange /types/rappid/ @DenEwout +/types/rascal/ @zijin-m /types/rasha/ @Just1B /types/raspi/ @nebrius /types/raspi-board/ @nebrius @@ -4602,11 +4712,12 @@ /types/raspi-pwm/ @nebrius /types/raspi-serial/ @nebrius /types/raspi-soft-pwm/ @nebrius -/types/rate-limit-redis/ @csuich2 @dotconnor +/types/rate-limit-redis/ @csuich2 @dotconnor @austin-beer /types/ratelimiter/ @AyaMorisawa /types/raty/ @terrawheat /types/raven/ @scttcper @1999 @shreyjain1994 /types/raven-for-redux/ @chiubaka +/types/rax/ @solojiang /types/raygun/ @UberMouse /types/raygun4js/ @xt0rted @BenjaminHarding @UberMouse /types/rbac-a/ @tlaziuk @@ -4614,6 +4725,7 @@ /types/rc/ @DanielRosenwasser @BendingBender /types/rc-select/ @DenisTirilis /types/rc-slider/ @mantasmarcinkus @mattoni @paustint @j-fro @Deanna2 @nicholasmaddren @nulladdict @m-izadmehr @yankovsky +/types/rc-steps/ @shssoichiro /types/rc-switch/ @karol-majewski @matteofrana /types/rc-time-picker/ @Hoff97 /types/rc-tooltip/ @rhysd @ahstro @vsaarinen @aigoncharov @@ -4626,6 +4738,7 @@ /types/rdf-js/ @rubensworks @LaurensRietveld /types/rdf-transform-triple-to-quad/ @tpluscode /types/rdfjs__dataset/ @tpluscode +/types/rdfjs__express-handler/ @tpluscode /types/rdfjs__fetch/ @tpluscode /types/rdfjs__fetch-lite/ @tpluscode /types/rdfjs__formats-common/ @tpluscode @@ -4635,6 +4748,7 @@ /types/rdfjs__serializer-jsonld/ @thewilkybarkid /types/rdfjs__serializer-jsonld-ext/ @thewilkybarkid /types/rdfjs__sink-map/ @tpluscode +/types/rdfjs__term-set/ @tpluscode /types/rdfjs__to-ntriples/ @tpluscode /types/rdflib/ @cenotelie /types/re-base/ @jordandrako @@ -4645,16 +4759,17 @@ /types/reach__dialog/ @hedgerh /types/reach__menu-button/ @hedgerh /types/reach__rect/ @hedgerh -/types/reach__router/ @kingdaro @xMokAx @awwit @wroughtec +/types/reach__router/ @kingdaro @xMokAx @awwit @wroughtec @chilledoj @Eyas /types/reach__skip-nav/ @hedgerh /types/reach__tabs/ @hedgerh /types/reach__tooltip/ @hedgerh /types/reach__utils/ @hedgerh /types/reach__visually-hidden/ @hedgerh /types/reach__window-size/ @hedgerh -/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @DovydasNavickas @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei @Jessidhia @saranshkataria @lukyth @eps1lon @zieka @dancerphil @dimitropoulos +/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @DovydasNavickas @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei @Jessidhia @saranshkataria @lukyth @eps1lon @zieka @dancerphil @dimitropoulos @disjukr @vhfmag /types/react/v15/ @bbenezech @pzavolinsky @digiguru @ericanderson @DovydasNavickas @onigoetz @zieka /types/react-adal/ @dkorolev1 +/types/react-adaptive-hooks/ @stramel /types/react-add-to-calendar/ @koss-lebedev /types/react-albus/ @sseppola @conradreuter @kuirak /types/react-alert/ @g1eny0ung @@ -4665,6 +4780,7 @@ /types/react-aria-live/ @ajliv /types/react-aria-menubutton/ @forabi @crohlfs @karmats /types/react-aria-modal/ @gabycperezdias @forabi @grgr-dkrk @crutchcorn +/types/react-audio-player/ @dpgil /types/react-autocomplete/ @lstanden /types/react-autosuggest/ @nicolas-schmitt @pjo256 @robessog @tbayne @cdeutsch @rosskevin @ThomasdenH @ulrichb /types/react-avatar-editor/ @diogocorrea @gabsprates @lsenta @davidspiess @JohnGrisham @@ -4678,17 +4794,23 @@ /types/react-big-scheduler/ @FizzBuzz791 /types/react-blessed/ @guoshencheng /types/react-body-classname/ @mhegazy -/types/react-bootstrap/ @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @LKay @aaronbeall @jrakotoharisoa @r3nya @t49tran @bes @collingreen +/types/react-bootstrap/ @aaronbeall +/types/react-bootstrap/undefined/ @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @LKay @aaronbeall @jrakotoharisoa @r3nya @t49tran @bes @collingreen /types/react-bootstrap-date-picker/ @LKay @ssi-hu-antal-bodnar /types/react-bootstrap-daterangepicker/ @ianks /types/react-bootstrap-table/ @flaub @alelode @UJosue10 @dawnmist @Ogglas /types/react-bootstrap-table/v2/ @flaub @alelode @UJosue10 +/types/react-bootstrap-table-next/ @gosticks +/types/react-bootstrap-table2-filter/ @gosticks +/types/react-bootstrap-table2-paginator/ @gosticks +/types/react-bootstrap-table2-toolkit/ @gosticks /types/react-bootstrap-typeahead/ @Guymestef @radziksh @PaitoAnderson @arichter83 @dalevfenton @KngHawkon /types/react-breadcrumbs/ @guoyunhe @matsuby /types/react-breadcrumbs-dynamic/ @mitsuruog /types/react-broadcast/ @kandros /types/react-burger-menu/ @radziksh @dacevedo12 @germanp173 /types/react-cache/ @skovy +/types/react-calendar/ @Guymestef @ksoldau /types/react-calendar-heatmap/ @9renpoto /types/react-calendar-timeline/ @radziksh @acemac @rip21 @joncar /types/react-canvas-draw/ @ksocha @@ -4702,15 +4824,16 @@ /types/react-collapse/ @Kimahriman @selbekk /types/react-color/ @LKay @markspolakovs @mntdn @nkgrnkgr @0815Strohhut @dnlfrst @ericktamayo /types/react-color/v2/ @LKay @markspolakovs @mntdn @nkgrnkgr @0815Strohhut @dnlfrst @ericktamayo +/types/react-combine-reducers/ @raphael-leger /types/react-confirm/ @santiagodoldan @marknelissen /types/react-cookies/ @nlopin /types/react-copy-to-clipboard/ @mabels @BernabeFelix @wdlb /types/react-copy-write/ @samhh @davej /types/react-count-to/ @pwolaq /types/react-countdown-circle-timer/ @timia2109 -/types/react-countup/ @danielbrodin +/types/react-countup/ @danielbrodin @esurijon /types/react-credit-cards/ @vstrimaitis @olefrank @zzanol -/types/react-cropper/ @stepancar @bwlt +/types/react-cropper/ @stepancar @bwlt @frisi /types/react-css-collapse/ @dford07 /types/react-css-modules/ @KostyaEsmukov @skirsdeda /types/react-css-transition-replace/ @LKay @@ -4725,7 +4848,7 @@ /types/react-datagrid/ @stephenjelfs /types/react-date-range/ @Junbong /types/react-datepicker/ @radziksh @andrewBalekha @smrq @Rogach @royxue @KoalaHuman @justingrant @jakeboone02 @Ky6uk @aviklai @seckie @tu4mo @kerry-g @wthefourth -/types/react-daterange-picker/ @uncovertruth @MartynasZilinskas @donaldtf @vladflorescu94 +/types/react-daterange-picker/ @uncovertruth @MartynasZilinskas @donaldtf @vladflorescu94 @peterblazejewicz /types/react-dates/ @ArturAmpilogov @NathanNZ /types/react-dev-utils/ @ark120202 /types/react-devtools/ @prma85 @@ -4744,7 +4867,7 @@ /types/react-easy-crop/ @smdonoghue /types/react-editext/ @alioguzhan /types/react-elemental/ @wzfc -/types/react-email-editor/ @ngranko +/types/react-email-editor/ @ngranko @mindtraveller /types/react-event-listener/ @asvetliakov /types/react-fa/ @flaub @patsissons @LKay /types/react-facebook-login/ @apare @jankarres @@ -4865,20 +4988,21 @@ /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 @alexdunne @swissmanu @bm-software @a-tarasyuk @mvdam @esemesek @mrnickel @souvik-ghosh @nossbigg @saranshkataria @franzmoro @tykus160 @jakebloom @ceyhun @mcmar @theohdv @TheSavior @romain-faust @bebebebebe @Naturalclar @chinesedfan @vtolochk @SychevSP @RageBill @sasurau4 @256hz @doumart @drmas +/types/react-native/ @alloy @huhuanming @iRoachie @timwangdev @kamal @alexdunne @swissmanu @bm-software @a-tarasyuk @mvdam @esemesek @mrnickel @souvik-ghosh @nossbigg @saranshkataria @franzmoro @tykus160 @jakebloom @ceyhun @mcmar @theohdv @TheSavior @romain-faust @bebebebebe @Naturalclar @chinesedfan @vtolochk @SychevSP @RageBill @sasurau4 @256hz @doumart @drmas @akrger @jeremybarbet @ca057 /types/react-native-actionsheet/ @ian-rudge /types/react-native-android-taskdescription/ @christianchown /types/react-native-app-intro-slider/ @hmajid2301 @oliverwelter /types/react-native-app-link/ @johngeorgewright /types/react-native-appsflyer/ @fabianlee1211 /types/react-native-audio/ @taoqf -/types/react-native-auth0/ @ascariandrea @marknelissen @leoafarias +/types/react-native-auth0/ @ascariandrea @marknelissen @leoafarias @willdady /types/react-native-autocomplete-input/ @ifiokjr @lukyth /types/react-native-autocomplete-input/v3/ @ifiokjr /types/react-native-awesome-card-io/ @OnurVar @emlynmac /types/react-native-background-downloader/ @Kweiza @adamrhunter /types/react-native-background-timer/ @chillkroeteTTS /types/react-native-bluetooth-serial/ @RodrigoAWeber +/types/react-native-calendar-picker/ @automatensalat /types/react-native-calendars/ @Tyler-Zhang @DavidNorena @FabianMeul /types/react-native-canvas/ @hmajid2301 @ragebill /types/react-native-charts-wrapper/ @dotconnor @@ -4886,6 +5010,7 @@ /types/react-native-communications/ @huhuanming @PaitoAnderson /types/react-native-community__cli/ @agathekieny /types/react-native-custom-tabs/ @philnova +/types/react-native-datawedge-intents/ @DerZersaeger /types/react-native-datepicker/ @jacobbaskin @nossbigg /types/react-native-dialog/ @MrLuje @stackbuilders @ibarrae @yaron1m /types/react-native-dialogflow/ @jasonmerino @@ -4897,7 +5022,7 @@ /types/react-native-drawer-layout/ @jmfirth /types/react-native-easy-upgrade/ @taoqf /types/react-native-elevated-view/ @fhelwanger -/types/react-native-fbsdk/ @ifiokjr @titozzz +/types/react-native-fbsdk/ @ifiokjr @titozzz @stuartforrest-infinity /types/react-native-fetch-blob/ @MNBuyskih /types/react-native-flip-card/ @imjakechapman /types/react-native-form/ @marknelissen @@ -4908,6 +5033,7 @@ /types/react-native-i18n/ @VincentLanglet /types/react-native-incall-manager/ @KarlosQ /types/react-native-indicators/ @ifiokjr @frankyjuang +/types/react-native-input-spinner/ @mkrishnan-codes /types/react-native-joi/ @CharlesStrong-GeoH /types/react-native-keep-awake/ @huhuanming /types/react-native-keyboard-spacer/ @VincentLanglet @@ -4938,7 +5064,6 @@ /types/react-native-qrcode/ @plantain-00 /types/react-native-read-more-text/ @solkaz /types/react-native-referrer/ @christianchown -/types/react-native-responsive-dimensions/ @SConaway /types/react-native-restart/ @christianchown /types/react-native-rss-parser/ @emilianoLeite /types/react-native-safari-view/ @mrand01 @@ -4946,13 +5071,13 @@ /types/react-native-scrollable-tab-view/ @CaiHuan @egorshulga @ydostyle /types/react-native-sensor-manager/ @SahinVardar /types/react-native-settings-list/ @MrLuje -/types/react-native-share/ @marknelissen @santiagofm @MateusAndrade @Naturalclar @fabianlee1211 +/types/react-native-share/ @marknelissen @santiagofm @MateusAndrade @Naturalclar @fabianlee1211 @evancloutier /types/react-native-share/v1/ @marknelissen @santiagofm @MateusAndrade @Naturalclar /types/react-native-share-extension/ @hmajid230 /types/react-native-share-menu/ @hmajid2301 /types/react-native-signature-capture/ @ifiokjr /types/react-native-snackbar-component/ @hmajid2301 -/types/react-native-snap-carousel/ @jnbt @j-fro @gazaret @GuillaumeAmat @VitorLuizC +/types/react-native-snap-carousel/ @jnbt @j-fro @gazaret @GuillaumeAmat @VitorLuizC @egarrett94 /types/react-native-sortable-grid/ @j-fro /types/react-native-sortable-list/ @sivolobov @RookY2K @renjfk /types/react-native-sqlite-storage/ @dryganets @cavarzan @@ -4970,7 +5095,7 @@ /types/react-native-vector-icons/ @iRoachie @timwangdev @robertying @Naturalclar /types/react-native-version-check/ @vdelacou @KrishyV /types/react-native-version-number/ @VincentLanglet -/types/react-native-video/ @huhuanming @Nekith +/types/react-native-video/ @huhuanming @Nekith @bananer /types/react-native-video-player/ @Kweiza /types/react-native-view-pdf/ @thesergiomiguel /types/react-native-webrtc/ @KarlosQ @@ -5006,7 +5131,7 @@ /types/react-primitives/ @aghoneim92 @davidpett /types/react-props-decorators/ @tkqubo /types/react-qr-reader/ @davidkevork -/types/react-query/ @lukaszfiszer @jacehensley @matteofrana +/types/react-query/ @lukaszfiszer @jacehensley @matteofrana @igorbek /types/react-radio-group/ @jsonunger /types/react-rangeslider/ @RichieRock /types/react-recaptcha/ @mhegazy @zzanol @@ -5025,7 +5150,7 @@ /types/react-resolver/ @forabi /types/react-responsive/ @asvetliakov @alechill @xaviergonz /types/react-responsive/v1/ @asvetliakov -/types/react-router/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @huy-nguyen @grmiade @DaIgeb @egorshulga @rraina @pret-a-porter @t49tran @8enSmith @wezleytsai @eps1lon @HipsterBrown +/types/react-router/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @huy-nguyen @grmiade @DaIgeb @egorshulga @rraina @pret-a-porter @t49tran @8enSmith @wezleytsai @eps1lon @HipsterBrown @pawfa /types/react-router/v3/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @ssorallen @gillchristian @nulladdict /types/react-router/v2/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov /types/react-router-bootstrap/ @vlesierse @LKay @olmobrutall @@ -5058,7 +5183,7 @@ /types/react-side-effect/ @remojansen @0xcaff /types/react-sidebar/ @jeroenvervaeke /types/react-signature-canvas/ @ksocha -/types/react-simple-maps/ @thepocp @pronebird +/types/react-simple-maps/ @thepocp @pronebird @komenank /types/react-sizes/ @janKir @micahstubbs /types/react-sketchapp/ @ricokahler @DomiR @saschazar21 /types/react-slick/ @andrewBalekha @GiedriusGrabauskas @r3nya @Shannor @@ -5130,7 +5255,7 @@ /types/react-widgets/ @rogierschouten @sanyatuning @frodehansen2 @r3nya @MBillemaz @georg94 @tzarger @vegtelenseg @calebergh @rmckeel @jankalfus /types/react-widgets-moment/ @dawnmist /types/react-window/ @martynaskadisa @heyimalex @jgoz -/types/react-window-infinite-loader/ @Nibblesh +/types/react-window-infinite-loader/ @Nibblesh @fnknzzz /types/react-window-size/ @jakejrichards /types/react-with-styles/ @mohsen1 @brieb @lencioni /types/react-wow/ @mikepthomas @@ -5146,6 +5271,7 @@ /types/reactstrap/v7/ @alihammad @mfal @danilobjr @FaithForHumans @timc13 @prabodht @georg94 /types/reactstrap/v4/ @alihammad @mfal @danilobjr @fabiopaiva /types/read/ @timjk +/types/read-json-sync/ @yoursunny /types/read-package-tree/ @mgroenhoff /types/readable-stream/ @TeamworkGuy2 /types/readdir-stream/ @Bartvds @@ -5160,7 +5286,7 @@ /types/rebind-host/ @tyler-johnson /types/recaptcha2/ @l-jonas /types/recase/ @18steps -/types/recharts/ @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan @pkeuter @jrsaunde @crusectrl @apalugniok @RobertStigsson @kousaku-maron @iflp @veddermatic @g07cha @gndelia @dimitropoulos @eliotball @vkentta @fcaylus +/types/recharts/ @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan @pkeuter @jrsaunde @crusectrl @apalugniok @RobertStigsson @kousaku-maron @iflp @veddermatic @g07cha @gndelia @dimitropoulos @eliotball @vkentta @fcaylus @samuelweckstrom /types/recharts-scale/ @johnnyreilly /types/rechoir/ @BendingBender /types/recluster/ @dex4er @@ -5168,6 +5294,7 @@ /types/reconnect-core/ @thw0rted /types/reconnectingwebsocket/ @nguarracino @AppLover69 /types/recorder-js/ @higuri +/types/recurly__recurly-js/ @dbrudner @chrissrogers /types/recursive-readdir/ @elisee @MicahZoltu /types/recursive-readdir/v1/ @elisee /types/redis/ @soywiz @CodeAnimal @MugeSo @UppaJung @Rokt33r @43081j @barnski @1pete @blablapolicja @ferrantejake @OpesanyaAdebayo @nwtgck @tdebarochez @@ -5198,7 +5325,7 @@ /types/redux-first-router-link/ @janb87 /types/redux-first-router-restore-scroll/ @icopp /types/redux-first-routing/ @tlaziuk -/types/redux-form/ @aikoven @LKay @bancek @tehbi4 @huwmartin @m-b-davis @ethanresnick @maddijoyce @smifun @mshaaban088 @esetnik @bwlt @mrsekut @abemedia +/types/redux-form/ @aikoven @LKay @bancek @tehbi4 @huwmartin @m-b-davis @ethanresnick @maddijoyce @smifun @mshaaban088 @esetnik @mrsekut @abemedia /types/redux-form/v7/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin @ethanresnick @maddijoyce @smifun @mshaaban088 @esetnik /types/redux-form/v6/ @carsonf @aikoven @LKay @bancek @mshaaban088 /types/redux-form/v5/ @reggino @@ -5257,7 +5384,7 @@ /types/relay-compiler/ @n1ru4l @alloy /types/relay-config/ @DefinitelyTyped /types/relay-runtime/ @voxmatt @alloy @ckknight @renanmav @Stephen2 @mrtnzlml -/types/relay-test-utils/ @renanmav +/types/relay-test-utils/ @renanmav @Stephen2 /types/rellax/ @shermendev /types/remarkable/ @makepost @chigix @bios21 /types/remote-origin-url/ @BendingBender @@ -5325,7 +5452,8 @@ /types/rickshaw/ @niemyjski /types/right-align/ @claasahl /types/rijndael-js/ @svetkomir -/types/rimraf/ @soywiz @e-cloud @bash @oganexon +/types/rimraf/ @soywiz @e-cloud @bash @oganexon @peterblazejewicz +/types/rimraf/v2/ @soywiz @e-cloud @bash @oganexon /types/ringbufferjs/ @amchelle /types/riot-api-nodejs/ @zafixlrp /types/riot-games-api/ @xstoudi @@ -5426,7 +5554,7 @@ /types/sandboxed-module/ @svi3c /types/sane/ @BendingBender /types/sane-email-validation/ @ForbesLindesay -/types/sanitize-html/ @rogierschouten @afshin @BehindTheMath @biermeester @WillGibson @sirMerr @johandavidson @YuJianrong @paambaati +/types/sanitize-html/ @rogierschouten @afshin @BehindTheMath @biermeester @WillGibson @sirMerr @johandavidson @YuJianrong @paambaati @tomotetra /types/sap__xsenv/ @mad-mike /types/sarif/ @rscrivens /types/sasl-anonymous/ @BendingBender @@ -5438,9 +5566,11 @@ /types/saslprep/ @BendingBender /types/sass/ @lenovouser @jleider /types/sass-graph/ @marvinhagemeister +/types/sass-loader/ @JasonHK /types/sat/ @omni360 /types/satnav/ @DotNetNerd /types/save-csv/ @FrankBrullo +/types/sawtooth-sdk/ @Patrick-Erichsen @trevormcdonald /types/sax/ @vsiao @evert @djcsdy @fvanderveen /types/sax-stream/ @mjwwit /types/saywhen/ @SeanSobey @@ -5465,6 +5595,7 @@ /types/screeps/ @MarkoSulamagi @NhanHo @bryanbecker @resir014 @Arcath @dmarcuse @pyrodogg @kotarou /types/screeps-profiler/ @ramblurr /types/script-ext-html-webpack-plugin/ @davecardwell +/types/scriptable-ios/ @schl3ck /types/scriptjs/ @ssttevee /types/scroll/ @romic /types/scroll-into-view/ @zivni @Thibaut-Fatus @@ -5484,7 +5615,7 @@ /types/seamless-immutable/ @alex3165 @xsburg @geirsagberg @RMHonor @pheromonez /types/season/ @dex4er /types/secp256k1/ @anler -/types/secure-json-parse/ @OSjoerdWie +/types/secure-json-parse/ @OSjoerdWie @mikemaccana /types/secure-password/ @jloveridge /types/secure-random-password/ @bjornars /types/seed-random/ @l-jonas @@ -5551,7 +5682,7 @@ /types/serve-static/ @urossmolnik @LinusU /types/server/ @sant123 @iddan @DazSanchez /types/server-destroy/ @gyszalai -/types/serverless/ @hassankhan @JonathanWilbur @a-pavlenko +/types/serverless/ @hassankhan @JonathanWilbur @a-pavlenko @fredericbarthelet /types/serverless-jest-plugin/ @Gaelan /types/service-worker-mock/ @remcohaszing /types/servicenow/ @bryceg @@ -5575,7 +5706,6 @@ /types/shallowequal/v0/ @seansfkelley /types/shapefile/ @DenisCarriere @Thw0rted /types/sharedb/ @soney @ericyhwang @pxpeterxu -/types/sharedworker/ @nakakura @mboughaba /types/sharepoint/ @gandjustas @andrei-markeev @teroarvola @dennispg @SPWizard01 @betlgtu /types/sharp/ @lith-light-g @wooseopkim @BTOdell @JamieWoodbury @Fdebijl /types/shasum/ @TeamworkGuy2 @@ -5606,7 +5736,7 @@ /types/sigmajs/ @qinfchen /types/sigmund/ @BendingBender /types/signal-exit/ @BendingBender -/types/signale/ @resir014 @kingdaro @rjoydip +/types/signale/ @resir014 @kingdaro @rjoydip @lookapanda /types/signalfx/ @VladimirGrenaderov @maxbogus /types/signalr/ @borisyankov @keesey @GiedriusGrabauskas /types/signalr-no-jquery/ @gjoshevski @@ -5636,7 +5766,7 @@ /types/simplestorage.js/ @axelcostaspena @mxl /types/simulant/ @ecraig12345 /types/single-line-log/ @ffflorian -/types/single-spa-react/ @Garrett-Smith-iq @chrisdopuch +/types/single-spa-react/ @Garrett-Smith-iq @chrisdopuch @benceczeili /types/sinon/ @mrbigdog2u @rationull @lumaxis @nicojs @43081j @joshuakgoldberg @gjednaszewski @johnjesse @alecf @SimonSchick @bergundy /types/sinon-as-promised/ @igrayson /types/sinon-chai/ @kazimanzurrashid @jedmao @elpdpt @@ -5656,6 +5786,7 @@ /types/skatejs/ @Hotell /types/sketchapp/ @manekinekko @shikanime /types/ski/ @AyaMorisawa +/types/skmeans/ @adamzerella /types/skyway/ @nakakura @izmhr /types/slack-mock/ @kkalavantavanich @ffflorian /types/slack-node/ @geoffreak @@ -5716,7 +5847,7 @@ /types/socketty/ @Nax /types/sockjs/ @pmccloghrylaing /types/sockjs-client/ @vladev @arusakov @BendingBender @renjfk -/types/sodium-native/ @ffflorian +/types/sodium-native/ @ffflorian @nshcore /types/solid-auth-client/ @Vinnl @durandj /types/solid__react/ @Vinnl /types/solr-client/ @liul85 @@ -5754,7 +5885,7 @@ /types/splitpanes/ @noonhorse /types/splunk-bunyan-logger/ @bricka /types/splunk-logging/ @bricka -/types/spotify-api/ @skovmand @Stadly @piksel +/types/spotify-api/ @skovmand @Stadly @piksel @Some-Dood /types/spotify-node-applescript/ @panz3r /types/spotify-web-api-node/ @Stadly /types/spotify-web-playback-sdk/ @Festify @mraerino @NeoLegends @deini @hanna-becker @@ -5768,7 +5899,7 @@ /types/sqlite3/ @nmalaguti @dpyro @BehindTheMath /types/sqlite3-promise/ @jonathanlb /types/sqlstring/ @marvinhagemeister -/types/square-connect/ @ddimitrioglo @mootrichard @Nican +/types/square-connect/ @ddimitrioglo @mootrichard /types/squirejs/ @bradleyayers /types/squirrelly/ @ffflorian /types/srp/ @Patman64 @@ -5792,6 +5923,7 @@ /types/standard-error/ @roblabat /types/standard-http-error/ @roblabat /types/standard-version/ @JasonHK +/types/start-server-webpack-plugin/ @AGenson /types/starwars-names/ @claasahl /types/stat-mode/ @BendingBender /types/staticmaps/ @olivierkamers @@ -5842,6 +5974,7 @@ /types/streaming-json-stringify/ @BendingBender /types/streamjs/ @erosb /types/streamtest/ @lummish +/types/stremio-addon-sdk/ @sleeyax /types/strftime/ @cyrilschumacher /types/strict-uri-encode/ @hoishin /types/strikeentco__get/ @ElliottCampbellJHA @eheikes @@ -5874,13 +6007,13 @@ /types/structured-source/ @azu /types/stubby/ @dex4er /types/style-search/ @peterblazejewicz -/types/styled-components/ @Igorbek @Igmat @lavoaster @Jessidhia @jkillian @eps1lon @flavordaaave @wagerfield @Lazyuki @mgoszcz2 +/types/styled-components/ @Igorbek @Igmat @lavoaster @Jessidhia @jkillian @eps1lon @flavordaaave @wagerfield @Lazyuki @mgoszcz2 @danilofuchs /types/styled-components/v3/ @Igorbek @Igmat /types/styled-jsx/ @R1ZZU /types/styled-react-modal/ @Lavoaster @gperl27 /types/styled-system/ @phobon @zephraph @damassi @alloy @maoueh @lavoaster @jschuler @adam187 @gretzky @chrislopresto @peduarte @Dhalton @elliotbonneville @jackcaldwell @eliseumds @craga89 @HipsterBrown @hammadj @maddhruv @cherewaty /types/styled-system__css/ @sebald @sztobar @RyanTheAllmighty -/types/styled-system__should-forward-prop/ @tpict +/types/styled-system__should-forward-prop/ @tpict @jsonmaur /types/styled-system__theme-get/ @Jerry-Hong /types/styled-theming/ @ArjanJ @hieuhlc @tinynumbers /types/stylelint/ @alan-agius4 @filipsalpe @43081j @bmatcuk @@ -5898,7 +6031,7 @@ /types/sudokus/ @ffflorian /types/suitescript/ @darrenhillconsulting /types/summernote/ @wstaelens @nusantara-cloud @crutchcorn -/types/sumo-logger/ @forabi @clementallen +/types/sumo-logger/ @forabi @clementallen @kristians-salna /types/suncalc/ @horiuchi /types/sunrise-sunset-js/ @hmajid2301 /types/superagent/ @NicoZelaya @mxl @paplorinc @shreyjain1994 @zopf @beeequeue @lukaselmer @theQuazz @carnesen @ghostganz @@ -5949,7 +6082,7 @@ /types/swig/ @CodeAnimal @soywiz /types/swig-email-templates/ @mrhen @micksatana /types/swipe/ @kant2002 -/types/swiper/ @sgaliano @lucax88x @ematseruk @odahcam @jmca @daem0ndev @LiadIdan +/types/swiper/ @sgaliano @lucax88x @ematseruk @odahcam @jmca @daem0ndev @LiadIdan @john015 /types/swiper/v4/ @sgaliano @lucax88x @ematseruk @odahcam @jmca @daem0ndev @LiadIdan /types/swiper/v3/ @sgaliano @lucax88x /types/swipeview/ @borisyankov @@ -5966,7 +6099,7 @@ /types/systemjs/ @joeldenning /types/systemjs/v0/ @ludohenin @NathanWalker @GiedriusGrabauskas @aluanhaddad /types/tabbable/ @mokkan -/types/table/ @evanshortiss @mrmlnc +/types/table/ @evanshortiss @mrmlnc @unindented /types/table-resolver/ @junalmeida /types/tableau/ @protip /types/tableify/ @forivall @@ -5983,14 +6116,14 @@ /types/tape-catch/ @ExE-Boss /types/tape-promise/ @ExE-Boss /types/tar/ @SomaticIT @connor4312 -/types/tar-fs/ @Umoxfo +/types/tar-fs/ @Umoxfo @chriswiggins /types/tar-stream/ @glicht @peterblazejewicz /types/tar-stream/v1/ @glicht /types/tarantool-driver/ @zharkov-eu /types/targz/ @alexandercurtis /types/task-graph-runner/ @mgroenhoff /types/task-worklet/ @karol-majewski -/types/tcp-ping/ @stegano +/types/tcp-ping/ @stegano @rymate1234 /types/tcp-port-used/ @gautejohan /types/tdweb/ @esindger /types/teddy/ @lannonbr @@ -6008,7 +6141,7 @@ /types/testing-library__cypress/ @aaronmcadam @bastibuck @NoriSte @wKovacs64 @existentialism @airato @simjes /types/testing-library__dom/ @alexkrolick @kentcdodds @eps1lon @weyert @reyronald @wKovacs64 @wezleytsai /types/testing-library__jest-dom/ @gnapse @jgoz @smacpherson64 -/types/testing-library__react/ @alexkrolick @kentcdodds @eps1lon @weyert @ifiokjr @danieljcafonso +/types/testing-library__react/ @alexkrolick @kentcdodds @eps1lon @weyert @ifiokjr @danieljcafonso @timswalling /types/testing-library__react-hooks/ @mpeyper @sarahdayan /types/testing-library__user-event/ @whtsky @weyert /types/testing-library__vue/ @cimbul @@ -6019,6 +6152,8 @@ /types/text-buffer/ @GlenCFL /types/text-encoding/ @pine @mohsen1 @nwmqpa /types/text-encoding-utf-8/ @trxcllnt +/types/text-mask-addons/ @huntjosh +/types/text-mask-core/ @huntjosh /types/text-table/ @saadq /types/textarea-caret/ @shiftkey /types/textextensions/ @BendingBender @@ -6026,7 +6161,7 @@ /types/textversionjs/ @aaronosher /types/texzilla/ @m93a /types/tgfancy/ @Dabolus -/types/theme-ui/ @erikdstock @ifiokjr @sbardian @pomber @wKovacs64 @prateekkathal @hasparus +/types/theme-ui/ @erikdstock @ifiokjr @sbardian @pomber @wKovacs64 @prateekkathal @hasparus @leocantthinkfoaname /types/theme-ui__components/ @hasparus @kripod /types/then-eos/ @seangenabe /types/theo/ @petekp @laitine @@ -6042,11 +6177,13 @@ /types/through2/v0/ @Bartvds @jedmao /types/through2-concurrent/ @Alorel /types/through2-map/ @LucasHill +/types/tictactoejs/ @Mattis6666 /types/tile-reduce/ @DenisCarriere /types/tilebelt/ @DenisCarriere /types/timeago/ @stof /types/timelinejs/ @rolandzwaga /types/timelinejs3/ @MikeMatusz +/types/timeout/ @itsnewt /types/timer-machine/ @dolanmiu /types/timezone-js/ @bonnici /types/timezoned-date/ @bengry @@ -6063,7 +6200,7 @@ /types/tinycon/ @dwaxweiler @jaulz /types/tinycopy/ @vvatanabe /types/tinymce/ @martinduparc @ipoul @nicohartto @Parent5446 @CymruKakashi -/types/titanium/ @appcelerator @janvennemann @ffMathy +/types/titanium/ @appcelerator @janvennemann @drauggres @ffMathy /types/title/ @fa7ad /types/tldjs/ @geoffreak /types/tlds/ @ajshres @@ -6074,6 +6211,7 @@ /types/to-camel-case/ @j-f1 /types/to-json-schema/ @forivall /types/to-markdown/ @SuperPaintman +/types/to-slug-case/ @peterblazejewicz /types/to-snake-case/ @LogvinovLeon /types/to-space-case/ @Richienb /types/to-title-case/ @Richienb @@ -6096,6 +6234,7 @@ /types/touch/ @mizunashi-mana @BendingBender /types/touch-events/ @kevinb7 /types/tough-cookie/ @leonard-thieu @LiJinyao @no2chem +/types/tough-cookie/v2/ @leonard-thieu @LiJinyao @no2chem /types/tough-cookie-file-store/ @forivall /types/tough-cookie-filestore/ @friedow /types/traceback/ @misak113 @@ -6121,8 +6260,9 @@ /types/trunk8/ @niemyjski /types/trusted-types/ @vrana @engelsdamien @siegrift /types/tryer/ @bengry -/types/tryghost__content-api/ @knguyen0125 @antonve +/types/tryghost__content-api/ @knguyen0125 @antonve @maveric1977 @thrymgjol /types/ts-nameof/ @dsherret +/types/tsc-watch/ @peterblazejewicz /types/tspromise/ @soywiz /types/tsscmp/ @g-rath /types/ttf2woff2/ @ThomasdenH @@ -6137,12 +6277,13 @@ /types/tween.js/ @Amos47 @sunetos @jzarnikov @alexburner @olafurkarl /types/tweenjs/ @evilangelist @jcyuan /types/tweezer.js/ @praxxis -/types/twemoji/ @coderbyheart +/types/twemoji/ @coderbyheart @peterblazejewicz +/types/twemoji-parser/ @peterblazejewicz /types/twig/ @soywiz @enko @mtizziani @dmelcer9 /types/twilio/ @nickiannone @ashleybrener @CatGuardian /types/twilio-common/ @gatimus -/types/twilio-video/ @minddocdev @darioblanco @ktsn @ben8p @nifled -/types/twit/ @Volox @sapphiredev @abraham @siwalikm @plhery @justgoscha @darkade +/types/twilio-video/ @minddocdev @darioblanco @ktsn @ben8p @nifled @howitzer-industries +/types/twit/ @Volox @sapphiredev @abraham @siwalikm @plhery @justgoscha @darkade @brianjychan /types/twitch-ext/ @beheh @FedeDR /types/twitter/ @BendingBender /types/twitter-for-web/ @chitoku-k @Lucretiel @@ -6167,7 +6308,7 @@ /types/tz-offset/ @RMHonor /types/ua-parser-js/ @superduper @legendecas @MeLlamoPablo /types/uglify-es/ @alan-agius4 -/types/uglify-js/ @alan-agius4 @tkrotoff @johnnyreilly +/types/uglify-js/ @alan-agius4 @tkrotoff @johnnyreilly @peterblazejewicz /types/uglify-js/v2/ @tkrotoff /types/uglifycss/ @blendsdk /types/uglifyjs-webpack-plugin/ @vajkayrene @@ -6203,7 +6344,7 @@ /types/unique-push-id/ @namick /types/unist/ @bizen241 @lujun2 @hrajchert @wooorm @rokt33r /types/unity-webapi/ @jmvrbanac -/types/universal-analytics/ @Bartvds @DarkerTV +/types/universal-analytics/ @Bartvds @DarkerTV @lekoaf /types/universal-cookie/ @tomi /types/universalify/ @Richienb /types/unl-core/ @u-n-l @@ -6219,8 +6360,9 @@ /types/upng-js/ @plantain-00 @pineapplemachine /types/uppercamelcase/ @plantain-00 /types/urbanairship-cordova/ @Justin-Credible +/types/uri-template-lite/ @DefinitelyTyped /types/uri-templates/ @Bartvds @barnski -/types/urijs/ @RodneyJT @xt0rted @petejohanson @ljqx @teamworkguy2 @Akuukis @marcelltoth +/types/urijs/ @RodneyJT @xt0rted @petejohanson @ljqx @teamworkguy2 @Akuukis @marcelltoth @ahagelstein /types/uritemplate/ @teyc @rubensworks /types/urix/ @BendingBender /types/url-assembler/ @wolfgang42 @@ -6275,9 +6417,9 @@ /types/vali-date/ @SamVerschueren /types/valiant/ @whatasoda /types/valid-data-url/ @jgeth -/types/valid-url/ @stevehipwell +/types/valid-url/ @stevehipwell @gcangussu /types/validate-npm-package-name/ @ffflorian -/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno @builtinnya @qqilihq @keatz55 @MunifTanjim +/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno @builtinnya @qqilihq @keatz55 @MunifTanjim @vlapo /types/validatorjs/ @LKay @danmana @MatiasOlivera /types/vanilla-masker/ @BenLorantfy /types/vanilla-modal/ @samnau @@ -6297,6 +6439,7 @@ /types/vex-js/ @gdcohan /types/vexflow/ @rquiring @sebastianhaas @bohoffi @sschmidTU @bneumann /types/vfile-location/ @ikatyang @rokt33r +/types/vhost/ @DefinitelyTyped /types/victory/ @asvetliakov @snerks @Havret @alreadyExisted @jlismore @stackbuilders @ibarrae @dominictwlee @veddermatic @alecf /types/video.js/ @vbortone @scleriot @SWBennett06 @IgelCampus @giofreitas @gjanblaszczyk @sroucheray @AkxeOne @meikidd @joeflateau @ckybonist /types/viewability-helper/ @lironzluf @@ -6304,7 +6447,7 @@ /types/viewport-mercator-project/ @fnberta /types/viewporter/ @borisyankov /types/vigour-ua/ @ffflorian -/types/vimeo/ @DazWilkin +/types/vimeo/ @mattleff /types/vimeo__player/ @denisyilmaz @timc13 @terrymun /types/vinyl/ @vvakame @jedmao @thorn0 /types/vinyl/v0/ @jedmao @@ -6320,6 +6463,7 @@ /types/vision/v4/ @jasonswearingen @AJamesPhillips /types/vitalsigns/ @cyrilschumacher /types/vivus/ @DanielRosenwasser @lekhmanrus @shuta13 +/types/vk-openapi/ @hikiko4ern /types/vkbeautify/ @sch3lp /types/vmap/ @jgainfort /types/vndb/ @PragunSaini @@ -6349,9 +6493,9 @@ /types/vue2-datepicker/ @ChristianStornowski /types/vue2-editor/ @suryadana /types/vue2-hammer/ @ptandler -/types/vuelidate/ @janesser @jubairsaidi @orblazer +/types/vuedraggable/ @beomy +/types/vuelidate/ @janesser @jubairsaidi @orblazer @shadrus /types/w2ui/ @Ptival -/types/w3c-css-typed-object-model-level-1/ @yavanosta /types/w3c-generic-sensor/ @kenchris /types/w3c-image-capture/ @cosium /types/w3c-screen-orientation/ @kenchris @@ -6373,7 +6517,7 @@ /types/waterline/ @arvitaly /types/wav/ @MasterOdin /types/wav-encoder/ @cdauth -/types/wavesurfer.js/ @higuri @kubk +/types/wavesurfer.js/ @higuri @kubk @bennordgengo /types/waypoints/ @dominikbulaj @Koloto @evil-shrike /types/wcag-contrast/ @plantain-00 /types/wcwidth/ @rokt33r @@ -6382,6 +6526,7 @@ /types/weapp-api/ @vargeek @pbestz /types/web-animations-js/ @kritollm /types/web-bluetooth/ @urish @thegecko +/types/web-locks-api/ @magne4000 /types/web-push/ @paullessing /types/web-resource-inliner/ @BendingBender /types/web3-provider-engine/ @LogvinovLeon @@ -6395,9 +6540,10 @@ /types/webgl2/ @nkemnitz @karhu /types/webicon/ @manuth /types/webidl-conversions/ @ExE-Boss -/types/webidl2/ @saschanaz +/types/webidl2/ @saschanaz @ExE-Boss +/types/webidl2js/ @ExE-Boss /types/webmidi/ @DefinitelyTyped -/types/webpack/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @alan-agius4 @elliottsj @jason0x43 @dennispg @christophehurpeau @ZSkycat @johnnyreilly @rwaskiewicz @kuehlein @grgur @rubenspgcavalcante @andersk @ofhouse @danielthank +/types/webpack/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @alan-agius4 @elliottsj @jason0x43 @dennispg @christophehurpeau @ZSkycat @johnnyreilly @rwaskiewicz @kuehlein @grgur @rubenspgcavalcante @andersk @ofhouse @danielthank @sasurau4 @dionshihk /types/webpack/v3/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @alan-agius4 @elliottsj @jason0x43 @christophehurpeau @rwaskiewicz @kuehlein /types/webpack-assets-manifest/ @FranklinWhale /types/webpack-blocks/ @maxbogus @@ -6420,13 +6566,13 @@ /types/webpack-dev-middleware/ @bumbleblym @reduckted @chrisabrams @peterblazejewicz /types/webpack-dev-middleware/v2/ @bumbleblym @reduckted @chrisabrams /types/webpack-dev-middleware/v1/ @bumbleblym @reduckted -/types/webpack-dev-server/ @maestroh @daveparslow @ZheyangSong @alan-agius4 @arturovt @davecardwell @dobogo @billy-le @chrispaterson @peterblazejewicz +/types/webpack-dev-server/ @maestroh @daveparslow @ZheyangSong @alan-agius4 @arturovt @davecardwell @dobogo @billy-le @chrispaterson @peterblazejewicz @wwmoraes /types/webpack-dotenv-plugin/ @kryops /types/webpack-env/ @use-strict @rhonsby /types/webpack-error-notification/ @peterblazejewicz /types/webpack-fail-plugin/ @deevus /types/webpack-hot-client/ @rynclark @ZSkycat @barm -/types/webpack-hot-middleware/ @bumbleblym @icylace @chrisabrams @iliyaZelenko +/types/webpack-hot-middleware/ @bumbleblym @icylace @chrisabrams @iliyaZelenko @saboya /types/webpack-manifest-plugin/ @r3nya @monsonjeremy /types/webpack-merge/ @deevus @mtraynham /types/webpack-merge/v0/ @deevus @@ -6441,7 +6587,8 @@ /types/webpack-validator/ @deevus /types/webpack-virtual-modules/ @AviVahl /types/webpack-watched-glob-entries-plugin/ @ChaosinaCan -/types/webpackbar/ @rynclark +/types/webpackbar/ @rynclark @peterblazejewicz +/types/webpackbar/v2/ @rynclark /types/webpagetest/ @ksm2 /types/webprogbase-console-view/ @veetaha /types/webrtc/ @nakakura @@ -6461,6 +6608,7 @@ /types/wellknown/ @davodesign84 @yairtawil /types/wepy/ @Jimexist /types/wepy-redux/ @Jimexist +/types/whatwg-encoding/ @fengkx /types/whatwg-mimetype/ @petejohanson /types/whatwg-url/ @aomarks /types/wheel/ @BTOdell @@ -6484,6 +6632,7 @@ /types/winjs/ @adamhewitt627 @craigktreasure @xirzec /types/winjs/v2/ @adamhewitt627 @craigktreasure @xirzec /types/winjs/v1/ @adamhewitt627 @craigktreasure @xirzec +/types/wink-pos-tagger/ @lhk /types/wink-tokenizer/ @lal12 /types/winreg/ @RX14 @BobBuehler /types/winrt-uwp/ @saschanaz @taylor224 @@ -6499,6 +6648,7 @@ /types/word-extractor/ @saboya /types/word2vector/ @renekeijzer /types/wordcloud/ @joeskeen +/types/wordpress-hash-node/ @glennreyes /types/wordpress__a11y/ @dsifford /types/wordpress__api-fetch/ @dsifford /types/wordpress__autop/ @dsifford @@ -6507,7 +6657,7 @@ /types/wordpress__block-library/ @dsifford /types/wordpress__block-serialization-default-parser/ @dsifford /types/wordpress__block-serialization-spec-parser/ @dsifford -/types/wordpress__blocks/ @dsifford +/types/wordpress__blocks/ @dsifford @sirreal /types/wordpress__components/ @dsifford @sirreal /types/wordpress__compose/ @dsifford /types/wordpress__core-data/ @dsifford @@ -6580,6 +6730,7 @@ /types/wu/ @phiresky /types/wx-js-sdk-dt/ @agasbzj @forzoom /types/wx-server-sdk/ @vonweb +/types/wyt/ @forivall /types/x-editable/ @sirkirby /types/x-ray/ @mtraynham /types/x-ray-crawler/ @mtraynham @@ -6602,7 +6753,7 @@ /types/xmpp__jid/ @PJakcson @BendingBender /types/xmpp__xml/ @BendingBender /types/xo/ @peterblazejewicz -/types/xregexp/ @Bartvds @jfahrenkrug @sigo +/types/xregexp/ @Bartvds @jfahrenkrug @sigo @pristinesource /types/xrm/ @6ix4our @mattngan @markusmauch @daryllabar @clownwilleatme @scottdurow /types/xrm/v8/ @6ix4our @mattngan @markusmauch @daryllabar @clownwilleatme @mariusagur /types/xrm/v7/ @daryllabar @@ -6615,6 +6766,7 @@ /types/yadda/ @dex4er /types/yallist/ @BendingBender /types/yaml/ @ikatyang @ColinBradley +/types/yaml-front-matter/ @xiaoxiangmoe /types/yandex-maps/ @Delagen @gastwork13 /types/yandex-money-sdk/ @chrootsu /types/yar/ @SimonSchick @@ -6651,8 +6803,9 @@ /types/youtube-dl/ @bsurai @moshfeu /types/youtube-player/ @jurca /types/yt-player/ @troeggla +/types/yt-search/ @cherryblossom000 /types/yui/ @giabao -/types/yup/ @dhardtke @vtserman @MoretonBayRC @sseppola @YashdalfTheGray @vincentjames501 @robertbullen @sat0yu @deskoh @mauricedb @kalley +/types/yup/ @dhardtke @vtserman @MoretonBayRC @sseppola @YashdalfTheGray @vincentjames501 @robertbullen @sat0yu @deskoh @mauricedb @kalley @elias-garcia /types/zchat-browser/ @davidcopley /types/zdog/ @demensky /types/zeit__next-source-maps/ @ldthorne @@ -6679,4 +6832,5 @@ /types/zopflipng-bin/ @hikoma /types/zrender/ @iRON5 /types/zui/ @yuanxu +/types/zurb-twentytwenty/ @mustafasalahuldin /types/zxcvbn/ @mtraynham diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ab3f84d44f..5e283ccee0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,6 +20,7 @@ If adding a new definition: If changing an existing definition: - [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <> - [ ] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header. +- [ ] Include [tests for your changes](https://github.com/DefinitelyTyped/DefinitelyTyped#testing) - [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "dtslint/dt.json" }`. If for reason the any rule need to be disabled, disable it for that line using `// tslint:disable-next-line [ruleName]` and not for whole package so that the need for disabling can be reviewed. If removing a declaration: diff --git a/.prettierrc.json b/.prettierrc.json index 159dda55f4..b1738e2c9f 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,5 +1,6 @@ { "$schema": "http://json.schemastore.org/prettierrc", + "arrowParens": "avoid", "singleQuote": true, "trailingComma": "all", "tabWidth": 4, diff --git a/README.cn.md b/README.cn.md index a8e81e46d8..ddc6f49cee 100644 --- a/README.cn.md +++ b/README.cn.md @@ -6,6 +6,8 @@ *你可以去看其他语言的 README,[英语](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md),[西班牙语](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md),[韩语](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ko.md),[俄罗斯语](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ru.md)* +*[管理员手册](./docs/admin.md)* + ## 目录 * [当前状态](#当前状态) @@ -57,13 +59,43 @@ npm install --save-dev @types/node 这通常会在 `package.json` 文件中的 `"types"` 或 `"typings"` 字段中提供, 或者可以只查找包中的任何 ".d.ts" 文件并手动将它们包含在 `/// `. -### 其他方法 +#### 旧版本的 TypeScript(2.7 和更早版本) + +Definitely Typed 仅在小于 2 年的 TypeScript 版本上测试软件包。当前已测试 2.8 及更高版本。如果您使用的是 TypeScript 2.0 到 2.7,仍然可以尝试安装 @types 软件包,大多数软件包都不使用 TypeScript 的新特性。但是不能保证它们会起作用,这是支持窗口: + +Version | Released | End of Support +-- | -- | -- +2.8 | March 2018 | March 2020 +2.9 | May 2018 | May 2020 +3.0 | July 2018 | July 2020 +3.1 | September 2018 | September 2020 +3.2 | November 2018 | November 2020 +3.3 | January 2019 | January 2021 +3.4 | March 2019 | March 2021 +3.5 | May 2019 | May 2021 +3.6 | August 2019 | August 2021 +3.7 | November 2019 | November 2021 +3.8 | February 2020 | February 2022 + +`@types` 软件包具有它们明确支持的 TypeScript 版本的标记,因此通常可以获取早于 2 年窗口的较早版本的软件包。例如,如果运行 `npm dist-tags @types/react`,您将看到 TypeScript 2.5 可以将类型用于 react@16.0,而 TypeScript 2.6 和 2.7 可以将类型用于 react@16.4: + +|Tag | Version| +|----|---------| +|latest| 16.9.23| +|ts2.0| 15.0.1| +| ... | ... | +|ts2.5| 16.0.36| +|ts2.6| 16.4.7| +|ts2.7| 16.4.7| +| ... | ... | + +#### TypeScript 1.* 这些可以被 TypeScript 1.0 使用。 -* [Typings](https://github.com/typings/typings) +* 从该仓库的 `master` 分支手动下载并将其放入您的项目中 +* ~~[Typings](https://github.com/typings/typings)~~ (使用首选替代方案,typings 已经被弃用) * ~~[NuGet](http://nuget.org/packages?q=DefinitelyTyped)~~ (使用首选替代方案, nuget DT 类型发布已关闭) -* 从这个仓库的 `master` 分支手动下载 你可能需要手动添加 [引用](http://www.typescriptlang.org/docs/handbook/triple-slash-directives.html)。 @@ -152,7 +184,11 @@ Definitely Typed 的成员会定期查看新的 PRs,但是请记住当有许 #### 常见错误 * 首先,请遵循 [手册](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html) 的建议。 -* 格式化:使用4个空格。 对于新代码,这由 Prettier 强制执行。 +* 格式化:使用4个空格。 该仓库已经设置了 prettier,因此你只需要运行 `npm run prettier -- --write path/to/package/**/*.ts`. [使用断言时](https://github.com/SamVerschueren/tsd#assertions),添加 `// prettier-ignore` 将这几行标记为不需要格式化的代码: + ```tsx + // prettier-ignore + const incompleteThemeColorModes: Theme = { colors: { modes: { papaya: { // $ExpectError + ``` * `function sum(nums: number[]): number`: 如果函数没有写入的参数,请使用 `ReadonlyArray`. * `interface Foo { new(): Foo; }`: 这定义了一个可实例化的类型,你可能需要的是 `declare class Foo { constructor(); }`. diff --git a/README.md b/README.md index 936d70245b..83775dff39 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ * [Current status](#current-status) * [How can I contribute?](#how-can-i-contribute) - * [Test](#test) + * [Testing](#testing) * [Make a pull request](#make-a-pull-request) * [Edit an existing package](#edit-an-existing-package) * [Create a new package](#create-a-new-package) @@ -112,17 +112,16 @@ You may need to add manual [references](http://www.typescriptlang.org/docs/handb Definitely Typed only works because of contributions by users like you! -### Test +### Testing Before you share your improvement with the world, use it yourself. #### Test editing an existing package -To add new features you can use [module augmentation](http://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation). -You can also directly edit the types in `node_modules/@types/foo/index.d.ts`, or copy them from there and follow the steps below. +To test local to your app, you can use [module augmentation](http://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) to extend existing types from the DT module you want to work on. +Alternatively, you can also edit the types directly in `node_modules/@types/foo/index.d.ts` to validate your changes, then bring the changes to this repo with the steps below. - -#### Test a new package +#### Adding tests to a new package Add to your `tsconfig.json`: @@ -131,10 +130,12 @@ Add to your `tsconfig.json`: "typeRoots": ["types"], ``` -(You can also use `src/types`.) Create `types/foo/index.d.ts` containing declarations for the module "foo". You should now be able to import from `"foo"` in your code and it will route to the new type definition. Then build *and* run the code to make sure your type definition actually corresponds to what happens at runtime. + +If you're wondering where to start with test code, the examples in the README of the module are a great place to start. + Once you've tested your definitions with real code, make a [PR](#make-a-pull-request) then follow the instructions to [edit an existing package](#edit-an-existing-package) or [create a new package](#create-a-new-package). @@ -167,6 +168,39 @@ First, [fork](https://guides.github.com/activities/forking/) this repository, in When you make a PR to edit an existing package, `dt-bot` should @-mention previous authors. If it doesn't, you can do so yourself in the comment associated with the PR. +#### Editing tests on an existing package + +There should be a `[modulename]-tests.ts` file, which is considered your test file, along with any `*.ts` files it imports. +If you don't see any test files in the module's folder, create a `[modulename]-tests.ts`. +These files are used to validate the API exported from the `*.d.ts` files which are shipped as `@types/yourmodule`. + +Changes to the `*.d.ts` files should include a corresponding `*.ts` file change which shows the API being used, so that someone doesn't accidentally break code you depend on. +If you don't see any test files in the module's folder, create a `[modulename]-tests.ts` + +For example, this change to a function in a `.d.ts` file adding an a new param to a function: + +`index.d.ts`: + +```diff +- export function twoslash(body: string): string ++ export function twoslash(body: string, config?: { version: string }): string +``` + +`index-tests.ts`: +```diff +import {twoslash} from "./" + +// $ExpectType string +const result = twoslash("//") + ++ // Handle options param ++ const resultWithOptions = twoslash("//", { version: "3.7" }) ++ // When the param is incorrect ++ // $ExpectError ++ const resultWithOptions = twoslash("//", { }) +``` + +You can validate your changes with `npm test` from the root of this repo, which takes changed files into account. #### Create a new package diff --git a/notNeededPackages.json b/notNeededPackages.json index 6af1828902..35b1eabb06 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -564,6 +564,12 @@ "sourceRepoURL": "https://github.com/sindresorhus/clipboardy", "asOfVersion": "2.0.0" }, + { + "libraryName": "cloudevents-sdk", + "typingsPackageName": "cloudevents-sdk", + "sourceRepoURL": "https://github.com/cloudevents/sdk-javascript", + "asOfVersion": "1.0.0" + }, { "libraryName": "colors.js (colors)", "typingsPackageName": "colors", @@ -984,6 +990,12 @@ "sourceRepoURL": "https://github.com/jonathantneal/document-promises#readme", "asOfVersion": "4.0.0" }, + { + "libraryName": "docx-templates", + "typingsPackageName": "docx-templates", + "sourceRepoURL": "https://github.com/guigrpa/docx-templates", + "asOfVersion": "4.0.0" + }, { "libraryName": "dom-helpers", "typingsPackageName": "dom-helpers", @@ -4032,6 +4044,12 @@ "sourceRepoURL": "https://github.com/yonahforst/react-native-permissions", "asOfVersion": "2.0.0" }, + { + "libraryName": "react-native-responsive-dimensions", + "typingsPackageName": "react-native-responsive-dimensions", + "sourceRepoURL": "https://github.com/DaniAkash/react-native-responsive-dimensions", + "asOfVersion": "3.1.0" + }, { "libraryName": "react-native-safe-area", "typingsPackageName": "react-native-safe-area", @@ -5016,18 +5034,18 @@ "sourceRepoURL": "https://github.com/arendjr/text-clipper", "asOfVersion": "1.3.0" }, - { - "libraryName": "theming", - "typingsPackageName": "theming", - "sourceRepoURL": "https://github.com/cssinjs/theming", - "asOfVersion": "2.0.0" - }, { "libraryName": "theme-ui", "typingsPackageName": "theme-ui__color", "sourceRepoURL": "https://github.com/system-ui/theme-ui", "asOfVersion": "0.3.1" }, + { + "libraryName": "theming", + "typingsPackageName": "theming", + "sourceRepoURL": "https://github.com/cssinjs/theming", + "asOfVersion": "2.0.0" + }, { "libraryName": "three", "typingsPackageName": "three", diff --git a/package.json b/package.json index 092e7fab93..864a4495cd 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "dtslint": "latest", - "prettier": "^1.17.1", + "prettier": "^2.0.2", "types-publisher": "github:Microsoft/types-publisher#production" }, "husky": { @@ -32,5 +32,6 @@ "_comment": "This will remove husky from when we started migrating to use prettier", "pre-commit": "npm uninstall husky" } - } + }, + "dependencies": {} } diff --git a/types/abs-svg-path/abs-svg-path-tests.ts b/types/abs-svg-path/abs-svg-path-tests.ts new file mode 100644 index 0000000000..5a9b9ebca5 --- /dev/null +++ b/types/abs-svg-path/abs-svg-path-tests.ts @@ -0,0 +1,2 @@ +import abs = require('abs-svg-path'); +const absolutized = abs([['M', 10, 10], ['l', 100, 100]]); // $ExpectType AbsAnyCommand[] diff --git a/types/abs-svg-path/index.d.ts b/types/abs-svg-path/index.d.ts new file mode 100644 index 0000000000..a842f70748 --- /dev/null +++ b/types/abs-svg-path/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for abs-svg-path 0.1 +// Project: https://github.com/jkroso/abs-svg-path +// Definitions by: Liam Martens +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type RelMoveCommand = ['m', number, number]; +type AbsMoveCommand = ['M', number, number]; +type MoveCommand = RelMoveCommand | AbsMoveCommand; +type RelLineCommand = ['l', number, number]; +type AbsLineCommand = ['L', number, number]; +type LineCommand = RelLineCommand | AbsLineCommand; +type RelHorizontalCommand = ['h', number]; +type AbsHorizontalCommand = ['H', number]; +type HorizontalCommand = RelHorizontalCommand | AbsHorizontalCommand; +type RelVerticalCommand = ['v', number]; +type AbsVerticalCommand = ['V', number]; +type VerticalCommand = RelVerticalCommand | AbsVerticalCommand; +type RelClosePathCommand = ['z']; +type AbsClosePathCommand = ['Z']; +type ClosePathCommand = RelClosePathCommand | AbsClosePathCommand; +type RelBezierCurveCommand = ['c', number, number, number, number, number, number]; +type AbsBezierCurveCommand = ['C', number, number, number, number, number, number]; +type BezierCurveCommand = RelBezierCurveCommand | AbsBezierCurveCommand; +type RelFollowingBezierCurveCommand = ['s', number, number, number, number]; +type AbsFollowingBezierCurveCommand = ['S', number, number, number, number]; +type FollowingBezierCurveCommand = RelFollowingBezierCurveCommand | AbsFollowingBezierCurveCommand; +type RelQuadraticCurveCommand = ['q', number, number, number, number]; +type AbsQuadraticCurveCommand = ['Q', number, number, number, number]; +type QuadraticCurveCommand = RelQuadraticCurveCommand | AbsQuadraticCurveCommand; +type RelFollowingQuadraticCurveCommand = ['t', number, number]; +type AbsFollowingQuadraticCurveCommand = ['T', number, number]; +type FollowingQuadraticCurveCommand = RelFollowingQuadraticCurveCommand | AbsFollowingQuadraticCurveCommand; +type RelArcCommand = ['a', number, number, number, number, number, number, number]; +type AbsArcCommand = ['A', number, number, number, number, number, number, number]; +type ArcCommand = RelArcCommand | AbsArcCommand; +type AnyCommand = MoveCommand | LineCommand | HorizontalCommand | VerticalCommand | + ClosePathCommand | BezierCurveCommand | FollowingBezierCurveCommand | + QuadraticCurveCommand | FollowingQuadraticCurveCommand | ArcCommand; +type AbsAnyCommand = AbsMoveCommand | AbsLineCommand | AbsHorizontalCommand | AbsVerticalCommand | + AbsClosePathCommand | AbsBezierCurveCommand | AbsFollowingBezierCurveCommand | + AbsQuadraticCurveCommand | AbsFollowingQuadraticCurveCommand | AbsArcCommand; +declare function absolutize(path: AnyCommand[]): AbsAnyCommand[]; +export = absolutize; diff --git a/types/react-native-responsive-dimensions/tsconfig.json b/types/abs-svg-path/tsconfig.json similarity index 89% rename from types/react-native-responsive-dimensions/tsconfig.json rename to types/abs-svg-path/tsconfig.json index 457c1b628b..7247dffcd9 100644 --- a/types/react-native-responsive-dimensions/tsconfig.json +++ b/types/abs-svg-path/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "react-native-responsive-dimensions-tests.ts" + "abs-svg-path-tests.ts" ] } diff --git a/types/docx-templates/tslint.json b/types/abs-svg-path/tslint.json similarity index 100% rename from types/docx-templates/tslint.json rename to types/abs-svg-path/tslint.json diff --git a/types/ace/index.d.ts b/types/ace/index.d.ts index 2588539c0c..867483c567 100644 --- a/types/ace/index.d.ts +++ b/types/ace/index.d.ts @@ -3080,7 +3080,7 @@ declare namespace AceAjax { docHTML?: string; } - export type CompletionCallback = (error: Error, results: Completion[]) => void; + export type CompletionCallback = (error: Error | null, results: Completion[]) => void; } declare var ace: AceAjax.Ace; diff --git a/types/adm-zip/adm-zip-tests.ts b/types/adm-zip/adm-zip-tests.ts index bd17c098be..af7449a79d 100644 --- a/types/adm-zip/adm-zip-tests.ts +++ b/types/adm-zip/adm-zip-tests.ts @@ -13,19 +13,11 @@ zipEntries.forEach(zipEntry => { // outputs the content of some_folder/my_file.txt console.log(zip.readAsText('some_folder/my_file.txt')); // extracts the specified file to the specified location -zip.extractEntryTo( - /*entry name*/ 'some_folder/my_file.txt', - /*target path*/ '/home/me/tempfolder', - /*overwrite*/ true -); +zip.extractEntryTo(/*entry name*/ 'some_folder/my_file.txt', /*target path*/ '/home/me/tempfolder', /*overwrite*/ true); // extracts everything zip.extractAllTo(/*target path*/ '/home/me/zipcontent/', /*overwrite*/ true); // extracts everything and calls callback -> async extracction -zip.extractAllToAsync( - /*target path*/ '/home/me/zipcontent/', - /*overwrite*/ true, - (error: Error) => {} -); +zip.extractAllToAsync(/*target path*/ '/home/me/zipcontent/', /*overwrite*/ true, (error: Error) => {}); // creating archives new AdmZip(); @@ -36,6 +28,13 @@ zip.addFile('test.txt', new Buffer('inner content of the file'), 'entry comment zip.addLocalFile('/home/me/some_picture.png'); // get everything as a buffer const willSendthis = zip.toBuffer(); + +zip.toBuffer( + buffer => console.log(buffer.length), + () => {}, + name => console.log(name), + name => console.log(name), +); // or write everything to disk zip.writeZip(/*target file name*/ '/home/me/files.zip'); diff --git a/types/adm-zip/index.d.ts b/types/adm-zip/index.d.ts index 52fd86a9e0..b4cc7303aa 100644 --- a/types/adm-zip/index.d.ts +++ b/types/adm-zip/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: John Vilk // Abner Oliveira // BendingBender +// Matthew Sainsbury // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -23,10 +24,7 @@ declare class AdmZip { * @param entry The full path of the entry or a `IZipEntry` object. * @param callback Called with a `Buffer` or `null` in case of error. */ - readFileAsync( - entry: string | AdmZip.IZipEntry, - callback: (data: Buffer | null, err: string) => any - ): void; + readFileAsync(entry: string | AdmZip.IZipEntry, callback: (data: Buffer | null, err: string) => any): void; /** * Extracts the given entry from the archive and returns the content as * plain text in the given encoding. @@ -40,11 +38,7 @@ declare class AdmZip { * @param callback Called with the resulting string. * @param encoding If no encoding is specified `"utf8"` is used. */ - readAsTextAsync( - fileName: string | AdmZip.IZipEntry, - callback: (data: string) => any, - encoding?: string - ): void; + readAsTextAsync(fileName: string | AdmZip.IZipEntry, callback: (data: string) => any, encoding?: string): void; /** * Remove the entry from the file or the entry and all its nested directories * and files if the given entry is a directory. @@ -97,11 +91,7 @@ declare class AdmZip { * @param zipPath Path to a folder in the archive. Default: `""`. * @param filter RegExp or Function if files match will be included. */ - addLocalFolder( - localPath: string, - zipPath?: string, - filter?: RegExp | ((filename: string) => boolean) - ): void; + addLocalFolder(localPath: string, zipPath?: string, filter?: RegExp | ((filename: string) => boolean)): void; /** * Allows you to create a entry (file or directory) in the zip file. * If you want to create a directory the `entryName` must end in `"/"` and a `null` @@ -140,7 +130,7 @@ declare class AdmZip { entryPath: string | AdmZip.IZipEntry, targetPath: string, maintainEntryPath?: boolean, - overwrite?: boolean + overwrite?: boolean, ): boolean; /** * Extracts the entire archive to the given location. @@ -156,11 +146,7 @@ declare class AdmZip { * will be overwriten if this is `true`. Default: `false`. * @param callback The callback function will be called after extraction. */ - extractAllToAsync( - targetPath: string, - overwrite?: boolean, - callback?: (error: Error) => void - ): void; + extractAllToAsync(targetPath: string, overwrite?: boolean, callback?: (error: Error) => void): void; /** * Writes the newly created zip file to disk at the specified location or * if a zip was opened and no `targetFileName` is provided, it will @@ -171,6 +157,19 @@ declare class AdmZip { * Returns the content of the entire zip file. */ toBuffer(): Buffer; + /** + * Asynchronously returns the content of the entire zip file. + * @param onSuccess called with the content of the zip file, once it has been generated. + * @param onFail unused. + * @param onItemStart called before an entry is compressed. + * @param onItemEnd called after an entry is compressed. + */ + toBuffer( + onSuccess: (buffer: Buffer) => void, + onFail?: (...args: any[]) => void, + onItemStart?: (name: string) => void, + onItemEnd?: (name: string) => void, + ): void; } declare namespace AdmZip { diff --git a/types/adobe__es-modules-middleware/index.d.ts b/types/adobe__es-modules-middleware/index.d.ts new file mode 100644 index 0000000000..30b831f7a3 --- /dev/null +++ b/types/adobe__es-modules-middleware/index.d.ts @@ -0,0 +1,30 @@ +// Type definitions for @adobe/es-modules-middleware 1.1 +// Project: https://github.com/adobe/es-modules-middleware#readme +// Definitions by: Piotr Błażejewicz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.2 + +import 'karma'; +import { NextHandleFunction } from 'connect'; + +declare module 'karma' { + interface ConfigOptions { + /** + * used in Karma to aid in testing es-modules in the browser + * see {@link https://github.com/adobe/es-modules-middleware} + */ + esModulesMiddleware?: MiddlewareOptions; + } +} + +/** + * used as a connect middleware by providing it with a map of url base path to file system path from which to serve files. + * Any files served through the middleware will be processed to resolve import/export paths properly. + */ +export interface MiddlewareOptions { + /** a map of url base path to file system path from which to serve files */ + paths: { + [path: string]: string; + }; +} +export function middleware(options?: MiddlewareOptions): NextHandleFunction; diff --git a/types/adobe__es-modules-middleware/test/express.tests.ts b/types/adobe__es-modules-middleware/test/express.tests.ts new file mode 100644 index 0000000000..34abae8db0 --- /dev/null +++ b/types/adobe__es-modules-middleware/test/express.tests.ts @@ -0,0 +1,19 @@ +/// +import esModuleMiddleware = require('@adobe/es-modules-middleware'); +import express = require('express'); +import path = require('path'); + +const app = express(); +const port = 3000; + +const rootPath = path.resolve(__dirname); + +app.use( + esModuleMiddleware.middleware({ + paths: { + '/node_modules': path.join(rootPath, 'node_modules'), + }, + }), +); + +app.listen(port, () => console.log(`Example app listening on port ${port}!`)); diff --git a/types/adobe__es-modules-middleware/test/karma.tests.ts b/types/adobe__es-modules-middleware/test/karma.tests.ts new file mode 100644 index 0000000000..e50fc14317 --- /dev/null +++ b/types/adobe__es-modules-middleware/test/karma.tests.ts @@ -0,0 +1,39 @@ +/// +import path = require('path'); +import karma = require('karma'); + +module.exports = (config: karma.Config) => { + config.set({ + // @adobe/es-modules-middleware + esModulesMiddleware: { + paths: { + '/': __dirname, + '/node_modules': path.join(__dirname, 'node_modules'), + }, + }, + + // other + basePath: '.', + plugins: ['karma-*', require('@adobe/es-modules-middleware')], + frameworks: ['mocha', 'chai', 'sinon', 'web-components'], + middleware: ['es-modules'], + files: [ + { + pattern: '**/*.test.html', + watched: false, + included: false, + served: true, + }, + { + pattern: '**/test/*.js', + watched: true, + included: false, + served: false, + }, + ], + proxies: { + '/node_modules/': '/base/node_modules/', + }, + reporters: ['mocha'], + }); +}; diff --git a/types/adobe__es-modules-middleware/tsconfig.json b/types/adobe__es-modules-middleware/tsconfig.json new file mode 100644 index 0000000000..c28f37f03a --- /dev/null +++ b/types/adobe__es-modules-middleware/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@adobe/es-modules-middleware": [ + "adobe__es-modules-middleware" + ] + } + }, + "files": [ + "index.d.ts", + "test/express.tests.ts", + "test/karma.tests.ts" + ] +} diff --git a/types/w3c-css-typed-object-model-level-1/tslint.json b/types/adobe__es-modules-middleware/tslint.json similarity index 100% rename from types/w3c-css-typed-object-model-level-1/tslint.json rename to types/adobe__es-modules-middleware/tslint.json diff --git a/types/aes-js/aes-js-tests.ts b/types/aes-js/aes-js-tests.ts index 4f9d582630..9379fda89e 100644 --- a/types/aes-js/aes-js-tests.ts +++ b/types/aes-js/aes-js-tests.ts @@ -8,3 +8,6 @@ const ecb = new aesjs.ModeOfOperation.ecb(key); ecb.decrypt(ecb.encrypt(data)); const hex: string = aesjs.utils.hex.fromBytes(data); + +const ctr = new aesjs.ModeOfOperation.ctr(key, new aesjs.Counter([])); +ctr.encrypt(data); diff --git a/types/aes-js/index.d.ts b/types/aes-js/index.d.ts index 142e03f7d9..e6bebdb9df 100644 --- a/types/aes-js/index.d.ts +++ b/types/aes-js/index.d.ts @@ -19,7 +19,7 @@ export class AES { * @param initialValue The Counter initial value. */ export class Counter { - constructor(initialValue: number) + constructor(initialValue: number | ByteSource) setValue(value: number): void; setBytes(bytes: ByteSource): void; increment(): void; diff --git a/types/akamai-edgeworkers/README.md b/types/akamai-edgeworkers/README.md index 2066a52626..49ab25301c 100644 --- a/types/akamai-edgeworkers/README.md +++ b/types/akamai-edgeworkers/README.md @@ -1,13 +1,13 @@ -Bindings for the Akamai [EdgeWorker API]. This allows you to write -your EdgeWorkers in TypeScript. +Bindings for the Akamai [EdgeWorker API]. This allows you to write +your EdgeWorkers in TypeScript. -Types are available for the `Request` and `Response` objects, as well as the -built-in modules. +Types are available for the `Request` and `Response` objects, as well as the +built-in modules. # User Guide -EdgeWorkers are written in ECMAScript6, so you need to set your -`tsconfig.json` to use `es6` as the compilation target and module +EdgeWorkers are written in ECMAScript6, so you need to set your +`tsconfig.json` to use `es6` as the compilation target and module code generator: ```json5 @@ -15,32 +15,32 @@ code generator: "compilerOptions": { "module": "es6", "target": "es6", -//... + //... } } -``` +``` ## Using the `Request` and `Response` Objects -The predefined EdgeWorker callbacks take Request and Response objects as +The predefined EdgeWorker callbacks take Request and Response objects as arguments. After you have installed this package, you can create a `main.ts` with the following stubs: ```typescript /// -export function onClientRequest(request : EW.MutableRequest & EW.HasRespondWith){} -export function onOriginRequest(request : EW.MutableRequest) {} -export function onOriginResponse(request : EW.ImmutableRequest & EW.HasRespondWith, response : EW.Response) {} -export function onClientResponse(request : EW.ImmutableRequest, response : EW.Response) {} +export function onClientRequest(request: EW.IngressClientRequest) {} +export function onOriginRequest(request: EW.IngressOriginRequest) {} +export function onOriginResponse(request: EW.EgressOriginRequest, response: EW.EgressOriginResponse) {} +export function onClientResponse(request: EW.EgressClientRequest, response: EW.EgressClientResponse) {} ``` -The triple-slashed first line references this package and pulls `EW` into your -namespace. +The triple-slashed first line references this package and pulls `EW` into your +namespace. ## Using Built-In Modules -Bindings are available for the built-in `cookies` and `url-search-params` +Bindings are available for the built-in `cookies` and `url-search-params` modules. Once you've added the triple-slash reference to `akamai-edgeworkers` you can import them normally: @@ -51,8 +51,8 @@ import { Cookies } from 'cookies'; function onClientRequest(request: EW.MutableRequest & EW.HasRespondWith) { const cookie = new Cookies(request.getHeader('cookies') || undefined); -//... + //... } ``` -[EdgeWorker API]: https://developer.akamai.com/api/web_performance/edgeworkers/v1.html \ No newline at end of file +[EdgeWorker API]: https://learn.akamai.com/en-us/webhelp/edgeworkers/edgeworkers-user-guide/GUID-14077BCA-0D9F-422C-8273-2F3E37339D5B.html diff --git a/types/akamai-edgeworkers/index.d.ts b/types/akamai-edgeworkers/index.d.ts index dfca9f5fbf..d34804775b 100644 --- a/types/akamai-edgeworkers/index.d.ts +++ b/types/akamai-edgeworkers/index.d.ts @@ -30,11 +30,19 @@ declare namespace EW { interface ReadsVariables { /** - * Get's the value of a request variable + * Gets the value of a metadata variable */ getVariable(name: string): string | undefined; } + interface MutatesVariables { + /** + * Sets the value of a metadata variable, throwing an error if the + * variable name does not start with 'PMUSER_' + */ + setVariable(name: string, value: string): void; + } + interface HasRespondWith { /** * Indicates that a complete response is being generated for a @@ -68,6 +76,72 @@ declare namespace EW { status: number; } + interface HasRoute { + /** + * If called, indicates that the request should be routed to a pre-specified origin + * server,or have the path or query string modified. + * + * @param destination Object holding properties that will control route + */ + route(destination: Destination): void; + } + + interface CacheKey { + /** + * Specifies that the entire query string should be excluded from the cache key. By + * default, the entire query string is part of the cache key. + */ + excludeQueryString(): void; + + /** + * Specifies that the entire query string should be included from the cache key. This is + * done by default, however it is provided as an API to be reverted to the default. + */ + includeQueryString(): void; + + /** + * Specifies that the named query argument is included in the cache key. Can be called + * multiple times to include multiple query arguments. Calling this function will result + * in all query arguments not explicitly included to be excluded from the cache key. By + * default, the entire query string is part of the cache key. This would override previous + * calls to "excludeQueryString()" or "includeQueryString()". + * + * @param name The name of the query arg to include in the cache key + */ + includeQueryArgument(name: string): void; + + /** + * Specifies that the named cookie is included in the cache key. Can be called multiple + * times to include multiple cookies. + * + * @param name The name of the cookie to include in the cid + */ + includeCookie(name: string): void; + + /** + * Specifies that the named HTTP request header is included in the cache key. Can be + * called multiple times to include multiple headers. + * + * @param name The name of the header to include in the cid + */ + includeHeader(name: string): void; + + /** + * Specifies that the named variable is included in the cache key. Can be called multiple + * times to include multiple variable. + * + * @param name The name of the variable to include in the cid + */ + includeVariable(name: string): void; + } + + interface HasCacheKey { + /** + * An object for manipulating this requests cache key. Only present during `onClientRequest()`. + */ + readonly cacheKey: CacheKey; + } + interface Request { /** * The Host header value of the incoming request. @@ -96,7 +170,7 @@ declare namespace EW { readonly query: string; /** - * The Relative URL of the incoming request. This includes the path as well + * The relative URL of the incoming request. This includes the path as well * as the query string. */ readonly url: string; @@ -109,27 +183,63 @@ declare namespace EW { readonly userLocation: UserLocation | undefined; /** - * Object containing properties specifying the device characteristics. This + * Object containing properties specifying the device characteristics. The * value of this property will be null if the contract associated with the * request does not have entitlements for EDC. */ readonly device: Device | undefined; /** - * The cpcode used for reporting. + * The CP code used for reporting. */ readonly cpCode: number; } + // Legacy interfaces for backwards compatibility interface MutableRequest extends MutatesHeaders, ReadsHeaders, ReadsVariables, Request { } - interface ImmutableRequest extends ReadsHeaders, ReadsVariables, Request { } - interface Response extends HasStatus, MutatesHeaders, ReadsHeaders { } + // onClientRequest + interface IngressClientRequest extends MutatesHeaders, ReadsHeaders, ReadsVariables, Request, HasRespondWith, HasRoute, HasCacheKey, MutatesVariables { + } + + // onOriginRequest + interface IngressOriginRequest extends MutatesHeaders, ReadsHeaders, ReadsVariables, Request, MutatesVariables { + } + + // onOriginResponse + interface EgressOriginRequest extends ReadsHeaders, ReadsVariables, Request, HasRespondWith, MutatesVariables { + } + interface EgressOriginResponse extends MutatesHeaders, ReadsHeaders, HasStatus { + } + + // onClientResponse + interface EgressClientRequest extends ReadsHeaders, ReadsVariables, Request, MutatesVariables { + } + interface EgressClientResponse extends MutatesHeaders, ReadsHeaders, HasStatus { + } + + interface Destination { + /** + * The identifier of the pre-configured origin to send the outgoing request to. + */ + origin?: string; + + /** + * The new path to use in the outgoing request. + */ + path?: string; + + /** + * The new query string to use in the outgoing request. + */ + query?: string; + } + /** * Notes: * * If the IP address is in the reserved IP space (as designated by the diff --git a/types/akamai-edgeworkers/test/akamai-edgeworkers-global.test.ts b/types/akamai-edgeworkers/test/akamai-edgeworkers-global.test.ts index e1caca7180..bb2e206e95 100644 --- a/types/akamai-edgeworkers/test/akamai-edgeworkers-global.test.ts +++ b/types/akamai-edgeworkers/test/akamai-edgeworkers-global.test.ts @@ -1,4 +1,4 @@ -export function onClientRequest(request: EW.MutableRequest & EW.HasRespondWith) { +export function onClientRequest(request: EW.IngressClientRequest) { // Exercise EW.ClientRequest.setHeader() request.setHeader("from-set-header-1", ["value-1", "trailer-1"]); @@ -20,7 +20,7 @@ export function onClientRequest(request: EW.MutableRequest & EW.HasRespondWith) } } -export function onOriginRequest(request: EW.MutableRequest) { +export function onOriginRequest(request: EW.IngressOriginRequest) { // getHeader const h = request.getHeader("onOriginRequest-getHeader"); if (h == null) { @@ -43,7 +43,7 @@ export function onOriginRequest(request: EW.MutableRequest) { request.setHeader("variable", v); } -export function onOriginResponse(request: EW.ImmutableRequest & EW.HasRespondWith, response: EW.Response) { +export function onOriginResponse(request: EW.EgressOriginRequest, response: EW.EgressOriginResponse) { if (response.getHeader("should-respondWith")) { request.respondWith(444, {}, "wanted a respond with"); return; @@ -82,7 +82,7 @@ export function onOriginResponse(request: EW.ImmutableRequest & EW.HasRespondWit response.status = 189; } -export function onClientResponse(request: EW.ImmutableRequest, response: EW.Response) { +export function onClientResponse(request: EW.EgressClientRequest, response: EW.EgressClientResponse) { if (request.getHeader("should-status")) { response.status = 234; return; diff --git a/types/akamai-edgeworkers/test/cookies-tests.ts b/types/akamai-edgeworkers/test/cookies-tests.ts index c44183cc6d..ec0c9ee3a8 100644 --- a/types/akamai-edgeworkers/test/cookies-tests.ts +++ b/types/akamai-edgeworkers/test/cookies-tests.ts @@ -1,6 +1,6 @@ import { Cookies, SetCookie } from 'cookies'; -function onClientRequest(request: EW.MutableRequest & EW.HasRespondWith) { +function onClientRequest(request: EW.IngressClientRequest) { // Verify parse constructor const c = new Cookies(request.getHeader('cookies') || undefined); @@ -31,7 +31,7 @@ function onClientRequest(request: EW.MutableRequest & EW.HasRespondWith) { c.delete('name'); } -function onClientRequest2(request: EW.MutableRequest & EW.HasRespondWith) { +function onClientRequest2(request: EW.IngressClientRequest) { // The values passed to SetCookie can be ignored - they're just to verify the compiler. const c = new SetCookie({ name: "n", diff --git a/types/akamai-edgeworkers/test/set_variable.ts b/types/akamai-edgeworkers/test/set_variable.ts new file mode 100644 index 0000000000..7ec593d6fd --- /dev/null +++ b/types/akamai-edgeworkers/test/set_variable.ts @@ -0,0 +1,15 @@ +export function onClientRequest(request: EW.IngressClientRequest) { + request.setVariable('PMUSER_client_request', 'foobar'); +} + +export function onOriginRequest(request: EW.IngressOriginRequest) { + request.setVariable('PMUSER_origin_request', 'foobar'); +} + +export function onOriginResponse(request: EW.EgressOriginRequest, response: EW.EgressOriginResponse) { + request.setVariable('PMUSER_origin_response', 'foobar'); +} + +export function onClientResponse(request: EW.EgressClientRequest, response: EW.EgressClientResponse) { + request.setVariable('PMUSER_client_response', 'foobar'); +} diff --git a/types/akamai-edgeworkers/test/url-search-params-tests.ts b/types/akamai-edgeworkers/test/url-search-params-tests.ts index c44233711e..5ceca0e380 100644 --- a/types/akamai-edgeworkers/test/url-search-params-tests.ts +++ b/types/akamai-edgeworkers/test/url-search-params-tests.ts @@ -1,6 +1,6 @@ import URLSearchParams from 'url-search-params'; -export function onClientRequest(request: EW.MutableRequest & EW.HasRespondWith) { +export function onClientRequest(request: EW.IngressClientRequest) { const params = new URLSearchParams(request.query); params.append("from-script", "from-value"); diff --git a/types/akamai-edgeworkers/tsconfig.json b/types/akamai-edgeworkers/tsconfig.json index 46f0352d44..2500528392 100644 --- a/types/akamai-edgeworkers/tsconfig.json +++ b/types/akamai-edgeworkers/tsconfig.json @@ -21,6 +21,7 @@ "index.d.ts", "test/akamai-edgeworkers-global.test.ts", "test/cookies-tests.ts", + "test/set_variable.ts", "test/url-search-params-tests.ts" ] } diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts index b6df289947..66c093d424 100644 --- a/types/ali-oss/index.d.ts +++ b/types/ali-oss/index.d.ts @@ -180,6 +180,7 @@ declare namespace OSS { interface PutObjectResult { name: string; + url: string; data: object; res: NormalSuccessResponse; } diff --git a/types/amqp-connection-manager/index.d.ts b/types/amqp-connection-manager/index.d.ts index 62db649444..b231923e7d 100644 --- a/types/amqp-connection-manager/index.d.ts +++ b/types/amqp-connection-manager/index.d.ts @@ -103,7 +103,7 @@ export interface AmqpConnectionManager extends EventEmitter { * Create a new ChannelWrapper. This is a proxy for the actual channel (which may or may not exist at any moment, depending on whether or not we are currently connected.) * @param opts */ - createChannel(opts: CreateChannelOpts): ChannelWrapper; + createChannel(opts?: CreateChannelOpts): ChannelWrapper; /** * Returns true if the AmqpConnectionManager is connected to a broker, false otherwise. diff --git a/types/analytics-node/analytics-node-tests.ts b/types/analytics-node/analytics-node-tests.ts index eef2065293..f8f0a80772 100644 --- a/types/analytics-node/analytics-node-tests.ts +++ b/types/analytics-node/analytics-node-tests.ts @@ -59,6 +59,24 @@ function testTrack(): void { } }); + analytics.track({ + anonymousId: '019mr8mf4r', + event: 'Purchased an Item', + properties: { + revenue: 39.95, + shippingMethod: '2-day' + } + }); + + // $ExpectError + analytics.track({ + event: 'Purchased an Item', + properties: { + revenue: 39.95, + shippingMethod: '2-day' + } + }); + analytics.track({ userId: '019mr8mf4r', event: 'Purchased an Item', diff --git a/types/analytics-node/index.d.ts b/types/analytics-node/index.d.ts index fba1ffc246..101852b8c8 100644 --- a/types/analytics-node/index.d.ts +++ b/types/analytics-node/index.d.ts @@ -3,11 +3,16 @@ // Definitions by: Andrew Fong // Thomas Thiebaud // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 export = AnalyticsNode.Analytics; declare namespace AnalyticsNode { - interface Message { + type Identity = + | { userId: string | number } + | { userId?: string | number; anonymousId: string | number }; + + type Message = Identity & { type: string; context: { library: { @@ -22,9 +27,7 @@ declare namespace AnalyticsNode { }; timestamp?: Date; messageId?: string; - anonymousId?: string | number; - userId?: string | number; - } + }; interface Data { batch: Message[]; @@ -49,9 +52,7 @@ declare namespace AnalyticsNode { /* The identify method lets you tie a user to their actions and record traits about them. */ - identify(message: { - userId?: string | number; - anonymousId?: string | number; + identify(message: Identity & { traits?: any; timestamp?: Date; context?: any; @@ -59,9 +60,7 @@ declare namespace AnalyticsNode { }, callback?: (err: Error, data: Data) => void): Analytics; /* The track method lets you record the actions your users perform. */ - track(message: { - userId?: string | number; - anonymousId?: string | number; + track(message: Identity & { event: string; properties?: any; timestamp?: Date; @@ -71,9 +70,7 @@ declare namespace AnalyticsNode { /* The page method lets you record page views on your website, along with optional extra information about the page being viewed. */ - page(message: { - userId?: string | number; - anonymousId?: string | number; + page(message: Identity & { category?: string; name?: string; properties?: any; @@ -83,18 +80,14 @@ declare namespace AnalyticsNode { }, callback?: (err: Error, data: Data) => void): Analytics; /* alias is how you associate one identity with another. */ - alias(message: { + alias(message: Identity & { previousId: string | number; - userId?: string | number; - anonymousId?: string | number; integrations?: Integrations; }, callback?: (err: Error, data: Data) => void): Analytics; /* Group calls can be used to associate individual users with shared accounts or companies. */ - group(message: { - userId?: string | number; - anonymousId?: string | number; + group(message: Identity & { groupId: string | number; traits?: any; context?: any; diff --git a/types/angular-route/angular-route-tests.ts b/types/angular-route/angular-route-tests.ts index e1e7bd43fd..35ba6da392 100644 --- a/types/angular-route/angular-route-tests.ts +++ b/types/angular-route/angular-route-tests.ts @@ -6,6 +6,15 @@ */ declare var $routeProvider: ng.route.IRouteProvider; +if (!$routeProvider.eagerInstantiationEnabled()) { + throw new Error("The default of $routeProvider.eagerInstantiationEnabled should be true."); +} + +$routeProvider.eagerInstantiationEnabled(false); +if ($routeProvider.eagerInstantiationEnabled()) { + throw new Error("$routeProvider.eagerInstantiationEnabled is expected to be false."); +} + $routeProvider .when('/projects/:projectId/dashboard', { controller: 'I am a string', diff --git a/types/angular-route/index.d.ts b/types/angular-route/index.d.ts index 15529f1572..b484cf607f 100644 --- a/types/angular-route/index.d.ts +++ b/types/angular-route/index.d.ts @@ -200,6 +200,20 @@ declare module 'angular' { * This option defaults to false. If the option is set to true, then the particular route can be matched without being case sensitive */ caseInsensitiveMatch?: boolean; + /** + * Call this method as a setter to enable/disable eager instantiation of the $route service upon application bootstrap. + * + * Instantiating $route early is necessary for capturing the initial $locationChangeStart event and navigating to the appropriate route. Usually, $route is instantiated in time by the ngView directive. Yet, in cases where ngView is included in an asynchronously loaded template (e.g. in another directive's template), the directive factory might not be called soon enough for $route to be instantiated before the initial $locationChangeSuccess event is fired. Eager instantiation ensures that $route is always instantiated in time, regardless of when ngView will be loaded. + * + * The default value is true. + * + * @param enabled If provided, update the internal eagerInstantiationEnabled flag. + */ + eagerInstantiationEnabled(enabled: boolean) : IRouteProvider; + /** + * Call this method as a getter (i.e. without any arguments) to get the current value of the eagerInstantiationEnabled flag. + */ + eagerInstantiationEnabled() : boolean; /** * Sets route definition that will be used on route change when no other route definition is matched. * diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index b7855df0c6..28d01dfc3e 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -1012,7 +1012,7 @@ angular.module('docsTimeDirective', []) return { link(scope: ng.IScope, element: JQLite, attrs: ng.IAttributes) { let format: any; - let timeoutId: any; + let timeoutId: angular.IPromise; function updateTime() { element.text(dateFilter(new Date(), format)); @@ -1538,3 +1538,10 @@ angular.module('WithGenerics', []) scope['name'] = 'Jeff'; }; }); + +angular.errorHandlingConfig(); // $ExpectType IErrorHandlingConfig +// $ExpectType void +angular.errorHandlingConfig({ + objectMaxDepth: 5, + urlErrorParamsEnabled: true, +}); diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index 0c28ddbf27..e54b8664f6 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -1,10 +1,11 @@ -// Type definitions for Angular JS 1.6 +// Type definitions for Angular JS 1.7 // Project: http://angularjs.org // Definitions by: Diego Vilar // Georgii Dolzhykov // Caleb St-Denis // Leonard Thieu // Steffen Kowalski +// Piotr Błażejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -89,6 +90,12 @@ declare namespace angular { * If jQuery is available, angular.element is an alias for the jQuery function. If jQuery is not available, angular.element delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite." */ element: JQueryStatic; + /** + * Configure several aspects of error handling in AngularJS if used as a setter + * or return the current configuration if used as a getter + */ + errorHandlingConfig(): IErrorHandlingConfig; + errorHandlingConfig(config: IErrorHandlingConfig): void; equals(value1: any, value2: any): boolean; extend(destination: any, ...sources: any[]): any; @@ -140,7 +147,6 @@ declare namespace angular { isObject(value: any): value is T; isString(value: any): value is string; isUndefined(value: any): boolean; - lowercase(str: string): string; /** * Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2). @@ -169,7 +175,6 @@ declare namespace angular { noop(...args: any[]): void; reloadWithDebugInfo(): void; toJson(obj: any, pretty?: boolean | number): string; - uppercase(str: string): string; version: { full: string; major: number; @@ -373,6 +378,7 @@ declare namespace angular { $name?: string; $pending?: { [validationErrorKey: string]: Array }; $addControl(control: INgModelController | IFormController): void; + $getControls(): ReadonlyArray; $removeControl(control: INgModelController | IFormController): void; $setValidity(validationErrorKey: string, isValid: boolean, control: INgModelController | IFormController): void; $setDirty(): void; @@ -435,6 +441,17 @@ declare namespace angular { allowInvalid?: boolean; getterSetter?: boolean; timezone?: string; + /** + * Defines if the time and datetime-local types should show seconds and milliseconds. + * The option follows the format string of date filter. + * By default, the options is undefined which is equal to 'ss.sss' (seconds and milliseconds) + */ + timeSecondsFormat?: string; + /** + * Defines if the time and datetime-local types should strip the seconds and milliseconds + * from the formatted value if they are zero. This option is applied after `timeSecondsFormat` + */ + timeStripZeroSeconds?: boolean; } interface IModelValidators { @@ -448,6 +465,21 @@ declare namespace angular { [index: string]: (modelValue: any, viewValue: any) => IPromise; } + interface IErrorHandlingConfig { + /** + * The max depth for stringifying objects. + * Setting to a non-positive or non-numeric value, removes the max depth limit + * @default 5 + */ + objectMaxDepth?: number; + /** + * Specifies whether the generated error url will contain the parameters of the thrown error. + * Disabling the parameters can be useful if the generated error url is very long. + * @default true; + */ + urlErrorParamsEnabled?: boolean; + } + interface IModelParser { (value: any): any; } @@ -1484,7 +1516,6 @@ declare namespace angular { interface IControllerProvider extends IServiceProvider { register(name: string, controllerConstructor: Function): void; register(name: string, dependencyAnnotatedConstructor: any[]): void; - allowGlobals(): void; } /** diff --git a/types/apicalypse/apicalypse-tests.ts b/types/apicalypse/apicalypse-tests.ts new file mode 100644 index 0000000000..273e89215c --- /dev/null +++ b/types/apicalypse/apicalypse-tests.ts @@ -0,0 +1,56 @@ +import Apicalypse from 'apicalypse'; + +// $ExpectType Apicalypse +Apicalypse({ + baseURL: 'https://my-api.url', + queryMethod: 'url', + auth: { + username: 'user', + password: 'pass', + }, + headers: { + Accept: 'application/json', + }, + responseType: 'json', + timeout: 30000, +}); + +// $ExpectType Promise> +Apicalypse() + .fields('id,slug,name') + .fields(['rating', 'popularity']) + .sort('rating desc') + .sort('name', 'asc') + .limit(10) + .offset(20) + .where('rating > 0; popularity > 10') + .where(['popularity < 100', 'first_release_date > 788918400']) + .request('/games'); + +// $ExpectType Promise +Apicalypse() + .search('title') + .requestAll('/games'); + +// $ExpectType Promise +Apicalypse() + .search('title') + .requestAll('/games', {}); + +// $ExpectType Promise +Apicalypse() + .search('title') + .requestAll('/games', { + concurrency: 2, + delay: 500, + }); + +// $ExpectType Apicalypse +Apicalypse().multi([ + Apicalypse() + .query('/games', 'game') + .where('id == 1081'), + Apicalypse() + .query('/achievements', 'achievements') + .where('game_id == 1081'), +]); diff --git a/types/apicalypse/index.d.ts b/types/apicalypse/index.d.ts new file mode 100644 index 0000000000..ef979b5d8c --- /dev/null +++ b/types/apicalypse/index.d.ts @@ -0,0 +1,39 @@ +// Type definitions for apicalypse 0.1 +// Project: https://github.com/igdb/node-apicalypse +// Definitions by: Susam +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { AxiosRequestConfig, AxiosResponse } from 'axios'; + +export interface Apicalypse { + request(url: string): Promise; + requestAll(url: string, options?: RequestAllConfig): Promise; + + multi(queries: ReadonlyArray): Apicalypse; + query(endpoint: string, name: string): Apicalypse; + + fields(fields: string | ReadonlyArray): Apicalypse; + sort(field: string, direction?: SortDirection): Apicalypse; + limit(limit: number): Apicalypse; + offset(offset: number): Apicalypse; + search(search: string): Apicalypse; + where(filters: string | ReadonlyArray): Apicalypse; +} + +export interface RequestAllConfig { + concurrency?: number; + delay?: number; +} + +export type SortDirection = 'asc' | 'desc'; + +declare function apicalypseFactory(options?: ApicalypseConfig): Apicalypse; +declare function apicalypseFactory(rawQueryString: string, options?: ApicalypseConfig): Apicalypse; + +export interface ApicalypseConfig extends AxiosRequestConfig { + queryMethod?: QueryMethod; +} + +export type QueryMethod = 'body' | 'url'; + +export default apicalypseFactory; diff --git a/types/apicalypse/package.json b/types/apicalypse/package.json new file mode 100644 index 0000000000..18cbf3da9c --- /dev/null +++ b/types/apicalypse/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "axios": "^0.19.0" + } +} diff --git a/types/apicalypse/tsconfig.json b/types/apicalypse/tsconfig.json new file mode 100644 index 0000000000..6c17f6be0a --- /dev/null +++ b/types/apicalypse/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", + "apicalypse-tests.ts" + ] +} diff --git a/types/apicalypse/tslint.json b/types/apicalypse/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/apicalypse/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/arcgis-js-api/index.d.ts b/types/arcgis-js-api/index.d.ts index 3df8cdfa5c..85c2c430b6 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.14 +// Type definitions for ArcGIS API for JavaScript 4.15 // Project: http://js.arcgis.com // Definitions by: Esri // Bjorn Svensson @@ -12,14 +12,6 @@ interface IHandle { remove(): void; } -declare namespace JSX { - interface IntrinsicElements { - [elementName: string]: any; - } - - interface Element {} -} - declare namespace __esri { export class Accessor { constructor(obj?: any); @@ -120,9 +112,11 @@ declare namespace __esri { concat(value: T[] | Collection): Collection; every(callback: ItemTestCallback): boolean; filter(callback: ItemTestCallback): Collection; + filter(callback: (item: T, index: number) => item is S): Collection; find(callback: ItemTestCallback): T; findIndex(callback: ItemTestCallback): number; - flatten(callback: ItemCallback): Collection; + flatten(callback: (item: T, index: number) => T[] | Collection): Collection; + flatten(callback: (item: U, index: number) => U[] | Collection): Collection; forEach(callback: ItemCallback): void; getItemAt(index: number): T; includes(searchElement: T): boolean; @@ -291,6 +285,8 @@ declare namespace __esri { export type FeatureLayerLayerviewDestroyEventHandler = (event: FeatureLayerLayerviewDestroyEvent) => void; + export type FeatureTableSelectionChangeEventHandler = (event: FeatureTableSelectionChangeEvent) => void; + export type FeatureTemplatesSelectEventHandler = (event: FeatureTemplatesSelectEvent) => void; export type FeatureTemplatesViewModelSelectEventHandler = (event: FeatureTemplatesViewModelSelectEvent) => void; @@ -419,6 +415,8 @@ declare namespace __esri { export type MapViewImmediateClickEventHandler = (event: MapViewImmediateClickEvent) => void; + export type MapViewImmediateDoubleClickEventHandler = (event: MapViewImmediateDoubleClickEvent) => void; + export type MapViewKeyDownEventHandler = (event: MapViewKeyDownEvent) => void; export type MapViewKeyUpEventHandler = (event: MapViewKeyUpEvent) => void; @@ -1056,6 +1054,8 @@ declare namespace __esri { packages?: any[]; } + export type ErrorCallback = (error: Error) => void; + /** * Specifies the object used for intercepting and modifying requests made via [esriRequest](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html). * @@ -1074,6 +1074,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ before?: BeforeInterceptorCallback; + /** + * When an error occurs during the request processing, this function is called with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) object giving the details about what happened. For example, this could be used to log specific errors occurring with layers or services. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) + */ + error?: ErrorCallback; /** * Sets or adds headers into `requestOptions.headers`. See also: [requestOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions). * @@ -1098,15 +1104,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ urls?: string | RegExp | (string | RegExp)[]; - - /** - * When an error occurs during the request processing, this function is called with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) object giving the details about what happened. For example, this could be used to log specific errors occurring with layers or services. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) - * - * - */ - error(): void; } export type WatchCallback = (newValue: any, oldValue: any, propertyName: string, target: Accessor) => void; @@ -1305,12 +1302,12 @@ declare namespace __esri { } interface ErrorConstructor { - new (): Error; + new (name: string, message?: string, details?: any): Error; } export const Error: ErrorConstructor; - interface Evented { + export class Evented { /** * Emits an event on the instance. This method should only be used when creating subclasses of this class. * @@ -1342,12 +1339,6 @@ declare namespace __esri { on(type: string | string[], listener: EventHandler): IHandle; } - interface EventedConstructor { - new (): Evented; - } - - export const Evented: EventedConstructor; - export type EventHandler = (event: any) => void; interface HandleOwner extends Accessor { @@ -1725,21 +1716,6 @@ declare namespace __esri { export type ResolveCallback = (value?: any | Promise) => void; - interface requireUtils { - /** - * Dynamically requires one or more modules and returns a promise that resolves when all the specified modules have loaded. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-requireUtils.html#when) - * - * @param moduleRequire The `require` function used to load the modules. This is the AMD alias (e.g. the `moduleRequire` reference in the snippets below) used to reference the `require` module. - * @param moduleNames The names of the modules to load. - * - */ - when(moduleRequire: any, moduleNames: string[] | string): Promise; - } - - export const requireUtils: requireUtils; - /** * Various utilities and convenience functions for executing code at various phases of browser frames. The scheduling module allows you to register tasks that are executed in every animation frame. This can be used to synchronize updates with ongoing animations of the view, or to animate the view manually by adjusting the extent or camera in every frame. * @@ -2797,7 +2773,7 @@ declare namespace __esri { */ readonly width: number; /** - * The bottom-right X-coordinate of an extent envelope. + * The maximum X-coordinate of an extent envelope. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmax) * @@ -2805,7 +2781,7 @@ declare namespace __esri { */ xmax: number; /** - * The top-left X-coordinate of an extent envelope. + * The minimum X-coordinate of an extent envelope. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmin) * @@ -2813,7 +2789,7 @@ declare namespace __esri { */ xmin: number; /** - * The top-right Y-coordinate of an extent envelope. + * The maximum Y-coordinate of an extent envelope. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymax) * @@ -2821,7 +2797,7 @@ declare namespace __esri { */ ymax: number; /** - * The bottom-left Y-coordinate of an extent envelope. + * The minimum Y-coordinate of an extent envelope. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymin) * @@ -2965,7 +2941,7 @@ declare namespace __esri { */ mmin?: number; /** - * The bottom-right X-coordinate of an extent envelope. + * The maximum X-coordinate of an extent envelope. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmax) * @@ -2973,7 +2949,7 @@ declare namespace __esri { */ xmax?: number; /** - * The top-left X-coordinate of an extent envelope. + * The minimum X-coordinate of an extent envelope. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmin) * @@ -2981,7 +2957,7 @@ declare namespace __esri { */ xmin?: number; /** - * The top-right Y-coordinate of an extent envelope. + * The maximum Y-coordinate of an extent envelope. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymax) * @@ -2989,7 +2965,7 @@ declare namespace __esri { */ ymax?: number; /** - * The bottom-left Y-coordinate of an extent envelope. + * The minimum Y-coordinate of an extent envelope. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymin) * @@ -3036,7 +3012,7 @@ declare namespace __esri { */ hasM: boolean; /** - * Indicates if the geometry has Z (elevation) values. + * Indicates if the geometry has z-values (elevation). * > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#hasZ) @@ -3083,7 +3059,7 @@ declare namespace __esri { */ hasM?: boolean; /** - * Indicates if the geometry has Z (elevation) values. + * Indicates if the geometry has z-values (elevation). * > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#hasZ) @@ -3299,14 +3275,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicDensify) * * @param geometry A polyline or polygon to densify. - * @param maxSegmentLength The maximum segment length allowed. This must be a positive value. - * @param maxSegmentLengthUnit Measurement unit for `maxSegmentLength`. If a unit is not specified, the units are considered to be the same as the units of the `geometry`. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards + * @param maxSegmentLength The maximum segment length allowed (in meters if a `maxSegmentLengthUnit` is not provided). This must be a positive value. + * @param maxSegmentLengthUnit Measurement unit for `maxSegmentLength`. If not provided, the unit will default to `meters`. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards * */ geodesicDensify( geometry: Polyline | Polygon, maxSegmentLength: number, - maxSegmentLengthUnit: string | number + maxSegmentLengthUnit?: string | number ): Geometry; /** * Calculates the length of the input geometry. As opposed to [planarLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarLength), geodesicLength() takes into account the curvature of the earth when performing this calculation. Therefore, when using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate lengths using geodesicLength(). If the input geometries have a projected coordinate system other than Web Mercator, use [planarLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarLength) instead. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. @@ -3527,12 +3503,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#NearestPointResult) */ distance: number; - /** - * Indicates if the vertex is on the right side of the `geometry`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#NearestPointResult) - */ - isRightSide: boolean; /** * The index of the vertex within the geometry's rings or paths. * @@ -3747,14 +3717,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicDensify) * * @param geometry A polyline or polygon to densify. - * @param maxSegmentLength The maximum segment length allowed. This must be a positive value. - * @param maxSegmentLengthUnit Measurement unit for `maxSegmentLength`. If a unit is not specified, the units are considered to be the same as the units of the `geometry`. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards + * @param maxSegmentLength The maximum segment length allowed (in meters if a `maxSegmentLengthUnit` is not provided). This must be a positive value. + * @param maxSegmentLengthUnit Measurement unit for `maxSegmentLength`. If not provided, the unit will default to `meters`. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards * */ geodesicDensify( geometry: Polyline | Polygon, maxSegmentLength: number, - maxSegmentLengthUnit: string | number + maxSegmentLengthUnit?: string | number ): Promise; /** * Calculates the length of the input geometry. As opposed to [planarLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#planarLength), geodesicLength() takes into account the curvature of the earth when performing this calculation. Therefore, when using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate lengths using geodesicLength(). If the input geometries have a projected coordinate system other than Web Mercator, use [planarLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#planarLength) instead. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. @@ -3852,7 +3822,7 @@ declare namespace __esri { joinType: string, bevelRatio?: number, flattenError?: number - ): Promise; + ): Promise; /** * Indicates if one geometry overlaps another geometry. * @@ -4210,7 +4180,7 @@ declare namespace __esri { * * [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 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. @@ -4738,7 +4708,7 @@ declare namespace __esri { * @param point Point geometry that specifies the new location. * */ - setPoint(index: number, point: Point): Multipoint; + setPoint(index: number, point: Point | number[]): Multipoint; } interface MultipointConstructor { @@ -5595,69 +5565,6 @@ declare namespace __esri { export const GeographicTransformationStep: GeographicTransformationStepConstructor; - interface ImageMeshColor 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-ImageMeshColor.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-ImageMeshColor.html#transparent) - * - * @default undefined - */ - transparent: boolean; - - readonly type: "image"; - /** - * 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-ImageMeshColor.html#url) - */ - url: string; - - /** - * Creates a deep clone. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#clone) - * - * - */ - clone(): ImageMeshColor; - } - - interface ImageMeshColorConstructor { - new (properties?: ImageMeshColorProperties): ImageMeshColor; - } - - export const ImageMeshColor: ImageMeshColorConstructor; - - interface ImageMeshColorProperties { - /** - * 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-ImageMeshColor.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-ImageMeshColor.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-ImageMeshColor.html#url) - */ - url?: string; - } - interface jsonUtils { /** * Creates a new instance of an appropriate [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input `json` parameter often comes from a response to a query operation in the REST API or a [toJSON()](http://pro.arcgis.com/en/pro-app/tool-reference/conversion/features-to-json.htm) method from another ArcGIS product. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/programming-patterns/#using-fromjson) topic in the Guide for details and examples of when and how to use this function. @@ -5693,7 +5600,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) */ - material: MeshMaterial; + material: MeshMaterial | MeshMaterialMetallicRoughness; /** * 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: * @@ -5742,7 +5649,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) */ - material?: MeshMaterialProperties; + material?: MeshMaterialProperties | MeshMaterialMetallicRoughnessProperties; /** * 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: * @@ -5760,7 +5667,7 @@ declare namespace __esri { interface MeshMaterial extends Accessor { /** - * 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). + * Specifies how transparency on the object is handled. If [alphaMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#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) * @@ -5768,13 +5675,13 @@ declare namespace __esri { */ alphaCutoff: number; /** - * Specifies how transparency on the object is handled. See also `alphaCutoff`. + * Specifies how transparency on the object is handled. See also [alphaCutoff](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#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`. | + * | mask | Alpha values are used for binary transparency, either displaying the object, or its background. See also [alphaCutoff](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaCutoff). | * | auto | The implementation mixes the `mask` and `blend` settings, masking below `alphaCutoff` and blending above it. | * * @@ -5784,13 +5691,13 @@ declare namespace __esri { */ alphaMode: "auto" | "blend" | "opaque" | "mask"; /** - * 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. + * Specifies 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. + * Specifies a texture from which to get color information. The texture is accessed using 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-MeshMaterial.html#colorTexture) */ @@ -5804,7 +5711,7 @@ declare namespace __esri { */ 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. + * Specifies a texture from which to get normal information. The texture is accessed using 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-MeshMaterial.html#normalTexture) */ @@ -5813,7 +5720,7 @@ declare namespace __esri { interface MeshMaterialConstructor { /** - * The material determines how a mesh component is visualized. Among other properties, MeshMaterial specifies a [color](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#color) that may be a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) value, as well as a [colorTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#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). + * The material determines how a [MeshComponent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html) is visualized. One of the major characteristics of a material is its [color](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#color). The [color](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#color) property can be used to set a uniform color for the whole [MeshComponent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html). Use the [colorTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#colorTexture) property to map an image onto the mesh component, using 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-MeshMaterial.html) */ @@ -5825,7 +5732,7 @@ declare namespace __esri { 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). + * Specifies how transparency on the object is handled. If [alphaMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#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) * @@ -5833,13 +5740,13 @@ declare namespace __esri { */ alphaCutoff?: number; /** - * Specifies how transparency on the object is handled. See also `alphaCutoff`. + * Specifies how transparency on the object is handled. See also [alphaCutoff](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#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`. | + * | mask | Alpha values are used for binary transparency, either displaying the object, or its background. See also [alphaCutoff](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaCutoff). | * | auto | The implementation mixes the `mask` and `blend` settings, masking below `alphaCutoff` and blending above it. | * * @@ -5849,13 +5756,13 @@ declare namespace __esri { */ alphaMode?: "auto" | "blend" | "opaque" | "mask"; /** - * 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. + * Specifies 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. + * Specifies a texture from which to get color information. The texture is accessed using 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-MeshMaterial.html#colorTexture) */ @@ -5869,20 +5776,118 @@ declare namespace __esri { */ 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. + * Specifies a texture from which to get normal information. The texture is accessed using 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-MeshMaterial.html#normalTexture) */ normalTexture?: MeshTextureProperties | HTMLImageElement | HTMLCanvasElement | ImageData | string; } + interface MeshMaterialMetallicRoughness extends MeshMaterial { + /** + * Specifies a single, uniform emissive color for the [MeshComponent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html). The emissiveColor is added to the base color of the component. This can be autocast with a named string, hex string, array of rgb values, an object with `r`, `g`, `b` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. Note that the alpha channel is ignored for emissive colors. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#emissiveColor) + */ + emissiveColor: Color; + /** + * Specifies a texture from which to get emissive color information. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. The colors in the texture are added to the base color of the component. When using both an `emissiveTexture` and an [emissiveColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#emissiveColor) their values are multiplied and then added to the base color of the component. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#emissiveTexture) + */ + emissiveTexture: MeshTexture; + /** + * Specifies how much the material behaves like a metal. Values must be in the range 0 (non metal material) to 1 (metal material). Physically accurate materials are usually either a metal (1) or a non-metal (0) and not something inbetween. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#metallic) + * + * @default 1 + */ + metallic: number; + /** + * Specifies a texture from which to get the combined metallic/roughness information. The metallic value should be stored in the `blue` channel, while the roughness value should be stored in the `green` channel. The `red` and `alpha` channels are ignored. 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-MeshMaterialMetallicRoughness.html#metallicRoughnessTexture) + */ + metallicRoughnessTexture: MeshTexture; + /** + * Allows to specify a texture to get the occlusion information from. This can be used to simulate the effect of ambient light on the object. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. The occlusion value should be encoded in the red channel of the texture. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#occlusionTexture) + */ + occlusionTexture: MeshTexture; + /** + * Indicates how rough the surface of the material is. Values must be in the range 0 (fully smooth surface) to 1 (fully diffuse surface). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#roughness) + * + * @default 1 + */ + roughness: number; + } + + interface MeshMaterialMetallicRoughnessConstructor { + /** + * A material determines how a [MeshComponent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html) is visualized. This particular material (based on [MeshMaterial](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html)) uses the metallic/roughness lighting model to enable physically based lighting. The metallic and roughness properties can be used to model various realistic materials including metals and plastics. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html) + */ + + new (properties?: MeshMaterialMetallicRoughnessProperties): MeshMaterialMetallicRoughness; + } + + export const MeshMaterialMetallicRoughness: MeshMaterialMetallicRoughnessConstructor; + + interface MeshMaterialMetallicRoughnessProperties extends MeshMaterialProperties { + /** + * Specifies a single, uniform emissive color for the [MeshComponent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html). The emissiveColor is added to the base color of the component. This can be autocast with a named string, hex string, array of rgb values, an object with `r`, `g`, `b` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. Note that the alpha channel is ignored for emissive colors. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#emissiveColor) + */ + emissiveColor?: Color | number[] | string; + /** + * Specifies a texture from which to get emissive color information. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. The colors in the texture are added to the base color of the component. When using both an `emissiveTexture` and an [emissiveColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#emissiveColor) their values are multiplied and then added to the base color of the component. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#emissiveTexture) + */ + emissiveTexture?: MeshTextureProperties | HTMLImageElement | HTMLCanvasElement | ImageData | string; + /** + * Specifies how much the material behaves like a metal. Values must be in the range 0 (non metal material) to 1 (metal material). Physically accurate materials are usually either a metal (1) or a non-metal (0) and not something inbetween. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#metallic) + * + * @default 1 + */ + metallic?: number; + /** + * Specifies a texture from which to get the combined metallic/roughness information. The metallic value should be stored in the `blue` channel, while the roughness value should be stored in the `green` channel. The `red` and `alpha` channels are ignored. 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-MeshMaterialMetallicRoughness.html#metallicRoughnessTexture) + */ + metallicRoughnessTexture?: MeshTextureProperties | HTMLImageElement | HTMLCanvasElement | ImageData | string; + /** + * Allows to specify a texture to get the occlusion information from. This can be used to simulate the effect of ambient light on the object. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. The occlusion value should be encoded in the red channel of the texture. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#occlusionTexture) + */ + occlusionTexture?: MeshTextureProperties | HTMLImageElement | HTMLCanvasElement | ImageData | string; + /** + * Indicates how rough the surface of the material is. Values must be in the range 0 (fully smooth surface) to 1 (fully diffuse surface). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html#roughness) + * + * @default 1 + */ + roughness?: number; + } + 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). + * A direct reference to the image or video data. The 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), [video element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). If the data is set to a [video element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement), the element needs to be visible in the DOM. 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; + data: HTMLImageElement | HTMLCanvasElement | any | 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`. * @@ -5892,7 +5897,7 @@ declare namespace __esri { */ 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). + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. Video resources can only be loaded using the [data](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#data) property. The url property is mutually exclusive with the [data](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#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) */ @@ -5924,7 +5929,7 @@ declare namespace __esri { interface MeshTextureConstructor { /** - * MeshTexture represents image data to be used for a esri/geometry/support/MeshMaterial. It is mapped to the mesh by its uv vertex attributes. MeshTexture instances can be used with the [MeshComponent.material](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) property and they can be set either as a [MeshMaterial.colorTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#colorTexture) or as [MeshMaterial.normalTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#normalTexture). Images can be referred to either by url or directly by data ( [HTMLImageElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData)). + * MeshTexture represents image data to be used for [MeshMaterial](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html) or [MeshMaterialMetallicRoughness](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterialMetallicRoughness.html). It is mapped to the mesh by its uv vertex attributes. MeshTexture instances can be used with the [MeshComponent.material](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) property and they can be set either as a [MeshMaterial.colorTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#colorTexture) or as [MeshMaterial.normalTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#normalTexture). Images can be referred to either by url or directly by data ( [HTMLImageElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement), [HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement) 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) */ @@ -5936,11 +5941,11 @@ declare namespace __esri { 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). + * A direct reference to the image or video data. The 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), [video element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). If the data is set to a [video element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement), the element needs to be visible in the DOM. 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; + data?: HTMLImageElement | HTMLCanvasElement | any | 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`. * @@ -5950,7 +5955,7 @@ declare namespace __esri { */ 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). + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. Video resources can only be loaded using the [data](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#data) property. The url property is mutually exclusive with the [data](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#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) */ @@ -6186,40 +6191,6 @@ declare namespace __esri { export const normalizeUtils: normalizeUtils; - interface ValueMeshColor extends Accessor { - readonly type: "value"; - /** - * The color value. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#value) - */ - value: Color; - - /** - * Creates a deep clone. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#clone) - * - * - */ - clone(): ValueMeshColor; - } - - interface ValueMeshColorConstructor { - new (properties?: ValueMeshColorProperties): ValueMeshColor; - } - - export const ValueMeshColor: ValueMeshColorConstructor; - - interface ValueMeshColorProperties { - /** - * The color value. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#value) - */ - value?: Color | number[] | string; - } - interface webMercatorUtils { /** * Returns `true` if the `source` spatial reference can be projected to the `target` spatial reference with the [project()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#project) function, or if the `source` and `target` are the same [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html). @@ -6839,7 +6810,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#dialog) */ - dialog: any; + dialog: Widget; /** * The suggested lifetime of the token in minutes. * @@ -7385,6 +7356,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#currentVersion) */ currentVersion: number; + /** + * Indicates whether the [server](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#server) is a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#hasPortal) + */ + hasPortal: boolean; + /** + * Indicates whether the [server](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#server) is an [ArcGIS Server](https://enterprise.arcgis.com/en/server/latest/get-started/windows/what-is-arcgis-for-server-.htm) instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#hasServer) + */ + hasServer: boolean; /** * The server URL. * @@ -7426,6 +7409,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#currentVersion) */ currentVersion?: number; + /** + * Indicates whether the [server](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#server) is a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#hasPortal) + */ + hasPortal?: boolean; + /** + * Indicates whether the [server](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#server) is an [ArcGIS Server](https://enterprise.arcgis.com/en/server/latest/get-started/windows/what-is-arcgis-for-server-.htm) instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#hasServer) + */ + hasServer?: boolean; /** * The server URL. * @@ -8328,12 +8323,26 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#filters) */ filters: Collection; + /** + * An array of field names from the service to include with each feature in all sublayers. To fetch the values from all fields in all sublayers, use `["*"]`. BuildingSceneLayers usually have a large number of fields, so fetching all the values might lead to slower load times. Fields specified in `outFields` will be requested alongside with required fields for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#renderer) and [filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#filters) on all sublayers. To include fields only in a specific sublayer, use the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#outFields) property of the sublayer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#outFields) + * + * @default null + */ + outFields: string[]; /** * Hierarchical structure of sublayers in a BuildingSceneLayer. Usually contains an Overview [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html) and a Full Model [BuildingGroupSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html). However, some BuildingSceneLayers can contain only the Full Model [BuildingGroupSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html) or the discipline [BuildingGroupSublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html) directly. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#sublayers) */ readonly sublayers: Collection; + /** + * Summary statistics for all component layers in the building scene layer. This object has to be loaded before accessing its properties. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#summaryStatistics) + */ + readonly summaryStatistics: BuildingSummaryStatistics; readonly type: "building-scene"; @@ -8390,6 +8399,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#filters) */ filters?: CollectionProperties; + /** + * An array of field names from the service to include with each feature in all sublayers. To fetch the values from all fields in all sublayers, use `["*"]`. BuildingSceneLayers usually have a large number of fields, so fetching all the values might lead to slower load times. Fields specified in `outFields` will be requested alongside with required fields for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#renderer) and [filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#filters) on all sublayers. To include fields only in a specific sublayer, use the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#outFields) property of the sublayer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#outFields) + * + * @default null + */ + outFields?: string[]; } export interface BuildingSceneLayerElevationInfo extends Object { @@ -8462,7 +8479,7 @@ declare namespace __esri { */ listMode: "show" | "hide"; /** - * 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-buildingSublayers-BuildingComponentSublayer.html#renderer). + * 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-buildingSublayers-BuildingComponentSublayer.html#renderer). To include fields in all sublayers, use the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#outFields) property of the parent layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#outFields) * @@ -8553,7 +8570,7 @@ declare namespace __esri { */ listMode?: "show" | "hide"; /** - * 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-buildingSublayers-BuildingComponentSublayer.html#renderer). + * 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-buildingSublayers-BuildingComponentSublayer.html#renderer). To include fields in all sublayers, use the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#outFields) property of the parent layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#outFields) * @@ -9204,13 +9221,13 @@ declare namespace __esri { */ supportsAttachment: boolean; /** - * Indicates if the features in the layer support M values. Requires ArcGIS Server service 10.1 or greater. + * Indicates if the features in the layer support m-values. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.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-CSVLayer.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). + * Indicates if the features in the layer support z-values. See [elevationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.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-CSVLayer.html#capabilities) */ @@ -9312,7 +9329,7 @@ declare namespace __esri { */ 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-CSVLayer.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). + * Indicates if the layer supports [REST API queryAttachments](https://developers.arcgis.com/rest/services-reference/query-attachments-feature-service-layer-.htm) operation. If `false`, [queryAttachments() method](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.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-CSVLayer.html#capabilities) */ @@ -9357,7 +9374,7 @@ declare namespace __esri { */ 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. + * Indicates if the layer's query response includes the extent of features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#capabilities) */ @@ -9369,37 +9386,43 @@ declare namespace __esri { */ 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. + * 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. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.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. + * Indicates if features returned in the query response can be ordered by one or more fields. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#capabilities) */ supportsOrderBy: boolean; /** - * Indicates if the query response supports pagination. Requires an ArcGIS Server service 10.3 or greater. + * Indicates if the query response supports pagination. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.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). + * Indicates if the layer supports [percentile statisticType](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticType). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#capabilities) + */ + supportsPercentileStatistics: boolean; + /** + * Indicates if the query response includes the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.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. + * Indicates if the query operation supports the projection of geometries onto a virtual grid. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.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. + * Indicates if the query operation supports quantization designed to be used in edit mode (highest resolution at the given spatial reference). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#capabilities) */ @@ -9423,13 +9446,13 @@ declare namespace __esri { */ supportsStandardizedQueriesOnly: boolean; /** - * Indicates if the layer supports field-based statistical functions. Requires ArcGIS Server service 10.1 or greater. + * Indicates if the layer supports field-based statistical functions. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#capabilities) */ supportsStatistics: boolean; /** - * Indicates if the layer supports historic moment query. Requires ArcGIS Server service 10.5 or greater. + * Indicates if the layer supports historic moment query. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#capabilities) */ @@ -9444,13 +9467,13 @@ declare namespace __esri { */ 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. + * Indicates if the related features or records returned in the query response can be ordered by one or more fields. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#capabilities) */ supportsOrderBy: boolean; /** - * Indicates if the query response supports pagination for related features or records. Requires ArcGIS Server service 10.3 or greater. + * Indicates if the query response supports pagination for related features or records. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#capabilities) */ @@ -9476,14 +9499,14 @@ declare namespace __esri { 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. + * Defines how the feature is placed with respect to the terrain surface or 3D objects in the scene. 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. ![elevation-info](https://developers.arcgis.com/javascript/assets/img/apiref/layers/elevation-info.png) * * 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 | Features are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html) and 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. + * on-the-ground | Features are aligned to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html). If the scene contains an [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), then features are aligned to the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If features have z-values, then the z-values are ignored in this mode. Features with 2D symbols are draped on the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). This is the default mode for layers without z-values containing [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) features or [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) features rendered with [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * absolute-height | Features 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. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or any other layers into account. This is the default value of features with any geometry type where [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#hasZ) is `true`. + * relative-to-ground | Features are placed at an elevation relative to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). The feature's elevation is determined by summing up the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) and 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. If the geometries don't have z-values, `relative-to-ground` 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). + * relative-to-scene | Features are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html), 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), depending on which one has higher elevation. If the feature is not directly above a building or any other feature, it is aligned to the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If present, the geometry's z-value is added to the elevation. If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo) @@ -9896,7 +9919,7 @@ declare namespace __esri { */ featureReduction: FeatureReductionCluster | FeatureReductionSelection; /** - * An array of fields in the layer. Each field represents an attribute that may contain a value for each feature in the layer. For example, a field named `POP_2015`, stores information about total population as a numeric value for each feature; this value represents the total number of people living within the geographic bounds of the feature. This property must be set in the constructor when creating a FeatureLayer from client-side [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). To create FeatureLayers from client-side features you must also set the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType), [renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), and [type](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#type) properties. + * An array of fields in the layer. Each field represents an attribute that may contain a value for each feature in the layer. For example, a field named `POP_2015`, stores information about total population as a numeric value for each feature; this value represents the total number of people living within the geographic bounds of the feature. When creating a FeatureLayer from [client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side), this property should be set in the constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. The `objectId` field also must be set either in this array or in the [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) */ @@ -9914,7 +9937,7 @@ declare namespace __esri { */ 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. + * 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](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side), 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. If the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) is an empty array at the time of initialization, this property must be set. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ @@ -9926,7 +9949,7 @@ declare namespace __esri { * * @default undefined */ - readonly hasM: boolean; + hasM: boolean; /** * 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-FeatureLayer.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 FeatureLayer's [capabilities.data](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) object to verify if `Z` values are supported on [feature service](https://developers.arcgis.com/rest/services-reference/feature-service.htm) features. * @@ -9934,7 +9957,7 @@ declare namespace __esri { * * @default undefined */ - readonly hasZ: boolean; + hasZ: boolean; /** * The historic moment to query. If historicMoment is not specified, the query will apply to the current features. * @@ -9987,7 +10010,7 @@ declare namespace __esri { */ legendEnabled: boolean; /** - * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) containing a unique value or identifier for each feature in the layer. This is required when constructing a FeatureLayer from a collection of client-side [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) containing a unique value or identifier for each feature in the layer. This property is required when constructing a FeatureLayer from a collection of [client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side). If not specified, it will be inferred from the [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) array. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) */ @@ -10035,7 +10058,7 @@ declare namespace __esri { */ returnM: boolean; /** - * When `true`, indicates that Z values will always be returned. When `false`, indicates that Z values will never be returned. The layer view determines whether to include Z values in feature queries when the property value is `undefined`. + * When `true`, indicates that z-values will always be returned. When `false`, indicates that z-values will never be returned. The layer view determines whether to include z-values in feature queries when the property value is `undefined`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#returnZ) * @@ -10052,7 +10075,7 @@ declare namespace __esri { */ screenSizePerspectiveEnabled: boolean; /** - * A collection of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) objects used to create a FeatureLayer. The geometry of each feature all must have a matching [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType). This property should only be used when creating a FeatureLayer from client-side features. When creating a FeatureLayer from client-side features, the [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField), [renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), and [type](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#type) properties must also be set. Use [applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) method to add, remove, and update features from a layer at runtime. Once `applyEdits()` resolves successfully, use [queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) to return updated features. The [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference) and [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) properties are determined based on the features provided to this property. + * A collection of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) objects used to create a FeatureLayer. The geometry of each feature all must have a matching [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType). This property must be set when creating a FeatureLayer from [client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side). When creating a FeatureLayer from client-side features, the `objectId` field must be set either in the [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) array or via [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField). The [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference) and [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) properties are determined based on the features provided to this property. If the `source` is an empty array at the time of layer initialization, then [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) must be set. Use [applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) method to add, remove, and update features from a client-side feature layer at runtime. Once `applyEdits()` resolves successfully, use [queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) to return updated features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) */ @@ -10080,7 +10103,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#type) */ - readonly type: "feature" | "stream"; + readonly type: "feature"; /** * 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). * @@ -10118,6 +10141,7 @@ declare namespace __esri { addAttachment(feature: Graphic, attachment: HTMLFormElement | FormData): Promise; /** * Applies edits to features in a layer. New features can be created and existing features can be updated or deleted. Feature geometries and/or attributes may be modified. Only applicable to layers in a [feature service](https://developers.arcgis.com/rest/services-reference/feature-service.htm) and client-side features set through the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source). If client-side features are added, removed or updated at runtime using [applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) then use [queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) to return updated features. + * > When apply edits to a service with z-values and no [vertical coordinate system](https://pro.arcgis.com/en/pro-app/help/mapping/properties/vertical-coordinate-systems.htm) information, the z-values will automatically be converted to match the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) units. Example: The service has a horizontal spatial reference using `feet` units and the apply edits is made with `outSpatialReference` based on `meter` units, then [applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) automatically converts the values from `meter` to `feet` units. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) * @@ -10131,7 +10155,7 @@ declare namespace __esri { * @param options Additional edit options to specify when editing features or attachments. * @param options.gdbVersion The geodatabase version to apply the edits. This parameter applies only if the [capabilities.data.isVersioned](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) property of the layer is `true`. If the gdbVersion parameter is not specified, edits are made to the published map’s version. * @param options.rollbackOnFailureEnabled Indicates whether the edits should be applied only if all submitted edits succeed. If `false`, the server will apply the edits that succeed even if some of the submitted edits fail. If `true`, the server will apply the edits only if all edits succeed. The layer's [capabilities.editing.supportsRollbackOnFailure](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) property must be `true` if using this parameter. If `supportsRollbackOnFailure` is `false` for a layer, then `rollbackOnFailureEnabled` will always be true, regardless of how the parameter is set. - * @param options.globalIdUsed Indicates whether the edits can be applied using globalIds of features or attachments. This parameter applies only if the layer's [capabilities.editing.supportsGlobalId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) property is `true`. When `false`, globalIds submitted with the features are ignored and the service assigns new globalIds to the new features. When `true`, the globalIds must be submitted with the new features. When updating or deleting existing features, if the `globalIdUsed` is `false`, the objectIds of the features to be updated or deleted must be provided. If the `globalIdUsed` is `true`, globalIds of features to be updated or deleted must be provided. When adding, updating or deleting attachments, `globalIdUsed` parameter must be set to `true` and the attachment globalId must be set. For new attachments, the user must provide globalIds. In order for an attachment to be updated or deleted, clients must include its globalId. Attachments are not supported in an edit payload when `globalIdUsed` is `false`. + * @param options.globalIdUsed Indicates whether the edits can be applied using globalIds of features or attachments. This parameter applies only if the layer's [capabilities.editing.supportsGlobalId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) property is `true`. When `false`, globalIds submitted with the features are ignored and the service assigns new globalIds to the new features. When `true`, the globalIds must be submitted with the new features. When updating existing features, if the `globalIdUsed` is `false`, the objectIds of the features to be updated must be provided. If the `globalIdUsed` is `true`, globalIds of features to be updated must be provided. When deleting existing features, set this property to `false` as deletes operation only accepts `objectIds` at the current version of the API. When adding, updating or deleting attachments, `globalIdUsed` parameter must be set to `true` and the attachment globalId must be set. For new attachments, the user must provide globalIds. In order for an attachment to be updated or deleted, clients must include its globalId. Attachments are not supported in an edit payload when `globalIdUsed` is `false`. * */ applyEdits(edits: FeatureLayerApplyEditsEdits, options?: FeatureLayerApplyEditsOptions): Promise; @@ -10235,6 +10259,7 @@ declare namespace __esri { /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the feature service 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. See the [querying](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#querying) section for more information on how to query features from a layer. * > To query features/graphics available to or visible in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) on the client rather than making a server-side query, you must use the [FeatureLayerView.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) method. + * > When querying a service with z-values and no [vertical coordinate system](https://pro.arcgis.com/en/pro-app/help/mapping/properties/vertical-coordinate-systems.htm) information, the z-values will automatically be converted to match the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) units. Example: The service has a horizontal spatial reference using `feet` units and the query is made with `outSpatialReference` based on `meter` units, then [queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) automatically converts the values from `feet` to `meter` units. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) * @@ -10354,7 +10379,7 @@ declare namespace __esri { */ featureReduction?: FeatureReductionClusterProperties | FeatureReductionSelectionProperties; /** - * An array of fields in the layer. Each field represents an attribute that may contain a value for each feature in the layer. For example, a field named `POP_2015`, stores information about total population as a numeric value for each feature; this value represents the total number of people living within the geographic bounds of the feature. This property must be set in the constructor when creating a FeatureLayer from client-side [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). To create FeatureLayers from client-side features you must also set the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source), [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField), [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference), [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType), [renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), and [type](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#type) properties. + * An array of fields in the layer. Each field represents an attribute that may contain a value for each feature in the layer. For example, a field named `POP_2015`, stores information about total population as a numeric value for each feature; this value represents the total number of people living within the geographic bounds of the feature. When creating a FeatureLayer from [client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side), this property should be set in the constructor along with the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. The `objectId` field also must be set either in this array or in the [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) */ @@ -10366,11 +10391,27 @@ declare namespace __esri { */ 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. + * 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](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side), 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. If the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) is an empty array at the time of initialization, this property must be set. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ geometryType?: "point" | "multipoint" | "polyline" | "polygon" | "multipatch" | "mesh"; + /** + * 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. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#hasM) + * + * @default undefined + */ + hasM?: boolean; + /** + * 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-FeatureLayer.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 FeatureLayer's [capabilities.data](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) object to verify if `Z` values are supported on [feature service](https://developers.arcgis.com/rest/services-reference/feature-service.htm) features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#hasZ) + * + * @default undefined + */ + hasZ?: boolean; /** * The historic moment to query. If historicMoment is not specified, the query will apply to the current features. * @@ -10423,7 +10464,7 @@ declare namespace __esri { */ legendEnabled?: boolean; /** - * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) containing a unique value or identifier for each feature in the layer. This is required when constructing a FeatureLayer from a collection of client-side [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) containing a unique value or identifier for each feature in the layer. This property is required when constructing a FeatureLayer from a collection of [client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side). If not specified, it will be inferred from the [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) array. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField) */ @@ -10465,7 +10506,7 @@ declare namespace __esri { */ returnM?: boolean; /** - * When `true`, indicates that Z values will always be returned. When `false`, indicates that Z values will never be returned. The layer view determines whether to include Z values in feature queries when the property value is `undefined`. + * When `true`, indicates that z-values will always be returned. When `false`, indicates that z-values will never be returned. The layer view determines whether to include z-values in feature queries when the property value is `undefined`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#returnZ) * @@ -10482,7 +10523,7 @@ declare namespace __esri { */ screenSizePerspectiveEnabled?: boolean; /** - * A collection of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) objects used to create a FeatureLayer. The geometry of each feature all must have a matching [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType). This property should only be used when creating a FeatureLayer from client-side features. When creating a FeatureLayer from client-side features, the [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields), [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField), [renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), and [type](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#type) properties must also be set. Use [applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) method to add, remove, and update features from a layer at runtime. Once `applyEdits()` resolves successfully, use [queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) to return updated features. The [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference) and [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) properties are determined based on the features provided to this property. + * A collection of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) objects used to create a FeatureLayer. The geometry of each feature all must have a matching [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType). This property must be set when creating a FeatureLayer from [client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#client-side). When creating a FeatureLayer from client-side features, the `objectId` field must be set either in the [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields) array or via [objectIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#objectIdField). The [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#spatialReference) and [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) properties are determined based on the features provided to this property. If the `source` is an empty array at the time of layer initialization, then [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) must be set. Use [applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) method to add, remove, and update features from a client-side feature layer at runtime. Once `applyEdits()` resolves successfully, use [queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) to return updated features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) */ @@ -10684,7 +10725,7 @@ declare namespace __esri { */ rollbackOnFailureEnabled?: boolean; /** - * Indicates whether the edits can be applied using globalIds of features or attachments. This parameter applies only if the layer's [capabilities.editing.supportsGlobalId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) property is `true`. When `false`, globalIds submitted with the features are ignored and the service assigns new globalIds to the new features. When `true`, the globalIds must be submitted with the new features. When updating or deleting existing features, if the `globalIdUsed` is `false`, the objectIds of the features to be updated or deleted must be provided. If the `globalIdUsed` is `true`, globalIds of features to be updated or deleted must be provided. When adding, updating or deleting attachments, `globalIdUsed` parameter must be set to `true` and the attachment globalId must be set. For new attachments, the user must provide globalIds. In order for an attachment to be updated or deleted, clients must include its globalId. Attachments are not supported in an edit payload when `globalIdUsed` is `false`. + * Indicates whether the edits can be applied using globalIds of features or attachments. This parameter applies only if the layer's [capabilities.editing.supportsGlobalId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) property is `true`. When `false`, globalIds submitted with the features are ignored and the service assigns new globalIds to the new features. When `true`, the globalIds must be submitted with the new features. When updating existing features, if the `globalIdUsed` is `false`, the objectIds of the features to be updated must be provided. If the `globalIdUsed` is `true`, globalIds of features to be updated must be provided. When deleting existing features, set this property to `false` as deletes operation only accepts `objectIds` at the current version of the API. When adding, updating or deleting attachments, `globalIdUsed` parameter must be set to `true` and the attachment globalId must be set. For new attachments, the user must provide globalIds. In order for an attachment to be updated or deleted, clients must include its globalId. Attachments are not supported in an edit payload when `globalIdUsed` is `false`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) */ @@ -10783,13 +10824,13 @@ declare namespace __esri { */ supportsAttachment: boolean; /** - * Indicates if the features in the layer support M values. Requires ArcGIS Server service 10.1 or greater. + * 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-FeatureLayer.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-FeatureLayer.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). + * 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-FeatureLayer.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-FeatureLayer.html#capabilities) */ @@ -10950,6 +10991,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsDisjointSpatialRelationship: boolean; + /** + * Indicates if the query operation supports a [cache hint](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#cacheHint). 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) + */ + supportsCacheHint: 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. * @@ -10980,6 +11027,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsPagination: boolean; + /** + * Indicates if the layer supports [percentile statisticType](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticType). Requires an ArcGIS Server service 10.7 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) + */ + supportsPercentileStatistics: 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). * @@ -11070,14 +11123,14 @@ declare namespace __esri { 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. + * Defines how the feature is placed with respect to the terrain surface or 3D objects in the scene. 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. ![elevation-info](https://developers.arcgis.com/javascript/assets/img/apiref/layers/elevation-info.png) * * Mode | Description * ------|------------ - * on-the-ground | Features are draped on the terrain surface. This is the default value for features with [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) or [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometries and features with [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 | Features are placed at an elevation relative to the terrain surface. The feature's elevation is determined by summing up the terrain elevation and 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. `relative-to-ground` 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 | Features 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. This mode doesn't take the elevation of the terrain into account. This is the default value of features with any geometry type where [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#hasZ) is `true`. - * relative-to-scene | Features are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html) and 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 feature 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. + * on-the-ground | Features are aligned to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html). If the scene contains an [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), then features are aligned to the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If features have z-values, then the z-values are ignored in this mode. Features with 2D symbols are draped on the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). This is the default mode for layers without z-values containing [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) features or [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) features rendered with [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * absolute-height | Features 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. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or any other layers into account. This is the default value of features with any geometry type where [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#hasZ) is `true`. + * relative-to-ground | Features are placed at an elevation relative to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). The feature's elevation is determined by summing up the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) and 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. If the geometries don't have z-values, `relative-to-ground` 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). + * relative-to-scene | Features are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html), 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), depending on which one has higher elevation. If the feature is not directly above a building or any other feature, it is aligned to the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If present, the geometry's z-value is added to the elevation. If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo) @@ -11338,6 +11391,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField) */ objectIdField: string; + /** + * An array of field names from the geoJSON file to include with each feature. To fetch the values from all fields in the layer, use `["*"]`. The required fields used for layer [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo), and setting the [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo), along with the fields specified in `outFields` are used to populate [GeoJSONLayerView.availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#availableFields). Set this property to include the fields that will be used for client-side [queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryFeatures) if the fields are not part of required fields. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#outFields) + * + * @default null + */ + outFields: 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`. * @@ -11613,6 +11674,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField) */ objectIdField?: string; + /** + * An array of field names from the geoJSON file to include with each feature. To fetch the values from all fields in the layer, use `["*"]`. The required fields used for layer [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo), and setting the [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo), along with the fields specified in `outFields` are used to populate [GeoJSONLayerView.availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#availableFields). Set this property to include the fields that will be used for client-side [queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryFeatures) if the fields are not part of required fields. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#outFields) + * + * @default null + */ + outFields?: 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`. * @@ -11734,13 +11803,13 @@ declare namespace __esri { */ supportsAttachment: boolean; /** - * Indicates if the features in the layer support M values. Requires ArcGIS Server service 10.1 or greater. + * Indicates if the features in the layer support m-values. * * [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). + * Indicates if the features in the layer support z-values. 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) */ @@ -11842,13 +11911,13 @@ declare namespace __esri { */ 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). + * Indicates if the layer supports [REST API queryAttachments](https://developers.arcgis.com/rest/services-reference/query-attachments-feature-service-layer-.htm) operation. 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. + * Indicates if the layer supports a SQL-92 expression or where clause. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) */ @@ -11863,7 +11932,7 @@ declare namespace __esri { 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. + * Indicates if the geometry centroid associated with each polygon feature can be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) */ @@ -11887,49 +11956,55 @@ declare namespace __esri { */ 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. + * Indicates if the layer's query response includes the extent of features. * * [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. + * Indicates if the layer's query response contains geometry attributes, including shape area and length attributes. * * [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. + * 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. * * [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. + * Indicates if features returned in the query response can be ordered by one or more fields. * * [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. + * Indicates if the query response supports pagination. * * [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). + * Indicates if the layer supports [percentile statisticType](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticType). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsPercentileStatistics: boolean; + /** + * Indicates if the query response includes the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry). * * [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. + * Indicates if the query operation supports the projection of geometries onto a virtual grid. * * [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. + * Indicates if the query operation supports quantization designed to be used in edit mode (highest resolution at the given spatial reference). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) */ @@ -11953,13 +12028,13 @@ declare namespace __esri { */ supportsStandardizedQueriesOnly: boolean; /** - * Indicates if the layer supports field-based statistical functions. Requires ArcGIS Server service 10.1 or greater. + * Indicates if the layer supports field-based statistical functions. * * [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. + * Indicates if the layer supports historic moment query. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) */ @@ -11974,13 +12049,13 @@ declare namespace __esri { */ 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. + * Indicates if the related features or records returned in the query response can be ordered by one or more fields. * * [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. + * Indicates if the query response supports pagination for related features or records. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) */ @@ -12006,14 +12081,14 @@ declare namespace __esri { 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. + * Defines how the feature is placed with respect to the terrain surface or 3D objects in the scene. 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. ![elevation-info](https://developers.arcgis.com/javascript/assets/img/apiref/layers/elevation-info.png) * * 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 | Features are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html) and 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. + * on-the-ground | Features are aligned to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html). If the scene contains an [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), then features are aligned to the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If features have z-values, then the z-values are ignored in this mode. Features with 2D symbols are draped on the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). This is the default mode for layers without z-values containing [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) features or [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) features rendered with [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * absolute-height | Features 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. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or any other layers into account. This is the default value of features with any geometry type where [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#hasZ) is `true`. + * relative-to-ground | Features are placed at an elevation relative to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). The feature's elevation is determined by summing up the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) and 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. If the geometries don't have z-values, `relative-to-ground` 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). + * relative-to-scene | Features are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html), 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), depending on which one has higher elevation. If the feature is not directly above a building or any other feature, it is aligned to the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If present, the geometry's z-value is added to the elevation. If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) @@ -12223,7 +12298,7 @@ declare namespace __esri { */ elevationInfo: GraphicsLayerElevationInfo; /** - * A collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) in the layer. Each graphic is a vector representation of the location of a real-world feature. Each graphic in a single GraphicsLayer may contain either a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), or [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#geometry). In addition, each [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) in the collection may contain its own [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes), [Symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html), and [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). To add a graphic to the GraphicsLayer use [add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#add), or [GraphicsLayer.graphics.add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add). + * A collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) in the layer. Each graphic is a vector representation of the location of a real-world feature. Each graphic in a single GraphicsLayer may contain either a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), or [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#geometry). In addition, each [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) in the collection may contain its own [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes), [Symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html), and [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). To add a graphic to the GraphicsLayer use [add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#add), [GraphicsLayer.graphics.add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add) or [GraphicsLayer.graphics.push()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#push). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#graphics) */ @@ -12241,7 +12316,7 @@ declare namespace __esri { readonly type: "graphics"; /** - * Adds a graphic to the layer. + * Adds a graphic to the layer's graphic collection. The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-add), [after-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-add), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#add) * @@ -12250,7 +12325,7 @@ declare namespace __esri { */ add(graphic: Graphic): void; /** - * Adds an array of graphics to the layer. + * Adds an array of graphics to the layer. The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-add), [after-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-add), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#addMany) * @@ -12259,7 +12334,7 @@ declare namespace __esri { */ addMany(graphics: Graphic[]): void; /** - * Removes a graphic from the layer. + * Removes a graphic from the layer. The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-remove), [after-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-remove), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#remove) * @@ -12268,7 +12343,7 @@ declare namespace __esri { */ remove(graphic: Graphic): void; /** - * Clears all the graphics from the layer. + * Clears all the graphics from the layer. The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-remove), [after-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-remove), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#removeAll) * @@ -12276,7 +12351,7 @@ declare namespace __esri { */ removeAll(): void; /** - * Removes an array of graphics from the layer. + * Removes an array of graphics from the layer. The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-remove), [after-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-remove), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#removeMany) * @@ -12312,7 +12387,7 @@ declare namespace __esri { */ elevationInfo?: GraphicsLayerElevationInfo; /** - * A collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) in the layer. Each graphic is a vector representation of the location of a real-world feature. Each graphic in a single GraphicsLayer may contain either a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), or [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#geometry). In addition, each [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) in the collection may contain its own [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes), [Symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html), and [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). To add a graphic to the GraphicsLayer use [add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#add), or [GraphicsLayer.graphics.add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add). + * A collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) in the layer. Each graphic is a vector representation of the location of a real-world feature. Each graphic in a single GraphicsLayer may contain either a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), or [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#geometry). In addition, each [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) in the collection may contain its own [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes), [Symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html), and [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). To add a graphic to the GraphicsLayer use [add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#add), [GraphicsLayer.graphics.add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add) or [GraphicsLayer.graphics.push()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#push). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#graphics) */ @@ -12330,14 +12405,14 @@ declare namespace __esri { export interface GraphicsLayerElevationInfo extends Object { /** - * Defines how the graphic 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. + * Defines how the feature is placed with respect to the terrain surface or 3D objects in the scene. 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. ![elevation-info](https://developers.arcgis.com/javascript/assets/img/apiref/layers/elevation-info.png) * * 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 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 | Features are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html) and 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. + * on-the-ground | Features are aligned to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html). If the scene contains an [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), then features are aligned to the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If features have z-values, then the z-values are ignored in this mode. Features with 2D symbols are draped on the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). This is the default mode for layers without z-values containing [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) features or [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) features rendered with [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * absolute-height | Features 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. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or any other layers into account. This is the default value of features with any geometry type where [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#hasZ) is `true`. + * relative-to-ground | Features are placed at an elevation relative to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). The feature's elevation is determined by summing up the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) and 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. If the geometries don't have z-values, `relative-to-ground` 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). + * relative-to-scene | Features are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html), 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), depending on which one has higher elevation. If the feature is not directly above a building or any other feature, it is aligned to the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If present, the geometry's z-value is added to the elevation. If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#elevationInfo) @@ -12840,12 +12915,14 @@ declare namespace __esri { | "graphics" | "group" | "imagery" + | "imagery-tile" | "integrated-mesh" | "kml" | "map-image" | "map-notes" | "open-street-map" | "point-cloud" + | "route" | "scene" | "stream" | "tile" @@ -13155,6 +13232,14 @@ declare namespace __esri { height: number, options?: MapImageLayerFetchImageOptions ): Promise; + /** + * Loads all of the sublayers. See [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#loaded) or [loadStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#loadStatus) properties to check the status. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#loadAll) + * + * + */ + loadAll(): Promise; on(name: "layerview-create", eventHandler: MapImageLayerLayerviewCreateEventHandler): IHandle; @@ -13916,12 +14001,6 @@ declare namespace __esri { } export interface ArcGISMapServiceCapabilitiesExportMap extends Object { - /** - * Indicates if sublayers can be added, removed, or reordered. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISMapService.html#capabilities) - */ - supportsSublayersChanges: boolean; /** * Indicates if sublayers rendering can be modified or added using dynamic layers. * @@ -13929,17 +14008,29 @@ declare namespace __esri { */ supportsDynamicLayers: boolean; /** - * Indicates if sublayers [visibility](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#visible) can be changed. + * Indicates if a sublayer supports modifying its renderer and/or data source. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISMapService.html#capabilities) */ - supportsSublayerVisibility: boolean; + supportsModification: boolean; + /** + * Indicates if sublayers can be added, removed, or reordered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISMapService.html#capabilities) + */ + supportsSublayersChanges: boolean; /** * Indicates if sublayers [definition expression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#definitionExpression) can be set. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISMapService.html#capabilities) */ supportsSublayerDefinitionExpression: boolean; + /** + * Indicates if sublayers [visibility](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#visible) can be changed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISMapService.html#capabilities) + */ + supportsSublayerVisibility: boolean; } export interface ArcGISMapServiceCapabilitiesExportTiles extends Object { @@ -15163,7 +15254,31 @@ declare namespace __esri { signal?: AbortSignal; } - interface StreamLayer extends FeatureLayer { + interface StreamLayer extends Layer, ScaleRangeLayer, TemporalLayer { + /** + * Copyright information for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#copyright) + */ + copyright: string; + /** + * The SQL where clause used to filter features based on their attributes. 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). Setting a definition expression is useful when the dataset is large and you don't want to bring all features to the client for analysis. 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-StreamLayer.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-StreamLayer.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-StreamLayer.html#elevationInfo) + */ + elevationInfo: StreamLayerElevationInfo; /** * Configures the method for reducing the number of point features in the view. By default this property is `null`, which indicates the layer view should draw every feature. StreamLayer supports one type feature reduction: `selection`. [Selection](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureReductionSelection.html) only applies to points in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and involves thinning overlapping features so no features intersect on screen. * @@ -15171,33 +15286,158 @@ declare namespace __esri { */ featureReduction: FeatureReductionSelection; /** - * An extent object used to filter features. Only features intersecting the extent are displayed in the view. + * An array of fields in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#fields) + */ + fields: Field[]; + /** + * A convenient property that can be used to make case-insensitive lookups for a field by name. It can also provide a list of the [date fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldsIndex.html#dateFields) in a layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#fieldsIndex) + */ + readonly fieldsIndex: FieldsIndex; + /** + * An [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) object used to filter features. Only features that intersect the extent object are displayed in the view. For example, the `geometryDefinition` can be set to a city boundary extent to display features only intersect this extent. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#geometryDefinition) */ geometryDefinition: Extent; /** - * The geometry type of features in the layer. + * The geometry type of features in the layer. All features must be of the same type. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#geometryType) */ - readonly geometryType: "point" | "multipoint" | "polyline" | "polygon"; + geometryType: "point" | "polygon" | "polyline" | "multipoint"; + /** + * 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 boats and green labels for trucks). + * > **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-StreamLayer.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-StreamLayer.html#labelingInfo) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.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-StreamLayer.html#legendEnabled) + * + * @default true + */ + legendEnabled: boolean; /** * Maximum number of features to show per [trackId](https://enterprise.arcgis.com/en/geoevent/latest/get-started/essential-geoevent-server-vocabulary.htm#ESRI_SECTION1_F45BBCE9ADFA4E57AF38DD225921EFCD). If `trackId` is not configured on the GeoEvent Service, the `maximumTrackPoints` property will have no effect and an error will be logged in the console. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#maximumTrackPoints) + * + * @default 1 */ maximumTrackPoints: number; /** - * Options for purging stale features. Use these options to avoid overloading the browser with graphics. + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.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-StreamLayer.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-StreamLayer.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-StreamLayer.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-StreamLayer.html#popupTemplate) + */ + popupTemplate: PopupTemplate; + /** + * Options for purging stale features. The purge options controls how much data is removed from [StreamLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html) and how often. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#purgeOptions) */ purgeOptions: StreamLayerPurgeOptions; - + /** + * 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-StreamLayer.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-StreamLayer.html#screenSizePerspectiveEnabled) + * + * @default true + */ + screenSizePerspectiveEnabled: boolean; + /** + * The [stream service's metadata JSON](https://developers.arcgis.com/rest/services-reference/stream-service.htm) exposed by the ArcGIS REST API. While most commonly used [properties](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#properties-summary) are exposed on the StreamLayer class directly, this property gives access to all information returned by the stream service. This property is useful if working in an application built using an older version of the API which requires access to stream service properties from a more recent version. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#sourceJSON) + */ + sourceJSON: any; + /** + * The spatial reference of the layer. When creating the layer from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#url), the spatial reference is read from the service. When creating a StreamLayer from client-side features, this property is inferred from the geometries of the features provided in the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#source) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#spatialReference) + */ + spatialReference: SpatialReference; + /** + * For [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) the type is `stream`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#type) + */ readonly type: "stream"; + /** + * The URL of the stream service. This is set in the `url` parameter of the [constructor](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#constructors-summary). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#url) + */ + url: string; - on(name: "edits", eventHandler: StreamLayerEditsEventHandler): IHandle; + /** + * 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-StreamLayer.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?: StreamLayerCreatePopupTemplateOptions): PopupTemplate; + /** + * Returns the [Field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html) instance for a field name (case-insensitive). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.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). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.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?: StreamLayerGetFieldDomainOptions): Domain; on(name: "layerview-create", eventHandler: StreamLayerLayerviewCreateEventHandler): IHandle; @@ -15208,19 +15448,41 @@ declare namespace __esri { interface StreamLayerConstructor { /** - * The stream layer extends the feature layer to add the ability to connect to a stream of data using HTML5 WebSockets. It connects to a server that emits geographic features continuously. While the feature layer is used to map relatively static data, the stream layer is suitable when you would like to map dynamic streams of data that are unbounded and continuous. When a stream layer is added to a map, users are able to see real-time updates pushed out by the server. + * The stream layer connects to a stream of data using [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket). It connects to a server that emits geographic features continuously. The stream layer is suitable when you would like to map dynamic streams of data that are unbounded and continuous. When a stream layer is added to a map, users are able to see real-time updates pushed out by the server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) */ new (properties?: StreamLayerProperties): StreamLayer; - - fromJSON(json: any): StreamLayer; } export const StreamLayer: StreamLayerConstructor; - interface StreamLayerProperties extends FeatureLayerProperties { + interface StreamLayerProperties extends LayerProperties, ScaleRangeLayerProperties, TemporalLayerProperties { + /** + * Copyright information for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#copyright) + */ + copyright?: string; + /** + * The SQL where clause used to filter features based on their attributes. 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). Setting a definition expression is useful when the dataset is large and you don't want to bring all features to the client for analysis. 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-StreamLayer.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-StreamLayer.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-StreamLayer.html#elevationInfo) + */ + elevationInfo?: StreamLayerElevationInfo; /** * Configures the method for reducing the number of point features in the view. By default this property is `null`, which indicates the layer view should draw every feature. StreamLayer supports one type feature reduction: `selection`. [Selection](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureReductionSelection.html) only applies to points in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and involves thinning overlapping features so no features intersect on screen. * @@ -15228,37 +15490,114 @@ declare namespace __esri { */ featureReduction?: FeatureReductionSelectionProperties; /** - * An extent object used to filter features. Only features intersecting the extent are displayed in the view. + * An array of fields in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#fields) + */ + fields?: FieldProperties[]; + /** + * An [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) object used to filter features. Only features that intersect the extent object are displayed in the view. For example, the `geometryDefinition` can be set to a city boundary extent to display features only intersect this extent. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#geometryDefinition) */ geometryDefinition?: ExtentProperties; + /** + * The geometry type of features in the layer. All features must be of the same type. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#geometryType) + */ + geometryType?: "point" | "polygon" | "polyline" | "multipoint"; + /** + * 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 boats and green labels for trucks). + * > **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-StreamLayer.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-StreamLayer.html#labelingInfo) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.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-StreamLayer.html#legendEnabled) + * + * @default true + */ + legendEnabled?: boolean; /** * Maximum number of features to show per [trackId](https://enterprise.arcgis.com/en/geoevent/latest/get-started/essential-geoevent-server-vocabulary.htm#ESRI_SECTION1_F45BBCE9ADFA4E57AF38DD225921EFCD). If `trackId` is not configured on the GeoEvent Service, the `maximumTrackPoints` property will have no effect and an error will be logged in the console. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#maximumTrackPoints) + * + * @default 1 */ maximumTrackPoints?: number; /** - * Options for purging stale features. Use these options to avoid overloading the browser with graphics. + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.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-StreamLayer.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-StreamLayer.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-StreamLayer.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-StreamLayer.html#popupTemplate) + */ + popupTemplate?: PopupTemplateProperties; + /** + * Options for purging stale features. The purge options controls how much data is removed from [StreamLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html) and how often. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#purgeOptions) */ purgeOptions?: StreamLayerPurgeOptions; - } - - export interface StreamLayerEditsEvent { - addedAttachments: FeatureEditResult[]; - - addedFeatures: FeatureEditResult[]; - - deletedAttachments: FeatureEditResult[]; - - deletedFeatures: FeatureEditResult[]; - - updatedAttachments: FeatureEditResult[]; - - updatedFeatures: FeatureEditResult[]; + /** + * 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-StreamLayer.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-StreamLayer.html#screenSizePerspectiveEnabled) + * + * @default true + */ + screenSizePerspectiveEnabled?: boolean; + /** + * The [stream service's metadata JSON](https://developers.arcgis.com/rest/services-reference/stream-service.htm) exposed by the ArcGIS REST API. While most commonly used [properties](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#properties-summary) are exposed on the StreamLayer class directly, this property gives access to all information returned by the stream service. This property is useful if working in an application built using an older version of the API which requires access to stream service properties from a more recent version. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#sourceJSON) + */ + sourceJSON?: any; + /** + * The spatial reference of the layer. When creating the layer from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#url), the spatial reference is read from the service. When creating a StreamLayer from client-side features, this property is inferred from the geometries of the features provided in the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#source) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#spatialReference) + */ + spatialReference?: SpatialReferenceProperties; + /** + * The URL of the stream service. This is set in the `url` parameter of the [constructor](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#constructors-summary). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#url) + */ + url?: string; } export interface StreamLayerLayerviewCreateErrorEvent { @@ -15279,19 +15618,95 @@ declare namespace __esri { view: View; } + export interface StreamLayerCreatePopupTemplateOptions 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-StreamLayer.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-StreamLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + + export interface StreamLayerElevationInfo extends Object { + /** + * Defines how the feature is placed with respect to the terrain surface or 3D objects in the scene. 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. ![elevation-info](https://developers.arcgis.com/javascript/assets/img/apiref/layers/elevation-info.png) + * + * Mode | Description + * ------|------------ + * on-the-ground | Features are aligned to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html). If the scene contains an [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), then features are aligned to the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If features have z-values, then the z-values are ignored in this mode. Features with 2D symbols are draped on the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). This is the default mode for layers without z-values containing [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) features or [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) features rendered with [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * absolute-height | Features 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. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or any other layers into account. This is the default value of features with any geometry type where [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#hasZ) is `true`. + * relative-to-ground | Features are placed at an elevation relative to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). The feature's elevation is determined by summing up the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) and 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. If the geometries don't have z-values, `relative-to-ground` 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). + * relative-to-scene | Features are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html), 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), depending on which one has higher elevation. If the feature is not directly above a building or any other feature, it is aligned to the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html). If defined, the result of `featureExpressionInfo` is added to the elevation. In this mode z-values are ignored. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#elevationInfo) + */ + mode: "on-the-ground" | "relative-to-ground" | "absolute-height" | "relative-to-scene"; + /** + * 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-StreamLayer.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-StreamLayer.html#elevationInfo) + */ + featureExpressionInfo?: StreamLayerElevationInfoFeatureExpressionInfo; + /** + * The unit for `featureExpressionInfo` and `offset` values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#elevationInfo) + */ + unit?: "feet" | "meters" | "kilometers" | "miles" | "us-feet" | "yards"; + } + + export interface StreamLayerElevationInfoFeatureExpressionInfo 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-StreamLayer.html#elevationInfo) + */ + expression?: string; + } + + export interface StreamLayerGetFieldDomainOptions 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-StreamLayer.html#getFieldDomain) + */ + feature: Graphic; + } + export interface StreamLayerPurgeOptions extends Object { /** - * The maximum number of features to display. Excess features are purged from the beginning of the graphics array. + * Controls the maximum age of a feature in minutes. Features older than specified age will be removed. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#purgeOptions) */ - displayCount: number; + age?: number; /** - * The maximum time in minutes that a feature should be kept. After this time, the feature is removed from the layer. + * Controls the overall maximum number of features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#purgeOptions) */ - age: number; + displayCount?: number; + /** + * Controls the maximum number of observations to show within a [track](https://enterprise.arcgis.com/en/geoevent/latest/get-started/essential-geoevent-server-vocabulary.htm#ESRI_SECTION1_F45BBCE9ADFA4E57AF38DD225921EFCD). If [trackIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#trackIdField) is not configured on the geoevent service, this property will have no effect. The default is 1. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#purgeOptions) + */ + maxObservations?: number; } interface AttachmentInfo extends Accessor, JSONSupport { @@ -15525,7 +15940,6 @@ declare namespace __esri { description: string; /** * Filter blocks define which features should be visible in the affected [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html) and how the filtered features are drawn. A filter should contain at least one filter block. The order of filter blocks influences the order in which the filter blocks are applied. For example, if a filter block using a `wire-frame` mode precedes a `solid` filter block in the collection, elements that match either filter block will be drawn as wireframe. - * > **Known Limitations** Filter blocks with a `wire-frame` filter mode are currently not rendered. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingFilter.html#filterBlocks) */ @@ -15561,7 +15975,6 @@ declare namespace __esri { description?: string; /** * Filter blocks define which features should be visible in the affected [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html) and how the filtered features are drawn. A filter should contain at least one filter block. The order of filter blocks influences the order in which the filter blocks are applied. For example, if a filter block using a `wire-frame` mode precedes a `solid` filter block in the collection, elements that match either filter block will be drawn as wireframe. - * > **Known Limitations** Filter blocks with a `wire-frame` filter mode are currently not rendered. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingFilter.html#filterBlocks) */ @@ -15587,7 +16000,7 @@ declare namespace __esri { */ filterExpression: string; /** - * This object contains information about the filter mode of the filter block. This property can generally be omitted, since only `solid` filter blocks are rendered in the JS API. + * This object contains information about the filter mode of the filter block. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingFilter.html#BuildingFilterBlock) */ @@ -15602,13 +16015,101 @@ declare namespace __esri { export interface BuildingFilterBlockFilterMode extends Object { /** - * Defines how features are drawn while the filter is active. The same filter mode type can only be used once in a filter. To filter multiple elements as solid, add them to a single filter block instead of creating several filter blocks that use the `solid` filter mode. + * Defines how features are drawn while the filter is active. `solid` mode renders the features with the original texture. With `wire-frame` mode, only the edges of the features are shown. `x-ray` renders elements semi-transparent with white color. To ensure performance on client applications, it is not recommended to declare multiple filter blocks with the same filter mode. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingFilter.html#BuildingFilterBlock) * * @default solid */ - type?: "solid" | "wire-frame"; + type?: "solid" | "wire-frame" | "x-ray"; + /** + * Defines the type of edges used to display a [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html) filtered in `wire-frame` mode. This property can only be used with `filterMode` of type `wire-frame`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingFilter.html#BuildingFilterBlock) + */ + edges?: SolidEdges3D | SketchEdges3D; + } + + interface BuildingSummaryStatistics extends Accessor, Loadable, JSONSupport { + /** + * An array of statistics on all fields in all sublayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#fields) + */ + fields: BuildingFieldStatistics[]; + } + + interface BuildingSummaryStatisticsConstructor { + /** + * Contains statistics about the fields in all sublayers of a [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html). The statistics contain the most frequent values in that layer, minimum and maximum values in case they are numeric and the sublayers where the field is available. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html) + */ + + new (properties?: BuildingSummaryStatisticsProperties): BuildingSummaryStatistics; + + fromJSON(json: any): BuildingSummaryStatistics; + } + + export const BuildingSummaryStatistics: BuildingSummaryStatisticsConstructor; + + interface BuildingSummaryStatisticsProperties extends LoadableProperties { + /** + * An array of statistics on all fields in all sublayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#fields) + */ + fields?: BuildingFieldStatistics[]; + } + + /** + * Summary statistics for a field in a [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html). The statistics contain the most frequent values in that layer, minimum and maximum values in case they are numeric and the sublayers where the field is available. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#BuildingFieldStatistics) + */ + export interface BuildingFieldStatistics extends Object { + /** + * Name of the field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#BuildingFieldStatistics) + */ + fieldName: string; + /** + * Model Name of the field. This can be used to identify certain special fields, like floor number, or phase id. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#BuildingFieldStatistics) + */ + modelName: string; + /** + * Label of the field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#BuildingFieldStatistics) + */ + label: string; + /** + * Minimum value of the field for numeric values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#BuildingFieldStatistics) + */ + min: number; + /** + * Maximum value of the field for numeric values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#BuildingFieldStatistics) + */ + max: number; + /** + * List of the most frequent values of the field. This is not guaranteed to be a complete list of all values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#BuildingFieldStatistics) + */ + mostFrequentValues: string[] | number[]; + /** + * List of sublayer ids where this field is available. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-BuildingSummaryStatistics.html#BuildingFieldStatistics) + */ + subLayerIds: number[]; } interface CodedValueDomain extends Domain { @@ -16609,14 +17110,36 @@ declare namespace __esri { 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). + * Gets the appropriate display field name to label a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getDisplayFieldName) + * + * @param fields An array of fields to determine the display field from. + * + */ + getDisplayFieldName(fields: Field[]): string; + /** + * 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. + * @param layer The featureLayer to extract fields required for calculating feature z-values. * */ getElevationFields(layer: FeatureLayer): Promise; + /** + * Returns an array of field names referenced in one or more Arcade expressions to be set on the given layer in either the `renderer`, `labelingInfo`, or `popupTemplate`. This is useful for when you want to request the data for these fields prior to updating a renderer for fast visual updates or when you want to execute a client-side query on that data prior to setting the Arcade expressions on the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getExpressionFields) + * + * @param layer The layer for which the Arcade `expressions` are authored. This layer must have a `fields` property. + * @param expressions An array of [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions to be set on the given `layer`. + * + */ + getExpressionFields( + layer: FeatureLayer | CSVLayer | GeoJSONLayer | SceneLayer | StreamLayer, + expressions: string[] + ): Promise; /** * 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). * @@ -17931,6 +18454,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#extent) */ extent: Extent; + /** + * Raster height (row count) in pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#height) + */ + height: number; /** * Raster histograms return basic name-value pairs for number of bins, min and max bounding values, counts of pixels in each bin. * @@ -17949,12 +18478,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#multidimensionalInfo) */ multidimensionalInfo: any; + /** + * The pixel value representing no available information. Can be a number (same value for all bands) or array (specific value for each band). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#noDataValue) + */ + noDataValue: number | number[]; /** * Raster pixel size. Specifies the pixel size being identified on the x and y axis. Defaults to the base resolution of the dataset when not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#pixelSize) */ - pixelSize: Point; + pixelSize: RasterInfoPixelSize; /** * Pixel type for the raster data source. * @@ -17986,6 +18521,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#statistics) */ statistics: RasterInfoStatistics[]; + /** + * Raster width (column count) in pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#width) + */ + width: number; } interface RasterInfoConstructor { @@ -18038,6 +18579,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#extent) */ extent?: ExtentProperties; + /** + * Raster height (row count) in pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#height) + */ + height?: number; /** * Raster histograms return basic name-value pairs for number of bins, min and max bounding values, counts of pixels in each bin. * @@ -18056,12 +18603,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#multidimensionalInfo) */ multidimensionalInfo?: any; + /** + * The pixel value representing no available information. Can be a number (same value for all bands) or array (specific value for each band). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#noDataValue) + */ + noDataValue?: number | number[]; /** * Raster pixel size. Specifies the pixel size being identified on the x and y axis. Defaults to the base resolution of the dataset when not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#pixelSize) */ - pixelSize?: PointProperties; + pixelSize?: RasterInfoPixelSize; /** * Pixel type for the raster data source. * @@ -18093,6 +18646,27 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#statistics) */ statistics?: RasterInfoStatistics[]; + /** + * Raster width (column count) in pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#width) + */ + width?: number; + } + + export interface RasterInfoPixelSize extends Object { + /** + * Pixel size along the x axis. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#pixelSize) + */ + x: number; + /** + * Pixel size along the y axis. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterInfo.html#pixelSize) + */ + y: number; } export interface RasterInfoStatistics extends Object { @@ -18194,13 +18768,31 @@ declare namespace __esri { relatedTableId?: number; } - interface Sublayer extends Accessor { + interface Sublayer extends Accessor, Loadable { /** * 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) */ definitionExpression: string; + /** + * An array of fields in the Sublayer. Each field represents an attribute that may contain a value for each feature in the Sublayer. This property is only available after the Sublayer has been [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#loadStatus). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#fields) + */ + readonly fields: Field[]; + /** + * A convenient property that can be used to make case-insensitive lookups for a [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#field) by name. It can also provide a list of the [date fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldsIndex.html#dateFields) in a Sublayer. This property is only available after the Sublayer has been [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#loadStatus). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#fieldsIndex) + */ + readonly fieldsIndex: FieldsIndex; + /** + * The full extent of the Sublayer. This property is only available after the Sublayer has been [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#loadStatus). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#fullExtent) + */ + readonly fullExtent: Extent; /** * The sublayer's layer ID. When a [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#source) is not defined on the layer, this value represents the id of the sublayer defined by the map service. If creating a [DynamicDataLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#DynamicDataLayer) or a [MapDataLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#MapDataLayer) and adding it to the [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#source) property of the sublayer, the value of this property can be anything set by the developer. * @@ -18262,6 +18854,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#minScale) */ minScale: number; + /** + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#fields) containing a unique value or identifier for each feature in the Sublayer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#objectIdField) + */ + readonly objectIdField: string; /** * The level of opacity to set on the sublayer on a scale from 0.0 - 1.0 where `0` is fully transparent and `1.0` is fully opaque. If the [MapImageLayer.opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#opacity) is set, the actual opacity value of the sublayer will be the value of [MapImageLayer.opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#opacity) multiplied by the sublayer's opacity. * @@ -18269,7 +18867,7 @@ declare namespace __esri { */ opacity: number; /** - * 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-support-Sublayer.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-support-Sublayer.html#popupEnabled) * @@ -18277,7 +18875,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 the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * 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 the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). 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`. * > **Known Limitations** * * [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in PopupTemplates set on MapImageLayer sublayers or TileLayer sublayers unless they reference ArcGIS Enterprise 10.6 map services (or later) created from ArcGIS Pro. * @@ -18299,6 +18897,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#source) */ source: DynamicMapLayer | DynamicDataLayer; + /** + * The [map service's metadata JSON](https://developers.arcgis.com/rest/services-reference/map-service.htm) exposed by the ArcGIS REST API. While most commonly used [properties](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#properties-summary) are exposed on the Sublayer class directly, this property gives access to all information returned by the map service. This property is useful if working in an application built using an older version of the API which requires access to map service properties from a more recent version. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#sourceJSON) + */ + sourceJSON: any; /** * If a sublayer contains sublayers, this property is 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 belonging to the given sublayer with sublayers. * @@ -18311,12 +18915,24 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#title) */ title: 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). This property is only available after the Sublayer has been [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#loadStatus). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#typeIdField) + */ + readonly typeIdField: string; + /** + * An array of subtypes defined in the feature service exposed by ArcGIS REST API. Each item includes information about the type, such as the type ID, name, and definition expression. This property is only available after the Sublayer has been [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#loadStatus). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#types) + */ + readonly types: FeatureType[]; /** * The URL to the REST endpoint of the sublayer. This allows you to view the schema of fields and query tables located in registered workspaces. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#url) */ - readonly url: string; + url: string; /** * 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). * @@ -18340,6 +18956,17 @@ declare namespace __esri { * */ createFeatureLayer(): Promise; + /** + * Creates a popup template for the sublayer, populated with all the fields of the sublayer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.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?: SublayerCreatePopupTemplateOptions): PopupTemplate; /** * 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. * @@ -18348,6 +18975,26 @@ declare namespace __esri { * */ createQuery(): Query; + /** + * Returns a [FeatureType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureType.html) describing the feature's type. This is applicable if the layer containing the feature has a [typeIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#typeIdField). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#getFeatureType) + * + * @param feature A feature from this Sublayer. + * + */ + getFeatureType(feature: Graphic): FeatureType; + /** + * 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). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.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?: SublayerGetFieldDomainOptions): Domain; /** * 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). * @@ -18381,7 +19028,7 @@ declare namespace __esri { export const Sublayer: SublayerConstructor; - interface SublayerProperties { + interface SublayerProperties extends LoadableProperties { /** * 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). * @@ -18456,7 +19103,7 @@ declare namespace __esri { */ opacity?: number; /** - * 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-support-Sublayer.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-support-Sublayer.html#popupEnabled) * @@ -18464,7 +19111,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 the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). + * 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 the user clicks the image. Sublayers with a [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#RasterDataSource) cannot be queried and therefore do not support [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). 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`. * > **Known Limitations** * * [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in PopupTemplates set on MapImageLayer sublayers or TileLayer sublayers unless they reference ArcGIS Enterprise 10.6 map services (or later) created from ArcGIS Pro. * @@ -18486,6 +19133,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#source) */ source?: DynamicMapLayer | DynamicDataLayer; + /** + * The [map service's metadata JSON](https://developers.arcgis.com/rest/services-reference/map-service.htm) exposed by the ArcGIS REST API. While most commonly used [properties](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#properties-summary) are exposed on the Sublayer class directly, this property gives access to all information returned by the map service. This property is useful if working in an application built using an older version of the API which requires access to map service properties from a more recent version. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#sourceJSON) + */ + sourceJSON?: any; /** * If a sublayer contains sublayers, this property is 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 belonging to the given sublayer with sublayers. * @@ -18498,6 +19151,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#title) */ title?: string; + /** + * The URL to the REST endpoint of the sublayer. This allows you to view the schema of fields and query tables located in registered workspaces. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#url) + */ + url?: string; /** * 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). * @@ -18686,6 +19345,32 @@ declare namespace __esri { dataSourceName: string; } + export interface SublayerCreatePopupTemplateOptions 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-support-Sublayer.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-support-Sublayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + + export interface SublayerGetFieldDomainOptions 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-support-Sublayer.html#getFieldDomain) + */ + feature: Graphic; + } + export interface SublayerQueryFeaturesOptions extends Object { /** * Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals. @@ -19013,6 +19698,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) */ startField: string; + /** + * The name of the field used to join or group discrete locations. For example, for hurricane tracks, trackIdField can be the hurricane name field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#trackIdField) + */ + trackIdField: string; /** * Creates a deep clone of TimeInfo object. @@ -19065,6 +19756,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) */ startField?: string; + /** + * The name of the field used to join or group discrete locations. For example, for hurricane tracks, trackIdField can be the hurricane name field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#trackIdField) + */ + trackIdField?: string; } interface WMSSublayer extends Accessor { @@ -19526,6 +20223,158 @@ declare namespace __esri { title?: string; } + interface TileImageryLayer extends Layer, PortalLayer, RefreshableLayer, ScaleRangeLayer { + /** + * Defines how to interpolate pixel values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#interpolation) + */ + interpolation: "nearest" | "bilinear" | "cubic" | "majority"; + /** + * 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](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) or have [different symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html) based on values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#renderer) + */ + renderer: Renderer; + /** + * The tiling scheme information for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#tileInfo) + */ + tileInfo: TileInfo; + + readonly type: "imagery-tile"; + /** + * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#url) + */ + url: string; + + /** + * 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-TileImageryLayer.html#createPopupTemplate) + * + * @param options the options. + * @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?: TileImageryLayerCreatePopupTemplateOptions): PopupTemplate; + /** + * Fetch pixels in a given extent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#fetchPixels) + * + * @param extent + * @param width + * @param height + * @param options + * + */ + fetchPixels(extent: void, width: void, height: void, options: void): void; + /** + * This method fetches a tile for the given level, row and column present in the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#fetchTile) + * + * @param level Level of detail of the tile to fetch. This value is provided by [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html). + * @param row The row(y) position of the tile fetch. This value is provided by [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html). + * @param col The column(x) position of the tile to fetch. This value is provided by [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html). + * @param options Optional settings for the tile request. + * + */ + fetchTile(level: number, row: number, col: number, options?: any): Promise; + /** + * Identify pixel value at a given location. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#identify) + * + * @param pint The given location + * @param options Optional settings for the tile request. + * + */ + identify(pint: any, options?: any): Promise; + + on(name: "layerview-create", eventHandler: TileImageryLayerLayerviewCreateEventHandler): IHandle; + + on(name: "layerview-create-error", eventHandler: TileImageryLayerLayerviewCreateErrorEventHandler): IHandle; + + on(name: "layerview-destroy", eventHandler: TileImageryLayerLayerviewDestroyEventHandler): IHandle; + } + + interface TileImageryLayerConstructor { + /** + * TileImageryLayer presents raster data from a tiled image service. Binary raster tiles are projected, processed, and rendered on the client-side. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html) + */ + + new (properties?: TileImageryLayerProperties): TileImageryLayer; + + fromJSON(json: any): TileImageryLayer; + } + + export const TileImageryLayer: TileImageryLayerConstructor; + + interface TileImageryLayerProperties + extends LayerProperties, + PortalLayerProperties, + RefreshableLayerProperties, + ScaleRangeLayerProperties { + /** + * Defines how to interpolate pixel values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#interpolation) + */ + interpolation?: "nearest" | "bilinear" | "cubic" | "majority"; + /** + * 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](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html) or have [different symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html) based on values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#renderer) + */ + renderer?: RendererProperties; + /** + * The tiling scheme information for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#tileInfo) + */ + tileInfo?: TileInfoProperties; + /** + * The URL of the REST endpoint of the layer. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileImageryLayer.html#url) + */ + url?: string; + } + + export interface TileImageryLayerLayerviewCreateErrorEvent { + error: Error; + + view: View; + } + + export interface TileImageryLayerLayerviewCreateEvent { + layerView: LayerView; + + view: View; + } + + export interface TileImageryLayerLayerviewDestroyEvent { + layerView: LayerView; + + view: View; + } + + export interface TileImageryLayerCreatePopupTemplateOptions extends Object { + /** + * 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-TileImageryLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + interface TileLayer extends Layer, SublayersOwner, @@ -20278,7 +21127,7 @@ declare namespace __esri { */ imageMaxHeight: number; /** - * Indicates the maximum height of the image exported by the service. + * Indicates the maximum width of the image exported by the service. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html#imageMaxWidth) * @@ -20436,7 +21285,7 @@ declare namespace __esri { */ imageMaxHeight?: number; /** - * Indicates the maximum height of the image exported by the service. + * Indicates the maximum width of the image exported by the service. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html#imageMaxWidth) * @@ -20920,12 +21769,6 @@ declare namespace __esri { } 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. If `list` is specified, attachments show as links. * @@ -20957,12 +21800,6 @@ declare namespace __esri { 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. If `list` is specified, attachments show as links. * @@ -22229,11 +23066,11 @@ declare namespace __esri { */ relatedRecordsInfo: RelatedRecordsInfo; /** - * The template for defining how to format the title used in a popup. You can format the title by specifying either a string value or a JavaScript function that returns a simple string. If using a function, the defined content returns a string value. 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's title. + * The template for defining how to format the title used in a popup. You can format the title by specifying either a string value or a JavaScript function that returns a simple string or a promise (since 4.15) that resolves to a string. If using a function, the defined content returns a string value. 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's title. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#title) */ - title: string | Function; + title: string | Function | Promise; /** * Creates a deep clone of the PopupTemplate object. @@ -22339,11 +23176,11 @@ declare namespace __esri { */ relatedRecordsInfo?: RelatedRecordsInfoProperties; /** - * The template for defining how to format the title used in a popup. You can format the title by specifying either a string value or a JavaScript function that returns a simple string. If using a function, the defined content returns a string value. 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's title. + * The template for defining how to format the title used in a popup. You can format the title by specifying either a string value or a JavaScript function that returns a simple string or a promise (since 4.15) that resolves to a string. If using a function, the defined content returns a string value. 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's title. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#title) */ - title?: string | Function; + title?: string | Function | Promise; } interface Portal extends Accessor, Loadable { @@ -22517,7 +23354,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#eueiEnabled) * - * @default false + * @default null */ eueiEnabled: boolean; /** @@ -23082,7 +23919,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#eueiEnabled) * - * @default false + * @default null */ eueiEnabled?: boolean; /** @@ -25319,6 +26156,15 @@ declare namespace __esri { * */ clone(): DictionaryRenderer; + /** + * This method will return the symbol for a given graphic using the dictionary renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DictionaryRenderer.html#getSymbolAsync) + * + * @param graphic The graphic used to get the resulting symbol. + * + */ + getSymbolAsync(graphic: Graphic): Promise; } interface DictionaryRendererConstructor { @@ -26338,50 +27184,58 @@ declare namespace __esri { * 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-RasterStretchRenderer.html#dynamicRangeAdjustment) + * + * @default false */ dynamicRangeAdjustment: boolean; /** - * The gamma values to be used if [useGamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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). + * The gamma values to be used if [useGamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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). Gamma stretching is only valid with the `none`, `standard-deviation`, and `min-max` [stretch types](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#stretchType). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#gamma) */ gamma: number[]; /** - * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#stretchType) is percent-clip. Specifies the percentage of the highest values to exclude from the stretch. + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#maxPercent) */ maxPercent: number; /** - * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#stretchType) is percent-clip. Specifies the percentage of the lowest values to exclude from the stretch. + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#minPercent) */ minPercent: number; /** - * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax). The remaining values are linearly stretched between [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax). + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax). The remaining values are linearly stretched between [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax) will set the range of values that will then be linearly contrast stretched. + * 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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax) will set the range of values that will then be linearly contrast stretched. + * 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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.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. + * The sigmoid 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-RasterStretchRenderer.html#sigmoidStrengthLevel) */ sigmoidStrengthLevel: number; + /** + * The input statistics can be specified through the statistics property. If not specified, they will be retrieved from the data. If [dynamicRangeAdjustment](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#dynamicRangeAdjustment) is `true`, these values will be ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#statistics) + */ + statistics: number[][] | RasterStretchRendererStatistics; /** * 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. * @@ -26407,7 +27261,7 @@ declare namespace __esri { */ readonly type: "raster-stretch"; /** - * Denotes wether the [gamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#gamma) property is required if `useGamma` is `true`. + * Denotes whether the [gamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#gamma) property is required if `useGamma` is `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#useGamma) * @@ -26458,50 +27312,58 @@ declare namespace __esri { * 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-RasterStretchRenderer.html#dynamicRangeAdjustment) + * + * @default false */ dynamicRangeAdjustment?: boolean; /** - * The gamma values to be used if [useGamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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). + * The gamma values to be used if [useGamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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). Gamma stretching is only valid with the `none`, `standard-deviation`, and `min-max` [stretch types](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#stretchType). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#gamma) */ gamma?: number[]; /** - * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#stretchType) is percent-clip. Specifies the percentage of the highest values to exclude from the stretch. + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#maxPercent) */ maxPercent?: number; /** - * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#stretchType) is percent-clip. Specifies the percentage of the lowest values to exclude from the stretch. + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#minPercent) */ minPercent?: number; /** - * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax). The remaining values are linearly stretched between [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax). + * Applicable when [stretchType](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax). The remaining values are linearly stretched between [outputMin](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax) will set the range of values that will then be linearly contrast stretched. + * 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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax) will set the range of values that will then be linearly contrast stretched. + * 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-RasterStretchRenderer.html#outputMin) and [outputMax](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.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. + * The sigmoid 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-RasterStretchRenderer.html#sigmoidStrengthLevel) */ sigmoidStrengthLevel?: number; + /** + * The input statistics can be specified through the statistics property. If not specified, they will be retrieved from the data. If [dynamicRangeAdjustment](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#dynamicRangeAdjustment) is `true`, these values will be ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#statistics) + */ + statistics?: number[][] | RasterStretchRendererStatistics; /** * 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. * @@ -26521,7 +27383,7 @@ declare namespace __esri { */ 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-RasterStretchRenderer.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-RasterStretchRenderer.html#gamma) property is required if `useGamma` is `true`. + * Denotes whether the [gamma](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.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-RasterStretchRenderer.html#gamma) property is required if `useGamma` is `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#useGamma) * @@ -26530,6 +27392,33 @@ declare namespace __esri { useGamma?: boolean; } + export interface RasterStretchRendererStatistics extends Object { + /** + * The minimum pixel value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#statistics) + */ + min: number; + /** + * The maximum pixel value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#statistics) + */ + max: number; + /** + * The average pixel value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#statistics) + */ + avg?: number; + /** + * The standard deviation of the pixel value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#statistics) + */ + stdev?: number; + } + interface Renderer extends Accessor, JSONSupport { /** * Authoring metadata only included in renderers generated from one of the Smart Mapping creator methods, such as [sizeRendererCreator.createContinuousRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) or [colorRendererCreator.createContinuousRenderer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer). This includes information from UI elements such as sliders and selected classification methods and themes. This allows the authoring clients to save specific overridable settings so that next time it is accessed via the UI, their selections can be remembered. @@ -26538,11 +27427,11 @@ declare namespace __esri { */ authoringInfo: AuthoringInfo; /** - * The renderer type. **Possible values:** class-breaks | heatmap | simple | unique-value | raster-stretch + * The renderer type. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html#type) */ - readonly type: string; + readonly type: "class-breaks" | "dictionary" | "dot-density" | "heatmap" | "simple" | "unique-value"; } interface RendererConstructor { @@ -26645,6 +27534,8 @@ declare namespace __esri { * @param params.startTime The name of the field, or a date value representing the start time in the age calculation. If a date value is specified, then the `endTime` parameter must reference a Date field in the layer. * @param params.endTime The name of the field, or a date value representing the end time in the age calculation. If a date value is specified, then the `startTime` parameter must reference a Date field in the layer. * @param params.unit The time unit used to calculate the difference between `endTime` and `startTime`. If a unit is not specified, then a suggested unit is determined based on the spread and distribution of the data. **Possible Values:** years | months | days | hours | minutes | seconds + * @param params.maxValue Sets a maximum age for the visualization. Even if data exists above this value, only statistics will be calculated for values between the `minValue` and `maxValue`. Added at version 4.15. + * @param params.minValue Sets a minimum age for the visualization. Even if data exists below this value, only statistics will be calculated for values between the `minValue` and `maxValue`. Added at version 4.15. * @param params.theme * Determines which values will be emphasized in the continuous ramp and the map. Possible values are listed below. * @@ -26676,6 +27567,8 @@ declare namespace __esri { * tint | Applies the symbol `color` to the desaturated geometry/texture color. * replace | Removes the geometry/texture color and applies the symbol `color`. * multiply | Multiplies geometry/texture color value with the symbol `color` value. The result is a darker color. Multiplying with white keeps the geometry color the same. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * @param params.edgesType Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none * */ createAgeRenderer(params: colorCreateAgeRendererParams): Promise; @@ -26734,9 +27627,11 @@ declare namespace __esri { * * Value | Description * ------|------------ - * tint | Applies the symbol `color` to the desaturated geometry/texture color. + * tint | Applies the symbol `color` to the unsaturated geometry/texture color. * replace | Removes the geometry/texture color and applies the symbol `color`. * multiply | Multiplies geometry/texture color value with the symbol `color` value. The result is a darker color. Multiplying with white keeps the geometry color the same. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * @param params.edgesType Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none * */ createClassBreaksRenderer(params: colorCreateClassBreaksRendererParams): Promise; @@ -26785,9 +27680,11 @@ declare namespace __esri { * * Value | Description * ------|------------ - * tint | Applies the symbol `color` to the desaturated geometry/texture color. + * tint | Applies the symbol `color` to the unsaturated geometry/texture color. * replace | Removes the geometry/texture color and applies the symbol `color`. * multiply | Multiplies geometry/texture color value with the symbol `color` value. The result is a darker color. Multiplying with white keeps the geometry color the same. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * @param params.edgesType Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none * */ createContinuousRenderer(params: colorCreateContinuousRendererParams): Promise; @@ -26803,7 +27700,8 @@ declare namespace __esri { * @param params.size The size of each point expressed as a percentage. This value will determine point sizes scaled based on the given `density` of points. When the value is `100%`, the size of each point is set so that it minimizes the number of gaps between neighboring points. Any value above `100%` will allow for points to overlap neighboring points scaled to the given value. Values below `100%` scale point sizes smaller so there appear to be more gaps between points. * @param params.density The number of points per inch in the view. * @param params.colorScheme In authoring apps, the user may select a pre-defined color 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 [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the stats object here to avoid making a second statistics query to the server. + * @param params.statistics A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the stats object here to avoid making a second statistics + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). query to the server. * */ createPCContinuousRenderer(params: colorCreatePCContinuousRendererParams): Promise; @@ -26816,6 +27714,7 @@ declare namespace __esri { * @param params.layer The layer for which the visualization is generated. * @param params.size The size of each point expressed as a percentage. This value will determine point sizes scaled based on the given `density` of points. When the value is `100%`, the size of each point is set so that it minimizes the number of gaps between neighboring points. Any value above `100%` will allow for points to overlap neighboring points scaled to the given value. Values below `100%` scale point sizes smaller so there appear to be more gaps between points. * @param params.density The number of points per inch in the view. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createPCTrueColorRenderer(params: colorCreatePCTrueColorRendererParams): Promise; @@ -26849,6 +27748,7 @@ declare namespace __esri { * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned color visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned color visual variable. * @param params.worldScale Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology, except for layers with a `mesh` geometry type. A `view` must be provided if this property is set to `true`. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createVisualVariable(params: colorCreateVisualVariableParams): Promise; @@ -26995,6 +27895,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createAgeRenderer) */ unit?: string; + /** + * Sets a maximum age for the visualization. Even if data exists above this value, only statistics will be calculated for values between the `minValue` and `maxValue`. Added at version 4.15. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createAgeRenderer) + */ + maxValue?: number; + /** + * Sets a minimum age for the visualization. Even if data exists below this value, only statistics will be calculated for values between the `minValue` and `maxValue`. Added at version 4.15. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createAgeRenderer) + */ + minValue?: number; /** * Determines which values will be emphasized in the continuous ramp and the map. Possible values are listed below. * @@ -27081,6 +27993,20 @@ declare namespace __esri { * @default replace */ colorMixMode?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createAgeRenderer) + */ + signal?: AbortSignal; + /** + * Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createAgeRenderer) + * + * @default none + */ + edgesType?: string; } export interface colorCreateAgeRendererParamsLegendOptions extends Object { @@ -27267,7 +28193,7 @@ declare namespace __esri { * * Value | Description * ------|------------ - * tint | Applies the symbol `color` to the desaturated geometry/texture color. + * tint | Applies the symbol `color` to the unsaturated geometry/texture color. * replace | Removes the geometry/texture color and applies the symbol `color`. * multiply | Multiplies geometry/texture color value with the symbol `color` value. The result is a darker color. Multiplying with white keeps the geometry color the same. * @@ -27277,6 +28203,20 @@ declare namespace __esri { * @default replace */ colorMixMode?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + */ + signal?: AbortSignal; + /** + * Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createClassBreaksRenderer) + * + * @default none + */ + edgesType?: string; } export interface colorCreateClassBreaksRendererParamsLegendOptions extends Object { @@ -27433,7 +28373,7 @@ declare namespace __esri { * * Value | Description * ------|------------ - * tint | Applies the symbol `color` to the desaturated geometry/texture color. + * tint | Applies the symbol `color` to the unsaturated geometry/texture color. * replace | Removes the geometry/texture color and applies the symbol `color`. * multiply | Multiplies geometry/texture color value with the symbol `color` value. The result is a darker color. Multiplying with white keeps the geometry color the same. * @@ -27443,6 +28383,20 @@ declare namespace __esri { * @default replace */ colorMixMode?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + */ + signal?: AbortSignal; + /** + * Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createContinuousRenderer) + * + * @default none + */ + edgesType?: string; } export interface colorCreateContinuousRendererParamsLegendOptions extends Object { @@ -27504,11 +28458,17 @@ declare namespace __esri { */ colorScheme?: ColorScheme; /** - * A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the stats object here to avoid making a second statistics query to the server. + * A statistics object generated from the [summaryStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html) function. If statistics for the field have already been generated, then pass the stats object here to avoid making a second statistics * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createPCContinuousRenderer) */ statistics?: SummaryStatisticsResult; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). query to the server. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createPCContinuousRenderer) + */ + signal?: AbortSignal; } export interface colorCreatePCTrueColorRendererParams extends Object { @@ -27534,6 +28494,12 @@ declare namespace __esri { * @default 25 */ density?: number; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createPCTrueColorRenderer) + */ + signal?: AbortSignal; } export interface colorCreateVisualVariableParams extends Object { @@ -27643,6 +28609,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) */ worldScale?: boolean; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-color.html#createVisualVariable) + */ + signal?: AbortSignal; } export interface colorCreateVisualVariableParamsLegendOptions extends Object { @@ -27849,6 +28821,7 @@ declare namespace __esri { * @param params.outlineOptimizationEnabled Indicates whether the polygon outline width should vary based on view scale. When false, no outline will be used in the output renderer. * @param params.legendOptions Provides options for modifying [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) properties describing the visualization. * @param params.dotDensityScheme In authoring apps, the user may select a pre-defined dot density scheme. Pass the scheme object to this property to avoid getting one based on the `basemap`. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createRenderer(params: dotDensityCreateRendererParams): Promise; @@ -27919,6 +28892,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-dotDensity.html#createRenderer) */ dotDensityScheme?: DotDensityScheme; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-dotDensity.html#createRenderer) + */ + signal?: AbortSignal; } export interface dotDensityCreateRendererParamsAttributes extends Object { @@ -28011,6 +28990,7 @@ declare namespace __esri { * @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. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createRenderer(params: heatmapCreateRendererParams): Promise; @@ -28089,6 +29069,12 @@ declare namespace __esri { * @default 1 */ maxRatio?: number; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-heatmap.html#createRenderer) + */ + signal?: AbortSignal; } /** @@ -28164,6 +29150,8 @@ declare namespace __esri { * tint | Applies the symbol `color` to the unsaturated geometry/texture color. * replace | Removes the geometry/texture color and applies the symbol `color`. * multiply | Multiplies geometry/texture color value with the symbol `color` value. The result is a darker color. Multiplying with white keeps the geometry color the same. + * @param params.edgesType Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createRenderer(params: locationCreateRendererParams): Promise; @@ -28244,6 +29232,20 @@ declare namespace __esri { * @default replace */ colorMixMode?: string; + /** + * Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-location.html#createRenderer) + * + * @default none + */ + edgesType?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-location.html#createRenderer) + */ + signal?: AbortSignal; } /** @@ -28302,6 +29304,7 @@ declare namespace __esri { * @param params.minValue A custom minimum value set by the user. Use this in conjunction with `maxValue` to generate statistics between lower and upper bounds. This will be the lowest stop in the returned visual variable. * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned visual variable. * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createVisualVariable(params: opacityCreateVisualVariableParams): Promise; @@ -28382,6 +29385,12 @@ declare namespace __esri { * [Read more...](global.html) */ view?: View; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-opacity.html#createVisualVariable) + */ + signal?: AbortSignal; } export interface opacityCreateVisualVariableParamsLegendOptions extends Object { @@ -28484,6 +29493,8 @@ declare namespace __esri { * tint | Applies the symbol `color` to the desaturated geometry/texture color. * replace | Removes the geometry/texture color and applies the symbol `color`. * multiply | Multiplies geometry/texture color value with the symbol `color` value. The result is a darker color. Multiplying with white keeps the geometry color the same. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * @param params.edgesType Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. * */ createRenderer(params: predominanceCreateRendererParams): Promise; @@ -28618,6 +29629,20 @@ declare namespace __esri { * @default replace */ colorMixMode?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-predominance.html#createRenderer) + */ + signal?: AbortSignal; + /** + * Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-predominance.html#createRenderer) + * + * @default none + */ + edgesType?: string; } export interface predominanceCreateRendererParamsFields extends Object { @@ -28763,6 +29788,8 @@ declare namespace __esri { * tint | Applies the symbol `color` to the desaturated geometry/texture color. * replace | Removes the geometry/texture color and applies the symbol `color`. * multiply | Multiplies geometry/texture color value with the symbol `color` value. The result is a darker color. Multiplying with white keeps the geometry color the same. + * @param params.edgesType Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createRenderer(params: relationshipCreateRendererParams): Promise; @@ -28938,6 +29965,20 @@ declare namespace __esri { * @default replace */ colorMixMode?: string; + /** + * Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#createRenderer) + * + * @default none + */ + edgesType?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-relationship.html#createRenderer) + */ + signal?: AbortSignal; } export interface relationshipCreateRendererParamsField1 extends Object { @@ -29182,6 +30223,8 @@ declare namespace __esri { * @param params.startTime The name of the field, or a date value representing the start time in the age calculation. If a date value is specified, then the `endTime` parameter must reference a Date field in the layer. * @param params.endTime The name of the field, or a date value representing the end time in the age calculation. If a date value is specified, then the `startTime` parameter must reference a Date field in the layer. * @param params.unit The time unit used to calculate the difference between `endTime` and `startTime`. If a unit is not specified, then a suggested unit is determined based on the spread and distribution of the data. **Possible Values:** years | months | days | hours | minutes | seconds + * @param params.maxValue Sets a maximum age for the visualization. Even if data exists above this value, only statistics will be calculated for values between the `minValue` and `maxValue`. Added at version 4.15. + * @param params.minValue Sets a minimum age for the visualization. Even if data exists below this value, only statistics will be calculated for values between the `minValue` and `maxValue`. Added at version 4.15. * @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. Determines optimal colors for the output renderer. * @param params.outlineOptimizationEnabled Only for polygon layers. Indicates whether the polygon outline width should vary based on view scale. When set, a valid [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance must be provided in the `view` parameter. This option is not supported for 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * @param params.sizeOptimizationEnabled Indicates whether symbol sizes should vary based on view scale. When set, a valid [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance must be provided in the `view` parameter. This option is not supported for 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). @@ -29197,6 +30240,7 @@ declare namespace __esri { * | 3d-flat | Generates a visualization using 3D symbols with flat symbol layers such as [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [LineSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3DLayer.html), or [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html). Use this option if generating a 2D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). | * | 3d-volumetric | Generates a visualization using 3D symbols with volumetric symbol layers such as [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html), [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html), or [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html). Use this option if generating a 3D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). A SceneView instance must be provided to the `view` parameter if this option is used. | * @param params.defaultSymbolEnabled Enables the `defaultSymbol` on the renderer and assigns it to features with no value. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createAgeRenderer(params: sizeCreateAgeRendererParams): Promise; @@ -29251,6 +30295,7 @@ declare namespace __esri { * | 3d-flat | Generates a visualization using 3D symbols with flat symbol layers such as [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [LineSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3DLayer.html), or [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html). Use this option if generating a 2D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). | * | 3d-volumetric | Generates a visualization using 3D symbols with volumetric symbol layers such as [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html), [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html), or [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html). Use this option if generating a 3D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and only the symbol's height should be variable, for example with cylinders. A SceneView instance must be provided to the `view` parameter if this option is used. | * | 3d-volumetric-uniform | Generates a visualization using uniformly sized 3D symbols with volumetric symbol layers. Use this option if generating a 3D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and the symbol should be sized uniformly, for example with spheres. A SceneView instance must be provided to the `view` parameter if this option is used. | + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createClassBreaksRenderer(params: sizeCreateClassBreaksRendererParams): Promise; @@ -29286,6 +30331,7 @@ declare namespace __esri { * | 3d-flat | Generates a visualization using 3D symbols with flat symbol layers such as [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [LineSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3DLayer.html), or [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html). Use this option if generating a 2D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). | * | 3d-volumetric | Generates a visualization using 3D symbols with volumetric symbol layers such as [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html), [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html), or [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html). Use this option if generating a 3D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and only the symbol's height should be variable, for example with cylinders. A SceneView instance must be provided to the `view` parameter if this option is used. | * | 3d-volumetric-uniform | Generates a visualization using uniformly sized 3D symbols with volumetric symbol layers. Use this option if generating a 3D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and the symbol should be sized uniformly, for example with spheres. A SceneView instance must be provided to the `view` parameter if this option is used. | + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createContinuousRenderer(params: sizeCreateContinuousRendererParams): Promise; @@ -29312,6 +30358,7 @@ declare namespace __esri { * @param params.maxValue A custom maximum value set by the user. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. This will be the uppermost stop in the returned size visual variable. * @param params.worldScale Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. * @param params.axis When set to `all`, a single size variable that scales uniformly in all dimensions is generated. When set to `height`, the result contains two size visual variables: the first one sizes the height according to the field statistics, while the second defines a constant size for width and depth. **Possible Values:** all | height + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createVisualVariables(params: sizeCreateVisualVariablesParams): Promise; @@ -29500,6 +30547,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createAgeRenderer) */ unit?: string; + /** + * Sets a maximum age for the visualization. Even if data exists above this value, only statistics will be calculated for values between the `minValue` and `maxValue`. Added at version 4.15. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createAgeRenderer) + */ + maxValue?: number; + /** + * Sets a minimum age for the visualization. Even if data exists below this value, only statistics will be calculated for values between the `minValue` and `maxValue`. Added at version 4.15. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createAgeRenderer) + */ + minValue?: number; /** * 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. Determines optimal colors for the output renderer. * @@ -29565,6 +30624,12 @@ declare namespace __esri { * @default true */ defaultSymbolEnabled?: boolean; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createAgeRenderer) + */ + signal?: AbortSignal; } export interface sizeCreateAgeRendererParamsLegendOptions extends Object { @@ -29747,6 +30812,12 @@ declare namespace __esri { * @default 2d */ symbolType?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createClassBreaksRenderer) + */ + signal?: AbortSignal; } export interface sizeCreateClassBreaksRendererParamsLegendOptions extends Object { @@ -29885,6 +30956,12 @@ declare namespace __esri { * @default 2d */ symbolType?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createContinuousRenderer) + */ + signal?: AbortSignal; } export interface sizeCreateContinuousRendererParamsLegendOptions extends Object { @@ -30011,6 +31088,12 @@ declare namespace __esri { * @default all */ axis?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-size.html#createVisualVariables) + */ + signal?: AbortSignal; } export interface sizeCreateVisualVariablesParamsLegendOptions extends Object { @@ -30096,6 +31179,7 @@ declare namespace __esri { * @param params.density The number of points per inch in the view. * @param params.typeScheme In authoring apps, the user may select a pre-defined type 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 [uniqueValues](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.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.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createPCClassRenderer(params: typeCreatePCClassRendererParams): Promise; @@ -30145,6 +31229,8 @@ declare namespace __esri { * replace | Removes the geometry/texture color and applies the symbol `color`. * multiply | Multiplies geometry/texture color value with the symbol `color` value. The result is a darker color. Multiplying with white keeps the geometry color the same. * @param params.returnAllCodedValues Indicates that all domain codes should be returned if the given field has domain values. + * @param params.edgesType Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createRenderer(params: typeCreateRendererParams): Promise; @@ -30251,6 +31337,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createPCClassRenderer) */ statistics?: UniqueValuesResult; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createPCClassRenderer) + */ + signal?: AbortSignal; } export interface typeCreateRendererParams extends Object { @@ -30393,6 +31485,20 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) */ returnAllCodedValues?: boolean; + /** + * Indicates whether to add edges to the output renderer. This setting only applies to mesh SceneLayers. **Possible Values:** solid | none + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) + * + * @default none + */ + edgesType?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-type.html#createRenderer) + */ + signal?: AbortSignal; } export interface typeCreateRendererParamsLegendOptions extends Object { @@ -30473,6 +31579,7 @@ declare namespace __esri { * | 3d-flat | Generates a visualization using 3D symbols with flat symbol layers such as [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [LineSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3DLayer.html), or [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html). Use this option if generating a 2D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). | * | 3d-volumetric | Generates a visualization using 3D symbols with volumetric symbol layers such as [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html), [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html), or [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html). Use this option if generating a 3D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and only the symbol's height should be variable, for example with cylinders. A SceneView instance must be provided to the `view` parameter if this option is used. | * | 3d-volumetric-uniform | Generates a visualization using uniformly sized 3D symbols with volumetric symbol layers. Use this option if generating a 3D visualization for data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and the symbol should be sizes uniformly, for example with spheres. A SceneView instance must be provided to the `view` parameter if this option is used. | + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createContinuousRenderer( @@ -30499,6 +31606,7 @@ declare namespace __esri { * @param params.colorOptions Options for configuring the color portion of the visualization. * @param params.sizeOptions Options for configuring the size portion of the visualization. * @param params.worldScale Indicates if the size units of the symbols will be in meters. This should be `true` when generating visualizations with 3D volumetric symbology. A `view` must be provided if this property is set to `true`. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ createVisualVariables(params: univariateColorSizeCreateVisualVariablesParams): Promise; @@ -30673,6 +31781,12 @@ declare namespace __esri { * @default 2d */ symbolType?: string; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createContinuousRenderer) + */ + signal?: AbortSignal; } export interface univariateColorSizeCreateContinuousRendererParamsColorOptions extends Object { @@ -30830,6 +31944,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) */ worldScale?: boolean; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-creators-univariateColorSize.html#createVisualVariables) + */ + signal?: AbortSignal; } export interface univariateColorSizeCreateVisualVariablesParamsColorOptions extends Object { @@ -31027,6 +32147,7 @@ declare namespace __esri { * @param params.layer The layer for which to generate a suggested min/max scale range. * @param params.view The [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) where the layer will be rendered. * @param params.sampleSize The number of features in the `layer` to sample for spatial statistics. A higher sample size will yield more precise results. However, higher sample sizes also require more time for the function to process the result. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ scaleRange(params: scaleRangeScaleRangeParams): Promise; @@ -31075,6 +32196,12 @@ declare namespace __esri { * @default 500 */ sampleSize?: number; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-heuristics-scaleRange.html#scaleRange) + */ + signal?: AbortSignal; } /** @@ -31093,6 +32220,7 @@ declare namespace __esri { * @param params See the table below for details about parameters that may be passed to this function. * @param params.layer The layer for which to generate a suggested min/max size range based on scale for a size visual variable. * @param params.view The [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) where the layer will be rendered. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ sizeRange(params: sizeRangeSizeRangeParams): Promise; @@ -31133,6 +32261,12 @@ declare namespace __esri { * [Read more...](global.html) */ view: MapView; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-heuristics-sizeRange.html#sizeRange) + */ + signal?: AbortSignal; } /** @@ -31168,6 +32302,7 @@ declare namespace __esri { * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. * @param params.features A subset of features for which to generate the class breaks. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ classBreaks(params: classBreaksClassBreaksParams): Promise; @@ -31289,6 +32424,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) */ features?: Graphic[]; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-classBreaks.html#classBreaks) + */ + signal?: AbortSignal; } /** @@ -31340,6 +32481,7 @@ declare namespace __esri { * @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. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ heatmapStatistics(params: heatmapStatisticsHeatmapStatisticsParams): Promise; @@ -31378,6 +32520,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#heatmapStatistics) */ features?: Graphic[]; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-heatmapStatistics.html#heatmapStatistics) + */ + signal?: AbortSignal; } /** @@ -31457,6 +32605,7 @@ declare namespace __esri { * @param params.sqlWhere A SQL where clause used to filter features for the statistics query. For example, this is useful in situations where you want to avoid dividing by zero as is the case with creating a predominance visualization. * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. * @param params.features A subset of features for which to generate the histogram. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ histogram(params: histogramHistogramParams): Promise; @@ -31554,6 +32703,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) */ features?: Graphic[]; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-histogram.html#histogram) + */ + signal?: AbortSignal; } /** @@ -31592,6 +32747,7 @@ declare namespace __esri { * @param params.layer The layer from which to generate predominant categories for the given set of `fields`. * @param params.fields An array of numeric fields from which to determine predominant categories. The fields must all be number fields and they must be competing or complementary (e.g. population totals by language spoken at home, or harvested acres by crop type, or the results of an election by candidate or party). * @param params.view The view in which features will be rendered. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ predominantCategories( @@ -31620,6 +32776,12 @@ declare namespace __esri { * [Read more...](global.html) */ view?: MapView | SceneView; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-predominantCategories.html#predominantCategories) + */ + signal?: AbortSignal; } /** @@ -31679,6 +32841,7 @@ declare namespace __esri { * @param params.maxValue The maximum bounding value for the statistics calculation. Use this in conjunction with `minValue` to generate statistics between lower and upper bounds. * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. * @param params.features A subset of features for which to calculate the statistics. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ summaryStatistics(params: summaryStatisticsSummaryStatisticsParams): Promise; @@ -31798,6 +32961,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) */ features?: Graphic[]; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatistics.html#summaryStatistics) + */ + signal?: AbortSignal; } interface summaryStatisticsForAge { @@ -31812,6 +32981,7 @@ declare namespace __esri { * @param params.endTime The end time for the age calculation. This can be a field name or a date value, such as `Date.now()`. If a `Date` is provided, then the `startTime` parameter must be a field name. * @param params.unit The desired units of the age result. **Possible Values:** years | months | days | hours | minutes | seconds * @param params.view The view in which features will be rendered. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ summaryStatisticsForAge( @@ -31852,6 +33022,12 @@ declare namespace __esri { * [Read more...](global.html) */ view?: MapView | SceneView; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-summaryStatisticsForAge.html#summaryStatisticsForAge) + */ + signal?: AbortSignal; } interface ageUtils { @@ -31945,6 +33121,7 @@ declare namespace __esri { * @param params.returnAllCodedValues Indicates that all domain codes should be returned if the given field has domain values. * @param params.view A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) or [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) instance is required when a `valueExpression` is specified. * @param params.features A subset of features for which to generate the unique values. + * @param params.signal Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). * */ uniqueValues(params: uniqueValuesUniqueValuesParams): Promise; @@ -32016,6 +33193,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) */ features?: Graphic[]; + /** + * Allows for cancelable requests. If canceled, the promise will be rejected with an error named `AbortError`. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-smartMapping-statistics-uniqueValues.html#uniqueValues) + */ + signal?: AbortSignal; } export interface UniqueValuesResultUniqueValueInfos extends Object { @@ -37689,7 +38872,7 @@ declare namespace __esri { layers: Collection; /** - * Adds a layer to the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). + * Adds a layer to the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-add), [after-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-add), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#add) * @@ -37699,7 +38882,7 @@ declare namespace __esri { */ add(layer: Layer | Promise, 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). + * 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). The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-add), [after-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-add), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. The [push()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#push) method on the layers collection also can be used to add a layer or layers. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#addMany) * @@ -37718,7 +38901,7 @@ declare namespace __esri { */ findLayerById(layerId: string): Layer; /** - * Removes the specified layer from the layers collection. + * Removes the specified layer from the layers collection. The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-remove), [after-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-remove), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#remove) * @@ -37727,7 +38910,7 @@ declare namespace __esri { */ remove(layer: Layer): Layer; /** - * Removes all layers. + * Removes all layers. The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-remove), [after-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-remove), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#removeAll) * @@ -37735,7 +38918,7 @@ declare namespace __esri { */ removeAll(): Layer[]; /** - * Removes the specified layers. + * Removes the specified layers. The [before-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-changes), [before-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-before-remove), [after-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-remove), [after-changes](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-after-changes) and [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) events will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#removeMany) * @@ -37744,7 +38927,7 @@ declare namespace __esri { */ removeMany(layers: Layer[]): Layer[]; /** - * Changes the layer order. The first layer added is always the base layer, even if its order is changed. + * Changes the layer order. The first layer added is always the base layer, even if its order is changed. The [change](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#event-change) event will be emitted when this method is called. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#reorder) * @@ -41214,7 +42397,9 @@ declare namespace __esri { borderLineSize: number; /** * The [Font](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html) used to style the text. This property allows the developer to set the font's family, decoration, size, style, and weight properties. See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/guide/labeling/index.html) for more information and known limitations. - * > **Known Limitations** This property is not fully supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * > **Known Limitations** + * * This property is not fully supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * The available [Font.family](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#family) property values depend on whether you are working with a 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#font) */ @@ -41240,7 +42425,7 @@ declare namespace __esri { * Adjusts the horizontal alignment of the text in multi-lines. * > **Known Limitations** * * This property is not currently supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). - * * This property only applies when TextSymbol is not used for labelling purposes. The `horizontalAlignment` for labels is inferred from the [labelPlacement](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement) value. + * * This property only applies when TextSymbol is not used for labeling purposes. The `horizontalAlignment` for labels is inferred from the [labelPlacement](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement) value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#horizontalAlignment) * @@ -41255,6 +42440,28 @@ declare namespace __esri { * @default true */ kerning: boolean; + /** + * The height of the space between each line of text. Only applies to multiline text. This property can be considered as a multiplier of the default value of 1.0 (e.g. a value of 2.0 will be two times the height of the default height). The range of possible values is: 0.1 - 4.0. If a value of 0 is specified, the default value of 1.0 will be used. + * > **Known Limitations** + * * This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * The default value is subject to change in future releases. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#lineHeight) + * + * @default 1.0 + */ + lineHeight: number; + /** + * The maximum length in points for each line of text. This value may be autocast with a string expressing size in points or pixels (e.g. `72px`). The default value is 192 points. The range of possible values is: 32px - 512px. If text extends farther than the `lineWidth` value, then the line will break at the whitespace before the text that extends past the limit if possible, and a new line will be created. + * > **Known Limitations** + * * This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * The default value is subject to change in future releases. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#lineWidth) + * + * @default 192 + */ + lineWidth: number; /** * Determines whether every character in the text string is rotated. * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). @@ -41265,8 +42472,8 @@ declare namespace __esri { */ rotated: boolean; /** - * 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. To manually create a new line, use the `\n` escape character. - * > **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. + * The text string to display in the view. Long text strings will be split into multiple lines. The length of the line is controlled by the [lineWidth](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#lineWidth) property. To manually create a new line, use the `\n` escape character. + * > **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 labeling purposes. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#text) */ @@ -41355,7 +42562,9 @@ declare namespace __esri { borderLineSize?: number; /** * The [Font](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html) used to style the text. This property allows the developer to set the font's family, decoration, size, style, and weight properties. See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/guide/labeling/index.html) for more information and known limitations. - * > **Known Limitations** This property is not fully supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * > **Known Limitations** + * * This property is not fully supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * The available [Font.family](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#family) property values depend on whether you are working with a 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#font) */ @@ -41381,7 +42590,7 @@ declare namespace __esri { * Adjusts the horizontal alignment of the text in multi-lines. * > **Known Limitations** * * This property is not currently supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). - * * This property only applies when TextSymbol is not used for labelling purposes. The `horizontalAlignment` for labels is inferred from the [labelPlacement](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement) value. + * * This property only applies when TextSymbol is not used for labeling purposes. The `horizontalAlignment` for labels is inferred from the [labelPlacement](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement) value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#horizontalAlignment) * @@ -41396,6 +42605,28 @@ declare namespace __esri { * @default true */ kerning?: boolean; + /** + * The height of the space between each line of text. Only applies to multiline text. This property can be considered as a multiplier of the default value of 1.0 (e.g. a value of 2.0 will be two times the height of the default height). The range of possible values is: 0.1 - 4.0. If a value of 0 is specified, the default value of 1.0 will be used. + * > **Known Limitations** + * * This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * The default value is subject to change in future releases. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#lineHeight) + * + * @default 1.0 + */ + lineHeight?: number; + /** + * The maximum length in points for each line of text. This value may be autocast with a string expressing size in points or pixels (e.g. `72px`). The default value is 192 points. The range of possible values is: 32px - 512px. If text extends farther than the `lineWidth` value, then the line will break at the whitespace before the text that extends past the limit if possible, and a new line will be created. + * > **Known Limitations** + * * This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * The default value is subject to change in future releases. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#lineWidth) + * + * @default 192 + */ + lineWidth?: number | string; /** * Determines whether every character in the text string is rotated. * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). @@ -41406,8 +42637,8 @@ declare namespace __esri { */ rotated?: boolean; /** - * 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. To manually create a new line, use the `\n` escape character. - * > **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. + * The text string to display in the view. Long text strings will be split into multiple lines. The length of the line is controlled by the [lineWidth](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#lineWidth) property. To manually create a new line, use the `\n` escape character. + * > **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 labeling purposes. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#text) */ @@ -42273,7 +43504,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). * */ - reshape(targetGeometry: Geometry, reshaper: Geometry, requestOptions?: any): Promise; + reshape(targetGeometry: Geometry, reshaper: Polyline, requestOptions?: any): Promise; /** * Alters the given geometries to make their definitions topologically legal with respect to their geometry type. * @@ -42310,7 +43541,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). * */ - trimExtend(params: TrimExtendParameters, requestOptions?: any): Promise; + trimExtend(params: TrimExtendParameters, requestOptions?: any): Promise; /** * The union operation is performed on a geometry service resource. This operation constructs the set-theoretic union of the geometries in the input array. All inputs must be of the same type. * @@ -45159,7 +46390,7 @@ declare namespace __esri { value?: string; } - interface GeneralizeParameters extends Accessor { + interface GeneralizeParameters extends Accessor, JSONSupport { /** * The maximum deviation unit. If the unit is not specified, units are derived from the spatial reference. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). * @@ -45178,19 +46409,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-GeneralizeParameters.html#maxDeviation) */ maxDeviation: number; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/programming-patterns/#using-fromjson) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-GeneralizeParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface GeneralizeParametersConstructor { new (properties?: GeneralizeParametersProperties): GeneralizeParameters; + + fromJSON(json: any): GeneralizeParameters; } export const GeneralizeParameters: GeneralizeParametersConstructor; @@ -45365,7 +46589,7 @@ declare namespace __esri { */ returnUnformattedValues: boolean; /** - * When `true`, indicates that Z values will be returned. + * When `true`, indicates that z-values will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnZ) * @@ -45497,7 +46721,7 @@ declare namespace __esri { */ returnUnformattedValues?: boolean; /** - * When `true`, indicates that Z values will be returned. + * When `true`, indicates that z-values will be returned. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-IdentifyParameters.html#returnZ) * @@ -45944,7 +47168,7 @@ declare namespace __esri { title?: string; } - interface LengthsParameters extends Accessor { + interface LengthsParameters extends Accessor, JSONSupport { /** * Defines the type of calculation for the geometry. The type can be one of the following: * @@ -45976,19 +47200,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-LengthsParameters.html#polylines) */ polylines: Polyline[]; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/programming-patterns/#using-fromjson) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-LengthsParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface LengthsParametersConstructor { new (properties?: LengthsParametersProperties): LengthsParameters; + + fromJSON(json: any): LengthsParameters; } export const LengthsParameters: LengthsParametersConstructor; @@ -46166,7 +47383,7 @@ declare namespace __esri { | "abort"; } - interface OffsetParameters extends Accessor { + interface OffsetParameters extends Accessor, JSONSupport { /** * The `bevelRatio` is multiplied by the offset distance and the result determines how far a mitered offset intersection can be located before it is beveled. When mitered is specified, the value set for `bevelRatio` is ignored and `10` is used internally. If beveled is specified, `1.1` will be used if no value is set for bevelRatio. The bevelRatio is ignored when `rounded` is specified. * @@ -46204,19 +47421,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-OffsetParameters.html#offsetUnit) */ offsetUnit: "feet" | "kilometers" | "meters" | "miles" | "nautical-miles" | "yards"; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/programming-patterns/#using-fromjson) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-OffsetParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface OffsetParametersConstructor { new (properties?: OffsetParametersProperties): OffsetParameters; + + fromJSON(json: any): OffsetParameters; } export const OffsetParameters: OffsetParametersConstructor; @@ -46772,6 +47982,17 @@ declare namespace __esri { } interface Query extends Accessor, JSONSupport { + /** + * Indicates if the service should cache the query results. It only applies if the layer's [capabilities.query.supportsCacheHint](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is set to `true`. Use only for queries that have the same parameters every time the app is used. Some examples of cacheable queries: + * * Queries that fetch [statistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) or [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnGeometry) on app load. + * * Queries based on [preset input](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where), for example, a drop-down list of US states. + * * Queries based on [preset extents](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), for example bookmarks, in web maps. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#cacheHint) + * + * @default false + */ + cacheHint: boolean; /** * Datum transformation used for projecting geometries in the query results when [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) is different than the layer's spatial reference. Requires ArcGIS Server service 10.5 or greater. * @@ -46804,7 +48025,7 @@ declare namespace __esri { */ geometryPrecision: number; /** - * Used only in [statistical queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#statistic). When one or more field names are provided in this property, the output statisics will be grouped based on unique values from those fields. This is only valid when [outStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) has been defined. + * Used only in [statistical queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#statistic). When one or more field names are provided in this property, the output statistics will be grouped based on unique values from those fields. This is only valid when [outStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) has been defined. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#groupByFieldsForStatistics) */ @@ -46871,6 +48092,8 @@ declare namespace __esri { * * If specifying outFields as expressions on a feature service-based [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), the service capabilities `advancedQueryCapabilities.supportsOutFieldSQLExpression` and `useStandardizedQueries` must both be true. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields) + * + * @default null */ outFields: string[]; /** @@ -47070,6 +48293,17 @@ declare namespace __esri { export const Query: QueryConstructor; interface QueryProperties { + /** + * Indicates if the service should cache the query results. It only applies if the layer's [capabilities.query.supportsCacheHint](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is set to `true`. Use only for queries that have the same parameters every time the app is used. Some examples of cacheable queries: + * * Queries that fetch [statistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) or [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnGeometry) on app load. + * * Queries based on [preset input](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#where), for example, a drop-down list of US states. + * * Queries based on [preset extents](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry), for example bookmarks, in web maps. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#cacheHint) + * + * @default false + */ + cacheHint?: boolean; /** * Datum transformation used for projecting geometries in the query results when [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) is different than the layer's spatial reference. Requires ArcGIS Server service 10.5 or greater. * @@ -47102,7 +48336,7 @@ declare namespace __esri { */ geometryPrecision?: number; /** - * Used only in [statistical queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#statistic). When one or more field names are provided in this property, the output statisics will be grouped based on unique values from those fields. This is only valid when [outStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) has been defined. + * Used only in [statistical queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#statistic). When one or more field names are provided in this property, the output statistics will be grouped based on unique values from those fields. This is only valid when [outStatistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outStatistics) has been defined. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#groupByFieldsForStatistics) */ @@ -47169,6 +48403,8 @@ declare namespace __esri { * * If specifying outFields as expressions on a feature service-based [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), the service capabilities `advancedQueryCapabilities.supportsOutFieldSQLExpression` and `useStandardizedQueries` must both be true. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields) + * + * @default null */ outFields?: string[]; /** @@ -47455,7 +48691,7 @@ declare namespace __esri { url?: string; } - interface RelationParameters extends Accessor { + interface RelationParameters extends Accessor, JSONSupport { /** * The first array of geometries to compute the relation. The structure of each geometry in the array is same as the structure of the json geometry objects returned by the ArcGIS REST API. * @@ -47508,19 +48744,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationParameters.html#relationParameter) */ relationParameter: string; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/programming-patterns/#using-fromjson) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface RelationParametersConstructor { new (properties?: RelationParametersProperties): RelationParameters; + + fromJSON(json: any): RelationParameters; } export const RelationParameters: RelationParametersConstructor; @@ -49051,11 +50280,46 @@ declare namespace __esri { */ outStatisticFieldName: string; /** - * Defines the type of statistic. + * The parameters for [percentile statistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticType). This property must be set when the [statisticType](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticType) is set to either `percentile-continuous` or `percentile-discrete`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticParameters) + * + * @default null + */ + statisticParameters: StatisticDefinitionStatisticParameters; + /** + * Defines the type of statistic. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * count | The number of features that match a specified criteria. + * sum | The total sum of values that match a specified criteria. + * min | The minimum value of a given field. + * max | The maximum value of a given field. + * avg | The average of values that match a specified criteria. + * stddev | The standard deviation of values that match a specified criteria. + * var | The statistical variance of values in the specified criteria. + * percentile-continuous | The percentile statistic indicates the value above or below which a given percentage of values in a group of data falls. For example, the 90th percentile (value 0.9) is the value below which 90% of the data values may be found. `percentile-continuous` returns an interpolated value from the dataset. + * percentile-discrete | Similar to `percentile-continuous` except `percentile-discrete` returns a data value from within the dataset. + * + * > **Known Limitations** + * * The [statisticParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticParameters) must be set when calculating `percentile-continuous` or `percentile-discrete` statistics. + * * The `percentile-continuous` and `percentile-discrete` statistic types cannot be used with the [having](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#having) parameter. + * * The `percentile-continuous` and `percentile-discrete` statistic types are only supported with server-side [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * * The `percentile-continuous` and `percentile-discrete` statistic types are supported if [capabilities.query.supportsPercentileStatistics](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-StatisticDefinition.html#statisticType) */ - statisticType: "count" | "sum" | "min" | "max" | "avg" | "stddev" | "var"; + statisticType: + | "count" + | "sum" + | "min" + | "max" + | "avg" + | "stddev" + | "var" + | "percentile-continuous" + | "percentile-discrete"; /** * Creates a deep clone of StatisticDefinition object. @@ -49089,14 +50353,64 @@ declare namespace __esri { */ outStatisticFieldName?: string; /** - * Defines the type of statistic. + * The parameters for [percentile statistics](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticType). This property must be set when the [statisticType](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticType) is set to either `percentile-continuous` or `percentile-discrete`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticParameters) + * + * @default null + */ + statisticParameters?: StatisticDefinitionStatisticParameters; + /** + * Defines the type of statistic. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * count | The number of features that match a specified criteria. + * sum | The total sum of values that match a specified criteria. + * min | The minimum value of a given field. + * max | The maximum value of a given field. + * avg | The average of values that match a specified criteria. + * stddev | The standard deviation of values that match a specified criteria. + * var | The statistical variance of values in the specified criteria. + * percentile-continuous | The percentile statistic indicates the value above or below which a given percentage of values in a group of data falls. For example, the 90th percentile (value 0.9) is the value below which 90% of the data values may be found. `percentile-continuous` returns an interpolated value from the dataset. + * percentile-discrete | Similar to `percentile-continuous` except `percentile-discrete` returns a data value from within the dataset. + * + * > **Known Limitations** + * * The [statisticParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticParameters) must be set when calculating `percentile-continuous` or `percentile-discrete` statistics. + * * The `percentile-continuous` and `percentile-discrete` statistic types cannot be used with the [having](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#having) parameter. + * * The `percentile-continuous` and `percentile-discrete` statistic types are only supported with server-side [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * * The `percentile-continuous` and `percentile-discrete` statistic types are supported if [capabilities.query.supportsPercentileStatistics](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-StatisticDefinition.html#statisticType) */ - statisticType?: "count" | "sum" | "min" | "max" | "avg" | "stddev" | "var"; + statisticType?: + | "count" + | "sum" + | "min" + | "max" + | "avg" + | "stddev" + | "var" + | "percentile-continuous" + | "percentile-discrete"; } - interface TrimExtendParameters extends Accessor { + export interface StatisticDefinitionStatisticParameters extends Object { + /** + * Percentile value. This should be a decimal value between 0 and 1. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticParameters) + */ + value: number; + /** + * Specify `ASC` (ascending) or `DESC` (descending) to control the order of the data. For example, in a data set of 10 values from 1 to 10, the percentile value for 0.9 with `orderBy` set to ascending (`ASC`) is 9, but when `ordenBy` is set to descending (`DESC`) the result is 2. The default is `ASC`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-StatisticDefinition.html#statisticParameters) + */ + orderBy?: "ASC" | "DESC"; + } + + interface TrimExtendParameters extends Accessor, JSONSupport { /** * A flag used with the `trimExtend` operation. * @@ -49133,19 +50447,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-TrimExtendParameters.html#trimExtendTo) */ trimExtendTo: Polyline; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/programming-patterns/#using-fromjson) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-TrimExtendParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface TrimExtendParametersConstructor { new (properties?: TrimExtendParametersProperties): TrimExtendParameters; + + fromJSON(json: any): TrimExtendParameters; } export const TrimExtendParameters: TrimExtendParametersConstructor; @@ -49659,6 +50966,14 @@ declare namespace __esri { * */ attach(): void; + /** + * Bind the designated rendering output surface and restore the correct viewport. This method can be used after the WebGL state has been altered by a call to `gl.bindFramebuffer()` to restore the framebuffer that contains the final, composited frame, i.e. the one that is guaranteed to be bound right before control is handed over to [render()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render). Note that this *may or may not be the default framebuffer*; [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) can use various surfaces for frame compositing and there is no guarantee that when [render()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) is called, the bound framebuffer is the default one. Together with the framebuffer, also a matching full-size viewport is restored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#bindRenderTarget) + * + * + */ + bindRenderTarget(): 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. * @@ -49667,6 +50982,14 @@ declare namespace __esri { * */ detach(): void; + /** + * Get the designated rendering output surface and corresponding viewport configuration. The returned object is the same render target that is restored by a call to [bindRenderTarget()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#bindRenderTarget). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#getRenderTarget) + * + * + */ + getRenderTarget(): RenderTarget; /** * 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. * @@ -49893,6 +51216,26 @@ declare namespace __esri { height: number; } + /** + * The destination to which [render()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) should direct its output. Rendering output is saved into a [framebuffer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLFramebuffer), possibly but not necessarily the default one, at a location defined by the [viewport](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/viewport). An instance of this class is mantained internally by `BaseLayerViewGL2D` and can be accessed by a call to [getRenderTarget()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#getRenderTarget). It is the same instance that is restored to the WebGL context by calling [bindRenderTarget()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#bindRenderTarget). When control is handed over to [render()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render), the WebGL context is guaranteed to be in a default state except for the currently bound framebuffer and the configured viewport. Implementations of [render()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) are free to change these parameters using `gl.bindFramebuffer()` and `gl.viewport()`, but they must send the output of the rendering process to the render target. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#RenderTarget) + */ + export interface RenderTarget extends Object { + /** + * The framebuffer where the [render()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) method should direct its output. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#RenderTarget) + */ + framebuffer: any; + /** + * A viewport that fully covers `framebuffer`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#RenderTarget) + */ + viewport: number[]; + } + /** * The triangle mesh resulting from a tessellation operation. An instance of `Mesh` can be obtained by calling one of the [BaseLayerViewGL2D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html) `tessellate*` methods and passing an instance of [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html). * @@ -50391,6 +51734,92 @@ declare namespace __esri { ambient: ColorAndIntensity; } + /** + * This class contains performance information like memory usage and number of features for a specific layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-LayerPerformanceInfo.html) + */ + interface LayerPerformanceInfo { + /** + * The number of features displayed in the SceneView. This property is only available for [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), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) and [point SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-LayerPerformanceInfo.html#displayedNumberOfFeatures) + */ + displayedNumberOfFeatures: number; + /** + * The layer corresponding to the memory usage information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-LayerPerformanceInfo.html#layer) + */ + layer: Layer; + /** + * The maximum number of features that can be displayed in the layer. This number depends on the symbol complexity and [qualityProfile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-LayerPerformanceInfo.html#qualityProfile) of the SceneView. If you want to increase it manually, set the [maximumNumberOfFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#maximumNumberOfFeatures) property. This property is only available for [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), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) and [point SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-LayerPerformanceInfo.html#maximumNumberOfFeatures) + */ + maximumNumberOfFeatures: number; + /** + * An estimate of the memory currently in use by the layer, in bytes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-LayerPerformanceInfo.html#memory) + */ + memory: number; + /** + * The total number of features contained in the layer. This property is only available for [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), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) and [point SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-LayerPerformanceInfo.html#totalNumberOfFeatures) + */ + totalNumberOfFeatures: number; + } + + export const LayerPerformanceInfo: LayerPerformanceInfo; + + /** + * This class contains information about performance in the scene like global memory usage and additional details for layers about memory consumption and number of features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-SceneViewPerformanceInfo.html) + */ + interface SceneViewPerformanceInfo { + /** + * An estimate of the memory used by the [Edges3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html) feature when added to 3D objects in [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or to polygons with [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html) symbols. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-SceneViewPerformanceInfo.html#edgesMemory) + */ + edgesMemory: number; + /** + * An array representing detailed information about memory usage of most layers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-SceneViewPerformanceInfo.html#layerPerformanceInfos) + */ + layerPerformanceInfos: LayerPerformanceInfo[]; + /** + * Quality level as a number between 0 and 1. The quality decreases when layers would need more memory than available, which reduces the level of detail, number of features and tile resolution. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-SceneViewPerformanceInfo.html#quality) + */ + quality: number; + /** + * An estimate of the memory currently in use by [ElevationLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html) and [tiled layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html), in bytes. This property also includes internal memory of the terrain subsystem, e.g., memory used to composite tiles in case multiple [tiled layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html) are added to the scene. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-SceneViewPerformanceInfo.html#terrainMemory) + */ + terrainMemory: number; + /** + * The total memory available to the SceneView, in bytes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-SceneViewPerformanceInfo.html#totalMemory) + */ + totalMemory: number; + /** + * An estimate of the memory that is in use by the SceneView, in bytes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-support-SceneViewPerformanceInfo.html#usedMemory) + */ + usedMemory: number; + } + + export const SceneViewPerformanceInfo: SceneViewPerformanceInfo; + interface BasemapView extends Accessor { /** * A collection containing a hierarchical list of all the created [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of the base layers in the map. @@ -50774,6 +52203,14 @@ declare namespace __esri { } interface DrawAction extends Accessor, Evented { + /** + * Controls whether the created geometry will have z coordinates or not. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#hasZ) + * + * @default true + */ + hasZ: number; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). * @@ -50797,6 +52234,22 @@ declare namespace __esri { * */ canUndo(): boolean; + /** + * Maps the given screen point to a map point. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#getCoordsAndPointFromScreenPoint) + * + * + */ + getCoordsAndPointFromScreenPoint(): any; + /** + * Maps the given screen point to a map point. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#getCoordsFromScreenPoint) + * + * + */ + getCoordsFromScreenPoint(): any; /** * 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. * @@ -50805,6 +52258,14 @@ declare namespace __esri { * */ redo(): void; + /** + * Maps the given screen point to a map point. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#screenToMap) + * + * + */ + screenToMap(): any; /** * 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. * @@ -50828,6 +52289,14 @@ declare namespace __esri { export const DrawAction: DrawActionConstructor; interface DrawActionProperties { + /** + * Controls whether the created geometry will have z coordinates or not. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#hasZ) + * + * @default true + */ + hasZ?: number; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). * @@ -51031,6 +52500,22 @@ declare namespace __esri { * */ complete(): void; + /** + * Returns the actual z value to be used when drawing geometry. NB: this.defaultZ is the value which was passed to the constructor of the DrawAction the actual defaultZ value may differ, depending on derived draw action implementation. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#getGeometryZValue) + * + * + */ + getGeometryZValue(): void; + /** + * Returns if snapToScene is allowed to be used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#isSnapToSceneEnabled) + * + * + */ + isSnapToSceneEnabled(): void; on(name: "cursor-update", eventHandler: PolygonDrawActionCursorUpdateEventHandler): IHandle; @@ -51308,6 +52793,22 @@ declare namespace __esri { * */ complete(): void; + /** + * Returns the actual z value to be used when drawing geometry. NB: this.defaultZ is the value which was passed to the constructor of the DrawAction the actual defaultZ value may differ, depending on derived draw action implementation. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#getGeometryZValue) + * + * + */ + getGeometryZValue(): void; + /** + * Returns if snapToScene is allowed to be used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#isSnapToSceneEnabled) + * + * + */ + isSnapToSceneEnabled(): void; on(name: "cursor-update", eventHandler: SegmentDrawActionCursorUpdateEventHandler): IHandle; @@ -51493,6 +52994,12 @@ declare namespace __esri { interface InputProperties {} interface CSVLayerView 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-CSVLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo), [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo), and additional fields defined on the [CSVLayer.outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#outFields). The `availableFields` property is populated when the layer view has finished [updating](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#updating). `availableFields` is used when [filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#filter) or querying features on the [client-side](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#queryFeatures). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.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. * @@ -51675,7 +53182,7 @@ declare namespace __esri { interface FeatureLayerView extends LayerView { /** - * A list of attribute fields fetched for each feature, including fields required for the 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). + * 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` property is populated when the layer view has finished [updating](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#updating). `availableFields` is used when [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) */ @@ -51888,6 +53395,12 @@ declare namespace __esri { } interface GeoJSONLayerView 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-GeoJSONLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo), [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo), and additional fields defined on the [GeoJSONLayer.outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#outFields). The `availableFields` property is populated when the layer view has finished [updating](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#updating). `availableFields` is used when [filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#filter) or querying features on the [client-side](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryFeatures). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.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. * @@ -52478,11 +53991,18 @@ declare namespace __esri { */ readonly connectionStatus: "connected" | "disconnected"; /** - * The geometry and attribute filter. Only the features that satisfy the filter are displayed. + * 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-StreamLayerView.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-StreamLayerView.html#filter) */ - readonly filter: FeatureFilter; + filter: FeatureFilter; /** * Highlights the given feature(s). @@ -52496,7 +54016,6 @@ 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 [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 features available for drawing are returned. * > **Known Limitations** - * * Queries on StreamLayerView 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 @@ -52506,7 +54025,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryExtent) * - * @param query 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 query Specifies the attributes, spatial, and temporal 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 options An object with the following properties. * @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals. * @@ -52515,7 +54034,6 @@ 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. * > **Known Limitations** - * * Queries on StreamLayerView 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 @@ -52525,7 +54043,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryFeatureCount) * - * @param query 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 query Specifies the attributes, spatial, and temporal 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 options An object with the following properties. * @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals. * @@ -52537,7 +54055,6 @@ 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 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 on StreamLayerView 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 @@ -52547,16 +54064,15 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryFeatures) * - * @param query 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 query Specifies the attributes, spatial, and temporal 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 options An object with the following properties. * @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals. * */ queryFeatures(query?: Query | QueryProperties, options?: StreamLayerViewQueryFeaturesOptions): Promise; /** - * If a [trackIdField](https://enterprise.arcgis.com/en/geoevent/latest/get-started/essential-geoevent-server-vocabulary.htm#ESRI_SECTION1_F45BBCE9ADFA4E57AF38DD225921EFCD) is specified on the Stream Service, this 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) of the latest observations for each [trackID](https://enterprise.arcgis.com/en/geoevent/latest/get-started/essential-geoevent-server-vocabulary.htm#ESRI_SECTION1_F45BBCE9ADFA4E57AF38DD225921EFCD) that satisfy the query. Otherwise, an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) will be thrown when the method is called. + * If a [trackIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#trackIdField) is specified on the stream service, this 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) of the latest observations for each `trackId` that satisfy the query. Otherwise, an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) will be thrown when the method is called. * > **Known Limitations** - * * Queries on StreamLayerView 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 @@ -52566,7 +54082,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryLatestObservations) * - * @param query 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 query Specifies the attributes, spatial, and temporal 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 options An object with the following properties. * @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals. * @@ -52578,7 +54094,6 @@ 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 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 on StreamLayerView 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 @@ -52588,7 +54103,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryObjectIds) * - * @param query 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 query Specifies the attributes, spatial, and temporal 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 options An object with the following properties. * @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals. * @@ -52610,9 +54125,27 @@ declare namespace __esri { export const StreamLayerView: StreamLayerViewConstructor; - interface StreamLayerViewProperties extends LayerViewProperties {} + interface StreamLayerViewProperties 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-StreamLayerView.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-StreamLayerView.html#filter) + */ + filter?: FeatureFilterProperties; + } - export interface StreamLayerViewDataReceivedEvent {} + export interface StreamLayerViewDataReceivedEvent { + attributes: any; + + geometry: any; + } export interface StreamLayerViewQueryExtentOptions extends Object { /** @@ -53050,6 +54583,14 @@ declare namespace __esri { on(name: "double-click", modifiers: string[], eventHandler: MapViewDoubleClickEventHandler): IHandle; + on(name: "immediate-double-click", eventHandler: MapViewImmediateDoubleClickEventHandler): IHandle; + + on( + name: "immediate-double-click", + modifiers: string[], + eventHandler: MapViewImmediateDoubleClickEventHandler + ): IHandle; + on(name: "immediate-click", eventHandler: MapViewImmediateClickEventHandler): IHandle; on(name: "immediate-click", modifiers: string[], eventHandler: MapViewImmediateClickEventHandler): IHandle; @@ -53202,6 +54743,8 @@ declare namespace __esri { native: any; + screenPoint: any; + stopPropagation: Function; timestamp: number; @@ -53367,6 +54910,26 @@ declare namespace __esri { y: number; } + export interface MapViewImmediateDoubleClickEvent { + button: any | any | any; + + buttons: number; + + mapPoint: Point; + + native: any; + + stopPropagation: Function; + + timestamp: number; + + type: "immediate-double-click"; + + x: number; + + y: number; + } + export interface MapViewKeyDownEvent { key: string; @@ -53828,7 +55391,21 @@ declare namespace __esri { * * Object with a combination of `target`, `center`, `scale` and `rotation` 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`. + * 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 setting the view to the new target fails, the promise returned by the goTo() method rejects with an error. Use a catch statement, to handle the error: + * ```js + * view.goTo({ + * center: [-126, 49] + * }) + * .catch(function(error) { + * if (error.name != "AbortError") { + * console.error(error); + * } + * }); + * ``` + * + * 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) * @@ -54105,6 +55682,13 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#highlightOptions) */ highlightOptions: SceneViewHighlightOptions; + /** + * This property contains performance information in a SceneView like global memory usage and additional details for layers about memory consumption and number of features. + * > **This property is experimental** and should be used for debugging purposes only. Its interface will change in future releases. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#performanceInfo) + */ + readonly performanceInfo: SceneViewPerformanceInfo; /** * SceneView can draw scenes in three different quality modes: `high`, `medium` and `low`. The `low` quality profile significantly increases performance on slower browsers and devices by reducing the memory limit and the visual quality in the following aspects: * * Map resolution @@ -54116,9 +55700,6 @@ declare namespace __esri { * * `low` for Internet Explorer 11 and certain mobile devices * * `medium` for any other browser * - * - * Overriding the default value is best done in the constructor (see example below). If the value is modified after construction, only a subset of the quality aspects are affected. - * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#qualityProfile) */ qualityProfile: "low" | "medium" | "high"; @@ -54166,7 +55747,21 @@ declare namespace __esri { * * Object with a combination of `target`, `center`, `scale`, `position`, `heading` and `tilt` properties (with `target` being any of the types listed above). The `center` property is provided as a convenience to animate the [SceneView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#center) and is the equivalent of specifying the `target` with the center [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). The target must be provided in the spatial reference of the view. * * - * 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 [SceneView.animation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#animation). If the given target is far away from the current camera position, then heading and tilt will be automatically set to their neutral values (facing north, looking top down). Tilt and heading can always be explicitly set to override this behavior. + * 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 [SceneView.animation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#animation). If setting the view to the new target fails, the promise returned by the goTo() method rejects with an error. Use a catch statement, to handle the error: + * ``` + * view.goTo({ + * center: [-126, 49] + * }) + * .catch(function(error) { + * if (error.name != "AbortError") { + * console.error(error); + * } + * }); + * ``` + * + * If the given target is far away from the current camera position, then heading and tilt will be automatically set to their + * neutral values (facing north, looking top down). + * Tilt and heading can always be explicitly set to override this behavior. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#goTo) * @@ -54266,6 +55861,14 @@ declare namespace __esri { on(name: "double-click", modifiers: string[], eventHandler: SceneViewDoubleClickEventHandler): IHandle; + on(name: "immediate-double-click", eventHandler: SceneViewImmediateDoubleClickEventHandler): IHandle; + + on( + name: "immediate-double-click", + modifiers: string[], + eventHandler: SceneViewImmediateDoubleClickEventHandler + ): IHandle; + on(name: "immediate-click", eventHandler: SceneViewImmediateClickEventHandler): IHandle; on(name: "immediate-click", modifiers: string[], eventHandler: SceneViewImmediateClickEventHandler): IHandle; @@ -54427,9 +56030,6 @@ declare namespace __esri { * * `low` for Internet Explorer 11 and certain mobile devices * * `medium` for any other browser * - * - * Overriding the default value is best done in the constructor (see example below). If the value is modified after construction, only a subset of the quality aspects are affected. - * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#qualityProfile) */ qualityProfile?: "low" | "medium" | "high"; @@ -54483,6 +56083,8 @@ declare namespace __esri { native: any; + screenPoint: any; + stopPropagation: Function; timestamp: number; @@ -54684,6 +56286,26 @@ declare namespace __esri { y: number; } + export interface SceneViewImmediateDoubleClickEvent { + button: any | any | any; + + buttons: number; + + mapPoint: Point; + + native: any; + + stopPropagation: Function; + + timestamp: number; + + type: "immediate-double-click"; + + x: number; + + 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. * @@ -54874,7 +56496,7 @@ declare namespace __esri { export interface SceneViewConstraintsProperties extends Object { /** * Specifies a constraint on the minimum and maximum allowed camera altitude. - * > **Known Limitations** The `altitude` constraints works just in global WebScene. (Not in local WebScene) + * > **Known Limitations** The `altitude` constraint is only supported in scenes with `global` [viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#constraints) */ @@ -54902,7 +56524,7 @@ declare namespace __esri { export interface SceneViewConstraints extends AnonymousAccessor { /** * Specifies a constraint on the minimum and maximum allowed camera altitude. - * > **Known Limitations** The `altitude` constraints works just in global WebScene. (Not in local WebScene) + * > **Known Limitations** The `altitude` constraint is only supported in scenes with `global` [viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#constraints) */ @@ -55586,10 +57208,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. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual + * @param component.position The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. * @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. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. **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. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual + * @param position The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. + * @param position.position The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. * @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. * */ @@ -55599,19 +57221,30 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#empty) * - * @param position The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual + * @param position The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. * */ - empty(position?: string): void; + empty( + position?: + | "bottom-leading" + | "bottom-left" + | "bottom-right" + | "bottom-trailing" + | "top-leading" + | "top-left" + | "top-right" + | "top-trailing" + | "manual" + ): void; /** * Find a component by widget or DOM ID. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#find) * - * @param the component's ID + * @param id The component's ID. * */ - find(the: string): HTMLElement | Widget; + find(id: string): HTMLElement | Widget; /** * Moves one or more UI component(s) to the specified position. * @@ -55619,11 +57252,14 @@ 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. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. **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 + * @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. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. + * @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 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. + * @param position.position The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. + * @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. * */ - move(component: Widget | HTMLElement | string | any[] | UIMoveComponent, position?: string): void; + move(component: Widget | HTMLElement | string | any[] | UIMoveComponent, position?: string | UIMovePosition): void; /** * Removes one or more HTML component(s) or [widgets](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html) from the UI. * @@ -55678,11 +57314,20 @@ 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. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual + * The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#add) */ - position?: string; + position?: + | "bottom-leading" + | "bottom-left" + | "bottom-right" + | "bottom-trailing" + | "top-leading" + | "top-left" + | "top-right" + | "top-trailing" + | "manual"; /** * 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. * @@ -55693,17 +57338,26 @@ declare namespace __esri { export interface UIAddPosition extends Object { /** - * The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual + * The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. For the other possible values, "top", "bottom", "left", and "right" are consistent placements. The "leading" and "trailing" values depend on whether the browser is using right-to-left (RTL) or left-to-right (LTR). For LTR, "leading" is left and "trailing" is right. For RTL, "leading" is right and "trailing" is left. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#add) */ - position?: string; + position?: + | "bottom-leading" + | "bottom-left" + | "bottom-right" + | "bottom-trailing" + | "top-leading" + | "top-left" + | "top-right" + | "top-trailing" + | "manual"; /** * 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. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#add) */ - index: number; + index?: number; } export interface UIMoveComponent extends Object { @@ -55714,11 +57368,50 @@ 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. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | 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. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#move) */ - position?: string; + position?: + | "bottom-leading" + | "bottom-left" + | "bottom-right" + | "bottom-trailing" + | "top-leading" + | "top-left" + | "top-right" + | "top-trailing" + | "manual"; + /** + * 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. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#move) + */ + index?: number; + } + + export interface UIMovePosition extends Object { + /** + * The position in the view at which to add the component. If not specified, `manual` is used by default. Using `manual` allows you to place the component in a container where you can position it anywhere using CSS. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#move) + */ + position?: + | "bottom-leading" + | "bottom-left" + | "bottom-right" + | "bottom-trailing" + | "top-leading" + | "top-left" + | "top-right" + | "top-trailing" + | "manual"; + /** + * 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. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#move) + */ + index?: number; } interface View extends Accessor, corePromise, Evented, DOMContainer { @@ -55759,7 +57452,7 @@ declare namespace __esri { */ readonly input: Input; /** - * Indication whether the view is being interacted with (for example when panning). + * Indication whether the view is being interacted with (for example when panning or by an interactive tool). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#interacting) * @@ -55778,6 +57471,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#map) */ map: Map; + /** + * Indication whether the view is being navigated (for example when panning). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#navigating) + * + * @default false + */ + readonly navigating: boolean; /** * Options to configure the navigation behavior of the View. * @@ -55829,7 +57530,7 @@ declare namespace __esri { */ spatialReference: SpatialReference; /** - * Indication whether the view is animating, being interacted with or resizing. + * Indication whether the view is animating, being navigated with or resizing. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#stationary) */ @@ -55857,6 +57558,14 @@ declare namespace __esri { */ readonly updating: boolean; + /** + * Destroys the view and any associated resources. The view can no longer be used once it has been destroyed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#destroy) + * + * + */ + destroy(): void; /** * Sets the focus on the view. * @@ -56012,6 +57721,14 @@ declare namespace __esri { on(name: "double-click", modifiers: string[], eventHandler: ViewDoubleClickEventHandler): IHandle; + on(name: "immediate-double-click", eventHandler: ViewImmediateDoubleClickEventHandler): IHandle; + + on( + name: "immediate-double-click", + modifiers: string[], + eventHandler: ViewImmediateDoubleClickEventHandler + ): IHandle; + on(name: "immediate-click", eventHandler: ViewImmediateClickEventHandler): IHandle; on(name: "immediate-click", modifiers: string[], eventHandler: ViewImmediateClickEventHandler): IHandle; @@ -56182,6 +57899,8 @@ declare namespace __esri { native: any; + screenPoint: any; + stopPropagation: Function; timestamp: number; @@ -56285,6 +58004,26 @@ declare namespace __esri { y: number; } + export interface ViewImmediateDoubleClickEvent { + button: any | any | any; + + buttons: number; + + mapPoint: Point; + + native: any; + + stopPropagation: Function; + + timestamp: number; + + type: "immediate-double-click"; + + x: number; + + y: number; + } + export interface ViewKeyDownEvent { key: string; @@ -56916,10 +58655,11 @@ declare namespace __esri { /** * Saves the webmap to its associated portal item. The portal item must already exist and be valid. This is a convenience method that will use [update](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#update) to store the webmap in the item. The webmap is saved according to [web map specification](https://developers.arcgis.com/web-map-specification/) standards. Use [updateFrom](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#updateFrom) to store the current view properties in the webmap before saving it. Note that this saves the webmap to its existing item. Depending on how the webmap is shared, users that do not own the webmap may be able to modify it. To save an existing webmap as a new item owned by the user signed into the portal instance, use [saveAs()](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#saveAs). The webmap will be automatically loaded if it is not already before saving. * > **Known Limitations** - * * [FeatureLayers](esri-layers-FeatureLayer.html#creating-a-featurelayer) created from non-spatial tables will not be saved. - * * For [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.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), and [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html) the following rules will apply: + * * [FeaturesLayers](esri-layers-FeatureLayer.html) 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) will be saved. + * * For [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html) and [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html) the following rules will apply: * * Any new layers of these types added to the webmap will not be saved. * * For existing layers only modifications to the following properties will saved: maxScale, minScale, opacity, title, visibility. + * * Save support is coming for multi-layer feature collection, [MapNotesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapNotesLayer.html), and [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#save) * @@ -56931,10 +58671,11 @@ declare namespace __esri { /** * Saves the webmap to a new [portal item](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html). If saving has completed successfully, then the saved portal item will be set in the [portalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#portalItem) property of the WebMap. This is a convenience method that will create a new [PortalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html) and use [PortalUser.addItem()](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalUser.html#addItem) to store the webmap in a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html). Use [updateFrom](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#updateFrom) to store the current view properties in the webmap before saving it. Note that this always saves the webmap as a new portal item owned by the user signed into the portal instance that executes the `saveAs()` method. If you want to modify an existing item without changing its ownership, use [save()](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#save). The webmap will be automatically loaded if it is not already before saving. * > **Known Limitations** - * * [FeatureLayers](esri-layers-FeatureLayer.html#creating-a-featurelayer) created from non-spatial tables will not be saved. - * * For [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.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), and [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html) the following rules will apply: + * * [FeaturesLayers](esri-layers-FeatureLayer.html) 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) will be saved. + * * For [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html) and [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html) the following rules will apply: * * Any new layers of these types added to the webmap will not be saved. * * For existing layers only modifications to the following properties will saved: maxScale, minScale, opacity, title, visibility. + * * Save support is coming for multi-layer feature collection, [MapNotesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapNotesLayer.html), and [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#saveAs) * @@ -59023,6 +60764,151 @@ declare namespace __esri { state: string; } + interface Attachments extends Widget { + /** + * A string value indicating how to display the attachment. If `list` is specified, attachments show as links. If `preview` is specified, a thumbnail of each attachment will be shown. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments.html#displayType) + * + * @default "list" + */ + displayType: "preview" | "list"; + /** + * The graphic for the attachments. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments.html#graphic) + */ + graphic: Graphic; + /** + * 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 [AttachmentsViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments.html#viewModel) + */ + viewModel: AttachmentsViewModel; + } + + interface AttachmentsConstructor { + /** + * This widget allows users to view and edit attachments associated with a feature and is considered a standalone experience that can be utilized in widgets such [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) and [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html). When viewing attachments, the attachment's thumbnail, file format, and size are displayed. The [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) widget uses this widget's functionality to display attachments. Whereas the [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) widget has the functionality to edit attachments automatically configured within it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments.html) + */ + + new (properties?: AttachmentsProperties): Attachments; + } + + export const Attachments: AttachmentsConstructor; + + interface AttachmentsProperties extends WidgetProperties { + /** + * A string value indicating how to display the attachment. If `list` is specified, attachments show as links. If `preview` is specified, a thumbnail of each attachment will be shown. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments.html#displayType) + * + * @default "list" + */ + displayType?: "preview" | "list"; + /** + * The graphic for the attachments. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments.html#graphic) + */ + graphic?: GraphicProperties; + /** + * 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 [AttachmentsViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments.html#viewModel) + */ + viewModel?: AttachmentsViewModelProperties; + } + + interface AttachmentsViewModel extends Accessor { + /** + * The current [AttachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) being edited. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#activeAttachmentInfo) + */ + activeAttachmentInfo: AttachmentInfo; + /** + * A collection of [AttachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) defined on a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#attachmentInfos) + */ + readonly attachmentInfos: AttachmentInfo[]; + /** + * The graphic for the attachments. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#graphic) + */ + graphic: Graphic; + /** + * The current mode performed by the user. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#mode) + * + * @default "view" + */ + mode: "view" | "add" | "edit"; + /** + * The current state of the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#state) + * + * @default "ready" + */ + readonly state: "ready" | "disabled" | "loading"; + /** + * Defines whether or not the feature supports resizing attachments. This depends on whether the feature layer's [capabilities.operations.supportsResizeAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#supportsResizeAttachments) + */ + supportsResizeAttachments: boolean; + + /** + * Queries for the attachments on a feature. Attachments for multiple features can be queried if the layer's [capabilities.operations.supportsQueryAttachments](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-widgets-Attachments-AttachmentsViewModel.html#getAttachments) + * + * + */ + getAttachments(): Promise; + } + + interface AttachmentsViewModelConstructor { + new (properties?: AttachmentsViewModelProperties): AttachmentsViewModel; + } + + export const AttachmentsViewModel: AttachmentsViewModelConstructor; + + interface AttachmentsViewModelProperties { + /** + * The current [AttachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) being edited. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#activeAttachmentInfo) + */ + activeAttachmentInfo?: AttachmentInfoProperties; + /** + * The graphic for the attachments. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#graphic) + */ + graphic?: GraphicProperties; + /** + * The current mode performed by the user. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#mode) + * + * @default "view" + */ + mode?: "view" | "add" | "edit"; + /** + * Defines whether or not the feature supports resizing attachments. This depends on whether the feature layer's [capabilities.operations.supportsResizeAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attachments-AttachmentsViewModel.html#supportsResizeAttachments) + */ + supportsResizeAttachments?: boolean; + } + interface Attribution extends Widget { /** * Full attribution text. @@ -59170,6 +61056,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#activeBasemap) */ activeBasemap: Basemap; + /** + * When `true`, sets the widget to a disabled state so the user cannot interact with it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#disabled) + * + * @default false + */ + disabled: boolean; /** * The widget's default CSS icon class. * @@ -59215,6 +61109,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#activeBasemap) */ activeBasemap?: BasemapProperties; + /** + * When `true`, sets the widget to a disabled state so the user cannot interact with it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#disabled) + * + * @default false + */ + disabled?: boolean; /** * The widget's default CSS icon class. * @@ -59548,6 +61450,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#viewModel) */ viewModel: BasemapLayerListViewModel; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#visibleElements) + */ + visibleElements: VisibleElements; /** * Triggers the [trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#event-trigger-action) event and executes the given [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). @@ -59648,6 +61556,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#viewModel) */ viewModel?: BasemapLayerListViewModelProperties; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#visibleElements) + */ + visibleElements?: VisibleElements; } interface BasemapLayerListViewModel extends Accessor { @@ -59759,6 +61673,20 @@ declare namespace __esri { item: ListItem; } + /** + * The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#VisibleElements) + */ + export interface VisibleElements extends Object { + /** + * Indicates whether to the status indicators will be displayed. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#VisibleElements) + */ + statusIndicators?: boolean; + } + interface BasemapToggle extends Widget { /** * The map's [basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap). @@ -59794,6 +61722,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html#viewModel) */ viewModel: BasemapToggleViewModel; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html#visibleElements) + */ + visibleElements: BasemapToggleVisibleElements; /** * Toggles to the [next basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html#nextBasemap). @@ -59848,6 +61782,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html#viewModel) */ viewModel?: BasemapToggleViewModelProperties; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html#visibleElements) + */ + visibleElements?: BasemapToggleVisibleElements; } interface BasemapToggleViewModel extends Accessor, Evented { @@ -59929,6 +61869,20 @@ declare namespace __esri { previous: Basemap; } + /** + * The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html#VisibleElements) + */ + export interface BasemapToggleVisibleElements extends Object { + /** + * Indicates whether to the title will be displayed. Default is `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html#VisibleElements) + */ + title?: boolean; + } + interface Bookmarks extends Widget, GoTo { /** * Specifies how new bookmarks will be created if [editingEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#editingEnabled) is set to `true`. Can be used to enable or disable taking screenshots or creating an extent based on the current view when a bookmark is created. See [BookmarkCreationOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html#BookmarkCreationOptions) for more information. @@ -59942,6 +61896,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#bookmarks) */ bookmarks: Collection; + /** + * When true, the widget is visually withdrawn and cannot be interacted with. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#disabled) + * + * @default false + */ + disabled: boolean; /** * Indicates whether the widget is able to be edited. When `true`, allows bookmarks to be added, edited, reordered, or deleted from within the widget. Any edits made will only be shown locally and will not be saved. * @@ -59973,7 +61935,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#visibleElements) */ - visibleElements: VisibleElements; + visibleElements: BookmarksVisibleElements; /** * Zoom to a specific bookmark. @@ -60013,6 +61975,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#bookmarks) */ bookmarks?: CollectionProperties; + /** + * When true, the widget is visually withdrawn and cannot be interacted with. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#disabled) + * + * @default false + */ + disabled?: boolean; /** * Indicates whether the widget is able to be edited. When `true`, allows bookmarks to be added, edited, reordered, or deleted from within the widget. Any edits made will only be shown locally and will not be saved. * @@ -60044,7 +62014,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#visibleElements) */ - visibleElements?: VisibleElements; + visibleElements?: BookmarksVisibleElements; } interface BookmarksViewModel extends Accessor, GoTo { @@ -60205,7 +62175,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#VisibleElements) */ - export interface VisibleElements extends Object { + export interface BookmarksVisibleElements extends Object { /** * Indicates whether to button to add a new bookmark displays. Default is `true`. * @@ -61051,37 +63021,34 @@ declare namespace __esri { yearPlaying?: boolean; } + /** + * The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#VisibleElements) + */ export interface DaylightVisibleElements extends Object { /** * When set to `false`, neither of the play buttons are displayed. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#visibleElements) - * - * @default true + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#VisibleElements) */ playButtons?: boolean; /** * When set to `false`, the shadow toggle button is not displayed. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#visibleElements) - * - * @default true + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#VisibleElements) */ shadowsToggle?: boolean; /** * When set to `false`, neither the date nor the season picker are displayed. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#visibleElements) - * - * @default true + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#VisibleElements) */ datePicker?: boolean; /** * When set to `false`, the timezone selector is not displayed. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#visibleElements) - * - * @default true + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html#VisibleElements) */ timezone?: boolean; } @@ -62410,11 +64377,11 @@ declare namespace __esri { interface Editor extends Widget { /** - * A property indicating the current active workflow. + * A property indicating the current active workflow. This is either [CreateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html) or [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#activeWorkflow) */ - readonly activeWorkflow: Workflow; + readonly activeWorkflow: CreateWorkflow | UpdateWorkflow; /** * 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`. * @@ -62467,72 +64434,72 @@ declare namespace __esri { * * */ - cancelWorkflow(): void; + cancelWorkflow(): Promise; /** - * This is applicable if there is an active update workflow. If so, this method deletes the workflow feature. + * This is applicable if there is an active [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html). 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; + deleteFeatureFromWorkflow(): Promise; /** - * 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. + * Initiates the [CreateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html) 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. This object provides the feature template and layer for creating a new feature. * */ - startCreateWorkflowAtFeatureCreation(creationInfo: CreationInfo): void; + startCreateWorkflowAtFeatureCreation(creationInfo: CreationInfo): Promise; /** - * This method starts the Editor workflow where it waits for the feature to be selected. + * This method starts the [CreateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html) 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; + startCreateWorkflowAtFeatureEdit(feature: Graphic): Promise; /** - * Initiates the `create` workflow by displaying the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) panel. + * Initiates the [CreateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html) 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; + startCreateWorkflowAtFeatureTypeSelection(): Promise; /** - * Starts the `update` workflow at the feature geometry and attribute editing panel. + * Starts the [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html) 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; + startUpdateWorkflowAtFeatureEdit(feature: Graphic): Promise; /** - * Starts the `update` workflow using the current selected feature. + * Starts the [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html) using the current selected feature. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startUpdateWorkflowAtFeatureSelection) * * */ - startUpdateWorkflowAtFeatureSelection(): void; + startUpdateWorkflowAtFeatureSelection(): Promise; /** - * This method starts the Editor workflow where it waits for multiple features to be selected. + * This method starts the [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html) 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. This is only relevant when there are multiple candidates to update. + * @param candidates An array of features to be updated. This is only relevant when there are multiple candidates to update. * */ - startUpdateWorkflowAtMultipleFeatureSelection(_candidates: Graphic[]): void; + startUpdateWorkflowAtMultipleFeatureSelection(candidates: Graphic[]): Promise; } 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. + * 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): [CreateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html) and [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html). 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) */ @@ -62583,15 +64550,61 @@ declare namespace __esri { viewModel?: EditorViewModelProperties; } + interface CreateWorkflow extends Workflow { + /** + * The type of workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html#type) + */ + readonly type: "create"; + } + + interface CreateWorkflowConstructor { + /** + * A read-only class containing the logic used when creating features using the [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) widget. This is indicated via the widget's `Add feature` option. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html) + */ + + new (properties?: CreateWorkflowProperties): CreateWorkflow; + } + + export const CreateWorkflow: CreateWorkflowConstructor; + + interface CreateWorkflowProperties extends WorkflowProperties {} + + interface CreateWorkflowData { + /** + * This provides the feature template and layer when creating a new feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflowData.html#creationInfo) + */ + creationInfo: CreationInfo; + /** + * The [edits](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Edits.html) used to keep track of a feature being modified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflowData.html#edits) + */ + 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-CreateWorkflowData.html#viewModel) + */ + viewModel: EditorViewModel; + } + + export const CreateWorkflowData: CreateWorkflowData; + interface EditorViewModel extends Accessor { /** - * A property indicating the current active workflow. + * A property indicating the current active workflow. This is either [CreateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html) or [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#activeWorkflow) */ - readonly activeWorkflow: Workflow; + readonly activeWorkflow: CreateWorkflow | UpdateWorkflow; /** - * 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`. + * 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 * ---------------|------------ @@ -62691,7 +64704,7 @@ declare namespace __esri { * * */ - cancelWorkflow(): void; + cancelWorkflow(): Promise; /** * This is applicable if there is an active update workflow. If so, this method deletes the workflow feature. * @@ -62699,7 +64712,7 @@ declare namespace __esri { * * */ - deleteFeatureFromWorkflow(): void; + deleteFeatureFromWorkflow(): Promise; /** * 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. * @@ -62708,7 +64721,7 @@ declare namespace __esri { * @param creationInfo An object containing information needed to create a new feature using the Editor widget. * */ - startCreateWorkflowAtFeatureCreation(creationInfo: CreationInfo): void; + startCreateWorkflowAtFeatureCreation(creationInfo: CreationInfo): Promise; /** * This method starts the Editor workflow where it waits for the feature to be selected. * @@ -62717,7 +64730,7 @@ declare namespace __esri { * @param feature The feature to be updated. * */ - startCreateWorkflowAtFeatureEdit(feature: Graphic): void; + startCreateWorkflowAtFeatureEdit(feature: Graphic): Promise; /** * Initiates the `create` workflow by displaying the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) panel. * @@ -62725,7 +64738,7 @@ declare namespace __esri { * * */ - startCreateWorkflowAtFeatureTypeSelection(): void; + startCreateWorkflowAtFeatureTypeSelection(): Promise; /** * Starts the update workflow at the feature geometry and attribute editing panel. * @@ -62734,7 +64747,7 @@ declare namespace __esri { * @param feature The feature to be updated. * */ - startUpdateWorkflowAtFeatureEdit(feature: Graphic): void; + startUpdateWorkflowAtFeatureEdit(feature: Graphic): Promise; /** * Starts the `update` workflow using the current selected feature. * @@ -62742,7 +64755,7 @@ declare namespace __esri { * * */ - startUpdateWorkflowAtFeatureSelection(): void; + startUpdateWorkflowAtFeatureSelection(): Promise; /** * Starts the Editor workflow where it waits for multiple features to be selected. * @@ -62750,7 +64763,7 @@ declare namespace __esri { * * */ - startUpdateWorkflowAtMultipleFeatureSelection(): void; + startUpdateWorkflowAtMultipleFeatureSelection(): Promise; } interface EditorViewModelConstructor { @@ -62761,7 +64774,7 @@ declare namespace __esri { 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`. + * 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 * ---------------|------------ @@ -62834,9 +64847,84 @@ declare namespace __esri { error: Error; } + interface Edits extends Accessor { + /** + * The feature to be edited. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Edits.html#feature) + */ + readonly feature: Graphic; + /** + * 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-Edits.html#modified) + */ + readonly modified: boolean; + } + + interface EditsConstructor { + new (properties?: EditsProperties): Edits; + } + + export const Edits: EditsConstructor; + + interface EditsProperties {} + + interface UpdateWorkflow extends Workflow { + /** + * The type of workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html#type) + */ + readonly type: "update"; + } + + interface UpdateWorkflowConstructor { + /** + * A read-only class containing the logic used when updating and/or deleting features using the [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) widget's. This is indicated via the widget's `Edit feature` option. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html) + */ + + new (properties?: UpdateWorkflowProperties): UpdateWorkflow; + } + + export const UpdateWorkflow: UpdateWorkflowConstructor; + + interface UpdateWorkflowProperties extends WorkflowProperties {} + + interface UpdateWorkflowData { + /** + * An array of features to be updated. This is only relevant when there are multiple candidates to update. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflowData.html#candidates) + */ + candidates: Graphic[]; + /** + * The object that matches the feature being updated. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflowData.html#editableItem) + */ + editableItem: EditableItem; + /** + * The [edits](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Edits.html) used to keep track of a feature being modified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflowData.html#edits) + */ + 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-UpdateWorkflowData.html#viewModel) + */ + viewModel: EditorViewModel; + } + + export const UpdateWorkflowData: UpdateWorkflowData; + 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). + * Shared workflow data. Can be either [CreateWorkflowData](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflowData.html) or [UpdateWorkflowData](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflowData.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#data) */ @@ -62933,7 +65021,7 @@ declare namespace __esri { interface WorkflowConstructor { /** - * A Workflow helps manage different stages of an [editing](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) 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. + * A Workflow helps manage different stages of an [editing](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) workflow. A workflow can be thought of as one of two types: [CreateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html) and [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html). If adding a new feature, the [CreateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateWorkflow.html) is used. Whereas if editing an existing feature, the [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html) 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) */ @@ -62945,84 +65033,6 @@ declare namespace __esri { interface WorkflowProperties {} - /** - * 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) provides the feature template and layer when creating a new feature. - * - * [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. This is only relevant when there are multiple candidates to update. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) - */ - candidates: Graphic[]; - /** - * The object that matches the feature being updated. - * - * [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; - } - /** * This object provides the feature template and layer for creating a new feature. * @@ -63062,6 +65072,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) */ fieldConfig?: FieldConfig[]; + /** + * Indicates whether to display the attachments widget in the Editor's UI. By default, this is `true`, if the service [supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + allowAttachments?: boolean; /** * Indicates whether to enable editing on the layer. Defaults to `true` if service supports it. * @@ -64522,6 +66538,269 @@ declare namespace __esri { value: number | string | any; } + interface FeatureTable extends Widget { + /** + * Indicates whether to display the `Attachments` field in the table. This is only applicable if the feature layer supports attachments. Currently, this field only displays the count of attachments per feature. ![featuretable attachmentenabled](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featuretable/attachments-enabled.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#attachmentsEnabled) + * + * @default false + */ + attachmentsEnabled: boolean; + /** + * An array of individual configuration objects. This is where you can specify what fields to display and how you wish to display them. When not set, all fields except for `CreationDate`, `Creator`, `EditDate`, `Editor`, and `GlobalID` 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-FeatureTable.html#fieldConfigs) + * + * @default null + */ + fieldConfigs: FieldColumnConfig[]; + /** + * The associated [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) containing the fields and attributes to display within the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#layer) + */ + layer: FeatureLayer; + /** + * 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 [FeatureTableViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#viewModel) + */ + viewModel: FeatureTableViewModel; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#visibleElements) + */ + visibleElements: FeatureTableVisibleElements; + + on(name: "selection-change", eventHandler: FeatureTableSelectionChangeEventHandler): IHandle; + } + + interface FeatureTableConstructor { + /** + * This widget provides an interactive tabular view of each feature's attributes in a feature layer. When working with a large dataset, the table loads additional features as the user scrolls. Users can select rows (features) within the table. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html) + */ + + new (properties?: FeatureTableProperties): FeatureTable; + } + + export const FeatureTable: FeatureTableConstructor; + + interface FeatureTableProperties extends WidgetProperties { + /** + * Indicates whether to display the `Attachments` field in the table. This is only applicable if the feature layer supports attachments. Currently, this field only displays the count of attachments per feature. ![featuretable attachmentenabled](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featuretable/attachments-enabled.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#attachmentsEnabled) + * + * @default false + */ + attachmentsEnabled?: boolean; + /** + * An array of individual configuration objects. This is where you can specify what fields to display and how you wish to display them. When not set, all fields except for `CreationDate`, `Creator`, `EditDate`, `Editor`, and `GlobalID` 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-FeatureTable.html#fieldConfigs) + * + * @default null + */ + fieldConfigs?: FieldColumnConfigProperties[]; + /** + * The associated [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) containing the fields and attributes to display within the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#layer) + */ + layer?: FeatureLayerProperties; + /** + * 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 [FeatureTableViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#viewModel) + */ + viewModel?: FeatureTableViewModel; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#visibleElements) + */ + visibleElements?: FeatureTableVisibleElements; + } + + interface FeatureTableViewModel { + /** + * Indicates whether to display the `Attachments` field in the table. This is only applicable if the feature layer supports attachments. Currently, this field only displays the count of attachments per feature. ![featuretable attachmentenabled](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featuretable/attachments-enabled.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#attachmentsEnabled) + * + * @default false + */ + attachmentsEnabled: boolean; + /** + * An array of individual configuration objects. This is where you can specify what fields to display and how you wish to display them. When not set, all fields except for `CreationDate`, `Creator`, `EditDate`, `Editor`, and `GlobalID` 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-FeatureTable-FeatureTableViewModel.html#fieldConfigs) + * + * @default null + */ + fieldConfigs: FieldColumnConfig[]; + /** + * A collection of fields to remain hidden within the table. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#hiddenFields) + */ + hiddenFields: Collection; + /** + * The associated [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) containing the fields and attributes to display within the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#layer) + */ + layer: FeatureLayer; + } + + interface FeatureTableViewModelConstructor { + new (properties?: any): FeatureTableViewModel; + + /** + * Returns a field value given the specified row (feature) `ObjectId` and an associated `fieldName`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#getValue) + * + * @param objectId The `ObjectId` of the specified row (feature). + * @param fieldName The name of the field in which to get the associated `ObjectId`'s row (feature) value. + * + */ + getValue(objectId: number, fieldName: string): Graphic; + } + + export const FeatureTableViewModel: FeatureTableViewModelConstructor; + + interface FieldColumnConfig extends FieldConfig { + /** + * Controls the sort order of the column. This property will only be honored on one fieldColumn in the FeatureTable widget. If direction is specified on more than one FieldColumn in the same FeatureTable, it will only be honored on the column with the highest index. + * + * Possible Value | Description + * ---------------|------------ + * asc | Sorts the column in ascending order. + * desc | Sorts the column in descending order. + * null | No sort is applied to the column. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FieldColumnConfig.html#direction) + * + * @default null + */ + direction: "asc" | "desc" | any; + /** + * Indicates whether the field column is visible. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FieldColumnConfig.html#visible) + * + * @default true + */ + visible: boolean; + } + + interface FieldColumnConfigConstructor { + new (properties?: FieldColumnConfigProperties): FieldColumnConfig; + } + + export const FieldColumnConfig: FieldColumnConfigConstructor; + + interface FieldColumnConfigProperties extends FieldConfigProperties { + /** + * Controls the sort order of the column. This property will only be honored on one fieldColumn in the FeatureTable widget. If direction is specified on more than one FieldColumn in the same FeatureTable, it will only be honored on the column with the highest index. + * + * Possible Value | Description + * ---------------|------------ + * asc | Sorts the column in ascending order. + * desc | Sorts the column in descending order. + * null | No sort is applied to the column. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FieldColumnConfig.html#direction) + * + * @default null + */ + direction?: "asc" | "desc" | any; + /** + * Indicates whether the field column is visible. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FieldColumnConfig.html#visible) + * + * @default true + */ + visible?: boolean; + } + + export interface FeatureTableSelectionChangeEvent { + added: FeatureTableSelectionChangeEventAdded[]; + + removed: FeatureTableSelectionChangeEventRemoved[]; + } + + /** + * The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#VisibleElements) + */ + export interface FeatureTableVisibleElements extends Object { + /** + * Indicates whether to display the feature table's header information. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#VisibleElements) + */ + header?: boolean; + /** + * Indicates whether to display the feature table's menu.Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#VisibleElements) + */ + menu?: boolean; + /** + * The menu items within the feature table menu. This image shows the individual items within the widget's menu. ![featuretable widget menu items](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featuretable/menuitems.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#VisibleElements) + */ + menuItems?: VisibleElementsMenuItems; + } + + export interface FeatureTableSelectionChangeEventAdded extends Object { + feature: Graphic; + + attachments: AttachmentInfo[]; + + relatedRecords: Graphic[]; + } + + export interface FeatureTableSelectionChangeEventRemoved extends Object { + feature: Graphic; + + attachments: AttachmentInfo[]; + + relatedRecords: Graphic[]; + } + + export interface VisibleElementsMenuItems extends Object { + /** + * Indicates whether to display the `Clear selection` menu item. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#VisibleElements) + */ + clearSelection?: boolean; + /** + * Indicates whether to display the `Refresh data` menu item. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#VisibleElements) + */ + refreshData?: boolean; + /** + * Indicates whether to enable toggling column visibility within the menu. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#VisibleElements) + */ + toggleColumns?: any; + } + interface FeatureTemplates extends Widget { /** * When `true`, displays the template [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterFunction). ![featureTemplatesFilter](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featureTemplatesFilter.png) @@ -64572,6 +66851,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#viewModel) */ viewModel: FeatureTemplatesViewModel; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#visibleElements) + */ + visibleElements: FeatureTemplatesVisibleElements; on(name: "select", eventHandler: FeatureTemplatesSelectEventHandler): IHandle; } @@ -64638,6 +66923,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#viewModel) */ viewModel?: FeatureTemplatesViewModelProperties; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#visibleElements) + */ + visibleElements?: FeatureTemplatesVisibleElements; } interface FeatureTemplatesViewModel extends Accessor, Evented { @@ -64873,6 +67164,20 @@ declare namespace __esri { template: FeatureTemplate; } + /** + * The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#VisibleElements) + */ + export interface FeatureTemplatesVisibleElements extends Object { + /** + * Indicates whether to the filter will be displayed. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#VisibleElements) + */ + filter?: boolean; + } + interface Fullscreen extends Widget { /** * The [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) to present in fullscreen mode. @@ -66047,6 +68352,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#viewModel) */ viewModel: LayerListViewModel; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#visibleElements) + */ + visibleElements: LayerListVisibleElements; /** * Triggers the [trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#event-trigger-action) event and executes the given [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). @@ -66123,6 +68434,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#viewModel) */ viewModel?: LayerListViewModelProperties; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#visibleElements) + */ + visibleElements?: LayerListVisibleElements; } interface LayerListViewModel extends Accessor { @@ -66393,6 +68710,20 @@ declare namespace __esri { item: ListItem; } + /** + * The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#VisibleElements) + */ + export interface LayerListVisibleElements extends Object { + /** + * Indicates whether to the status indicators will be displayed. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#VisibleElements) + */ + statusIndicators?: boolean; + } + 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. @@ -67291,6 +69622,20 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#layerInfos) */ layer: Layer; + /** + * When `false`, the default symbol for the renderer will not display in the legend. Only applicable to [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#layerInfos) + * + * @default true + */ + defaultSymbol?: boolean; + /** + * List of sublayer ids that will not be displayed in the legend even if they are visible in the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#layerInfos) + */ + hideLayers: number[]; } export interface LegendStyle extends Object { @@ -68251,7 +70596,7 @@ declare namespace __esri { | "bottom-center" | "bottom-right"; /** - * 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), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.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), [PointCloudLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.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)). + * 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), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.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), [PointCloudLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.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)). * > Starting with version 4.12, [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content can no longer be set using a wildcard, e.g. `*`. Instead, set the `defaultPopupTemplateEnabled` property to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) @@ -68307,6 +70652,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#location) */ location: Point; + /** + * Defines the maximum icons displayed at one time in the action area. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#maxInlineActions) + * + * @default 3 + */ + maxInlineActions: number | any; /** * An array of pending Promises that have not yet been fulfilled. If there are no pending promises, the value is `null`. When the pending promises are resolved they are removed from this array and the features they return are pushed into the [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) array. * @@ -68325,6 +70678,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeatureIndex) */ selectedFeatureIndex: number; + /** + * Returns a reference to the current [Feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html) that the Popup is using. This is useful if needing to get a reference to the widget in order to make any changes to it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeatureWidget) + */ + readonly selectedFeatureWidget: Feature; /** * Indicates whether to display a spinner at the popup location prior to its display when it has pending promises. * @@ -68355,6 +70714,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#visible) */ visible: boolean; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#visibleElements) + */ + visibleElements: PopupVisibleElements; /** * Use this method to remove focus from the Widget. @@ -68380,6 +70745,21 @@ declare namespace __esri { * */ close(): void; + /** + * Use this method to return feature(s) at a given screen location. These features are fetched from all of the [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) in the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). In order to use this, a layer must already have an associated [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) and have its [popupEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupEnabled). These features can then be used within a custom [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) or [Feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html) widget experience. One example could be a custom side panel that displays feature-specific information based on an end user's click location. This method allows a developer the ability to control how the input location is handled, and then subsequently, what to do with the results. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#fetchFeatures) + * + * @param screenPoint An object representing a point on the screen. This point can be in either the MapView or SceneView. + * @param screenPoint.x The x coordinate. + * @param screenPoint.y The y coordinate. + * @param options The [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchFeaturesOptions) to pass into the `fetchFeatures` method. + * + */ + fetchFeatures( + screenPoint: PopupFetchFeaturesScreenPoint, + options?: FetchFeaturesOptions + ): Promise; /** * Use this method to give focus to the Widget if the widget is able to be focused. * @@ -68509,7 +70889,7 @@ declare namespace __esri { */ 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), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.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), [PointCloudLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.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)). + * 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), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.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), [PointCloudLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.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)). * > Starting with version 4.12, [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content can no longer be set using a wildcard, e.g. `*`. Instead, set the `defaultPopupTemplateEnabled` property to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) @@ -68557,6 +70937,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#location) */ location?: PointProperties; + /** + * Defines the maximum icons displayed at one time in the action area. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#maxInlineActions) + * + * @default 3 + */ + maxInlineActions?: number | any; /** * An array of pending Promises that have not yet been fulfilled. If there are no pending promises, the value is `null`. When the pending promises are resolved they are removed from this array and the features they return are pushed into the [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#features) array. * @@ -68599,6 +70987,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#visible) */ visible?: boolean; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#visibleElements) + */ + visibleElements?: PopupVisibleElements; } interface PopupViewModel extends Accessor, Evented, GoTo { @@ -68741,6 +71135,21 @@ declare namespace __esri { * */ clear(): void; + /** + * Use this method to return feature(s) at a given screen location. These features are fetched from all of the [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) in the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). In order to use this, a layer must already have an associated [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) and have its [popupEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupEnabled). These features can then be used within a custom [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) or [Feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html) widget experience. One example could be a custom side panel that displays feature-specific information based on an end user's click location. This method allows a developer the ability to control how the input location is handled, and then subsequently, what to do with the results. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#fetchFeatures) + * + * @param screenPoint An object representing a point on the screen. This point can be in either the MapView or SceneView. + * @param screenPoint.x The x coordinate. + * @param screenPoint.y The y coordinate. + * @param options The [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchFeaturesOptions) to pass into the `fetchFeatures` method. + * + */ + fetchFeatures( + screenPoint: PopupViewModelFetchFeaturesScreenPoint, + options?: FetchFeaturesOptions + ): Promise; /** * Selects the feature at the next index in relation to the selected feature. * @@ -68888,6 +71297,21 @@ declare namespace __esri { visible?: boolean; } + export interface PopupViewModelFetchFeaturesScreenPoint extends Object { + /** + * The x coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#fetchFeatures) + */ + x: number; + /** + * The y coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#fetchFeatures) + */ + y: number; + } + export interface PopupViewModelOpenOptions extends Object { /** * Sets the [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#title) of the popup. @@ -68949,6 +71373,78 @@ declare namespace __esri { action: ActionButton | ActionToggle; } + /** + * Optional properties to use with the [fetchFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#fetchFeatures) method. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchFeaturesOptions) + */ + export interface FetchFeaturesOptions extends Object { + /** + * The `click` event for either 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). The event can be supplied in order to adjust the query radius depending on the pointer type. For example, touch events query a larger radius. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchFeaturesOptions) + */ + event?: any; + /** + * The signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchFeaturesOptions) + */ + signal?: AbortSignal; + } + + /** + * An object containing popup features for a specific location in addition to its associated [layerview](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchPopupFeaturesPromisesPerLayerView) + */ + export interface FetchPopupFeaturesPromisesPerLayerView extends Object { + /** + * The associated [layerview](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) in which the features are fetched. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchPopupFeaturesPromisesPerLayerView) + */ + layerView: LayerView; + /** + * A promise containing an array of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) for the selected location associated with a specific [layerview](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchPopupFeaturesPromisesPerLayerView) + */ + promise: Promise; + } + + /** + * The resulting features returned from the [fetchFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#fetchFeatures) method. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchPopupFeaturesResult) + */ + export interface FetchPopupFeaturesResult extends Object { + /** + * An array of promises containing graphics from the selected location. This can be a combination of graphics derived from a [layerview](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html), and/or graphics that reside directly on the view, ie. [view.graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchPopupFeaturesResult) + */ + allGraphicsPromise?: Promise; + /** + * An array of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) that do not have any associated [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html), ie. [view.graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchPopupFeaturesResult) + */ + clientOnlyGraphics?: Graphic[]; + /** + * The resulting location of the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest)'s' `hitTest`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchPopupFeaturesResult) + */ + location?: Point; + /** + * An array of [FetchPopupFeaturesPromisesPerLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchPopupFeaturesPromisesPerLayerView). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#FetchPopupFeaturesResult) + */ + promisesPerLayerView?: FetchPopupFeaturesPromisesPerLayerView[]; + } + export interface PopupDockOptions extends Object { /** * Defines the dimensions of the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) at which to dock the popup. Set to `false` to disable docking at a breakpoint. @@ -69004,6 +71500,21 @@ declare namespace __esri { height?: number; } + export interface PopupFetchFeaturesScreenPoint extends Object { + /** + * The x coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#fetchFeatures) + */ + x: number; + /** + * The y coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#fetchFeatures) + */ + y: number; + } + export interface PopupOpenOptions extends Object { /** * Sets the [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#title) of the popup. @@ -69073,7 +71584,43 @@ declare namespace __esri { action: ActionButton | ActionToggle; } + /** + * The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#VisibleElements) + */ + export interface PopupVisibleElements extends Object { + /** + * Indicates whether to the feature navigation will be displayed. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#VisibleElements) + */ + featureNavigation?: boolean; + /** + * Indicates whether to display a close button on the popup dialog. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#VisibleElements) + */ + closeButton?: boolean; + } + interface Print extends Widget { + /** + * Specify the print output file format(s) that the user can select based on the options available from the print service. This property can take a string value or an array of string values. When this value is "all" (default value), all the print service formats are available to be used. When an array of string values is used, only those values that match the options available from the print service will be used. If none of the input string values match those available from the print service, `allowedFormats` will fallback to default behavior. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#allowedFormats) + * + * @default "all" + */ + allowedFormats: string | string[]; + /** + * Specify the print output layout(s) that the user can select based on the options available from the print service. This property can take a string value or an array of string values. When this value is "all" (default value), all the print service layouts are available to be used. When an array of string values is used, only those values that match the options available from the print service will be used. If none of the input string values match those available from the print service, `allowedLayouts` will fallback to default behavior. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#allowedLayouts) + * + * @default "all" + */ + allowedLayouts: string | string[]; /** * The widget's default CSS icon class. * @@ -69119,6 +71666,22 @@ declare namespace __esri { export const Print: PrintConstructor; interface PrintProperties extends WidgetProperties { + /** + * Specify the print output file format(s) that the user can select based on the options available from the print service. This property can take a string value or an array of string values. When this value is "all" (default value), all the print service formats are available to be used. When an array of string values is used, only those values that match the options available from the print service will be used. If none of the input string values match those available from the print service, `allowedFormats` will fallback to default behavior. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#allowedFormats) + * + * @default "all" + */ + allowedFormats?: string | string[]; + /** + * Specify the print output layout(s) that the user can select based on the options available from the print service. This property can take a string value or an array of string values. When this value is "all" (default value), all the print service layouts are available to be used. When an array of string values is used, only those values that match the options available from the print service will be used. If none of the input string values match those available from the print service, `allowedLayouts` will fallback to default behavior. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#allowedLayouts) + * + * @default "all" + */ + allowedLayouts?: string | string[]; /** * The widget's default CSS icon class. * @@ -69152,6 +71715,22 @@ declare namespace __esri { } interface PrintViewModel extends Accessor { + /** + * Specify the print output file format(s) that the user can select based on the options available from the print service. This property can take a string value or an array of string values. When this value is "all" (default value), all the print service formats are available to be used. When an array of string values is used, only those values that match the options available from the print service will be used. If none of the input string values match those available from the print service, `allowedFormats` will fallback to default behavior. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#allowedFormats) + * + * @default "all" + */ + allowedFormats: string | string[]; + /** + * Specify the print output layout(s) that the user can select based on the options available from the print service. This property can take a string value or an array of string values. When this value is "all" (default value), all the print service layouts are available to be used. When an array of string values is used, only those values that match the options available from the print service will be used. If none of the input string values match those available from the print service, `allowedLayouts` will fallback to default behavior. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#allowedLayouts) + * + * @default "all" + */ + allowedLayouts: string | string[]; /** * The URL of the REST endpoint of the Export Web Map Task. * @@ -69221,6 +71800,22 @@ declare namespace __esri { export const PrintViewModel: PrintViewModelConstructor; interface PrintViewModelProperties { + /** + * Specify the print output file format(s) that the user can select based on the options available from the print service. This property can take a string value or an array of string values. When this value is "all" (default value), all the print service formats are available to be used. When an array of string values is used, only those values that match the options available from the print service will be used. If none of the input string values match those available from the print service, `allowedFormats` will fallback to default behavior. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#allowedFormats) + * + * @default "all" + */ + allowedFormats?: string | string[]; + /** + * Specify the print output layout(s) that the user can select based on the options available from the print service. This property can take a string value or an array of string values. When this value is "all" (default value), all the print service layouts are available to be used. When an array of string values is used, only those values that match the options available from the print service will be used. If none of the input string values match those available from the print service, `allowedLayouts` will fallback to default behavior. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#allowedLayouts) + * + * @default "all" + */ + allowedLayouts?: string | string[]; /** * The URL of the REST endpoint of the Export Web Map Task. * @@ -69281,7 +71876,7 @@ declare namespace __esri { */ dpi: string; /** - * This property defines the printed map's file name. This only applies when the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is `map-only`. If the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is not `map-only`, see [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#title). + * This property only applies when the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is `map-only`. If the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is not `map-only`, see [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#title). If the application and the print service are on the same origin, this property defines the file name of the downloadable printed map, and the title of the map in the printout. Clicking on the download icon or the file name will download the printed map. ![Download-Link](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/Download-Link.png) If the application and the print service are not on the same origin, this property defines the title of the map in the printout. The file name of the downloadable printed map will be generated by the ArcGIS Enterprise that hosts the print service. Clicking on the external link icon or the file name will open the printed map in a new window. ![External-Link](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/External-Link.png) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#fileName) */ @@ -69347,7 +71942,13 @@ declare namespace __esri { */ legendEnabled: boolean; /** - * When `true`, scale is used in the printed map. + * The map scale of the printed map. Only applies when [scaleEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#scaleEnabled) = `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#scale) + */ + scale: number; + /** + * When `true`, [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#scale) is used in the printed map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#scaleEnabled) * @@ -69355,7 +71956,7 @@ declare namespace __esri { */ scaleEnabled: boolean; /** - * The text used for the map title if the specified layout contains a title text element. This only applies if the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is not `map-only`. For `map-only`, see [fileName](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#fileName). + * The text used for the map title if the specified layout contains a title text element. This only applies if the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is not `map-only`. For `map-only`, see [fileName](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#fileName). If the application and the print service are on the same origin, this property defines the file name of the downloadable printed map, and the title of the map in the printout. Clicking on the download icon or the file name will download the printed map. ![Download-Link](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/Download-Link.png) If the application and the print service are not on the same origin, this property defines the title of the map in the printout. The file name of the downloadable printed map will be generated by the ArcGIS Enterprise that hosts the print service. Clicking on the external link icon or the file name will open the printed map in a new window. ![External-Link](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/External-Link.png) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#title) */ @@ -69404,7 +72005,7 @@ declare namespace __esri { */ dpi?: string; /** - * This property defines the printed map's file name. This only applies when the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is `map-only`. If the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is not `map-only`, see [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#title). + * This property only applies when the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is `map-only`. If the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is not `map-only`, see [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#title). If the application and the print service are on the same origin, this property defines the file name of the downloadable printed map, and the title of the map in the printout. Clicking on the download icon or the file name will download the printed map. ![Download-Link](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/Download-Link.png) If the application and the print service are not on the same origin, this property defines the title of the map in the printout. The file name of the downloadable printed map will be generated by the ArcGIS Enterprise that hosts the print service. Clicking on the external link icon or the file name will open the printed map in a new window. ![External-Link](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/External-Link.png) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#fileName) */ @@ -69470,7 +72071,13 @@ declare namespace __esri { */ legendEnabled?: boolean; /** - * When `true`, scale is used in the printed map. + * The map scale of the printed map. Only applies when [scaleEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#scaleEnabled) = `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#scale) + */ + scale?: number; + /** + * When `true`, [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#scale) is used in the printed map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#scaleEnabled) * @@ -69478,7 +72085,7 @@ declare namespace __esri { */ scaleEnabled?: boolean; /** - * The text used for the map title if the specified layout contains a title text element. This only applies if the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is not `map-only`. For `map-only`, see [fileName](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#fileName). + * The text used for the map title if the specified layout contains a title text element. This only applies if the [layout](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#layout) value is not `map-only`. For `map-only`, see [fileName](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#fileName). If the application and the print service are on the same origin, this property defines the file name of the downloadable printed map, and the title of the map in the printout. Clicking on the download icon or the file name will download the printed map. ![Download-Link](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/Download-Link.png) If the application and the print service are not on the same origin, this property defines the title of the map in the printout. The file name of the downloadable printed map will be generated by the ArcGIS Enterprise that hosts the print service. Clicking on the external link icon or the file name will open the printed map in a new window. ![External-Link](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/External-Link.png) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-TemplateOptions.html#title) */ @@ -70186,6 +72793,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#defaultSources) */ readonly defaultSources: Collection; + /** + * When true, the widget is visually withdrawn and cannot be interacted with. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#disabled) + * + * @default false + */ + disabled: boolean; /** * The widget's default CSS icon class. * @@ -70438,6 +73053,14 @@ declare namespace __esri { * @default true */ autoSelect?: boolean; + /** + * When true, the widget is visually withdrawn and cannot be interacted with. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#disabled) + * + * @default false + */ + disabled?: boolean; /** * The widget's default CSS icon class. * @@ -70953,6 +73576,7 @@ declare namespace __esri { resultGraphicEnabled: boolean; /** * The symbol used to display the result. + * > **Known Limitations** This property only applies when the layer/locator/source is not part of the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#resultSymbol) */ @@ -71089,6 +73713,7 @@ declare namespace __esri { resultGraphicEnabled?: boolean; /** * The symbol used to display the result. + * > **Known Limitations** This property only applies when the layer/locator/source is not part of the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#resultSymbol) */ @@ -72155,7 +74780,7 @@ declare namespace __esri { viewModel: SketchViewModel; /** - * Cancels the active operation and fires the [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event-create) or [update](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event-update) event and changes the event's state to `cancel`. If called in the middle of a create operation, `cancel()` discards the partially created graphic. + * Cancels the active operation and fires the [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event-create) or [update](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event-update) event. If called in the middle of a create operation, `cancel()` discards the partially created graphic. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#cancel) * @@ -72185,6 +74810,8 @@ declare namespace __esri { * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline`. * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` `rectangle` and `circle`. Default for `rectangle` and `circle`. * click | Vertices are added when the pointer is clicked. + * @param createOptions.hasZ Controls whether the created geometry has z-values or not. + * @param createOptions.defaultZ The default z-value of the newly created geometry. Ignored when `hasZ` is `false` or the layer's elevation mode is set to `absolute-height`. * */ create( @@ -72232,6 +74859,8 @@ declare namespace __esri { * 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.enableZ Indicates if z-values can be modified when updating the graphic. When enabled, the height handle manipulator is displayed. + * @param updateOptions.multipleSelectionEnabled Indicates whether more than one selection can be made at once. This applies to the shift+click interaction with the `transform` tool. * @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. * @@ -72444,7 +75073,7 @@ declare namespace __esri { 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`. If called in the middle of a create operation, `cancel()` discards the partially created graphic. + * 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 If called in the middle of a create operation, `cancel()` discards the partially created graphic. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#cancel) * @@ -72474,6 +75103,8 @@ declare namespace __esri { * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline`. * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` `rectangle` and `circle`. Default for `rectangle` and `circle`. * click | Vertices are added when the pointer is clicked. + * @param createOptions.hasZ Controls whether the created geometry has z-values or not. + * @param createOptions.defaultZ The default z-value of the newly created geometry. Ignored when `hasZ` is `false` or the layer's elevation mode is set to `absolute-height`. * */ create(tool: string, createOptions?: SketchViewModelCreateCreateOptions): void; @@ -72526,6 +75157,8 @@ declare namespace __esri { * 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.enableZ Indicates if z-values can be modified when updating the graphic. When enabled, the height handle manipulator is displayed. + * @param updateOptions.multipleSelectionEnabled Indicates whether more than one selection can be made at once. This applies to the shift+click interaction with the `transform` tool. * @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. * @@ -72638,7 +75271,7 @@ declare namespace __esri { export interface SketchViewModelCreateEvent { graphic: Graphic; - state: string; + state: "start" | "active" | "complete" | "cancel"; tool: string; @@ -72677,11 +75310,23 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) */ mode?: string; + /** + * Controls whether the created geometry has z-values or not. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) + */ + hasZ?: boolean; + /** + * The default z-value of the newly created geometry. Ignored when `hasZ` is `false` or the layer's elevation mode is set to `absolute-height`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) + */ + defaultZ?: number; } export interface SketchViewModelDefaultCreateOptions extends Object { /** - * Create operation mode how the graphic can be created. **Possible Values:** + * Create operation mode how the graphic can be created. **Possible Values:** * * Value | Description | * ----- | ----------- | @@ -72693,6 +75338,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultCreateOptions) */ mode?: string; + /** + * Controls whether the created geometry has z-values or not. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultCreateOptions) + */ + hasZ?: boolean; + /** + * The default z-value of the newly created geometry. Ignored when `hasZ` is `false` or the layer's elevation mode is set to `absolute-height`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultCreateOptions) + */ + defaultZ?: number; } export interface SketchViewModelDefaultUpdateOptions extends Object { @@ -72719,7 +75376,15 @@ declare namespace __esri { */ enableScaling?: boolean; /** - * Indicates whether more than one selection can be made at once. This pertains to shift+click interaction with the `transform` tool. + * Indicates if z-values can be modified when updating the graphic. When enabled, the height handle manipulator is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) + * + * @default true + */ + enableZ?: boolean; + /** + * Indicates whether more than one selection can be made at once. This applies to the shift+click interaction with the `transform` tool. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) * @@ -72774,6 +75439,22 @@ declare namespace __esri { * @default true */ enableScaling?: boolean; + /** + * Indicates if z-values can be modified when updating the graphic. When enabled, the height handle manipulator is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) + * + * @default true + */ + enableZ?: boolean; + /** + * Indicates whether more than one selection can be made at once. This applies to the shift+click interaction with the `transform` tool. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) + * + * @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). * @@ -72801,9 +75482,11 @@ declare namespace __esri { } export interface SketchViewModelUpdateEvent { + aborted: boolean; + graphics: Graphic[]; - state: "start" | "active" | "complete" | "cancel"; + state: "start" | "active" | "complete"; tool: "move" | "transform" | "reshape"; @@ -73001,11 +75684,23 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#create) */ mode?: "hybrid" | "freehand" | "click"; + /** + * Controls whether the created geometry has z-values or not. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#create) + */ + hasZ?: boolean; + /** + * The default z-value of the newly created geometry. Ignored when `hasZ` is `false` or the layer's elevation mode is set to `absolute-height`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#create) + */ + defaultZ?: number; } export interface SketchDefaultCreateOptions extends Object { /** - * Create operation mode how the graphic can be created. **Possible Values:** + * Create operation mode how the graphic can be created. **Possible Values:** * * Value | Description | * ----- | ----------- | @@ -73017,6 +75712,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultCreateOptions) */ mode?: string; + /** + * Controls whether the created geometry has z-values or not. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultCreateOptions) + */ + hasZ?: boolean; + /** + * The default z-value of the newly created geometry. Ignored when `hasZ` is `false` or the layer's elevation mode is set to `absolute-height`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultCreateOptions) + */ + defaultZ?: number; } export interface SketchDefaultUpdateOptions extends Object { @@ -73043,7 +75750,15 @@ declare namespace __esri { */ enableScaling?: boolean; /** - * Indicates whether more than one selection can be made at once. This pertains to shift+click interaction with the `transform` tool. + * Indicates if z-values can be modified when updating the graphic. When enabled, the height handle manipulator is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default true + */ + enableZ?: boolean; + /** + * Indicates whether more than one selection can be made at once. This applies to the shift+click interaction with the `transform` tool. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) * @@ -73098,6 +75813,22 @@ declare namespace __esri { * @default true */ enableScaling?: boolean; + /** + * Indicates if z-values can be modified when updating the graphic. When enabled, the height handle manipulator is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) + * + * @default true + */ + enableZ?: boolean; + /** + * Indicates whether more than one selection can be made at once. This applies to the shift+click interaction with the `transform` tool. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) + * + * @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). * @@ -73125,9 +75856,11 @@ declare namespace __esri { } export interface SketchUpdateEvent { + aborted: boolean; + graphics: Graphic[]; - state: "start" | "active" | "complete" | "cancel"; + state: "start" | "active" | "complete"; tool: "move" | "transform" | "reshape"; @@ -73167,6 +75900,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexAddEventInfo) */ added: Graphic[]; + /** + * Contains the details of the added vertices to track changes in topology of the geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexAddEventInfo) + */ + vertices: VertexAddEventInfoVertices[]; } /** @@ -73187,6 +75926,54 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexRemoveEventInfo) */ removed: Graphic[]; + /** + * Contains the details of the removed vertices to track changes in topology of the geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexRemoveEventInfo) + */ + vertices: VertexRemoveEventInfoVertices[]; + } + + export interface VertexAddEventInfoVertices extends Object { + /** + * The [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries representing the vertices that were added. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexAddEventInfo) + */ + coordinates: Graphic[]; + /** + * The ring/path index of the added vertex. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexAddEventInfo) + */ + componentIndex: number; + /** + * The index of the vertex position. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexAddEventInfo) + */ + vertexIndex: number; + } + + export interface VertexRemoveEventInfoVertices extends Object { + /** + * The [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries representing the vertices that were added. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexRemoveEventInfo) + */ + coordinates: Graphic[]; + /** + * The ring/path index of the removed vertex. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexRemoveEventInfo) + */ + componentIndex: number; + /** + * The index of the vertex position. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#VertexRemoveEventInfo) + */ + vertexIndex: number; } interface Slice extends Widget { @@ -73387,13 +76174,13 @@ declare namespace __esri { */ layout: "horizontal" | "horizontal-reversed" | "vertical" | "vertical-reversed"; /** - * The maximum possible data/thumb value of the slider. In the constructor, if one of the values specified in [values](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#values) is greater than the `max` value specified in this property, then the `max` will update to the highest value in `values`. To display the max value's label on the slider, then set [rangeLabelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelsVisible) to `true`. To allow the end user to modify the max value, set [rangeLabelInputsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelInputsEnabled) to `true`. + * The maximum possible data/thumb value of the slider. In the constructor, if one of the values specified in [values](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#values) is greater than the `max` value specified in this property, then the `max` will update to the highest value in `values`. To display the `max` value's label on the slider, set [visibleElements.rangeLabels](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#visibleElements) to `true`. To allow the end user to modify the max value, set [rangeLabelInputsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelInputsEnabled) to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#max) */ max: number; /** - * The minimum possible data/thumb value of the slider. In the constructor, if one of the values specified in [values](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#values) is less than the `min` value specified in this property, then the `min` will update to the lowest value in `values`. To display the min value's label on the slider, then set [rangeLabelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelsVisible) to `true`. To allow the end user to modify the min value, set [rangeLabelInputsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelInputsEnabled) to `true`. + * The minimum possible data/thumb value of the slider. In the constructor, if one of the values specified in [values](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#values) is less than the `min` value specified in this property, then the `min` will update to the lowest value in `values`. To display the `min` value's label on the slider, set [visibleElements.rangeLabels](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#visibleElements) to `true`. To allow the end user to modify the min value, set [rangeLabelInputsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelInputsEnabled) to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#min) */ @@ -73501,6 +76288,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#viewModel) */ viewModel: SliderViewModel; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#visibleElements) + */ + visibleElements: SliderVisibleElements; on(name: "max-change", eventHandler: SliderMaxChangeEventHandler): IHandle; @@ -73590,13 +76383,13 @@ declare namespace __esri { */ layout?: "horizontal" | "horizontal-reversed" | "vertical" | "vertical-reversed"; /** - * The maximum possible data/thumb value of the slider. In the constructor, if one of the values specified in [values](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#values) is greater than the `max` value specified in this property, then the `max` will update to the highest value in `values`. To display the max value's label on the slider, then set [rangeLabelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelsVisible) to `true`. To allow the end user to modify the max value, set [rangeLabelInputsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelInputsEnabled) to `true`. + * The maximum possible data/thumb value of the slider. In the constructor, if one of the values specified in [values](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#values) is greater than the `max` value specified in this property, then the `max` will update to the highest value in `values`. To display the `max` value's label on the slider, set [visibleElements.rangeLabels](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#visibleElements) to `true`. To allow the end user to modify the max value, set [rangeLabelInputsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelInputsEnabled) to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#max) */ max?: number; /** - * The minimum possible data/thumb value of the slider. In the constructor, if one of the values specified in [values](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#values) is less than the `min` value specified in this property, then the `min` will update to the lowest value in `values`. To display the min value's label on the slider, then set [rangeLabelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelsVisible) to `true`. To allow the end user to modify the min value, set [rangeLabelInputsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelInputsEnabled) to `true`. + * The minimum possible data/thumb value of the slider. In the constructor, if one of the values specified in [values](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#values) is less than the `min` value specified in this property, then the `min` will update to the lowest value in `values`. To display the `min` value's label on the slider, set [visibleElements.rangeLabels](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#visibleElements) to `true`. To allow the end user to modify the min value, set [rangeLabelInputsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#rangeLabelInputsEnabled) to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#min) */ @@ -73698,6 +76491,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#viewModel) */ viewModel?: SliderViewModelProperties; + /** + * The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#visibleElements) + */ + visibleElements?: SliderVisibleElements; } interface SliderViewModel extends Accessor, Evented { @@ -74077,6 +76876,26 @@ declare namespace __esri { export type TickCreatedFunction = (value: number, tickElement: HTMLElement, labelElement?: HTMLElement) => void; + /** + * The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off. Alternatively, developers may also use CSS (e.g. `display: none`) to show/hide elements, such as labels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#VisibleElements) + */ + export interface SliderVisibleElements extends Object { + /** + * Indicates whether to display labels for slider thumbs. By default, labels display input thumb values as floating point values with a precision of two digits. The format of labels can be customized via the [labelFormatFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#labelFormatFunction). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#VisibleElements) + */ + labels?: boolean; + /** + * Indicates whether to display [min](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#min) or [max](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#max) range values on the slider. The format of labels can be customized via the [labelFormatFunction](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#labelFormatFunction). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slider.html#VisibleElements) + */ + rangeLabels?: boolean; + } + interface ClassedColorSlider extends SmartMappingSliderBase { /** * An array of class breaks with associated colors. The colors mapped to each break can be used to update the renderer of a layer. A minimum of two breaks must be provided to the slider. @@ -74399,7 +77218,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-ClassedSizeSlider.html#style) */ - style?: ClassedSizeSliderStyle; + style?: ClassedSizeSliderStyleProperties; /** * The view model for the ClassedSizeSlider widget. This class contains all the logic (properties and methods) that controls this widget's behavior. See the [ClassedSizeSliderViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-ClassedSizeSlider-ClassedSizeSliderViewModel.html) class to access all properties and methods on the ClassedSizeSlider widget. * @@ -74494,7 +77313,26 @@ declare namespace __esri { min: number; } - export interface ClassedSizeSliderStyle extends Object { + export interface ClassedSizeSliderStyleProperties extends Object { + /** + * The color of the slider's track. For single-color visualizations where only a Size variable is present, you should set this color to match the color of the symbol in the [SimpleRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-ClassedSizeSlider.html#style) + * + * @default new Color([149, 149, 149]) + */ + trackFillColor?: Color | number[] | string; + /** + * The background color of the slider's track. Generally, this color should be subdued and not interfere with the `trackFillColor`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-ClassedSizeSlider.html#style) + * + * @default new Color([224, 224, 224]) + */ + trackBackgroundColor?: Color | number[] | string; + } + + export interface ClassedSizeSliderStyle extends AnonymousAccessor { /** * The color of the slider's track. For single-color visualizations where only a Size variable is present, you should set this color to match the color of the symbol in the [SimpleRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html). * @@ -75252,7 +78090,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-OpacitySlider.html#style) */ - style?: OpacitySliderStyle; + style?: OpacitySliderStyleProperties; /** * The view model for the OpacitySlider widget. This class contains all the logic (properties and methods) that controls this widget's behavior. See the [OpacitySliderViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-OpacitySlider-OpacitySliderViewModel.html) class to access all properties and methods on the OpacitySlider widget. * @@ -75350,7 +78188,18 @@ declare namespace __esri { value: number; } - export interface OpacitySliderStyle extends Object { + export interface OpacitySliderStyleProperties extends Object { + /** + * The color of the slider's track. For single-color visualizations where only an Opacity variable is present, you should set this color to match the color of the symbol in the [SimpleRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-OpacitySlider.html#style) + * + * @default new Color([0, 121, 193]) + */ + trackFillColor?: Color | number[] | string; + } + + export interface OpacitySliderStyle extends AnonymousAccessor { /** * The color of the slider's track. For single-color visualizations where only an Opacity variable is present, you should set this color to match the color of the symbol in the [SimpleRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html). * @@ -75465,7 +78314,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-SizeSlider.html#style) */ - style?: SizeSliderStyle; + style?: SizeSliderStyleProperties; /** * The view model for the SizeSlider widget. This class contains all the logic (properties and methods) that controls this widget's behavior. See the [SizeSliderViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-SizeSlider-SizeSliderViewModel.html) class to access all properties and methods on the SizeSlider widget. * @@ -75534,7 +78383,26 @@ declare namespace __esri { value: number; } - export interface SizeSliderStyle extends Object { + export interface SizeSliderStyleProperties extends Object { + /** + * The color of the slider's track. For single-color visualizations where only a Size variable is present, you should set this color to match the color of the symbol in the [SimpleRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-SizeSlider.html#style) + * + * @default new Color([149, 149, 149]) + */ + trackFillColor?: Color | number[] | string; + /** + * The background color of the slider's track. Generally, this color should be subdued and not interfere with the `trackFillColor`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-smartMapping-SizeSlider.html#style) + * + * @default new Color([224, 224, 224]) + */ + trackBackgroundColor?: Color | number[] | string; + } + + export interface SizeSliderStyle extends AnonymousAccessor { /** * The color of the slider's track. For single-color visualizations where only a Size variable is present, you should set this color to match the color of the symbol in the [SimpleRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html). * @@ -75986,6 +78854,62 @@ declare namespace __esri { interface SpinnerViewModelProperties {} + interface DatePicker extends Widget { + /** + * Indicates whether the date gets updated when the user changes the month in the drop-down. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-DatePicker.html#commitOnMonthChange) + * + * @default false + */ + commitOnMonthChange: boolean; + /** + * The input value for the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-DatePicker.html#value) + */ + value: any; + /** + * 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 [DatePickerViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-DatePickerViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-DatePicker.html#viewModel) + */ + viewModel: DatePickerViewModel; + } + + interface DatePickerConstructor { + new (properties?: DatePickerProperties): DatePicker; + } + + export const DatePicker: DatePickerConstructor; + + interface DatePickerProperties extends WidgetProperties { + /** + * Indicates whether the date gets updated when the user changes the month in the drop-down. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-DatePicker.html#commitOnMonthChange) + * + * @default false + */ + commitOnMonthChange?: boolean; + /** + * The input value for the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-DatePicker.html#value) + */ + value?: any; + /** + * 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 [DatePickerViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-DatePickerViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-DatePicker.html#viewModel) + */ + viewModel?: DatePickerViewModel; + } + + interface DatePickerViewModel {} + + export const DatePickerViewModel: DatePickerViewModel; + interface GeolocationPositioning { /** * The HTML5 Geolocation Position options for locating. Refer to [Geolocation API Specification](http://www.w3.org/TR/geolocation-API/#position-options) for details. @@ -76094,7 +79018,47 @@ declare namespace __esri { goToOverride?: GoToOverride; } - interface widget { + interface TimePicker extends Widget { + /** + * The input value for the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-TimePicker.html#value) + */ + value: any; + /** + * 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 [TimePickerViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-TimePickerViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-TimePicker.html#viewModel) + */ + viewModel: TimePickerViewModel; + } + + interface TimePickerConstructor { + new (properties?: TimePickerProperties): TimePicker; + } + + export const TimePicker: TimePickerConstructor; + + interface TimePickerProperties extends WidgetProperties { + /** + * The input value for the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-TimePicker.html#value) + */ + value?: any; + /** + * 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 [TimePickerViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-TimePickerViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-TimePicker.html#viewModel) + */ + viewModel?: TimePickerViewModel; + } + + interface TimePickerViewModel {} + + export const TimePickerViewModel: TimePickerViewModel; + + namespace widget { /** * This convenience decorator is used to help simplify accessibility within the widget keyboard events. For example, it can be used to execute a method when the `space` or `enter` keys are pressed. * @@ -76102,7 +79066,7 @@ declare namespace __esri { * * */ - accessibleHandler(): Function; + function accessibleHandler(): Function; /** * Utility method used for creating CSS animation/transition functions. * @@ -76112,7 +79076,7 @@ declare namespace __esri { * @param className The animation/transition class name. * */ - cssTransition(type: string, className: string): Function; + function cssTransition(type: string, className: string): Function; /** * Utility method used to determine if the directionality of the text of the document is right-to-left. * @@ -76120,7 +79084,7 @@ declare namespace __esri { * * */ - isRTL(): boolean; + function isRTL(): boolean; /** * Utility method used for joining CSS classes. * @@ -76129,7 +79093,7 @@ declare namespace __esri { * @param classNames The class names to join. * */ - join(...classNames: string[]): string; + function join(...classNames: string[]): string; /** * This convenience decorator marks a property for automatic rendering. It is useful when you want rendering to be scheduled whenever the decorated property changes. Many times this decorator is used in conjunction with the [@property](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html) decorator. Rendering on deep properties is also supported by providing a path to a property deeper in the instance. * @@ -76138,7 +79102,7 @@ declare namespace __esri { * @param propertyName Names of nested renderable properties. * */ - renderable(propertyName?: string | string[]): Function; + function renderable(propertyName?: string | string[]): Function; /** * This convenience method is used to assign an [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) DOM node reference to a variable. It does this by taking a [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) passed from either the [afterUpdate](https://developers.arcgis.com/javascript/latest/guide/custom-widget/index.html#widget-rendering) or [afterCreate](https://developers.arcgis.com/javascript/latest/guide/custom-widget/index.html#widget-rendering) callbacks. In order to use this, the element must have a set [data-node-ref](https://developers.arcgis.com/javascript/latest/guide/custom-widget/index.html#widget-rendering) attribute. In addition, it must also be bound to the widget instance, e.g. `bind={this}`. * @@ -76147,18 +79111,7 @@ declare namespace __esri { * @param node The referenced DOM node. * */ - storeNode(node: HTMLElement): void; - /** - * This convenience method is used to render the JSX in the [widget.render()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#render) method. It is required to import `tsx` even though it is not explicitly called. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-widget.html#tsx) - * - * @param selector The element to create. - * @param properties The element's properties. - * @param children The element's children. - * - */ - tsx(selector: string, properties?: any, children?: any): any; + function storeNode(node: HTMLElement): void; /** * This convenience decorator helps dispatch view model events on the widget instance. * @@ -76167,10 +79120,30 @@ declare namespace __esri { * @param eventNames The event names to re-dispatch. * */ - vmEvent(eventNames: string | string[]): Function; - } + function vmEvent(eventNames: string | string[]): Function; - export const widget: widget; + namespace tsx { + /** + * This convenience method is used to render the JSX in the [widget.render()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#render) method. It is required to import `tsx` even though it is not explicitly called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-widget.html#tsx) + * + * @param selector The element to create. + * @param properties The element's properties. + * @param children The element's children. + * + */ + function tsx(selector: string, properties?: any, children?: any): any; + + namespace JSX { + interface IntrinsicElements { + [elementName: string]: any; + } + + interface Element {} + } + } + } export type GoToOverride = (view: MapView | SceneView, goToParameters: any) => void; @@ -76245,7 +79218,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html#visibleElements) */ - visibleElements: SwipeVisibleElements; + visibleElements: widgetsSwipeVisibleElements; } interface SwipeConstructor { @@ -76331,7 +79304,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html#visibleElements) */ - visibleElements?: SwipeVisibleElements; + visibleElements?: widgetsSwipeVisibleElements; } interface SwipeViewModel extends Accessor { @@ -76432,7 +79405,7 @@ declare namespace __esri { view?: MapViewProperties; } - export interface SwipeVisibleElements extends Object { + export interface widgetsSwipeVisibleElements extends SwipeVisibleElements { /** * Indicates whether the handle from which you drag the widget is visible. Default value is `true`. * @@ -76447,6 +79420,26 @@ declare namespace __esri { divider: boolean; } + /** + * The visible elements that are displayed within the widget. This provides the ability to turn individual elements of the widget's display on/off. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html#VisibleElements) + */ + export interface SwipeVisibleElements extends Object { + /** + * Indicates whether the handle from which you drag the widget is visible. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html#VisibleElements) + */ + handle: boolean; + /** + * Indicates whether the divider between the leading and trailing layers is visible. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html#VisibleElements) + */ + divider: boolean; + } + interface TimeSlider extends Widget { /** * Lists the specific locations on the timeline where handle(s) will snap to when manipulated. @@ -77696,6 +80689,8 @@ declare namespace __esri { export type SceneViewImmediateClickEventHandler = (event: SceneViewImmediateClickEvent) => void; + export type SceneViewImmediateDoubleClickEventHandler = (event: SceneViewImmediateDoubleClickEvent) => void; + export type SceneViewKeyDownEventHandler = (event: SceneViewKeyDownEvent) => void; export type SceneViewKeyUpEventHandler = (event: SceneViewKeyUpEvent) => void; @@ -77816,8 +80811,6 @@ declare namespace __esri { event: SmartMappingSliderViewModelMinChangeEvent ) => void; - export type StreamLayerEditsEventHandler = (event: StreamLayerEditsEvent) => void; - export type StreamLayerLayerviewCreateErrorEventHandler = (event: StreamLayerLayerviewCreateErrorEvent) => void; export type StreamLayerLayerviewCreateEventHandler = (event: StreamLayerLayerviewCreateEvent) => void; @@ -77826,6 +80819,14 @@ declare namespace __esri { export type StreamLayerViewDataReceivedEventHandler = (event: StreamLayerViewDataReceivedEvent) => void; + export type TileImageryLayerLayerviewCreateErrorEventHandler = ( + event: TileImageryLayerLayerviewCreateErrorEvent + ) => void; + + export type TileImageryLayerLayerviewCreateEventHandler = (event: TileImageryLayerLayerviewCreateEvent) => void; + + export type TileImageryLayerLayerviewDestroyEventHandler = (event: TileImageryLayerLayerviewDestroyEvent) => void; + export type TileLayerLayerviewCreateErrorEventHandler = (event: TileLayerLayerviewCreateErrorEvent) => void; export type TileLayerLayerviewCreateEventHandler = (event: TileLayerLayerviewCreateEvent) => void; @@ -77876,6 +80877,8 @@ declare namespace __esri { export type ViewImmediateClickEventHandler = (event: ViewImmediateClickEvent) => void; + export type ViewImmediateDoubleClickEventHandler = (event: ViewImmediateDoubleClickEvent) => void; + export type ViewKeyDownEventHandler = (event: ViewKeyDownEvent) => void; export type ViewKeyUpEventHandler = (event: ViewKeyUpEvent) => void; @@ -78079,21 +81082,16 @@ declare module "esri/geometry/support/MeshMaterial" { export = MeshMaterial; } +declare module "esri/geometry/support/MeshMaterialMetallicRoughness" { + import MeshMaterialMetallicRoughness = __esri.MeshMaterialMetallicRoughness; + export = MeshMaterialMetallicRoughness; +} + declare module "esri/geometry/support/MeshTexture" { import MeshTexture = __esri.MeshTexture; export = MeshTexture; } -declare module "esri/geometry/support/ValueMeshColor" { - import ValueMeshColor = __esri.ValueMeshColor; - export = ValueMeshColor; -} - -declare module "esri/geometry/support/ImageMeshColor" { - import ImageMeshColor = __esri.ImageMeshColor; - export = ImageMeshColor; -} - declare module "esri/identity/Credential" { import Credential = __esri.Credential; export = Credential; @@ -78214,6 +81212,11 @@ declare module "esri/layers/StreamLayer" { export = StreamLayer; } +declare module "esri/layers/TileImageryLayer" { + import TileImageryLayer = __esri.TileImageryLayer; + export = TileImageryLayer; +} + declare module "esri/layers/TileLayer" { import TileLayer = __esri.TileLayer; export = TileLayer; @@ -78299,6 +81302,11 @@ declare module "esri/layers/support/BuildingFilter" { export = BuildingFilter; } +declare module "esri/layers/support/BuildingSummaryStatistics" { + import BuildingSummaryStatistics = __esri.BuildingSummaryStatistics; + export = BuildingSummaryStatistics; +} + declare module "esri/layers/support/CodedValueDomain" { import CodedValueDomain = __esri.CodedValueDomain; export = CodedValueDomain; @@ -79434,6 +82442,11 @@ declare module "esri/widgets/AreaMeasurement3D" { export = AreaMeasurement3D; } +declare module "esri/widgets/Attachments" { + import Attachments = __esri.Attachments; + export = Attachments; +} + declare module "esri/widgets/Attribution" { import Attribution = __esri.Attribution; export = Attribution; @@ -79509,6 +82522,11 @@ declare module "esri/widgets/FeatureForm" { export = FeatureForm; } +declare module "esri/widgets/FeatureTable" { + import FeatureTable = __esri.FeatureTable; + export = FeatureTable; +} + declare module "esri/widgets/FeatureTemplates" { import FeatureTemplates = __esri.FeatureTemplates; export = FeatureTemplates; @@ -79684,6 +82702,11 @@ declare module "esri/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel" { export = AreaMeasurement3DViewModel; } +declare module "esri/widgets/Attachments/AttachmentsViewModel" { + import AttachmentsViewModel = __esri.AttachmentsViewModel; + export = AttachmentsViewModel; +} + declare module "esri/widgets/Attribution/AttributionViewModel" { import AttributionViewModel = __esri.AttributionViewModel; export = AttributionViewModel; @@ -79754,11 +82777,26 @@ declare module "esri/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewMode export = DistanceMeasurement2DViewModel; } +declare module "esri/widgets/Editor/CreateWorkflow" { + import CreateWorkflow = __esri.CreateWorkflow; + export = CreateWorkflow; +} + +declare module "esri/widgets/Editor/UpdateWorkflow" { + import UpdateWorkflow = __esri.UpdateWorkflow; + export = UpdateWorkflow; +} + declare module "esri/widgets/Editor/EditorViewModel" { import EditorViewModel = __esri.EditorViewModel; export = EditorViewModel; } +declare module "esri/widgets/Editor/Edits" { + import Edits = __esri.Edits; + export = Edits; +} + declare module "esri/widgets/Editor/Workflow" { import Workflow = __esri.Workflow; export = Workflow; @@ -79799,6 +82837,16 @@ declare module "esri/widgets/FeatureForm/InputFieldGroup" { export = InputFieldGroup; } +declare module "esri/widgets/FeatureTable/FeatureTableViewModel" { + import FeatureTableViewModel = __esri.FeatureTableViewModel; + export = FeatureTableViewModel; +} + +declare module "esri/widgets/FeatureTable/FieldColumnConfig" { + import FieldColumnConfig = __esri.FieldColumnConfig; + export = FieldColumnConfig; +} + declare module "esri/widgets/FeatureTemplates/FeatureTemplatesViewModel" { import FeatureTemplatesViewModel = __esri.FeatureTemplatesViewModel; export = FeatureTemplatesViewModel; @@ -79964,6 +83012,16 @@ declare module "esri/widgets/Swipe/SwipeViewModel" { export = SwipeViewModel; } +declare module "esri/widgets/support/DatePicker" { + import DatePicker = __esri.DatePicker; + export = DatePicker; +} + +declare module "esri/widgets/support/TimePicker" { + import TimePicker = __esri.TimePicker; + export = TimePicker; +} + declare module "esri/widgets/TimeSlider/TimeSliderViewModel" { import TimeSliderViewModel = __esri.TimeSliderViewModel; export = TimeSliderViewModel; @@ -80189,11 +83247,6 @@ declare module "esri/core/promiseUtils" { export = promiseUtils; } -declare module "esri/core/requireUtils" { - import requireUtils = __esri.requireUtils; - export = requireUtils; -} - declare module "esri/core/scheduling" { import scheduling = __esri.scheduling; export = scheduling; @@ -80459,6 +83512,16 @@ declare module "esri/views/3d/externalRenderers" { export = externalRenderers; } +declare module "esri/views/3d/support/SceneViewPerformanceInfo" { + import SceneViewPerformanceInfo = __esri.SceneViewPerformanceInfo; + export = SceneViewPerformanceInfo; +} + +declare module "esri/views/3d/support/LayerPerformanceInfo" { + import LayerPerformanceInfo = __esri.LayerPerformanceInfo; + export = LayerPerformanceInfo; +} + declare module "esri/widgets/smartMapping/support/utils" { import utils = __esri.utils; export = utils; @@ -80478,3 +83541,23 @@ declare module "esri/widgets/CoordinateConversion/support/Conversion" { import Conversion = __esri.Conversion; export = Conversion; } + +declare module "esri/widgets/Editor/CreateWorkflowData" { + import CreateWorkflowData = __esri.CreateWorkflowData; + export = CreateWorkflowData; +} + +declare module "esri/widgets/Editor/UpdateWorkflowData" { + import UpdateWorkflowData = __esri.UpdateWorkflowData; + export = UpdateWorkflowData; +} + +declare module "esri/widgets/support/DatePickerViewModel" { + import DatePickerViewModel = __esri.DatePickerViewModel; + export = DatePickerViewModel; +} + +declare module "esri/widgets/support/TimePickerViewModel" { + import TimePickerViewModel = __esri.TimePickerViewModel; + export = TimePickerViewModel; +} diff --git a/types/arcgis-js-api/v3/index.d.ts b/types/arcgis-js-api/v3/index.d.ts index e3c744493b..0ffab87a31 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.31 +// Type definitions for ArcGIS API for JavaScript 3.32 // Project: https://developers.arcgis.com/javascript/3/ // Definitions by: Esri // Bjorn Svensson @@ -2855,6 +2855,10 @@ declare module "esri/ServerInfo" { adminTokenServiceUrl: string; /** Version of the ArcGIS Server REST API deployed on this server. */ currentVersion: number; + /** Indicates whether the server is a Portal instance. */ + hasPortal: boolean; + /** Indicates whether the server is an ArcGIS Server instance. */ + hasServer: boolean; /** The server URL. */ server: string; /** Validity of short-lived token in minutes. */ @@ -17522,6 +17526,8 @@ declare module "esri/tasks/query" { static SPATIAL_REL_TOUCHES: any; /** The feature from feature class 1 is completely enclosed by the feature from feature class 2. */ static SPATIAL_REL_WITHIN: any; + /** Indicates if the service should cache the query results. */ + cacheHint: boolean; /** Buffer distance for input geometries. */ distance: number; /** The geometry to apply to the spatial filter. */ diff --git a/types/ari-client/index.d.ts b/types/ari-client/index.d.ts new file mode 100644 index 0000000000..bcd8adea4c --- /dev/null +++ b/types/ari-client/index.d.ts @@ -0,0 +1,1835 @@ +// Type definitions for ari-client 2.2 +// Project: https://github.com/asterisk/node-ari-client +// Definitions by: Dioris Moreno +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export function connect( + baseUrl: string, + user: string, + pass: string, + callback?: (err: Error, client: Client) => void, +): Promise; + +export interface Client extends Resource { + /* Start and Stop Method Overloads */ + start(apps: string | string[], subscribeAll: boolean, callback?: (err: Error, ...args: any[]) => void): void; + start(apps: string | string[], callback?: (err: Error, ...args: any[]) => void): void; + stop(): void; + /* Properties */ + applications: Applications; + asterisk: Asterisk; + channels: Channels; + bridges: Bridges; + deviceStates: DeviceStates; + endpoints: Endpoints; + recordings: Recordings; + mailboxes: Mailboxes; + playbacks: Playbacks; + sounds: Sounds; + events: Events; + /* Create Methods */ + Application(id?: string, objValues?: object): Application; + Asterisk(id?: string, objValues?: object): Asterisk; + Channel(id?: string, objValues?: object): Channel; + Bridge(id?: string, objValues?: object): Bridge; + DeviceState(id?: string, objValues?: object): DeviceState; + Endpoint(id?: string, objValues?: object): Endpoint; + LiveRecording(id?: string, objValues?: object): LiveRecording; + Mailbox(id?: string, objValues?: object): Mailbox; + Playback(id?: string, objValues?: object): Playback; + Sound(id?: string, objValues?: object): Sound; + StoredRecording(id?: string, objValues?: object): StoredRecording; +} + +export interface Containers { + [key: string]: any; +} +/* Event Types */ +export type APILoadErrorEventType = 'APILoadError'; +export type EventsEventType = 'Events'; +export type MessageEventType = 'Message'; +export type MissingParamsEventType = 'MissingParams'; +export type EventEventType = 'Event'; +export type ContactInfoEventType = 'ContactInfo'; +export type PeerEventType = 'Peer'; +export type DeviceStateChangedEventType = 'DeviceStateChanged'; +export type PlaybackStartedEventType = 'PlaybackStarted'; +export type PlaybackContinuingEventType = 'PlaybackContinuing'; +export type PlaybackFinishedEventType = 'PlaybackFinished'; +export type RecordingStartedEventType = 'RecordingStarted'; +export type RecordingFinishedEventType = 'RecordingFinished'; +export type RecordingFailedEventType = 'RecordingFailed'; +export type ApplicationMoveFailedEventType = 'ApplicationMoveFailed'; +export type ApplicationReplacedEventType = 'ApplicationReplaced'; +export type BridgeCreatedEventType = 'BridgeCreated'; +export type BridgeDestroyedEventType = 'BridgeDestroyed'; +export type BridgeMergedEventType = 'BridgeMerged'; +export type BridgeVideoSourceChangedEventType = 'BridgeVideoSourceChanged'; +export type BridgeBlindTransferEventType = 'BridgeBlindTransfer'; +export type BridgeAttendedTransferEventType = 'BridgeAttendedTransfer'; +export type ChannelCreatedEventType = 'ChannelCreated'; +export type ChannelDestroyedEventType = 'ChannelDestroyed'; +export type ChannelEnteredBridgeEventType = 'ChannelEnteredBridge'; +export type ChannelLeftBridgeEventType = 'ChannelLeftBridge'; +export type ChannelStateChangeEventType = 'ChannelStateChange'; +export type ChannelDtmfReceivedEventType = 'ChannelDtmfReceived'; +export type ChannelDialplanEventType = 'ChannelDialplan'; +export type ChannelCallerIdEventType = 'ChannelCallerId'; +export type ChannelUsereventEventType = 'ChannelUserevent'; +export type ChannelHangupRequestEventType = 'ChannelHangupRequest'; +export type ChannelVarsetEventType = 'ChannelVarset'; +export type ChannelHoldEventType = 'ChannelHold'; +export type ChannelUnholdEventType = 'ChannelUnhold'; +export type ChannelTalkingStartedEventType = 'ChannelTalkingStarted'; +export type ChannelTalkingFinishedEventType = 'ChannelTalkingFinished'; +export type ContactStatusChangeEventType = 'ContactStatusChange'; +export type PeerStatusChangeEventType = 'PeerStatusChange'; +export type EndpointStateChangeEventType = 'EndpointStateChange'; +export type DialEventType = 'Dial'; +export type StasisEndEventType = 'StasisEnd'; +export type StasisStartEventType = 'StasisStart'; +export type TextMessageReceivedEventType = 'TextMessageReceived'; +export type ChannelConnectedLineEventType = 'ChannelConnectedLine'; +export type AnyEventType = + | EventsEventType + | MessageEventType + | MissingParamsEventType + | EventEventType + | ContactInfoEventType + | PeerEventType + | DeviceStateChangedEventType + | PlaybackStartedEventType + | PlaybackContinuingEventType + | PlaybackFinishedEventType + | RecordingStartedEventType + | RecordingFinishedEventType + | RecordingFailedEventType + | ApplicationMoveFailedEventType + | ApplicationReplacedEventType + | BridgeCreatedEventType + | BridgeDestroyedEventType + | BridgeMergedEventType + | BridgeVideoSourceChangedEventType + | BridgeBlindTransferEventType + | BridgeAttendedTransferEventType + | ChannelCreatedEventType + | ChannelDestroyedEventType + | ChannelEnteredBridgeEventType + | ChannelLeftBridgeEventType + | ChannelStateChangeEventType + | ChannelDtmfReceivedEventType + | ChannelDialplanEventType + | ChannelCallerIdEventType + | ChannelUsereventEventType + | ChannelHangupRequestEventType + | ChannelVarsetEventType + | ChannelHoldEventType + | ChannelUnholdEventType + | ChannelTalkingStartedEventType + | ChannelTalkingFinishedEventType + | ContactStatusChangeEventType + | PeerStatusChangeEventType + | EndpointStateChangeEventType + | DialEventType + | StasisEndEventType + | StasisStartEventType + | TextMessageReceivedEventType + | ChannelConnectedLineEventType; +/* Event Classes */ +export interface Events { + /* Methods */ + eventWebsocket( + params: { app: string | string[]; subscribeAll?: boolean }, + callback: (err: Error, message: Message) => void, + ): void; + eventWebsocket(params: { app: string | string[]; subscribeAll?: boolean }): Promise; + userEvent( + params: { eventName: string; application: string; source?: string | string[]; variables?: Containers }, + callback: (err: Error) => void, + ): void; + userEvent(params: { + eventName: string; + application: string; + source?: string | string[]; + variables?: Containers; + }): Promise; +} +export interface Message { + /* Properties */ + type: string; + asterisk_id?: string; +} +export interface MissingParams extends Message { + /* Properties */ + params: string | string[]; +} +export interface Event extends Message { + /* Properties */ + application: string; + timestamp: Date; +} +export interface ContactInfo { + /* Properties */ + uri: string; + contact_status: string; + aor: string; + roundtrip_usec?: string; +} +export interface Peer { + /* Properties */ + peer_status: string; + cause?: string; + address?: string; + port?: string; + time?: string; +} +export interface DeviceStateChanged extends Event { + /* Properties */ + device_state: DeviceState; +} +export interface PlaybackStarted extends Event { + /* Properties */ + playback: Playback; +} +export interface PlaybackContinuing extends Event { + /* Properties */ + playback: Playback; +} +export interface PlaybackFinished extends Event { + /* Properties */ + playback: Playback; +} +export interface RecordingStarted extends Event { + /* Properties */ + recording: LiveRecording; +} +export interface RecordingFinished extends Event { + /* Properties */ + recording: LiveRecording; +} +export interface RecordingFailed extends Event { + /* Properties */ + recording: LiveRecording; +} +export interface ApplicationMoveFailed extends Event { + /* Properties */ + channel: Channel; + destination: string; + args: string | string[]; +} +export interface BridgeCreated extends Event { + /* Properties */ + bridge: Bridge; +} +export interface BridgeDestroyed extends Event { + /* Properties */ + bridge: Bridge; +} +export interface BridgeMerged extends Event { + /* Properties */ + bridge: Bridge; + bridge_from: Bridge; +} +export interface BridgeVideoSourceChanged extends Event { + /* Properties */ + bridge: Bridge; + old_video_source_id?: string; +} +export interface BridgeBlindTransfer extends Event { + /* Properties */ + channel: Channel; + replace_channel?: Channel; + transferee?: Channel; + exten: string; + context: string; + result: string; + is_external: boolean; + bridge: Bridge; +} +export interface BridgeAttendedTransfer extends Event { + /* Properties */ + transferer_first_leg: Channel; + transferer_second_leg: Channel; + replace_channel?: Channel; + transferee?: Channel; + transfer_target?: Channel; + result: string; + is_external: boolean; + transferer_first_leg_bridge: Bridge; + transferer_second_leg_bridge: Bridge; + destination_type: string; + destination_bridge: string; + destination_application: string; + destination_link_first_leg: Channel; + destination_link_second_leg: Channel; + destination_threeway_channel: Channel; + destination_threeway_bridge: Bridge; +} +export interface ChannelCreated extends Event { + /* Properties */ + channel: Channel; +} +export interface ChannelDestroyed extends Event { + /* Properties */ + cause: number; + cause_txt: string; + channel: Channel; +} +export interface ChannelEnteredBridge extends Event { + /* Properties */ + bridge: Bridge; + channel: Channel; +} +export interface ChannelLeftBridge extends Event { + /* Properties */ + bridge: Bridge; + channel: Channel; +} +export interface ChannelStateChange extends Event { + /* Properties */ + channel: Channel; +} +export interface ChannelDtmfReceived extends Event { + /* Properties */ + digit: string; + duration_ms: number; + channel: Channel; +} +export interface ChannelDialplan extends Event { + /* Properties */ + channel: Channel; + dialplan_app: string; + dialplan_app_data: string; +} +export interface ChannelCallerId extends Event { + /* Properties */ + caller_presentation: number; + caller_presentation_txt: string; + channel: Channel; +} +export interface ChannelUserevent extends Event { + /* Properties */ + eventname: string; + channel?: Channel; + bridge?: Bridge; + endpoint?: Endpoint; + userevent: object; +} +export interface ChannelHangupRequest extends Event { + /* Properties */ + cause: number; + soft: boolean; + channel: Channel; +} +export interface ChannelVarset extends Event { + /* Properties */ + variable: string; + value: string; + channel?: Channel; +} +export interface ChannelHold extends Event { + /* Properties */ + channel: Channel; + musicclass?: string; +} +export interface ChannelUnhold extends Event { + /* Properties */ + channel: Channel; +} +export interface ChannelTalkingStarted extends Event { + /* Properties */ + channel: Channel; +} +export interface ChannelTalkingFinished extends Event { + /* Properties */ + channel: Channel; + duration: number; +} +export interface ContactStatusChange extends Event { + /* Properties */ + endpoint: Endpoint; + contact_info: ContactInfo; +} +export interface PeerStatusChange extends Event { + /* Properties */ + endpoint: Endpoint; + peer: Peer; +} +export interface EndpointStateChange extends Event { + /* Properties */ + endpoint: Endpoint; +} +export interface Dial extends Event { + /* Properties */ + caller?: Channel; + peer: Channel; + forward?: string; + forwarded?: Channel; + dialstring?: string; + dialstatus: string; +} +export interface StasisEnd extends Event { + /* Properties */ + channel: Channel; +} +export interface StasisStart extends Event { + /* Properties */ + args: string | string[]; + channel: Channel; + replace_channel?: Channel; +} +export interface TextMessageReceived extends Event { + /* Properties */ + message: TextMessage; + endpoint?: Endpoint; +} +export interface ChannelConnectedLine extends Event { + /* Properties */ + channel: Channel; +} +export interface Resource { + on(event: MessageEventType, callback: (event: Message, instances: Message) => void): void; + on(event: MissingParamsEventType, callback: (event: MissingParams, instances: MissingParams) => void): void; + on(event: EventEventType, callback: (event: Event, instances: Event) => void): void; + on(event: ContactInfoEventType, callback: (event: ContactInfo, instances: ContactInfo) => void): void; + on(event: PeerEventType, callback: (event: Peer, instances: Peer) => void): void; + on( + event: DeviceStateChangedEventType, + callback: (event: DeviceStateChanged, devicestate: DeviceState) => void, + ): void; + on(event: PlaybackStartedEventType, callback: (event: PlaybackStarted, playback: Playback) => void): void; + on(event: PlaybackContinuingEventType, callback: (event: PlaybackContinuing, playback: Playback) => void): void; + on(event: PlaybackFinishedEventType, callback: (event: PlaybackFinished, playback: Playback) => void): void; + on( + event: RecordingStartedEventType, + callback: (event: RecordingStarted, liverecording: LiveRecording) => void, + ): void; + on( + event: RecordingFinishedEventType, + callback: (event: RecordingFinished, liverecording: LiveRecording) => void, + ): void; + on(event: RecordingFailedEventType, callback: (event: RecordingFailed, liverecording: LiveRecording) => void): void; + on(event: ApplicationMoveFailedEventType, callback: (event: ApplicationMoveFailed, channel: Channel) => void): void; + on(event: ApplicationReplacedEventType, callback: (event: Event) => void): void; + on(event: BridgeCreatedEventType, callback: (event: BridgeCreated, bridge: Bridge) => void): void; + on(event: BridgeDestroyedEventType, callback: (event: BridgeDestroyed, bridge: Bridge) => void): void; + on(event: BridgeMergedEventType, callback: (event: BridgeMerged, bridge: Bridge) => void): void; + on( + event: BridgeVideoSourceChangedEventType, + callback: (event: BridgeVideoSourceChanged, bridge: Bridge) => void, + ): void; + on( + event: BridgeBlindTransferEventType, + callback: (event: BridgeBlindTransfer, instances: BridgeBlindTransfer) => void, + ): void; + on( + event: BridgeAttendedTransferEventType, + callback: (event: BridgeAttendedTransfer, instances: BridgeAttendedTransfer) => void, + ): void; + on(event: ChannelCreatedEventType, callback: (event: ChannelCreated, channel: Channel) => void): void; + on(event: ChannelDestroyedEventType, callback: (event: ChannelDestroyed, channel: Channel) => void): void; + on( + event: ChannelEnteredBridgeEventType, + callback: (event: ChannelEnteredBridge, instances: ChannelEnteredBridge) => void, + ): void; + on( + event: ChannelLeftBridgeEventType, + callback: (event: ChannelLeftBridge, instances: ChannelLeftBridge) => void, + ): void; + on(event: ChannelStateChangeEventType, callback: (event: ChannelStateChange, channel: Channel) => void): void; + on(event: ChannelDtmfReceivedEventType, callback: (event: ChannelDtmfReceived, channel: Channel) => void): void; + on(event: ChannelDialplanEventType, callback: (event: ChannelDialplan, channel: Channel) => void): void; + on(event: ChannelCallerIdEventType, callback: (event: ChannelCallerId, channel: Channel) => void): void; + on( + event: ChannelUsereventEventType, + callback: (event: ChannelUserevent, instances: ChannelUserevent) => void, + ): void; + on(event: ChannelHangupRequestEventType, callback: (event: ChannelHangupRequest, channel: Channel) => void): void; + on(event: ChannelVarsetEventType, callback: (event: ChannelVarset, channel: Channel) => void): void; + on(event: ChannelHoldEventType, callback: (event: ChannelHold, channel: Channel) => void): void; + on(event: ChannelUnholdEventType, callback: (event: ChannelUnhold, channel: Channel) => void): void; + on(event: ChannelTalkingStartedEventType, callback: (event: ChannelTalkingStarted, channel: Channel) => void): void; + on( + event: ChannelTalkingFinishedEventType, + callback: (event: ChannelTalkingFinished, channel: Channel) => void, + ): void; + on(event: ContactStatusChangeEventType, callback: (event: ContactStatusChange, endpoint: Endpoint) => void): void; + on(event: PeerStatusChangeEventType, callback: (event: PeerStatusChange, endpoint: Endpoint) => void): void; + on(event: EndpointStateChangeEventType, callback: (event: EndpointStateChange, endpoint: Endpoint) => void): void; + on(event: DialEventType, callback: (event: Dial, channel: Channel) => void): void; + on(event: StasisEndEventType, callback: (event: StasisEnd, channel: Channel) => void): void; + on(event: StasisStartEventType, callback: (event: StasisStart, channel: Channel) => void): void; + on(event: TextMessageReceivedEventType, callback: (event: TextMessageReceived, endpoint: Endpoint) => void): void; + on(event: ChannelConnectedLineEventType, callback: (event: ChannelConnectedLine, channel: Channel) => void): void; + once(event: MessageEventType, callback: (event: Message, instances: Message) => void): void; + once(event: MissingParamsEventType, callback: (event: MissingParams, instances: MissingParams) => void): void; + once(event: EventEventType, callback: (event: Event, instances: Event) => void): void; + once(event: ContactInfoEventType, callback: (event: ContactInfo, instances: ContactInfo) => void): void; + once(event: PeerEventType, callback: (event: Peer, instances: Peer) => void): void; + once( + event: DeviceStateChangedEventType, + callback: (event: DeviceStateChanged, devicestate: DeviceState) => void, + ): void; + once(event: PlaybackStartedEventType, callback: (event: PlaybackStarted, playback: Playback) => void): void; + once(event: PlaybackContinuingEventType, callback: (event: PlaybackContinuing, playback: Playback) => void): void; + once(event: PlaybackFinishedEventType, callback: (event: PlaybackFinished, playback: Playback) => void): void; + once( + event: RecordingStartedEventType, + callback: (event: RecordingStarted, liverecording: LiveRecording) => void, + ): void; + once( + event: RecordingFinishedEventType, + callback: (event: RecordingFinished, liverecording: LiveRecording) => void, + ): void; + once( + event: RecordingFailedEventType, + callback: (event: RecordingFailed, liverecording: LiveRecording) => void, + ): void; + once( + event: ApplicationMoveFailedEventType, + callback: (event: ApplicationMoveFailed, channel: Channel) => void, + ): void; + once(event: ApplicationReplacedEventType, callback: (event: Event) => void): void; + once(event: BridgeCreatedEventType, callback: (event: BridgeCreated, bridge: Bridge) => void): void; + once(event: BridgeDestroyedEventType, callback: (event: BridgeDestroyed, bridge: Bridge) => void): void; + once(event: BridgeMergedEventType, callback: (event: BridgeMerged, bridge: Bridge) => void): void; + once( + event: BridgeVideoSourceChangedEventType, + callback: (event: BridgeVideoSourceChanged, bridge: Bridge) => void, + ): void; + once( + event: BridgeBlindTransferEventType, + callback: (event: BridgeBlindTransfer, instances: BridgeBlindTransfer) => void, + ): void; + once( + event: BridgeAttendedTransferEventType, + callback: (event: BridgeAttendedTransfer, instances: BridgeAttendedTransfer) => void, + ): void; + once(event: ChannelCreatedEventType, callback: (event: ChannelCreated, channel: Channel) => void): void; + once(event: ChannelDestroyedEventType, callback: (event: ChannelDestroyed, channel: Channel) => void): void; + once( + event: ChannelEnteredBridgeEventType, + callback: (event: ChannelEnteredBridge, instances: ChannelEnteredBridge) => void, + ): void; + once( + event: ChannelLeftBridgeEventType, + callback: (event: ChannelLeftBridge, instances: ChannelLeftBridge) => void, + ): void; + once(event: ChannelStateChangeEventType, callback: (event: ChannelStateChange, channel: Channel) => void): void; + once(event: ChannelDtmfReceivedEventType, callback: (event: ChannelDtmfReceived, channel: Channel) => void): void; + once(event: ChannelDialplanEventType, callback: (event: ChannelDialplan, channel: Channel) => void): void; + once(event: ChannelCallerIdEventType, callback: (event: ChannelCallerId, channel: Channel) => void): void; + once( + event: ChannelUsereventEventType, + callback: (event: ChannelUserevent, instances: ChannelUserevent) => void, + ): void; + once(event: ChannelHangupRequestEventType, callback: (event: ChannelHangupRequest, channel: Channel) => void): void; + once(event: ChannelVarsetEventType, callback: (event: ChannelVarset, channel: Channel) => void): void; + once(event: ChannelHoldEventType, callback: (event: ChannelHold, channel: Channel) => void): void; + once(event: ChannelUnholdEventType, callback: (event: ChannelUnhold, channel: Channel) => void): void; + once( + event: ChannelTalkingStartedEventType, + callback: (event: ChannelTalkingStarted, channel: Channel) => void, + ): void; + once( + event: ChannelTalkingFinishedEventType, + callback: (event: ChannelTalkingFinished, channel: Channel) => void, + ): void; + once(event: ContactStatusChangeEventType, callback: (event: ContactStatusChange, endpoint: Endpoint) => void): void; + once(event: PeerStatusChangeEventType, callback: (event: PeerStatusChange, endpoint: Endpoint) => void): void; + once(event: EndpointStateChangeEventType, callback: (event: EndpointStateChange, endpoint: Endpoint) => void): void; + once(event: DialEventType, callback: (event: Dial, channel: Channel) => void): void; + once(event: StasisEndEventType, callback: (event: StasisEnd, channel: Channel) => void): void; + once(event: StasisStartEventType, callback: (event: StasisStart, channel: Channel) => void): void; + once(event: TextMessageReceivedEventType, callback: (event: TextMessageReceived, endpoint: Endpoint) => void): void; + once(event: ChannelConnectedLineEventType, callback: (event: ChannelConnectedLine, channel: Channel) => void): void; + addListener(event: MessageEventType, callback: (event: Message, instances: Message) => void): void; + addListener( + event: MissingParamsEventType, + callback: (event: MissingParams, instances: MissingParams) => void, + ): void; + addListener(event: EventEventType, callback: (event: Event, instances: Event) => void): void; + addListener(event: ContactInfoEventType, callback: (event: ContactInfo, instances: ContactInfo) => void): void; + addListener(event: PeerEventType, callback: (event: Peer, instances: Peer) => void): void; + addListener( + event: DeviceStateChangedEventType, + callback: (event: DeviceStateChanged, devicestate: DeviceState) => void, + ): void; + addListener(event: PlaybackStartedEventType, callback: (event: PlaybackStarted, playback: Playback) => void): void; + addListener( + event: PlaybackContinuingEventType, + callback: (event: PlaybackContinuing, playback: Playback) => void, + ): void; + addListener( + event: PlaybackFinishedEventType, + callback: (event: PlaybackFinished, playback: Playback) => void, + ): void; + addListener( + event: RecordingStartedEventType, + callback: (event: RecordingStarted, liverecording: LiveRecording) => void, + ): void; + addListener( + event: RecordingFinishedEventType, + callback: (event: RecordingFinished, liverecording: LiveRecording) => void, + ): void; + addListener( + event: RecordingFailedEventType, + callback: (event: RecordingFailed, liverecording: LiveRecording) => void, + ): void; + addListener( + event: ApplicationMoveFailedEventType, + callback: (event: ApplicationMoveFailed, channel: Channel) => void, + ): void; + addListener(event: ApplicationReplacedEventType, callback: (event: Event) => void): void; + addListener(event: BridgeCreatedEventType, callback: (event: BridgeCreated, bridge: Bridge) => void): void; + addListener(event: BridgeDestroyedEventType, callback: (event: BridgeDestroyed, bridge: Bridge) => void): void; + addListener(event: BridgeMergedEventType, callback: (event: BridgeMerged, bridge: Bridge) => void): void; + addListener( + event: BridgeVideoSourceChangedEventType, + callback: (event: BridgeVideoSourceChanged, bridge: Bridge) => void, + ): void; + addListener( + event: BridgeBlindTransferEventType, + callback: (event: BridgeBlindTransfer, instances: BridgeBlindTransfer) => void, + ): void; + addListener( + event: BridgeAttendedTransferEventType, + callback: (event: BridgeAttendedTransfer, instances: BridgeAttendedTransfer) => void, + ): void; + addListener(event: ChannelCreatedEventType, callback: (event: ChannelCreated, channel: Channel) => void): void; + addListener(event: ChannelDestroyedEventType, callback: (event: ChannelDestroyed, channel: Channel) => void): void; + addListener( + event: ChannelEnteredBridgeEventType, + callback: (event: ChannelEnteredBridge, instances: ChannelEnteredBridge) => void, + ): void; + addListener( + event: ChannelLeftBridgeEventType, + callback: (event: ChannelLeftBridge, instances: ChannelLeftBridge) => void, + ): void; + addListener( + event: ChannelStateChangeEventType, + callback: (event: ChannelStateChange, channel: Channel) => void, + ): void; + addListener( + event: ChannelDtmfReceivedEventType, + callback: (event: ChannelDtmfReceived, channel: Channel) => void, + ): void; + addListener(event: ChannelDialplanEventType, callback: (event: ChannelDialplan, channel: Channel) => void): void; + addListener(event: ChannelCallerIdEventType, callback: (event: ChannelCallerId, channel: Channel) => void): void; + addListener( + event: ChannelUsereventEventType, + callback: (event: ChannelUserevent, instances: ChannelUserevent) => void, + ): void; + addListener( + event: ChannelHangupRequestEventType, + callback: (event: ChannelHangupRequest, channel: Channel) => void, + ): void; + addListener(event: ChannelVarsetEventType, callback: (event: ChannelVarset, channel: Channel) => void): void; + addListener(event: ChannelHoldEventType, callback: (event: ChannelHold, channel: Channel) => void): void; + addListener(event: ChannelUnholdEventType, callback: (event: ChannelUnhold, channel: Channel) => void): void; + addListener( + event: ChannelTalkingStartedEventType, + callback: (event: ChannelTalkingStarted, channel: Channel) => void, + ): void; + addListener( + event: ChannelTalkingFinishedEventType, + callback: (event: ChannelTalkingFinished, channel: Channel) => void, + ): void; + addListener( + event: ContactStatusChangeEventType, + callback: (event: ContactStatusChange, endpoint: Endpoint) => void, + ): void; + addListener( + event: PeerStatusChangeEventType, + callback: (event: PeerStatusChange, endpoint: Endpoint) => void, + ): void; + addListener( + event: EndpointStateChangeEventType, + callback: (event: EndpointStateChange, endpoint: Endpoint) => void, + ): void; + addListener(event: DialEventType, callback: (event: Dial, channel: Channel) => void): void; + addListener(event: StasisEndEventType, callback: (event: StasisEnd, channel: Channel) => void): void; + addListener(event: StasisStartEventType, callback: (event: StasisStart, channel: Channel) => void): void; + addListener( + event: TextMessageReceivedEventType, + callback: (event: TextMessageReceived, endpoint: Endpoint) => void, + ): void; + addListener( + event: ChannelConnectedLineEventType, + callback: (event: ChannelConnectedLine, channel: Channel) => void, + ): void; + removeListener(event: AnyEventType, handler: (...args: any[]) => void): void; + removeAllListeners(event?: AnyEventType): void; +} +export interface Applications { + /* Methods */ + list(callback: (err: Error, applications: Application[]) => void): void; + list(): Promise; + get(params: { applicationName: string }, callback: (err: Error, application: Application) => void): void; + get(params: { applicationName: string }): Promise; + subscribe( + params: { applicationName: string; eventSource: string | string[] }, + callback: (err: Error, application: Application) => void, + ): void; + subscribe(params: { applicationName: string; eventSource: string | string[] }): Promise; + unsubscribe( + params: { applicationName: string; eventSource: string | string[] }, + callback: (err: Error, application: Application) => void, + ): void; + unsubscribe(params: { applicationName: string; eventSource: string | string[] }): Promise; + filter( + params: { applicationName: string; filter?: object }, + callback: (err: Error, application: Application) => void, + ): void; + filter(params: { applicationName: string; filter?: object }): Promise; +} +export interface Application extends Resource { + /* Properties */ + name: string; + channel_ids: string | string[]; + bridge_ids: string | string[]; + endpoint_ids: string | string[]; + device_names: string | string[]; + events_allowed: object | object[]; + events_disallowed: object | object[]; + /* Methods */ + list(callback: (err: Error, applications: Application[]) => void): void; + list(): Promise; + get(callback: (err: Error, application: Application) => void): void; + get(): Promise; + subscribe( + params: { eventSource: string | string[] }, + callback: (err: Error, application: Application) => void, + ): void; + subscribe(params: { eventSource: string | string[] }): Promise; + unsubscribe( + params: { eventSource: string | string[] }, + callback: (err: Error, application: Application) => void, + ): void; + unsubscribe(params: { eventSource: string | string[] }): Promise; + filter(params: { filter?: object }, callback: (err: Error, application: Application) => void): void; + filter(callback: (err: Error, application: Application) => void): void; + filter(params?: { filter?: object }): Promise; +} +export interface Asterisk { + /* Methods */ + getObject( + params: { configClass: string; objectType: string; id: string }, + callback: (err: Error, configtuples: ConfigTuple[]) => void, + ): void; + getObject(params: { configClass: string; objectType: string; id: string }): Promise; + updateObject( + params: { configClass: string; objectType: string; id: string; fields?: Containers }, + callback: (err: Error, configtuples: ConfigTuple[]) => void, + ): void; + updateObject(params: { + configClass: string; + objectType: string; + id: string; + fields?: Containers; + }): Promise; + deleteObject(params: { configClass: string; objectType: string; id: string }, callback: (err: Error) => void): void; + deleteObject(params: { configClass: string; objectType: string; id: string }): Promise; + getInfo(params: { only?: string | string[] }, callback: (err: Error, asteriskinfo: AsteriskInfo) => void): void; + getInfo(callback: (err: Error, asteriskinfo: AsteriskInfo) => void): void; + getInfo(params?: { only?: string | string[] }): Promise; + ping(callback: (err: Error, asteriskping: AsteriskPing) => void): void; + ping(): Promise; + listModules(callback: (err: Error, modules: Module[]) => void): void; + listModules(): Promise; + getModule(params: { moduleName: string }, callback: (err: Error, module: Module) => void): void; + getModule(params: { moduleName: string }): Promise; + loadModule(params: { moduleName: string }, callback: (err: Error) => void): void; + loadModule(params: { moduleName: string }): Promise; + unloadModule(params: { moduleName: string }, callback: (err: Error) => void): void; + unloadModule(params: { moduleName: string }): Promise; + reloadModule(params: { moduleName: string }, callback: (err: Error) => void): void; + reloadModule(params: { moduleName: string }): Promise; + listLogChannels(callback: (err: Error, logchannels: LogChannel[]) => void): void; + listLogChannels(): Promise; + addLog(params: { logChannelName: string; configuration: string }, callback: (err: Error) => void): void; + addLog(params: { logChannelName: string; configuration: string }): Promise; + deleteLog(params: { logChannelName: string }, callback: (err: Error) => void): void; + deleteLog(params: { logChannelName: string }): Promise; + rotateLog(params: { logChannelName: string }, callback: (err: Error) => void): void; + rotateLog(params: { logChannelName: string }): Promise; + getGlobalVar(params: { variable: string }, callback: (err: Error, variable: Variable) => void): void; + getGlobalVar(params: { variable: string }): Promise; + setGlobalVar(params: { variable: string; value?: string }, callback: (err: Error) => void): void; + setGlobalVar(params: { variable: string; value?: string }): Promise; +} +export interface BuildInfo { + /* Properties */ + os: string; + kernel: string; + options: string; + machine: string; + date: string; + user: string; +} +export interface SystemInfo { + /* Properties */ + version: string; + entity_id: string; +} +export interface SetId { + /* Properties */ + user: string; + group: string; +} +export interface ConfigInfo { + /* Properties */ + name: string; + default_language: string; + max_channels?: number; + max_open_files?: number; + max_load?: number; + setid: SetId; +} +export interface StatusInfo { + /* Properties */ + startup_time: Date; + last_reload_time: Date; +} +export interface AsteriskInfo { + /* Properties */ + build?: BuildInfo; + system?: SystemInfo; + config?: ConfigInfo; + status?: StatusInfo; +} +export interface AsteriskPing { + /* Properties */ + asterisk_id: string; + ping: string; + timestamp: string; +} +export interface Module { + /* Properties */ + name: string; + description: string; + use_count: number; + status: string; + support_level: string; +} +export interface LogChannel { + /* Properties */ + channel: string; + type: string; + status: string; + configuration: string; +} +export interface Variable { + /* Properties */ + value: string; +} +export interface ConfigTuple { + /* Properties */ + attribute: string; + value: string; +} +export interface Bridges { + /* Methods */ + list(callback: (err: Error, bridges: Bridge[]) => void): void; + list(): Promise; + create( + params: { type?: string; bridgeId?: string; name?: string }, + callback: (err: Error, bridge: Bridge) => void, + ): void; + create(callback: (err: Error, bridge: Bridge) => void): void; + create(params?: { type?: string; bridgeId?: string; name?: string }): Promise; + createWithId( + params: { type?: string; bridgeId: string; name?: string }, + callback: (err: Error, bridge: Bridge) => void, + ): void; + createWithId(params: { type?: string; bridgeId: string; name?: string }): Promise; + get(params: { bridgeId: string }, callback: (err: Error, bridge: Bridge) => void): void; + get(params: { bridgeId: string }): Promise; + destroy(params: { bridgeId: string }, callback: (err: Error) => void): void; + destroy(params: { bridgeId: string }): Promise; + addChannel( + params: { bridgeId: string; channel: string | string[]; role?: string; absorbDTMF?: boolean; mute?: boolean }, + callback: (err: Error) => void, + ): void; + addChannel(params: { + bridgeId: string; + channel: string | string[]; + role?: string; + absorbDTMF?: boolean; + mute?: boolean; + }): Promise; + removeChannel(params: { bridgeId: string; channel: string | string[] }, callback: (err: Error) => void): void; + removeChannel(params: { bridgeId: string; channel: string | string[] }): Promise; + setVideoSource(params: { bridgeId: string; channelId: string }, callback: (err: Error) => void): void; + setVideoSource(params: { bridgeId: string; channelId: string }): Promise; + clearVideoSource(params: { bridgeId: string }, callback: (err: Error) => void): void; + clearVideoSource(params: { bridgeId: string }): Promise; + startMoh(params: { bridgeId: string; mohClass?: string }, callback: (err: Error) => void): void; + startMoh(params: { bridgeId: string; mohClass?: string }): Promise; + stopMoh(params: { bridgeId: string }, callback: (err: Error) => void): void; + stopMoh(params: { bridgeId: string }): Promise; + play( + params: { + bridgeId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + playbackId?: string; + }, + callback: (err: Error, playback: Playback) => void, + ): void; + play(params: { + bridgeId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + playbackId?: string; + }): Promise; + playWithId( + params: { + bridgeId: string; + playbackId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + }, + callback: (err: Error, playback: Playback) => void, + ): void; + playWithId(params: { + bridgeId: string; + playbackId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + }): Promise; + record( + params: { + bridgeId: string; + name: string; + format: string; + maxDurationSeconds?: number; + maxSilenceSeconds?: number; + ifExists?: string; + beep?: boolean; + terminateOn?: string; + }, + callback: (err: Error, liverecording: LiveRecording) => void, + ): void; + record(params: { + bridgeId: string; + name: string; + format: string; + maxDurationSeconds?: number; + maxSilenceSeconds?: number; + ifExists?: string; + beep?: boolean; + terminateOn?: string; + }): Promise; +} +export interface Bridge extends Resource { + /* Properties */ + id: string; + technology: string; + bridge_type: string; + bridge_class: string; + creator: string; + name: string; + channels: string | string[]; + video_mode?: string; + video_source_id?: string; + creationtime: Date; + /* Methods */ + list(callback: (err: Error, bridges: Bridge[]) => void): void; + list(): Promise; + create(params: { type?: string; name?: string }, callback: (err: Error, bridge: Bridge) => void): void; + create(callback: (err: Error, bridge: Bridge) => void): void; + create(params?: { type?: string; name?: string }): Promise; + createWithId(params: { type?: string; name?: string }, callback: (err: Error, bridge: Bridge) => void): void; + createWithId(callback: (err: Error, bridge: Bridge) => void): void; + createWithId(params?: { type?: string; name?: string }): Promise; + get(callback: (err: Error, bridge: Bridge) => void): void; + get(): Promise; + destroy(callback: (err: Error) => void): void; + destroy(): Promise; + addChannel( + params: { channel: string | string[]; role?: string; absorbDTMF?: boolean; mute?: boolean }, + callback: (err: Error) => void, + ): void; + addChannel(params: { + channel: string | string[]; + role?: string; + absorbDTMF?: boolean; + mute?: boolean; + }): Promise; + removeChannel(params: { channel: string | string[] }, callback: (err: Error) => void): void; + removeChannel(params: { channel: string | string[] }): Promise; + setVideoSource(params: { channelId: string }, callback: (err: Error) => void): void; + setVideoSource(params: { channelId: string }): Promise; + clearVideoSource(callback: (err: Error) => void): void; + clearVideoSource(): Promise; + startMoh(params: { mohClass?: string }, callback: (err: Error) => void): void; + startMoh(callback: (err: Error) => void): void; + startMoh(params?: { mohClass?: string }): Promise; + stopMoh(callback: (err: Error) => void): void; + stopMoh(): Promise; + play( + params: { media: string | string[]; lang?: string; offsetms?: number; skipms?: number; playbackId?: string }, + callback: (err: Error, playback: Playback) => void, + ): void; + play(params: { + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + playbackId?: string; + }): Promise; + playWithId( + params: { playbackId: string; media: string | string[]; lang?: string; offsetms?: number; skipms?: number }, + callback: (err: Error, playback: Playback) => void, + ): void; + playWithId(params: { + playbackId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + }): Promise; + record( + params: { + name: string; + format: string; + maxDurationSeconds?: number; + maxSilenceSeconds?: number; + ifExists?: string; + beep?: boolean; + terminateOn?: string; + }, + recording: LiveRecording, + callback: (err: Error, liverecording: LiveRecording) => void, + ): void; + record( + params: { + name: string; + format: string; + maxDurationSeconds?: number; + maxSilenceSeconds?: number; + ifExists?: string; + beep?: boolean; + terminateOn?: string; + }, + recording: LiveRecording, + ): Promise; +} +export interface Channels { + /* Methods */ + list(callback: (err: Error, channels: Channel[]) => void): void; + list(): Promise; + originate( + params: { + endpoint: string; + extension?: string; + context?: string; + priority?: number; + label?: string; + app?: string; + appArgs?: string; + callerId?: string; + timeout?: number; + variables?: Containers; + channelId?: string; + otherChannelId?: string; + originator?: string; + formats?: string; + }, + callback: (err: Error, channel: Channel) => void, + ): void; + originate(params: { + endpoint: string; + extension?: string; + context?: string; + priority?: number; + label?: string; + app?: string; + appArgs?: string; + callerId?: string; + timeout?: number; + variables?: Containers; + channelId?: string; + otherChannelId?: string; + originator?: string; + formats?: string; + }): Promise; + create( + params: { + endpoint: string; + app: string; + appArgs?: string; + channelId?: string; + otherChannelId?: string; + originator?: string; + formats?: string; + }, + callback: (err: Error, channel: Channel) => void, + ): void; + create(params: { + endpoint: string; + app: string; + appArgs?: string; + channelId?: string; + otherChannelId?: string; + originator?: string; + formats?: string; + }): Promise; + get(params: { channelId: string }, callback: (err: Error, channel: Channel) => void): void; + get(params: { channelId: string }): Promise; + originateWithId( + params: { + channelId: string; + endpoint: string; + extension?: string; + context?: string; + priority?: number; + label?: string; + app?: string; + appArgs?: string; + callerId?: string; + timeout?: number; + variables?: Containers; + otherChannelId?: string; + originator?: string; + formats?: string; + }, + callback: (err: Error, channel: Channel) => void, + ): void; + originateWithId(params: { + channelId: string; + endpoint: string; + extension?: string; + context?: string; + priority?: number; + label?: string; + app?: string; + appArgs?: string; + callerId?: string; + timeout?: number; + variables?: Containers; + otherChannelId?: string; + originator?: string; + formats?: string; + }): Promise; + hangup(params: { channelId: string; reason?: string }, callback: (err: Error) => void): void; + hangup(params: { channelId: string; reason?: string }): Promise; + continueInDialplan( + params: { channelId: string; context?: string; extension?: string; priority?: number; label?: string }, + callback: (err: Error) => void, + ): void; + continueInDialplan(params: { + channelId: string; + context?: string; + extension?: string; + priority?: number; + label?: string; + }): Promise; + move(params: { channelId: string; app: string; appArgs?: string }, callback: (err: Error) => void): void; + move(params: { channelId: string; app: string; appArgs?: string }): Promise; + redirect(params: { channelId: string; endpoint: string }, callback: (err: Error) => void): void; + redirect(params: { channelId: string; endpoint: string }): Promise; + answer(params: { channelId: string }, callback: (err: Error) => void): void; + answer(params: { channelId: string }): Promise; + ring(params: { channelId: string }, callback: (err: Error) => void): void; + ring(params: { channelId: string }): Promise; + ringStop(params: { channelId: string }, callback: (err: Error) => void): void; + ringStop(params: { channelId: string }): Promise; + sendDTMF( + params: { + channelId: string; + dtmf?: string; + before?: number; + between?: number; + duration?: number; + after?: number; + }, + callback: (err: Error) => void, + ): void; + sendDTMF(params: { + channelId: string; + dtmf?: string; + before?: number; + between?: number; + duration?: number; + after?: number; + }): Promise; + mute(params: { channelId: string; direction?: string }, callback: (err: Error) => void): void; + mute(params: { channelId: string; direction?: string }): Promise; + unmute(params: { channelId: string; direction?: string }, callback: (err: Error) => void): void; + unmute(params: { channelId: string; direction?: string }): Promise; + hold(params: { channelId: string }, callback: (err: Error) => void): void; + hold(params: { channelId: string }): Promise; + unhold(params: { channelId: string }, callback: (err: Error) => void): void; + unhold(params: { channelId: string }): Promise; + startMoh(params: { channelId: string; mohClass?: string }, callback: (err: Error) => void): void; + startMoh(params: { channelId: string; mohClass?: string }): Promise; + stopMoh(params: { channelId: string }, callback: (err: Error) => void): void; + stopMoh(params: { channelId: string }): Promise; + startSilence(params: { channelId: string }, callback: (err: Error) => void): void; + startSilence(params: { channelId: string }): Promise; + stopSilence(params: { channelId: string }, callback: (err: Error) => void): void; + stopSilence(params: { channelId: string }): Promise; + play( + params: { + channelId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + playbackId?: string; + }, + callback: (err: Error, playback: Playback) => void, + ): void; + play(params: { + channelId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + playbackId?: string; + }): Promise; + playWithId( + params: { + channelId: string; + playbackId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + }, + callback: (err: Error, playback: Playback) => void, + ): void; + playWithId(params: { + channelId: string; + playbackId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + }): Promise; + record( + params: { + channelId: string; + name: string; + format: string; + maxDurationSeconds?: number; + maxSilenceSeconds?: number; + ifExists?: string; + beep?: boolean; + terminateOn?: string; + }, + callback: (err: Error, liverecording: LiveRecording) => void, + ): void; + record(params: { + channelId: string; + name: string; + format: string; + maxDurationSeconds?: number; + maxSilenceSeconds?: number; + ifExists?: string; + beep?: boolean; + terminateOn?: string; + }): Promise; + getChannelVar( + params: { channelId: string; variable: string }, + callback: (err: Error, variable: Variable) => void, + ): void; + getChannelVar(params: { channelId: string; variable: string }): Promise; + setChannelVar( + params: { channelId: string; variable: string; value?: string }, + callback: (err: Error) => void, + ): void; + setChannelVar(params: { channelId: string; variable: string; value?: string }): Promise; + snoopChannel( + params: { channelId: string; spy?: string; whisper?: string; app: string; appArgs?: string; snoopId?: string }, + callback: (err: Error, channel: Channel) => void, + ): void; + snoopChannel(params: { + channelId: string; + spy?: string; + whisper?: string; + app: string; + appArgs?: string; + snoopId?: string; + }): Promise; + snoopChannelWithId( + params: { channelId: string; snoopId: string; spy?: string; whisper?: string; app: string; appArgs?: string }, + callback: (err: Error, channel: Channel) => void, + ): void; + snoopChannelWithId(params: { + channelId: string; + snoopId: string; + spy?: string; + whisper?: string; + app: string; + appArgs?: string; + }): Promise; + dial(params: { channelId: string; caller?: string; timeout?: number }, callback: (err: Error) => void): void; + dial(params: { channelId: string; caller?: string; timeout?: number }): Promise; + rtpstatistics(params: { channelId: string }, callback: (err: Error, rtpstat: RTPstat) => void): void; + rtpstatistics(params: { channelId: string }): Promise; +} +export interface DialplanCEP { + /* Properties */ + context: string; + exten: string; + priority: number; + app_name: string; + app_data: string; +} +export interface CallerID { + /* Properties */ + name: string; + number: string; +} +export interface RTPstat { + /* Properties */ + txcount: number; + rxcount: number; + txjitter?: number; + rxjitter?: number; + remote_maxjitter?: number; + remote_minjitter?: number; + remote_normdevjitter?: number; + remote_stdevjitter?: number; + local_maxjitter?: number; + local_minjitter?: number; + local_normdevjitter?: number; + local_stdevjitter?: number; + txploss: number; + rxploss: number; + remote_maxrxploss?: number; + remote_minrxploss?: number; + remote_normdevrxploss?: number; + remote_stdevrxploss?: number; + local_maxrxploss?: number; + local_minrxploss?: number; + local_normdevrxploss?: number; + local_stdevrxploss?: number; + rtt?: number; + maxrtt?: number; + minrtt?: number; + normdevrtt?: number; + stdevrtt?: number; + local_ssrc: number; + remote_ssrc: number; + txoctetcount: number; + rxoctetcount: number; + channel_uniqueid: string; +} +export interface Channel extends Resource { + /* Properties */ + id: string; + name: string; + state: string; + caller: CallerID; + connected: CallerID; + accountcode: string; + dialplan: DialplanCEP; + creationtime: Date; + language: string; + channelvars?: object; + /* Methods */ + list(callback: (err: Error, channels: Channel[]) => void): void; + list(): Promise; + originate( + params: { + endpoint: string; + extension?: string; + context?: string; + priority?: number; + label?: string; + app?: string; + appArgs?: string; + callerId?: string; + timeout?: number; + variables?: Containers; + otherChannelId?: string; + originator?: string; + formats?: string; + }, + callback: (err: Error, channel: Channel) => void, + ): void; + originate(params: { + endpoint: string; + extension?: string; + context?: string; + priority?: number; + label?: string; + app?: string; + appArgs?: string; + callerId?: string; + timeout?: number; + variables?: Containers; + otherChannelId?: string; + originator?: string; + formats?: string; + }): Promise; + create( + params: { + endpoint: string; + app: string; + appArgs?: string; + otherChannelId?: string; + originator?: string; + formats?: string; + }, + callback: (err: Error, channel: Channel) => void, + ): void; + create(params: { + endpoint: string; + app: string; + appArgs?: string; + otherChannelId?: string; + originator?: string; + formats?: string; + }): Promise; + get(callback: (err: Error, channel: Channel) => void): void; + get(): Promise; + originateWithId( + params: { + endpoint: string; + extension?: string; + context?: string; + priority?: number; + label?: string; + app?: string; + appArgs?: string; + callerId?: string; + timeout?: number; + variables?: Containers; + otherChannelId?: string; + originator?: string; + formats?: string; + }, + callback: (err: Error, channel: Channel) => void, + ): void; + originateWithId(params: { + endpoint: string; + extension?: string; + context?: string; + priority?: number; + label?: string; + app?: string; + appArgs?: string; + callerId?: string; + timeout?: number; + variables?: Containers; + otherChannelId?: string; + originator?: string; + formats?: string; + }): Promise; + hangup(params: { reason?: string }, callback: (err: Error) => void): void; + hangup(callback: (err: Error) => void): void; + hangup(params?: { reason?: string }): Promise; + continueInDialplan( + params: { context?: string; extension?: string; priority?: number; label?: string }, + callback: (err: Error) => void, + ): void; + continueInDialplan(callback: (err: Error) => void): void; + continueInDialplan(params?: { + context?: string; + extension?: string; + priority?: number; + label?: string; + }): Promise; + move(params: { app: string; appArgs?: string }, callback: (err: Error) => void): void; + move(params: { app: string; appArgs?: string }): Promise; + redirect(params: { endpoint: string }, callback: (err: Error) => void): void; + redirect(params: { endpoint: string }): Promise; + answer(callback: (err: Error) => void): void; + answer(): Promise; + ring(callback: (err: Error) => void): void; + ring(): Promise; + ringStop(callback: (err: Error) => void): void; + ringStop(): Promise; + sendDTMF( + params: { dtmf?: string; before?: number; between?: number; duration?: number; after?: number }, + callback: (err: Error) => void, + ): void; + sendDTMF(callback: (err: Error) => void): void; + sendDTMF(params?: { + dtmf?: string; + before?: number; + between?: number; + duration?: number; + after?: number; + }): Promise; + mute(params: { direction?: string }, callback: (err: Error) => void): void; + mute(callback: (err: Error) => void): void; + mute(params?: { direction?: string }): Promise; + unmute(params: { direction?: string }, callback: (err: Error) => void): void; + unmute(callback: (err: Error) => void): void; + unmute(params?: { direction?: string }): Promise; + hold(callback: (err: Error) => void): void; + hold(): Promise; + unhold(callback: (err: Error) => void): void; + unhold(): Promise; + startMoh(params: { mohClass?: string }, callback: (err: Error) => void): void; + startMoh(callback: (err: Error) => void): void; + startMoh(params?: { mohClass?: string }): Promise; + stopMoh(callback: (err: Error) => void): void; + stopMoh(): Promise; + startSilence(callback: (err: Error) => void): void; + startSilence(): Promise; + stopSilence(callback: (err: Error) => void): void; + stopSilence(): Promise; + play( + params: { media: string | string[]; lang?: string; offsetms?: number; skipms?: number; playbackId?: string }, + playback: Playback, + callback: (err: Error, playback: Playback) => void, + ): void; + play( + params: { media: string | string[]; lang?: string; offsetms?: number; skipms?: number; playbackId?: string }, + playback: Playback, + ): Promise; + playWithId( + params: { playbackId: string; media: string | string[]; lang?: string; offsetms?: number; skipms?: number }, + callback: (err: Error, playback: Playback) => void, + ): void; + playWithId(params: { + playbackId: string; + media: string | string[]; + lang?: string; + offsetms?: number; + skipms?: number; + }): Promise; + record( + params: { + name: string; + format: string; + maxDurationSeconds?: number; + maxSilenceSeconds?: number; + ifExists?: string; + beep?: boolean; + terminateOn?: string; + }, + recording: LiveRecording, + callback: (err: Error, liverecording: LiveRecording) => void, + ): void; + record( + params: { + name: string; + format: string; + maxDurationSeconds?: number; + maxSilenceSeconds?: number; + ifExists?: string; + beep?: boolean; + terminateOn?: string; + }, + recording: LiveRecording, + ): Promise; + getChannelVar(params: { variable: string }, callback: (err: Error, variable: Variable) => void): void; + getChannelVar(params: { variable: string }): Promise; + setChannelVar(params: { variable: string; value?: string }, callback: (err: Error) => void): void; + setChannelVar(params: { variable: string; value?: string }): Promise; + snoopChannel( + params: { spy?: string; whisper?: string; app: string; appArgs?: string; snoopId?: string }, + snoopChannel: Channel, + callback: (err: Error, channel: Channel) => void, + ): void; + snoopChannel( + params: { spy?: string; whisper?: string; app: string; appArgs?: string; snoopId?: string }, + snoopChannel: Channel, + ): Promise; + snoopChannelWithId( + params: { snoopId: string; spy?: string; whisper?: string; app: string; appArgs?: string }, + callback: (err: Error, channel: Channel) => void, + ): void; + snoopChannelWithId(params: { + snoopId: string; + spy?: string; + whisper?: string; + app: string; + appArgs?: string; + }): Promise; + dial(params: { caller?: string; timeout?: number }, callback: (err: Error) => void): void; + dial(callback: (err: Error) => void): void; + dial(params?: { caller?: string; timeout?: number }): Promise; + rtpstatistics(callback: (err: Error, rtpstat: RTPstat) => void): void; + rtpstatistics(): Promise; +} +export interface DeviceStates { + /* Methods */ + list(callback: (err: Error, devicestates: DeviceState[]) => void): void; + list(): Promise; + get(params: { deviceName: string }, callback: (err: Error, devicestate: DeviceState) => void): void; + get(params: { deviceName: string }): Promise; + update(params: { deviceName: string; deviceState: string }, callback: (err: Error) => void): void; + update(params: { deviceName: string; deviceState: string }): Promise; + delete(params: { deviceName: string }, callback: (err: Error) => void): void; + delete(params: { deviceName: string }): Promise; +} +export interface DeviceState extends Resource { + /* Properties */ + name: string; + state: string; + /* Methods */ + list(callback: (err: Error, devicestates: DeviceState[]) => void): void; + list(): Promise; + get(callback: (err: Error, devicestate: DeviceState) => void): void; + get(): Promise; + update(params: { deviceState: string }, callback: (err: Error) => void): void; + update(params: { deviceState: string }): Promise; + delete(callback: (err: Error) => void): void; + delete(): Promise; +} +export interface Endpoints { + /* Methods */ + list(callback: (err: Error, endpoints: Endpoint[]) => void): void; + list(): Promise; + sendMessage( + params: { to: string; from: string; body?: string; variables?: Containers }, + callback: (err: Error) => void, + ): void; + sendMessage(params: { to: string; from: string; body?: string; variables?: Containers }): Promise; + listByTech(params: { tech: string }, callback: (err: Error, endpoints: Endpoint[]) => void): void; + listByTech(callback: (err: Error, endpoints: Endpoint[]) => void): void; + listByTech(params?: { tech: string }): Promise; + get(params: { tech: string; resource: string }, callback: (err: Error, endpoint: Endpoint) => void): void; + get(callback: (err: Error, endpoint: Endpoint) => void): void; + get(params?: { tech: string; resource: string }): Promise; + sendMessageToEndpoint( + params: { tech: string; resource: string; from: string; body?: string; variables?: Containers }, + callback: (err: Error) => void, + ): void; + sendMessageToEndpoint(params: { + tech: string; + resource: string; + from: string; + body?: string; + variables?: Containers; + }): Promise; +} +export interface Endpoint extends Resource { + /* Properties */ + technology: string; + resource: string; + state?: string; + channel_ids: string | string[]; + /* Methods */ + list(callback: (err: Error, endpoints: Endpoint[]) => void): void; + list(): Promise; + sendMessage( + params: { to: string; from: string; body?: string; variables?: Containers }, + callback: (err: Error) => void, + ): void; + sendMessage(params: { to: string; from: string; body?: string; variables?: Containers }): Promise; + listByTech(callback: (err: Error, endpoints: Endpoint[]) => void): void; + listByTech(): Promise; + get(callback: (err: Error, endpoint: Endpoint) => void): void; + get(): Promise; + sendMessageToEndpoint( + params: { from: string; body?: string; variables?: Containers }, + callback: (err: Error) => void, + ): void; + sendMessageToEndpoint(params: { from: string; body?: string; variables?: Containers }): Promise; +} +export interface TextMessageVariable { + /* Properties */ + key: string; + value: string; +} +export interface TextMessage { + /* Properties */ + from: string; + to: string; + body: string; + variables?: TextMessageVariable | TextMessageVariable[]; +} +export interface Mailboxes { + /* Methods */ + list(callback: (err: Error, mailboxs: Mailbox[]) => void): void; + list(): Promise; + get(params: { mailboxName: string }, callback: (err: Error, mailbox: Mailbox) => void): void; + get(params: { mailboxName: string }): Promise; + update( + params: { mailboxName: string; oldMessages: number; newMessages: number }, + callback: (err: Error) => void, + ): void; + update(params: { mailboxName: string; oldMessages: number; newMessages: number }): Promise; + delete(params: { mailboxName: string }, callback: (err: Error) => void): void; + delete(params: { mailboxName: string }): Promise; +} +export interface Mailbox extends Resource { + /* Properties */ + name: string; + old_messages: number; + new_messages: number; + /* Methods */ + list(callback: (err: Error, mailboxs: Mailbox[]) => void): void; + list(): Promise; + get(callback: (err: Error, mailbox: Mailbox) => void): void; + get(): Promise; + update(params: { oldMessages: number; newMessages: number }, callback: (err: Error) => void): void; + update(params: { oldMessages: number; newMessages: number }): Promise; + delete(callback: (err: Error) => void): void; + delete(): Promise; +} +export interface Playbacks { + /* Methods */ + get(params: { playbackId: string }, callback: (err: Error, playback: Playback) => void): void; + get(params: { playbackId: string }): Promise; + stop(params: { playbackId: string }, callback: (err: Error) => void): void; + stop(params: { playbackId: string }): Promise; + control(params: { playbackId: string; operation: string }, callback: (err: Error) => void): void; + control(params: { playbackId: string; operation: string }): Promise; +} +export interface Playback extends Resource { + /* Properties */ + id: string; + media_uri: string; + next_media_uri?: string; + target_uri: string; + language: string; + state: string; + /* Methods */ + get(callback: (err: Error, playback: Playback) => void): void; + get(): Promise; + stop(callback: (err: Error) => void): void; + stop(): Promise; + control(params: { operation: string }, callback: (err: Error) => void): void; + control(params: { operation: string }): Promise; +} +export interface Recordings { + /* Methods */ + listStored(callback: (err: Error, storedrecordings: StoredRecording[]) => void): void; + listStored(): Promise; + getStored( + params: { recordingName: string }, + callback: (err: Error, storedrecording: StoredRecording) => void, + ): void; + getStored(params: { recordingName: string }): Promise; + deleteStored(params: { recordingName: string }, callback: (err: Error) => void): void; + deleteStored(params: { recordingName: string }): Promise; + getStoredFile(params: { recordingName: string }, callback: (err: Error, binary: Buffer) => void): void; + getStoredFile(params: { recordingName: string }): Promise; + copyStored( + params: { recordingName: string; destinationRecordingName: string }, + callback: (err: Error, storedrecording: StoredRecording) => void, + ): void; + copyStored(params: { recordingName: string; destinationRecordingName: string }): Promise; + getLive(params: { recordingName: string }, callback: (err: Error, liverecording: LiveRecording) => void): void; + getLive(params: { recordingName: string }): Promise; + cancel(params: { recordingName: string }, callback: (err: Error) => void): void; + cancel(params: { recordingName: string }): Promise; + stop(params: { recordingName: string }, callback: (err: Error) => void): void; + stop(params: { recordingName: string }): Promise; + pause(params: { recordingName: string }, callback: (err: Error) => void): void; + pause(params: { recordingName: string }): Promise; + unpause(params: { recordingName: string }, callback: (err: Error) => void): void; + unpause(params: { recordingName: string }): Promise; + mute(params: { recordingName: string }, callback: (err: Error) => void): void; + mute(params: { recordingName: string }): Promise; + unmute(params: { recordingName: string }, callback: (err: Error) => void): void; + unmute(params: { recordingName: string }): Promise; +} +export interface StoredRecording extends Resource { + /* Properties */ + name: string; + format: string; + /* Methods */ + listStored(callback: (err: Error, storedrecordings: StoredRecording[]) => void): void; + listStored(): Promise; + getStored(callback: (err: Error, storedrecording: StoredRecording) => void): void; + getStored(): Promise; + deleteStored(callback: (err: Error) => void): void; + deleteStored(): Promise; + getStoredFile(callback: (err: Error, binary: Buffer) => void): void; + getStoredFile(): Promise; + copyStored( + params: { destinationRecordingName: string }, + callback: (err: Error, storedrecording: StoredRecording) => void, + ): void; + copyStored(params: { destinationRecordingName: string }): Promise; + getLive(callback: (err: Error, liverecording: LiveRecording) => void): void; + getLive(): Promise; + cancel(callback: (err: Error) => void): void; + cancel(): Promise; + stop(callback: (err: Error) => void): void; + stop(): Promise; + pause(callback: (err: Error) => void): void; + pause(): Promise; + unpause(callback: (err: Error) => void): void; + unpause(): Promise; + mute(callback: (err: Error) => void): void; + mute(): Promise; + unmute(callback: (err: Error) => void): void; + unmute(): Promise; +} +export interface LiveRecording extends Resource { + /* Properties */ + name: string; + format: string; + target_uri: string; + state: string; + duration?: number; + talking_duration?: number; + silence_duration?: number; + cause?: string; + /* Methods */ + listStored(callback: (err: Error, storedrecordings: StoredRecording[]) => void): void; + listStored(): Promise; + getStored(callback: (err: Error, storedrecording: StoredRecording) => void): void; + getStored(): Promise; + deleteStored(callback: (err: Error) => void): void; + deleteStored(): Promise; + getStoredFile(callback: (err: Error, binary: Buffer) => void): void; + getStoredFile(): Promise; + copyStored( + params: { destinationRecordingName: string }, + callback: (err: Error, storedrecording: StoredRecording) => void, + ): void; + copyStored(params: { destinationRecordingName: string }): Promise; + getLive(callback: (err: Error, liverecording: LiveRecording) => void): void; + getLive(): Promise; + cancel(callback: (err: Error) => void): void; + cancel(): Promise; + stop(callback: (err: Error) => void): void; + stop(): Promise; + pause(callback: (err: Error) => void): void; + pause(): Promise; + unpause(callback: (err: Error) => void): void; + unpause(): Promise; + mute(callback: (err: Error) => void): void; + mute(): Promise; + unmute(callback: (err: Error) => void): void; + unmute(): Promise; +} +export interface Sounds { + /* Methods */ + list(params: { lang?: string; format?: string }, callback: (err: Error, sounds: Sound[]) => void): void; + list(callback: (err: Error, sounds: Sound[]) => void): void; + list(params?: { lang?: string; format?: string }): Promise; + get(params: { soundId: string }, callback: (err: Error, sound: Sound) => void): void; + get(params: { soundId: string }): Promise; +} +export interface FormatLangPair { + /* Properties */ + language: string; + format: string; +} +export interface Sound extends Resource { + /* Properties */ + id: string; + text?: string; + formats: FormatLangPair | FormatLangPair[]; + /* Methods */ + list(params: { lang?: string; format?: string }, callback: (err: Error, sounds: Sound[]) => void): void; + list(callback: (err: Error, sounds: Sound[]) => void): void; + list(params?: { lang?: string; format?: string }): Promise; + get(callback: (err: Error, sound: Sound) => void): void; + get(): Promise; +} diff --git a/types/ari-client/test/bridge.ts b/types/ari-client/test/bridge.ts new file mode 100644 index 0000000000..aebc722e67 --- /dev/null +++ b/types/ari-client/test/bridge.ts @@ -0,0 +1,56 @@ +import Ari, { Channel, Bridge, ChannelLeftBridge } from 'ari-client'; + +// TypeScript version of example published on project https://github.com/asterisk/node-ari-client. + +Ari.connect( + 'http://ari.js:8088', + 'user', + 'secret', + + (err, client) => { + // use once to start the application + client.on('StasisStart', (event, incoming) => { + incoming.answer(err => { + getOrCreateBridge(incoming); + }); + }); + + const getOrCreateBridge = (channel: Channel) => { + client.bridges.list((err: Error, bridges: Bridge[]) => { + let bridge = bridges.filter((candidate: Bridge) => { + return candidate['bridge_type'] === 'holding'; + })[0]; + + if (!bridge) { + bridge = client.Bridge(); + bridge.create({ type: 'holding' }, (err: Error, bridge: Bridge) => { + bridge.on('ChannelLeftBridge', (event, instances) => { + cleanupBridge(event, instances, bridge); + }); + joinHoldingBridgeAndPlayMoh(bridge, channel); + }); + } else { + // Add incoming channel to existing holding bridge and play + // music on hold + joinHoldingBridgeAndPlayMoh(bridge, channel); + } + }); + }; + + const cleanupBridge = (event: ChannelLeftBridge, instances: ChannelLeftBridge, bridge: Bridge) => { + const holdingBridge = instances.bridge; + if (holdingBridge.channels.length === 0 && holdingBridge.id === bridge.id) { + bridge.destroy(err => {}); + } + }; + + const joinHoldingBridgeAndPlayMoh = (bridge: Bridge, channel: Channel) => { + bridge.addChannel({ channel: channel.id }, err => { + channel.startMoh(err => {}); + }); + }; + + // can also use client.start(['app-name'...]) to start multiple applications + client.start('bridge-example'); + }, +); diff --git a/types/ari-client/test/bridgeAsyncAwait.ts b/types/ari-client/test/bridgeAsyncAwait.ts new file mode 100644 index 0000000000..2515d3490f --- /dev/null +++ b/types/ari-client/test/bridgeAsyncAwait.ts @@ -0,0 +1,50 @@ +import Ari, { Channel, Bridge } from 'ari-client'; + +// async/await version of the example published on project https://github.com/asterisk/node-ari-client. + +export default async () => { + try { + const client = await Ari.connect('http://ari.js:8088', 'user', 'secret'); + + client.on('StasisStart', async (event, incoming) => { + await incoming.answer(); + const bridge = await getOrCreateBridge(); + await joinHoldingBridgeAndPlayMoh(bridge, incoming); + }); + + const getOrCreateBridge = async () => { + const bridges = await client.bridges.list(); + let bridge = bridges.filter(candidate => { + return candidate['bridge_type'] === 'holding'; + })[0]; + + if (!bridge) { + bridge = client.Bridge(); + return bridge.create({ type: 'holding' }); + } else { + // Add incoming channel to existing holding bridge and play + // music on hold + return bridge; + } + }; + + const joinHoldingBridgeAndPlayMoh = async (bridge: Bridge, channel: Channel) => { + bridge.on('ChannelLeftBridge', async (event, instances) => { + const holdingBridge = instances.bridge; + if (holdingBridge.channels.length === 0 && holdingBridge.id === bridge.id) { + try { + await bridge.destroy(); + } catch (err) { + console.error(err); + } + } + }); + await bridge.addChannel({ channel: channel.id }); + await channel.startMoh(); + }; + + client.start('bridge-example'); + } catch (err) { + console.error(err); + } +}; diff --git a/types/ari-client/test/deviceState.ts b/types/ari-client/test/deviceState.ts new file mode 100644 index 0000000000..a4d6bdced1 --- /dev/null +++ b/types/ari-client/test/deviceState.ts @@ -0,0 +1,56 @@ +import Ari from 'ari-client'; +import util = require('util'); + +// TypeScript version of example published on project https://github.com/asterisk/node-ari-client. + +const BRIDGE_STATE = 'device-state-example'; + +// replace ari.js with your Asterisk instance +Ari.connect('http://ari.js:8088', 'user', 'secret', (err, client) => { + const bridge = client.Bridge(); + // Keep track of bridge state at the application level so we don't have to + // make extra calls to ARI + let currentBridgeState = 'NOT_INUSE'; + + bridge.create({ type: 'mixing' }, (err, instance) => { + // Mark this bridge as available + const opts = { + deviceName: util.format('Stasis:%s', BRIDGE_STATE), + deviceState: 'NOT_INUSE', + }; + client.deviceStates.update(opts, err => {}); + }); + + client.on('ChannelEnteredBridge', (event, objects) => { + if (objects.bridge.channels.length > 0 && currentBridgeState !== 'BUSY') { + // Mark this bridge as busy + const opts = { + deviceName: util.format('Stasis:%s', BRIDGE_STATE), + deviceState: 'BUSY', + }; + client.deviceStates.update(opts, err => {}); + currentBridgeState = 'BUSY'; + } + }); + + client.on('ChannelLeftBridge', (event, objects) => { + if (objects.bridge.channels.length === 0 && currentBridgeState !== 'NOT_INUSE') { + // Mark this bridge as available + const opts = { + deviceName: util.format('Stasis:%s', BRIDGE_STATE), + deviceState: 'NOT_INUSE', + }; + client.deviceStates.update(opts, err => {}); + currentBridgeState = 'NOT_INUSE'; + } + }); + + client.on('StasisStart', (event, incoming) => { + incoming.answer(err => { + bridge.addChannel({ channel: incoming.id }, err => {}); + }); + }); + + // can also use client.start(['app-name'...]) to start multiple applications + client.start('device-state-example'); +}); diff --git a/types/ari-client/test/deviceStateAsyncAwait.ts b/types/ari-client/test/deviceStateAsyncAwait.ts new file mode 100644 index 0000000000..2a9eebd326 --- /dev/null +++ b/types/ari-client/test/deviceStateAsyncAwait.ts @@ -0,0 +1,72 @@ +import Ari from 'ari-client'; +import util = require('util'); + +// async/await version of the example published on project https://github.com/asterisk/node-ari-client. + +export default async () => { + const BRIDGE_STATE = 'device-state-example'; + + try { + const client = await Ari.connect('http://ari.js:8088', 'user', 'secret'); + + const bridge = client.Bridge(); + // Keep track of bridge state at the application level so we don't have to + // make extra calls to ARI + let currentBridgeState = 'NOT_INUSE'; + + const instance = await bridge.create({ type: 'mixing' }); + + // Mark this bridge as available + const opts = { + deviceName: util.format('Stasis:%s', BRIDGE_STATE), + deviceState: 'NOT_INUSE', + }; + await client.deviceStates.update(opts); + + client.on('ChannelEnteredBridge', async (event, objects) => { + if (objects.bridge.channels.length > 0 && currentBridgeState !== 'BUSY') { + // Mark this bridge as busy + const opts = { + deviceName: util.format('Stasis:%s', BRIDGE_STATE), + deviceState: 'BUSY', + }; + try { + await client.deviceStates.update(opts); + currentBridgeState = 'BUSY'; + } catch (err) { + console.error(err); + } + } + }); + + client.on('ChannelLeftBridge', async (event, objects) => { + if (objects.bridge.channels.length === 0 && currentBridgeState !== 'NOT_INUSE') { + // Mark this bridge as available + const opts = { + deviceName: util.format('Stasis:%s', BRIDGE_STATE), + deviceState: 'NOT_INUSE', + }; + try { + await client.deviceStates.update(opts); + currentBridgeState = 'NOT_INUSE'; + } catch (err) { + console.error(err); + } + } + }); + + client.on('StasisStart', async (event, incoming) => { + try { + await incoming.answer(); + await bridge.addChannel({ channel: incoming.id }); + } catch (err) { + console.error(err); + } + }); + + // can also use client.start(['app-name'...]) to start multiple applications + client.start('device-state-example'); + } catch (err) { + console.error(err); + } +}; diff --git a/types/ari-client/test/example.ts b/types/ari-client/test/example.ts new file mode 100644 index 0000000000..f2658195dd --- /dev/null +++ b/types/ari-client/test/example.ts @@ -0,0 +1,50 @@ +import Ari, { Channel } from 'ari-client'; +import util = require('util'); + +// TypeScript version of example published on project https://github.com/asterisk/node-ari-client. + +// replace ari.js with your Asterisk instance +Ari.connect('http://ari.js:8088', 'user', 'secret', (err, client) => { + if (err) { + throw err; // program will crash if it fails to connect + } + + // Use once to start the application + client.on('StasisStart', (event, incoming) => { + // Handle DTMF events + incoming.on('ChannelDtmfReceived', (event, channel) => { + const digit = event.digit; + switch (digit) { + case '#': + play(channel, 'sound:vm-goodbye', err => { + channel.hangup(err => { + process.exit(0); + }); + }); + break; + case '*': + play(channel, 'sound:tt-monkeys'); + break; + default: + play(channel, util.format('sound:digits/%s', digit)); + } + }); + + incoming.answer(err => { + play(incoming, 'sound:hello-world'); + }); + }); + + const play = (channel: Channel, sound: string, callback?: (param: any) => void) => { + const playback = client.Playback(); + playback.once('PlaybackFinished', (event, instance) => { + if (callback) { + callback(null); + } + }); + channel.play({ media: sound }, playback, (err, playback) => {}); + }; + + // can also use client.start(['app-name'...]) to start multiple applications + client.start('example'); +}); diff --git a/types/ari-client/test/exampleAsyncAwait.ts b/types/ari-client/test/exampleAsyncAwait.ts new file mode 100644 index 0000000000..d32d5a3bbb --- /dev/null +++ b/types/ari-client/test/exampleAsyncAwait.ts @@ -0,0 +1,52 @@ +import Ari, { Channel } from 'ari-client'; +import util = require('util'); + +// async/await version of the example published on project https://github.com/asterisk/node-ari-client. + +export default async () => { + try { + const client = await Ari.connect('http://ari.js:8088', 'user', 'secret'); + + // Use once to start the application + client.on('StasisStart', async (event, incoming) => { + // Handle DTMF events + incoming.on('ChannelDtmfReceived', async (event, channel) => { + const digit = event.digit; + switch (digit) { + case '#': + await play(channel, 'sound:vm-goodbye'); + await channel.hangup(); + process.exit(0); + break; + case '*': + await play(channel, 'sound:tt-monkeys'); + break; + default: + await play(channel, util.format('sound:digits/%s', digit)); + } + }); + + await incoming.answer(); + await play(incoming, 'sound:hello-world'); + }); + + const play = (channel: Channel, sound: string) => { + const playback = client.Playback(); + + return new Promise((resolve, reject) => { + playback.once('PlaybackFinished', (event, playback) => { + resolve(playback); + }); + + channel.play({ media: sound }, playback).catch(err => { + reject(err); + }); + }); + }; + + // can also use client.start(['app-name'...]) to start multiple applications + client.start('example'); + } catch (err) { + console.error(err); + } +}; diff --git a/types/ari-client/test/mwi.ts b/types/ari-client/test/mwi.ts new file mode 100644 index 0000000000..5400a67c64 --- /dev/null +++ b/types/ari-client/test/mwi.ts @@ -0,0 +1,101 @@ +import Ari from 'ari-client'; +import util = require('util'); + +// TypeScript version of example published on project https://github.com/asterisk/node-ari-client. + +// replace ari.js with your Asterisk instance +Ari.connect('http://ari.js:8088', 'user', 'secret', (err, client) => { + // Create new mailbox + const mailbox = client.Mailbox('mwi-example'); + let messages = 0; + + client.on( + 'StasisStart', + + (event, channel) => { + channel.on('ChannelDtmfReceived', (event, channel) => { + const digit = event.digit; + switch (digit) { + case '5': + // Record message + const recording = client.LiveRecording(); + + recording.once('RecordingFinished', (event, newRecording) => { + const playback = client.Playback(); + playback.once('PlaybackFinished', (event, newPlayback) => { + // Update MWI + messages += 1; + const opts = { + oldMessages: 0, + newMessages: messages, + }; + mailbox.update(opts, err => {}); + + channel.hangup(err => {}); + }); + + channel.play({ media: 'sound:vm-msgsaved' }, playback, err => {}); + }); + + const opts = { + name: channel.id, // name parameter is required. See channels.json fixture file. + format: 'wav', + maxSilenceSeconds: 2, + beep: true, + }; + + // Record a message + channel.record(opts, recording, err => {}); + break; + case '6': + // Playback last message + client.recordings.listStored((err, recordings) => { + const playback = client.Playback(); + const recording = recordings[recordings.length - 1]; + + if (!recording) { + channel.play({ media: 'sound:vm-nomore' }, playback, err => {}); + } else { + playback.once('PlaybackFinished', (event, newPlayback) => { + recording.deleteStored(err => { + // Remove MWI + messages -= 1; + const opts = { + oldMessages: 0, + newMessages: messages, + }; + mailbox.update(opts, err => {}); + + const playback = client.Playback(); + channel.play({ media: 'sound:vm-next' }, playback, err => {}); + }); + }); + + const opts = { + media: util.format('recording:%s', recording.name), + }; + + // Play the latest message + channel.play(opts, playback, err => {}); + } + }); + break; + } + }); + + channel.answer(err => { + let playback = client.Playback(); + + playback.once('PlaybackFinished', (err, newPlayback) => { + playback = client.Playback(); + channel.play({ media: 'sound:vm-next' }, playback, err => {}); + }); + + channel.play({ media: 'sound:vm-leavemsg' }, playback, err => {}); + }); + }, + ); + + // can also use client.start(['app-name'...]) to start multiple applications + client.start('mwi-example'); +}); diff --git a/types/ari-client/test/mwiAsyncAwait.ts b/types/ari-client/test/mwiAsyncAwait.ts new file mode 100644 index 0000000000..c6b80bb842 --- /dev/null +++ b/types/ari-client/test/mwiAsyncAwait.ts @@ -0,0 +1,99 @@ +import Ari from 'ari-client'; +import util = require('util'); + +// async/await version of the example published on project https://github.com/asterisk/node-ari-client. + +export default async () => { + try { + const client = await Ari.connect('http://ari.js:8088', 'user', 'secret'); + + // Create new mailbox + const mailbox = client.Mailbox('mwi-example'); + let messages = 0; + + client.on('StasisStart', async (event, channel) => { + channel.on('ChannelDtmfReceived', async (event, channel) => { + const digit = event.digit; + switch (digit) { + case '5': + // Record message + const message = client.LiveRecording(); + + message.once('RecordingFinished', async (event, newRecording) => { + const playback = client.Playback(); + playback.once('PlaybackFinished', async (event, newPlayback) => { + // Update MWI + messages += 1; + const opts = { + oldMessages: 0, + newMessages: messages, + }; + await mailbox.update(opts); + await channel.hangup(); + }); + + await channel.play({ media: 'sound:vm-msgsaved' }, playback); + }); + + const messageOptions = { + name: channel.id, // name parameter is required. See channels.json fixture file. + format: 'wav', + maxSilenceSeconds: 2, + beep: true, + }; + + // Record a message + await channel.record(messageOptions, message); + break; + case '6': + // Playback last message + const recordings = await client.recordings.listStored(); + + const playback = client.Playback(); + const lastMessage = recordings[recordings.length - 1]; + + if (!lastMessage) return channel.play({ media: 'sound:vm-nomore' }, playback); + + playback.once('PlaybackFinished', async (event, newPlayback) => { + await lastMessage.deleteStored(); + + // Remove MWI + messages -= 1; + const opts = { + oldMessages: 0, + newMessages: messages, + }; + await mailbox.update(opts); + + const playback = client.Playback(); + await channel.play({ media: 'sound:vm-next' }, playback); + }); + + const lastMessageOptions = { + media: util.format('recording:%s', lastMessage.name), + }; + + // Play the latest message + await channel.play(lastMessageOptions, playback); + + break; + } + }); + + await channel.answer(); + let playback = client.Playback(); + + playback.once('PlaybackFinished', async (err, newPlayback) => { + playback = client.Playback(); + await channel.play({ media: 'sound:vm-next' }, playback); + }); + + await channel.play({ media: 'sound:vm-leavemsg' }, playback); + }); + + // can also use client.start(['app-name'...]) to start multiple applications + client.start('mwi-example'); + } catch (err) { + console.error(err); + } +}; diff --git a/types/ari-client/test/originate.ts b/types/ari-client/test/originate.ts new file mode 100644 index 0000000000..7e6c7b32b9 --- /dev/null +++ b/types/ari-client/test/originate.ts @@ -0,0 +1,55 @@ +import Ari, { Channel, Containers } from 'ari-client'; + +// TypeScript version of example published on project https://github.com/asterisk/node-ari-client. + +const ENDPOINT = 'PJSIP/sipphone'; + +// replace ari.js with your Asterisk instance +Ari.connect('http://ari.js:8088', 'user', 'secret', (err, client) => { + // Use once to start the application to ensure this listener will only run + // for the incoming channel + client.once('StasisStart', (event, incoming) => { + incoming.answer(err => { + originate(incoming); + }); + }); + + const originate = (incoming: Channel) => { + incoming.once('StasisEnd', (event, channel) => { + outgoing.hangup(err => {}); + }); + + const outgoing = client.Channel(); + + outgoing.once('ChannelDestroyed', (event, channel) => { + incoming.hangup(err => {}); + }); + + outgoing.once('StasisStart', (event, outgoing) => { + const bridge = client.Bridge(); + + outgoing.once('StasisEnd', (event, channel) => { + bridge.destroy(err => {}); + }); + + outgoing.answer(err => { + bridge.create({ type: 'mixing' }, (err, bridge) => { + bridge.addChannel({ channel: [incoming.id, outgoing.id] }, err => {}); + }); + }); + }); + + const playback = client.Playback(); + incoming.play({ media: 'sound:vm-dialout' }, playback, err => {}); + + // Originate call from incoming channel to endpoint + const variables: Containers = { 'CALLERID(name)': 'Alice', name: 'test' }; + outgoing.originate( + { endpoint: ENDPOINT, app: 'originate-example', appArgs: 'dialed', variables }, + (err, channel) => {}, + ); + }; + + // can also use client.start(['app-name'...]) to start multiple applications + client.start('originate-example'); +}); diff --git a/types/ari-client/test/originateAsyncAwait.ts b/types/ari-client/test/originateAsyncAwait.ts new file mode 100644 index 0000000000..3812493935 --- /dev/null +++ b/types/ari-client/test/originateAsyncAwait.ts @@ -0,0 +1,55 @@ +import Ari, { Channel } from 'ari-client'; + +// async/await version of the example published on project https://github.com/asterisk/node-ari-client. + +export default async () => { + try { + const client = await Ari.connect('http://ari.js:8088', 'user', 'secret'); + const ENDPOINT = 'PJSIP/sipphone'; + + // Use once to start the application to ensure this listener will only run + // for the incoming channel + client.once('StasisStart', async (event, incoming) => { + await incoming.answer(); + originate(incoming); + }); + + const originate = async (incoming: Channel) => { + incoming.once('StasisEnd', async (event, channel) => { + await outgoing.hangup(); + }); + + const outgoing = client.Channel(); + + outgoing.once('ChannelDestroyed', async (event, channel) => { + await incoming.hangup(); + }); + + outgoing.once('StasisStart', async (event, outgoing) => { + const bridge = client.Bridge(); + + outgoing.once('StasisEnd', async (event, channel) => { + await bridge.destroy(); + }); + + await outgoing.answer(); + const mixingBridge = await bridge.create({ type: 'mixing' }); + await mixingBridge.addChannel({ channel: [incoming.id, outgoing.id] }); + }); + + const playback = client.Playback(); + await incoming.play({ media: 'sound:vm-dialout' }, playback); + + // Originate call from incoming channel to endpoint + await outgoing.originate({ + endpoint: ENDPOINT, + app: 'originate-example', + appArgs: 'dialed', + }); + }; + + client.start('originate-example'); + } catch (err) { + console.error(err); + } +}; diff --git a/types/ari-client/test/playback.ts b/types/ari-client/test/playback.ts new file mode 100644 index 0000000000..e5e11a72a3 --- /dev/null +++ b/types/ari-client/test/playback.ts @@ -0,0 +1,54 @@ +import Ari, { Channel, Playback } from 'ari-client'; +import util = require('util'); + +// TypeScript version of example published on project https://github.com/asterisk/node-ari-client. + +// replace ari.js with your Asterisk instance +Ari.connect('http://ari.js:8088', 'user', 'secret', (err, client) => { + // Use once to start the application + client.once('StasisStart', (event, incoming) => { + incoming.answer(err => { + const playback = client.Playback(); + + // Play demo greeting and register dtmf event listeners + incoming.play({ media: 'sound:demo-congrats' }, playback, (err, playback) => { + registerDtmfListeners(err, playback, incoming); + }); + }); + }); + + const registerDtmfListeners = (err: Error, playback: Playback, incoming: Channel) => { + incoming.on('ChannelDtmfReceived', (event, channel) => { + const digit = event.digit; + + switch (digit) { + case '5': + playback.control({ operation: 'pause' }, err => {}); + break; + case '8': + playback.control({ operation: 'unpause' }, err => {}); + break; + case '4': + playback.control({ operation: 'reverse' }, err => {}); + break; + case '6': + playback.control({ operation: 'forward' }, err => {}); + break; + case '2': + playback.control({ operation: 'restart' }, err => {}); + break; + case '#': + playback.control({ operation: 'stop' }, err => {}); + incoming.hangup(err => { + process.exit(0); + }); + break; + default: + console.error(util.format('Unknown DTMF %s', digit)); + } + }); + }; + + // can also use client.start(['app-name'...]) to start multiple applications + client.start('playback-example'); +}); diff --git a/types/ari-client/test/playbackAsyncAwait.ts b/types/ari-client/test/playbackAsyncAwait.ts new file mode 100644 index 0000000000..9185773b9f --- /dev/null +++ b/types/ari-client/test/playbackAsyncAwait.ts @@ -0,0 +1,52 @@ +import Ari, { Channel, Playback } from 'ari-client'; +import util = require('util'); + +// async/await version of the example published on project https://github.com/asterisk/node-ari-client. + +export default async () => { + try { + const client = await Ari.connect('http://ari.js:8088', 'user', 'secret'); + + // Use once to start the application + client.once('StasisStart', async (event, incoming) => { + await incoming.answer(); + const playback = client.Playback(); + // Play demo greeting and register dtmf event listeners + const newPlayback = await incoming.play({ media: 'sound:demo-congrats' }, playback); + registerDtmfListeners(newPlayback, incoming); + }); + + const registerDtmfListeners = (playback: Playback, incoming: Channel) => { + incoming.on('ChannelDtmfReceived', async (event, channel) => { + const digit = event.digit; + switch (digit) { + case '5': + await playback.control({ operation: 'pause' }); + break; + case '8': + await playback.control({ operation: 'unpause' }); + break; + case '4': + await playback.control({ operation: 'reverse' }); + break; + case '6': + await playback.control({ operation: 'forward' }); + break; + case '2': + await playback.control({ operation: 'restart' }); + break; + case '#': + await playback.control({ operation: 'stop' }); + await incoming.hangup(); + process.exit(0); + default: + console.error(util.format('Unknown DTMF %s', digit)); + } + }); + }; + + client.start('playback-example'); + } catch (err) { + console.error(err); + } +}; diff --git a/types/ari-client/tsconfig.json b/types/ari-client/tsconfig.json new file mode 100644 index 0000000000..448c454b08 --- /dev/null +++ b/types/ari-client/tsconfig.json @@ -0,0 +1,35 @@ +{ + "files": [ + "index.d.ts", + "test/bridge.ts", + "test/bridgeAsyncAwait.ts", + "test/deviceState.ts", + "test/deviceStateAsyncAwait.ts", + "test/example.ts", + "test/exampleAsyncAwait.ts", + "test/mwi.ts", + "test/mwiAsyncAwait.ts", + "test/originate.ts", + "test/originateAsyncAwait.ts", + "test/playback.ts", + "test/playbackAsyncAwait.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "esModuleInterop": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/types/cloudevents-sdk/tslint.json b/types/ari-client/tslint.json similarity index 92% rename from types/cloudevents-sdk/tslint.json rename to types/ari-client/tslint.json index 6746359dda..f93cf8562a 100644 --- a/types/cloudevents-sdk/tslint.json +++ b/types/ari-client/tslint.json @@ -1,3 +1,3 @@ -{ +{ "extends": "dtslint/dt.json" } diff --git a/types/async-lock/async-lock-tests.ts b/types/async-lock/async-lock-tests.ts index 9e8920ca4b..2fa46b69f7 100644 --- a/types/async-lock/async-lock-tests.ts +++ b/types/async-lock/async-lock-tests.ts @@ -27,3 +27,4 @@ lock.isBusy('key'); const lock2 = new AsyncLock({ timeout : 5000 }); const lock3 = new AsyncLock({ maxPending : 5000 }); const lock4 = new AsyncLock({ Promise: null }); +const lock5 = new AsyncLock({ skipQueue: true }); diff --git a/types/async-lock/index.d.ts b/types/async-lock/index.d.ts index 3c358c744c..c1ff7b4bc7 100644 --- a/types/async-lock/index.d.ts +++ b/types/async-lock/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Elisée MAURER // Alejandro // Anatoly +// Humulus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -13,6 +14,7 @@ interface AsyncLockOptions { maxPending?: number; domainReentrant?: boolean; Promise?: any; + skipQueue?: boolean; } declare class AsyncLock { diff --git a/types/async/index.d.ts b/types/async/index.d.ts index adc37e01b9..be9382bee8 100644 --- a/types/async/index.d.ts +++ b/types/async/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Async 3.0 +// Type definitions for Async 3.2 // Project: https://github.com/caolan/async, https://caolan.github.io/async // Definitions by: Boris Yankov // Arseniy Maximov @@ -8,6 +8,7 @@ // Dmitri Trofimov // Etienne Rossignon // Lifeng Zhu +// Tümay Çeber // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -199,14 +200,21 @@ export const concatSeries: typeof concat; // Control Flow export function series(tasks: Array>, callback?: AsyncResultArrayCallback): void; export function series(tasks: Dictionary>, callback?: AsyncResultObjectCallback): void; +export function series(tasks: Array> | Dictionary>): Promise; export function parallel(tasks: Array>, callback?: AsyncResultArrayCallback): void; export function parallel(tasks: Dictionary>, callback?: AsyncResultObjectCallback): void; +export function parallel(tasks: Array> | Dictionary>): Promise; export function parallelLimit(tasks: Array>, limit: number, callback?: AsyncResultArrayCallback): void; export function parallelLimit(tasks: Dictionary>, limit: number, callback?: AsyncResultObjectCallback): void; +export function parallelLimit(tasks: Array> | Dictionary>, limit: number): Promise; export function whilst(test: () => boolean, fn: AsyncVoidFunction, callback: ErrorCallback): void; +export function whilst(test: () => boolean, fn: AsyncVoidFunction): Promise; export function doWhilst(fn: AsyncFunctionEx, test: (...results: T[]) => boolean, callback: ErrorCallback): void; +export function doWhilst(fn: AsyncFunctionEx, test: (...results: T[]) => boolean): Promise; export function until(test: () => boolean, fn: AsyncVoidFunction, callback: ErrorCallback): void; +export function until(test: () => boolean, fn: AsyncVoidFunction): Promise; export function doUntil(fn: AsyncFunctionEx, test: (...results: T[]) => boolean, callback: ErrorCallback): void; +export function doUntil(fn: AsyncFunctionEx, test: (...results: T[]) => boolean): Promise; export function during(test: (testCallback: AsyncBooleanResultCallback) => void, fn: AsyncVoidFunction, callback: ErrorCallback): void; export function doDuring(fn: AsyncVoidFunction, test: (testCallback: AsyncBooleanResultCallback) => void, callback: ErrorCallback): void; export function forever(next: (next: ErrorCallback) => void, errBack: ErrorCallback): void; diff --git a/types/atom/OTHER_FILES.txt b/types/atom/OTHER_FILES.txt index 459cc5a6db..8fc352b4c1 100644 --- a/types/atom/OTHER_FILES.txt +++ b/types/atom/OTHER_FILES.txt @@ -3,4 +3,6 @@ autocomplete-plus/index.d.ts linter/config.d.ts linter/index.d.ts status-bar/config.d.ts -status-bar/index.d.ts \ No newline at end of file +status-bar/index.d.ts +tool-bar/config.d.ts +tool-bar/index.d.ts diff --git a/types/atom/index.d.ts b/types/atom/index.d.ts index d71d6b7633..65c54c483b 100644 --- a/types/atom/index.d.ts +++ b/types/atom/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: GlenCFL // smhxx // lierdakil +// aminya // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/atom/tool-bar/config.d.ts b/types/atom/tool-bar/config.d.ts new file mode 100644 index 0000000000..85c56107ca --- /dev/null +++ b/types/atom/tool-bar/config.d.ts @@ -0,0 +1,28 @@ +import "../index" + +declare module "atom" { + interface ConfigValues { + /** Make tool-bar visible. - default: true */ + "tool-bar.visible": boolean + + /** Icon size. - default: "24px" */ + "tool-bar.iconSize": + | "12px" + | "14px" + | "16px" + | "18px" + | "21px" + | "24px" + | "28px" + | "32px" + + /** Position of tool-bar. - default: "Top" */ + "tool-bar.position": "Top" | "Right" | "Bottom" | "Left" + + /** Fit the tool-bar to the window's full-width. - default: true */ + "tool-bar.fullWidth": boolean + + /** On MacOS, show seven first tool-bar buttons in the TouchBar. - default: true */ + "tool-bar.useTouchBar": string + } +} diff --git a/types/atom/tool-bar/index.d.ts b/types/atom/tool-bar/index.d.ts new file mode 100644 index 0000000000..923df3e415 --- /dev/null +++ b/types/atom/tool-bar/index.d.ts @@ -0,0 +1,233 @@ +// tool-bar 1.2.x +// https://atom.io/packages/tool-bar +// Definitions by: aminya + +/// + +import {TooltipPlacement, Disposable} from "../index"; + +export declare interface ButtonOptions { + /** (optional) + * icon name + * ## Example: + * ```js + * icon: 'octoface', + * ``` + */ + icon?: string; + + /** (optional) + * icon set name. + * It can be chosen among these: + * - not given : if `iconset` is not given Octicons (default Atom's flavour) is chosen + * - `ion` with `ios-` and `md- `prefixes for the icon names (Ionicons) + * - `fa` and fab for brands (FontAwesome) + * - `fi` (Foundation) + * - `icomoon` (IcoMoon) + * - `devicon` (Devicon) + * - `mdi` (MaterialDesignIcons) + * + * ## Example: + * ```ts + * icon: 'ios-gear-a', + * iconset: 'ion' + * ``` + */ + iconset?: + | undefined + | "ion" + | "fa" + | "fab" + | "fi" + | "icomoon" + | "devicon" + | "mdi"; + + /** (optional) + * You can use `text` to: + * - add text as a button, or + * + * ## Example: + * ```ts + * text: 'hello', + * ``` + * - use HTML for a button. Needs `html` to be set to `true` + * + * ## Example: + * ```ts + * text: 'BIG button', + * html: true, + * ``` + */ + text?: string; + + /** (optional) + * if set to `true`, `text` will be rendered as HTML + * ## Example: + * ```ts + * text: 'BIG button', + * html: true, + * ``` + */ + html?: boolean; + + /** (mandatory) + + * The callback must be either: + * - Atom command: a string or array of strings, + * - a custom callback function, + * - or an object where the keys are key modifiers (alt, ctrl or shift) and the values are commands or custom functions + * + * ## Example: + * ```ts + * callback: 'application:about', + * ``` + * + * + * ## Example - Callback with modifiers + * ```ts + * callback: { + * '': 'application:cmd-1', // Without modifiers is default action + * 'alt': 'application:cmd-2', + * 'ctrl': 'application:cmd-3', // With function callback + * 'shift'(data) { + * console.log(data); + * }, + * 'alt+shift': 'application:cmd-5', // Multiple modifiers + * 'alt+ctrl+shift': 'application:cmd-6' // All modifiers + * }, + * data: 'foo' + * ``` + */ + callback: + | string + | Array + | ((data?: any) => void) + | { [modifier: string]: string } + | { [modifier: string]: (data?: any) => void }; + + /** `data` can be passed as the input argument of callback, If callback is of type + * - `(data: any) => void)` or + * - `{ [modifier: string]: ((data: any) => void) }`, + * + */ + data?: any; + + /** (optional) defaults to `50` */ + priority?: number; + + /** (optional) + * The tooltip option may be a string or an object that is passed to Atom's TooltipManager + */ + tooltip?: + | string // minimally sets title + // similar to what TooltipManager.add options accepts: + | { item?: object } + | ({ + title?: string | (() => string); + html?: boolean; + keyBindingCommand?: string; + keyBindingTarget?: HTMLElement; + } & { + class?: string; + placement?: TooltipPlacement | (() => TooltipPlacement); + trigger?: "click" | "hover" | "focus" | "manual"; + delay?: { show: number; hide: number }; + }); + + /** (optional) Color of the button */ + color?: string; + + /** (optional) Color of the button's background */ + background?: string; + + /** Buttons can be styled with arbitrary CSS through classes. + * An example of how the class can be used is show below. + * + * ## Example: + * ```ts + * class: 'my-awesome-class' + * ``` + * + * ## Example: + * ```ts + * class: ['multiple', 'classes', 'also', 'works'] + * ``` + */ + class?: string | Array; +} + +export declare interface SpacerOptions { + /** (optional) defaults to `50` */ + priority?: number; +} + +declare interface ToolBarButtonView { + element: HTMLButtonElement; + subscriptions: Disposable; + priority: number; + options: ButtonOptions; + group: string; + enabled: boolean; + + setEnabled(enabled: boolean): void; + + setSelected(selected: boolean): void; + + getSelected(): boolean; + + _onMouseDown(event: MouseEvent): void; + + _onClick(event: MouseEvent): void; + + executeCallback(event: MouseEvent): void; + + destroy(): void; +} + +declare interface ToolBarSpacerView { + element: HTMLHRElement; + priority: number; + group: string; + + destroy(): void; +} + +export declare interface ToolBarManager { + /** Adds a button. The input to this function is a `ButtonOptions` object */ + addButton(options: ButtonOptions): ToolBarButtonView; + + /** Adds a spacer. Optionally, you can pass a `SpacerOptions` object */ + addSpacer(options?: SpacerOptions): ToolBarSpacerView; + + /** Use the method removeItems to remove the buttons added by your package. This is particular useful in your package deactivate method, but can be used at any time. + */ + removeItems(): void; + + /** The onDidDestroy method takes a function that will be called when the tool-bar package is destroyed. This is useful if your package needs to do cleanup when the tool-bar is deactivated but your package continues running. + */ + onDidDestroy(callback: () => void): void; +} + +/** + * Passed as an input to `consumeToolBar(getToolBar: getToolBarManager)` function of your package. + * + * In your main package file, add the following methods and replace your-package-name with your package name. + * ```ts + * let toolBar: ToolBarManager + * + * export function consumeToolBar(getToolBar: getToolBarManager) { + * toolBar = getToolBar("packageName"); + * // Add buttons and spacers here... + * } + * + * + * export function deactivate() { + * if (toolBar) { + * toolBar.removeItems(); + * toolBar = null; + * } + * } + * ``` + */ +export type getToolBarManager = (packageName: string) => ToolBarManager; diff --git a/types/auth0-lock/index.d.ts b/types/auth0-lock/index.d.ts index 21f269bf08..6ada2b2a42 100644 --- a/types/auth0-lock/index.d.ts +++ b/types/auth0-lock/index.d.ts @@ -86,7 +86,7 @@ interface Auth0LockThemeOptions { // https://auth0.com/docs/libraries/lock/v10/sending-authentication-parameters interface Auth0LockAuthParamsOptions { access_token?: any; - connection_scopes?: any; + connection_scope?: any; device?: any; nonce?: any; protocol?: any; diff --git a/types/auth0/auth0-tests.ts b/types/auth0/auth0-tests.ts index 75b838f55e..0dde686a87 100644 --- a/types/auth0/auth0-tests.ts +++ b/types/auth0/auth0-tests.ts @@ -375,6 +375,12 @@ management.importUsers({ upsert: true }, (err, data) => console.log(data)); +management.importUsers({ + users_json: "some json data", + connection_id: 'con_id', + send_completion_email: false +}, (err, data) => console.log(data)); + management.exportUsers({ connection_id: 'con_id', fields: [ @@ -446,6 +452,10 @@ management.updateRole({id: "role_id"}, { management.getPermissionsInRole({id: "role_id"}).then(permissions => console.log(permissions)); management.getPermissionsInRole({id: "role_id"}, (err, data) => console.log(data)); +management.getPermissionsInRole({id: "role_id", per_page: 8}).then(permissions => console.log(permissions)); +management.getPermissionsInRole({id: "role_id", per_page: 8}, (err, data) => console.log(data)); +management.getPermissionsInRole({id: "role_id", include_totals: true}).then(permissions => console.log(permissions)); +management.getPermissionsInRole({id: "role_id", include_totals: true}, (err, data) => console.log(data)); management.removePermissionsFromRole({id: "role_id"}, { permissions: [ @@ -569,3 +579,13 @@ management.unblockUserByIdentifier({ identifier: 'email' }, (err, response) => { } console.log(response); }); + +// Rules configurations +management.setRulesConfig({key: 'test'}, {value: 'test'}).then((config) => console.log(config)); +management.setRulesConfig({key: 'test'}, {value: 'test'}, (err, config) => console.log(config)); + +management.deleteRulesConfig({key: 'test'}).then(() => {}); +management.deleteRulesConfig({key: 'test'}, (err) => {}); + +management.getRulesConfigs().then((configs) => console.log(configs)); +management.getRulesConfigs((err, configs) => console.log(configs)); diff --git a/types/auth0/index.d.ts b/types/auth0/index.d.ts index e94652c44f..4e75303e85 100644 --- a/types/auth0/index.d.ts +++ b/types/auth0/index.d.ts @@ -118,6 +118,20 @@ export interface Rule { order?: number; } +export interface RulesConfig { + /** + * Key for a rules config variable. + */ + key: string; +} + +export interface RulesConfigData { + /** + * Value for a rules config variable. + */ + value: string +} + export interface Role { id?: string; name?: string; @@ -168,6 +182,15 @@ export interface PermissionData { permission_name: string; } +export interface GetRolePermissionsData extends ObjectWithId { + per_page?: number; + page?: number; +} + +export interface GetRolePermissionsDataPaged extends GetRolePermissionsData { + include_totals: boolean; +} + export interface GetRoleUsersData extends ObjectWithId { per_page?: number; page?: number; @@ -564,6 +587,12 @@ export interface AuthorizationCodeGrantOptions { redirect_uri: string; } +export interface TokenResponse { + access_token: string; + token_type: string; + expires_in: number; +} + export interface ObjectWithId { id: string; } @@ -669,14 +698,23 @@ export interface VerificationEmailJob { created_at?: string; } -export interface ImportUsersOptions { - users: string; +export interface BaseImportUsersOptions { connection_id: string; upsert?: boolean; external_id?: string; send_completion_email?: boolean; } +export interface ImportUsersFromFileOptions extends BaseImportUsersOptions { + users: string; +} + +export interface ImportUsersFromJsonOptions extends BaseImportUsersOptions { + users_json: string; +} + +export type ImportUsersOptions = ImportUsersFromFileOptions | ImportUsersFromJsonOptions; + export interface ExportUsersOptions { connection_id?: string; format?: JobFormat; @@ -836,11 +874,11 @@ export class AuthenticationClient { getProfile(accessToken: string): Promise; getProfile(accessToken: string, cb: (err: Error, message: string) => void): void; - clientCredentialsGrant(options: ClientCredentialsGrantOptions): Promise; - clientCredentialsGrant(options: ClientCredentialsGrantOptions, cb: (err: Error, response: any) => void): void; + clientCredentialsGrant(options: ClientCredentialsGrantOptions): Promise; + clientCredentialsGrant(options: ClientCredentialsGrantOptions, cb: (err: Error, response: TokenResponse) => void): void; - passwordGrant(options: PasswordGrantOptions): Promise; - passwordGrant(options: PasswordGrantOptions, cb: (err: Error, response: any) => void): void; + passwordGrant(options: PasswordGrantOptions): Promise; + passwordGrant(options: PasswordGrantOptions, cb: (err: Error, response: TokenResponse) => void): void; } @@ -931,6 +969,10 @@ export class ManagementClient { getPermissionsInRole(params: ObjectWithId): Promise; getPermissionsInRole(params: ObjectWithId, cb: (err: Error, permissions: Permission[]) => void): void; + getPermissionsInRole(params: GetRolePermissionsData): Promise; + getPermissionsInRole(params: GetRolePermissionsData, cb: (err: Error, permissions: Permission[]) => void): void; + getPermissionsInRole(params: GetRolePermissionsDataPaged): Promise; + getPermissionsInRole(params: GetRolePermissionsDataPaged, cb: (err: Error, permissionPage: PermissionPage) => void): void; removePermissionsFromRole(params: ObjectWithId, data: PermissionsData): Promise; removePermissionsFromRole(params: ObjectWithId, data: PermissionsData, cb: (err: Error) => void): void; @@ -961,6 +1003,16 @@ export class ManagementClient { deleteRule(params: ObjectWithId): Promise; deleteRule(params: ObjectWithId, cb: (err: Error) => void): void; + // Rules Configurations + getRulesConfigs(): Promise; + getRulesConfigs(cb: (err: Error, rulesConfigs: RulesConfig[]) => void): void; + + setRulesConfig(params: RulesConfig, data: RulesConfigData): Promise; + setRulesConfig(params: RulesConfig, data: RulesConfigData, + cb: (err: Error, rulesConfig: RulesConfig & RulesConfigData) => void):void; + + deleteRulesConfig(params: RulesConfig): Promise; + deleteRulesConfig(params: RulesConfig, cb: (err: Error) => void): void; // Users getUsers(params: GetUsersDataPaged): Promise>; diff --git a/types/autoprefixer/autoprefixer-tests.ts b/types/autoprefixer/autoprefixer-tests.ts index d730fcb558..af702ef9a5 100644 --- a/types/autoprefixer/autoprefixer-tests.ts +++ b/types/autoprefixer/autoprefixer-tests.ts @@ -1,4 +1,6 @@ import autoprefixer = require('autoprefixer'); +import Browsers = require('autoprefixer/lib/browsers'); +import Prefixes = require('autoprefixer/lib/prefixes'); import { Transformer } from 'postcss'; // No options @@ -36,3 +38,31 @@ const ap3: Transformer = autoprefixer({ ssr: ['node 12'], }, }); + +const prefixes = new Prefixes(autoprefixer.data.prefixes, new Browsers(autoprefixer.data.browsers, [])); +const autoprefixerApiTest = { + atRuleName(identifier: string) { + return Boolean(prefixes.remove[`@${identifier.toLowerCase()}`]); + }, + selector(identifier: string) { + return prefixes.remove.selectors.some((selectorObj: { prefixed: string }) => { + return identifier.toLowerCase() === selectorObj.prefixed; + }); + }, + mediaFeatureName(identifier: string) { + return identifier.toLowerCase().includes('device-pixel-ratio'); + }, + property(identifier: string) { + return Boolean(autoprefixer.data.prefixes[prefixes.unprefixed(identifier.toLowerCase())]); + }, + propertyValue(prop: string, value: string) { + const possiblePrefixableValues = + (prefixes.remove[prop.toLowerCase()] && prefixes.remove[prop.toLowerCase()].values) || false; + return ( + possiblePrefixableValues && + possiblePrefixableValues.some((valueObj: { prefixed: string }) => { + return value.toLowerCase() === valueObj.prefixed; + }) + ); + }, +}; diff --git a/types/autoprefixer/lib/browsers.d.ts b/types/autoprefixer/lib/browsers.d.ts new file mode 100644 index 0000000000..eca68394c8 --- /dev/null +++ b/types/autoprefixer/lib/browsers.d.ts @@ -0,0 +1,25 @@ +import browserslist = require('browserslist'); + +type Queries = string | ReadonlyArray; + +interface Browsers { + parse(queries: Queries): string[]; + prefix(browser: string): string; + isSelected(browser: string): boolean; +} + +declare class BrowsersImpl implements Browsers { + constructor(data: { [k: string]: any }, options?: any, browserslistOpts?: browserslist.Options); + + isSelected(browser: string): boolean; + + parse(queries: string | ReadonlyArray): string[]; + + prefix(browser: string): string; + + prefixes(): string[]; + + withPrefix(value: string): boolean; +} + +export = BrowsersImpl; diff --git a/types/autoprefixer/lib/prefixes.d.ts b/types/autoprefixer/lib/prefixes.d.ts new file mode 100644 index 0000000000..c9d0213026 --- /dev/null +++ b/types/autoprefixer/lib/prefixes.d.ts @@ -0,0 +1,17 @@ +import Browsers = require('./browsers'); + +interface Prefixes { + remove: { [k: string]: any }; + + unprefixed(value: string): string; +} + +declare class PrefixesImpl implements Prefixes { + constructor(data: string[], browsers: Browsers, options?: any); + + remove: { [p: string]: any }; + + unprefixed(value: string): string; +} + +export = PrefixesImpl; diff --git a/types/aws-kcl/aws-kcl-tests.ts b/types/aws-kcl/aws-kcl-tests.ts new file mode 100644 index 0000000000..05c6bf083e --- /dev/null +++ b/types/aws-kcl/aws-kcl-tests.ts @@ -0,0 +1,50 @@ +import kcl from 'aws-kcl'; + +// Example used from https://github.com/awslabs/amazon-kinesis-client-nodejs +const recordProcessor = { + initialize(_initializeInput: kcl.InitializeInput, completeCallback: kcl.Callback) { + completeCallback(); + }, + + processRecords(processRecordsInput: kcl.ProcessRecordsInput, completeCallback: kcl.Callback) { + if (!processRecordsInput || !processRecordsInput.records) { + completeCallback(); + return; + } + + const records = processRecordsInput.records; + let record; + let sequenceNumber; + + for (record of records) { + sequenceNumber = record.sequenceNumber; + const partitionKey = record.partitionKey; + const data = new Buffer(record.data, 'base64').toString(); + console.log(partitionKey, data); + } + + if (!sequenceNumber) { + completeCallback(); + return; + } + processRecordsInput.checkpointer.checkpoint( + sequenceNumber, + (_err: string | undefined, _checkpointedSequenceNumber: string) => { + completeCallback(); + }, + ); + }, + + leaseLost(_leaseLostInput: kcl.LeaseLossInput, completeCallback: kcl.Callback) { + completeCallback(); + }, + + shardEnded(shardEndedInput: kcl.ShardEndedInput, completeCallback: kcl.Callback) { + shardEndedInput.checkpointer.checkpoint((_err?: string) => { + completeCallback(); + }); + completeCallback(); + }, +}; + +kcl(recordProcessor).run(); diff --git a/types/aws-kcl/index.d.ts b/types/aws-kcl/index.d.ts new file mode 100644 index 0000000000..168abd6bd8 --- /dev/null +++ b/types/aws-kcl/index.d.ts @@ -0,0 +1,136 @@ +// Type definitions for aws-kcl 2.0 +// Project: https://github.com/awslabs/amazon-kinesis-client-nodejs +// Definitions by: Vlad Shlosberg +// Foqal +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as fs from "fs"; + +export = KCLProcess; + +declare function KCLProcess( + recordProcessor: KCLProcess.RecordProcessor, + inputFile?: fs.ReadStream, + outputFile?: fs.WriteStream, + errorFile?: fs.WriteStream, +): KCLProcess.KCLManager; + +declare namespace KCLProcess { + type Callback = () => void; + + type CheckpointCallback = (error: string | undefined, checkpointedSequenceNumber: string) => void; + + interface Checkpointer { + /** + * Checkpoints at a given sequence number. + * @param sequenceNumber Sequence number of the record to checkpoint; + * @param callback Function that is invoked after the checkpoint operation completes. + */ + checkpoint(sequenceNumber: string, callback: CheckpointCallback): void; + + /** + * Checkpoints at the checkpoint will be at the end of the most + * recently-delivered list of records. + * @param callback Function that is invoked after the checkpoint + * operation completes. + */ + checkpoint(callback: CheckpointCallback): void; + } + + interface InitializeInput { + shardId: string; + sequenceNumber?: string; + subSequenceNumber?: number; + } + + interface CheckpointInput { + checkpointer: Checkpointer; + } + + interface Record { + data: string; + partitionKey: string; + sequenceNumber: string; + } + + interface ProcessRecordsInput extends CheckpointInput { + records: Record[]; + millisBehindLatest?: number; + } + + interface LeaseLossInput {} // tslint:disable-line:no-empty-interface + + interface ShardEndedInput extends CheckpointInput {} // tslint:disable-line:no-empty-interface + + interface RecordProcessor { + /** + * Called once by the KCL before any calls to processRecords. Any initialization + * logic for record processing can go here. + * + * @param initializeInput - Initialization related information. + * @param completeCallback - The callback that must be invoked + * once the initialization operation is complete. + */ + initialize(initializeInput: InitializeInput, completeCallback: Callback): void; + + /** + * Called by KCL with a list of records to be processed and checkpointed. + * A record looks like: + * + * The checkpointer can optionally be used to checkpoint a particular sequence + * number (from a record). If checkpointing, the checkpoint must always be + * invoked before calling `completeCallback` for processRecords. Moreover, + * `completeCallback` should only be invoked once the checkpoint operation + * callback is received. + * + * @param processRecordsInput Process records information with + * array of records that are to be processed. + * @param completeCallback The callback that must be invoked + * once all records are processed and checkpoint (optional) is + * complete. + */ + processRecords(processRecordsInput: ProcessRecordsInput, completeCallback: Callback): void; + + /** + * Called by the KCL to indicate that this record processor should shut down. + * After the lease lost operation is complete, there will not be any more calls to + * any other functions of this record processor. Clients should not attempt to + * checkpoint because the lease has been lost by this Worker. + * + * @param leaseLostInput Lease lost information. + * @param completeCallback The callback must be invoked once lease + * lost operations are completed. + */ + leaseLost(leaseLostInput: LeaseLossInput, completeCallback: Callback): void; + /** + * Called by the KCL to indicate that this record processor should shutdown. + * After the shard ended operation is complete, there will not be any more calls to + * any other functions of this record processor. Clients are required to checkpoint + * at this time. This indicates that the current record processor has finished + * processing and new record processors for the children will be created. + * + * @param shardEndedInput ShardEnded information. + * @param completeCallback The callback must be invoked once shard + * ended operations are completed. + */ + shardEnded(shardEndedInput: ShardEndedInput, completeCallback: Callback): void; + } + + interface KCLInput { + recordProcessor: RecordProcessor; + version: symbol; + } + + class KCLManager { + constructor( + kclManagerInput: KCLInput, + inputFile?: fs.ReadStream, + outputFile?: fs.WriteStream, + errorFile?: fs.WriteStream, + ); + checkpoint(sequenceNumber: string): void; + run(): void; + } +} diff --git a/types/cloudevents-sdk/tsconfig.json b/types/aws-kcl/tsconfig.json similarity index 78% rename from types/cloudevents-sdk/tsconfig.json rename to types/aws-kcl/tsconfig.json index 24df405fc9..e8887b62a4 100644 --- a/types/cloudevents-sdk/tsconfig.json +++ b/types/aws-kcl/tsconfig.json @@ -6,17 +6,19 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictFunctionTypes": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", - "typeRoots": ["../"], + "typeRoots": [ + "../" + ], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, - "allowSyntheticDefaultImports": true + "esModuleInterop": true }, "files": [ "index.d.ts", - "cloudevents-sdk-tests.ts" + "aws-kcl-tests.ts" ] } diff --git a/types/aws-kcl/tslint.json b/types/aws-kcl/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/aws-kcl/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/aws-lambda/common/cloudfront.d.ts b/types/aws-lambda/common/cloudfront.d.ts index f0ebbae8f5..1270347899 100644 --- a/types/aws-lambda/common/cloudfront.d.ts +++ b/types/aws-lambda/common/cloudfront.d.ts @@ -60,9 +60,9 @@ export interface CloudFrontEvent { config: { readonly distributionDomainName: string; readonly distributionId: string; - } & ( - | { readonly eventType: 'origin-request' | 'origin-response' } - | { readonly eventType: 'viewer-request' | 'viewer-response'; readonly requestId: string }); + readonly eventType: 'origin-request' | 'origin-response' | 'viewer-request' | 'viewer-response'; + readonly requestId: string; + }; } /** diff --git a/types/aws-lambda/test/api-gateway-tests.ts b/types/aws-lambda/test/api-gateway-tests.ts index 540e9aee88..f210234045 100644 --- a/types/aws-lambda/test/api-gateway-tests.ts +++ b/types/aws-lambda/test/api-gateway-tests.ts @@ -201,7 +201,6 @@ const authorizer: APIGatewayAuthorizerHandler = async (event, context, callback) str = event.resource; // $ExpectError } else { event.type; // $ExpectType "REQUEST" - str = event.methodArn; // $ExpectError str = event.resource; } @@ -221,7 +220,6 @@ const authorizerWithCustomContext: APIGatewayAuthorizerWithContextHandler; - domainName: string; - apiId: string; } export interface APIGatewayAuthorizerResult { diff --git a/types/aws-lambda/trigger/cognito-user-pool-trigger.d.ts b/types/aws-lambda/trigger/cognito-user-pool-trigger.d.ts index b0b878102c..bbd7a48e80 100644 --- a/types/aws-lambda/trigger/cognito-user-pool-trigger.d.ts +++ b/types/aws-lambda/trigger/cognito-user-pool-trigger.d.ts @@ -57,7 +57,8 @@ export interface CognitoUserPoolTriggerEvent { | 'SMS_MFA' | 'DEVICE_SRP_AUTH' | 'DEVICE_PASSWORD_VERIFIER' - | 'ADMIN_NO_SRP_AUTH'; + | 'ADMIN_NO_SRP_AUTH' + | 'SRP_A'; challengeResult: boolean; challengeMetadata?: string; }>; @@ -66,6 +67,7 @@ export interface CognitoUserPoolTriggerEvent { challengeAnswer?: string; password?: string; clientMetadata?: { [key: string]: string }; + userNotFound?: boolean; }; response: { autoConfirmUser?: boolean; diff --git a/types/b-spline/b-spline-tests.ts b/types/b-spline/b-spline-tests.ts new file mode 100644 index 0000000000..5b1c0ab561 --- /dev/null +++ b/types/b-spline/b-spline-tests.ts @@ -0,0 +1,2 @@ +import bSpline = require('b-spline'); +bSpline<[number, number]>(0, 1, [[0, 0], [1, 0], [1, 1]]); // $ExpectType [number, number] diff --git a/types/b-spline/index.d.ts b/types/b-spline/index.d.ts new file mode 100644 index 0000000000..798b6fdfe6 --- /dev/null +++ b/types/b-spline/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for b-spline 2.0 +// Project: https://github.com/thibauts/b-spline +// Definitions by: Ruby +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare function interpolate>(t: number, degree: number, points: T[], knots?: number[], weights?: number[]): T; + +export = interpolate; diff --git a/types/b-spline/tsconfig.json b/types/b-spline/tsconfig.json new file mode 100644 index 0000000000..e9adc4e7fa --- /dev/null +++ b/types/b-spline/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", "b-spline-tests.ts"] +} diff --git a/types/b-spline/tslint.json b/types/b-spline/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/b-spline/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/babel__core/index.d.ts b/types/babel__core/index.d.ts index 3225d5d29c..744db30d99 100644 --- a/types/babel__core/index.d.ts +++ b/types/babel__core/index.d.ts @@ -71,7 +71,7 @@ export interface TransformOptions { * * Default: `undefined` */ - configFile?: string | false | null; + configFile?: string | boolean | null; /** * Specify whether or not to use .babelrc and @@ -87,7 +87,7 @@ export interface TransformOptions { * * Default: `(root)` */ - babelrcRoots?: true | string | string[] | null; + babelrcRoots?: boolean | MatchPattern | MatchPattern[] | null; /** * Defaults to environment variable `BABEL_ENV` if set, or else `NODE_ENV` if set, or else it defaults to `"development"` @@ -192,7 +192,7 @@ export interface TransformOptions { * * Default: `null` */ - ignore?: string[] | null; + ignore?: MatchPattern[] | null; /** * This option is a synonym for "test" @@ -240,7 +240,7 @@ export interface TransformOptions { * * Default: `null` */ - only?: string | RegExp | Array | null; + only?: MatchPattern[] | null; /** * Allows users to provide an array of options that will be merged into the current configuration one at a time. diff --git a/types/babel__plugin-transform-runtime/babel__plugin-transform-runtime-tests.ts b/types/babel__plugin-transform-runtime/babel__plugin-transform-runtime-tests.ts new file mode 100644 index 0000000000..dc2f439930 --- /dev/null +++ b/types/babel__plugin-transform-runtime/babel__plugin-transform-runtime-tests.ts @@ -0,0 +1,95 @@ +/* tslint:disable:no-consecutive-blank-lines comment-format */ + +import { Options } from '@babel/plugin-transform-runtime'; + + +//========// +// COREJS // +//========// + +let options: Options = { + corejs: 2, +}; + +options = { + corejs: 3, +}; + +options = { + corejs: { + version: 2, + proposals: true, + }, +}; + +options = { + corejs: { + version: 3, + proposals: false, + }, +}; + + +//=========// +// HELPERS // +//=========// + +options = { + helpers: true, +}; + +options = { + helpers: false, +}; + + +//=============// +// REGENERATOR // +//=============// + +options = { + regenerator: true, +}; + +options = { + regenerator: false, +}; + + +//================// +// USE ES MODULES // +//================// + +options = { + useESModules: true, +}; + +options = { + useESModules: false, +}; + + +//==================// +// ABSOLUTE RUNTIME // +//==================// + +options = { + absoluteRuntime: true, +}; + +options = { + absoluteRuntime: false, +}; + +options = { + absoluteRuntime: '/some/path/here', +}; + + +//=========// +// VERSION // +//=========// + +options = { + version: '^1.2.3', +}; diff --git a/types/babel__plugin-transform-runtime/index.d.ts b/types/babel__plugin-transform-runtime/index.d.ts new file mode 100644 index 0000000000..6763af19a7 --- /dev/null +++ b/types/babel__plugin-transform-runtime/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for @babel/plugin-transform-runtime 7.9 +// Project: https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime, https://babeljs.io/docs/en/babel-plugin-transform-runtime +// Definitions by: Slava Fomin II +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Options { + corejs?: CorejsOption; + helpers?: boolean; + regenerator?: boolean; + useESModules?: boolean; + absoluteRuntime?: (boolean | string); + version?: string; +} + +export type CorejsOption = ( + | CorejsVersion + | { version: CorejsVersion, proposals: boolean } + | false +); + +export type CorejsVersion = (2 | 3); diff --git a/types/babel__plugin-transform-runtime/tsconfig.json b/types/babel__plugin-transform-runtime/tsconfig.json new file mode 100644 index 0000000000..1b3efc52e0 --- /dev/null +++ b/types/babel__plugin-transform-runtime/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "strict": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@babel/plugin-transform-runtime": [ + "babel__plugin-transform-runtime" + ] + } + }, + "files": [ + "index.d.ts", + "babel__plugin-transform-runtime-tests.ts" + ] +} diff --git a/types/react-native-responsive-dimensions/tslint.json b/types/babel__plugin-transform-runtime/tslint.json similarity index 89% rename from types/react-native-responsive-dimensions/tslint.json rename to types/babel__plugin-transform-runtime/tslint.json index c29c5ae617..f93cf8562a 100644 --- a/types/react-native-responsive-dimensions/tslint.json +++ b/types/babel__plugin-transform-runtime/tslint.json @@ -1,4 +1,3 @@ -{ +{ "extends": "dtslint/dt.json" - } diff --git a/types/babel__preset-env/babel__preset-env-tests.ts b/types/babel__preset-env/babel__preset-env-tests.ts new file mode 100644 index 0000000000..689a521e0f --- /dev/null +++ b/types/babel__preset-env/babel__preset-env-tests.ts @@ -0,0 +1,277 @@ +/* tslint:disable:no-consecutive-blank-lines comment-format */ + +import { Options } from '@babel/preset-env'; + + +//=========// +// TARGETS // +//=========// + +let options: Options = { + targets: '> 0.25%, not dead', +}; + +options = { + targets: [ + '> 0.25%', + 'not dead', + ], +}; + +options = { + targets: { + OperaMini: '80', + Edge: '22', + ie: '11', + }, +}; + +options = { + targets: { + esmodules: true, + }, +}; + +options = { + targets: { + node: '12', + }, +}; + +options = { + targets: { + node: 'current', + }, +}; + +options = { + targets: { + node: true, + }, +}; + +options = { + targets: { + safari: '20', + }, +}; + +options = { + targets: { + safari: 'tp', + }, +}; + +options = { + targets: { + browsers: '> 0.25%, not dead', + }, +}; + +options = { + targets: { + browsers: [ + '> 0.25%', + 'not dead', + ], + }, +}; + + +//==========// +// BUGFIXES // +//==========// + +options = { + bugfixes: true, +}; + +options = { + bugfixes: false, +}; + + +//======// +// SPEC // +//======// + +options = { + spec: true, +}; + +options = { + spec: false, +}; + + +//=======// +// LOOSE // +//=======// + +options = { + loose: true, +}; + +options = { + loose: false, +}; + + +//=========// +// MODULES // +//=========// + +options = { + modules: 'amd', +}; + +options = { + modules: 'cjs', +}; + +options = { + modules: 'commonjs', +}; + +options = { + modules: false, +}; + + +//=======// +// DEBUG // +//=======// + +options = { + debug: true, +}; + +options = { + debug: false, +}; + + +//=========// +// INCLUDE // +//=========// + +options = { + include: [], +}; + +options = { + include: ['foo', 'bar'], +}; + +options = { + include: [/foo/, /bar/], +}; + + +//=========// +// EXCLUDE // +//=========// + +options = { + exclude: [], +}; + +options = { + exclude: ['foo', 'bar'], +}; + +options = { + exclude: [/foo/, /bar/], +}; + + +//===============// +// USE BUILT INS // +//===============// + +options = { + useBuiltIns: 'usage', +}; + +options = { + useBuiltIns: 'entry', +}; + +options = { + useBuiltIns: false, +}; + + +//========// +// COREJS // +//========// + +options = { + corejs: 2, +}; + +options = { + corejs: 3, +}; + +options = { + corejs: { + version: 2, + proposals: true, + }, +}; + +options = { + corejs: { + version: 3, + proposals: false, + }, +}; + + +//======================// +// FORCE ALL TRANSFORMS // +//======================// + +options = { + forceAllTransforms: true, +}; + +options = { + forceAllTransforms: false, +}; + + +//======================// +// FORCE ALL TRANSFORMS // +//======================// + +options = { + configPath: '/etc/babel-config.json', +}; + + +//============================// +// IGNORE BROWSERSLIST CONFIG // +//============================// + +options = { + ignoreBrowserslistConfig: true, +}; + +options = { + ignoreBrowserslistConfig: false, +}; + + +//===================// +// SHIPPED PROPOSALS // +//===================// + +options = { + shippedProposals: true, +}; + +options = { + shippedProposals: false, +}; diff --git a/types/babel__preset-env/index.d.ts b/types/babel__preset-env/index.d.ts new file mode 100644 index 0000000000..3db1c198fb --- /dev/null +++ b/types/babel__preset-env/index.d.ts @@ -0,0 +1,94 @@ +// Type definitions for @babel/preset-env 7.9 +// Project: https://github.com/babel/babel/tree/master/packages/babel-preset-env, https://babeljs.io/docs/en/babel-preset-env +// Definitions by: Slava Fomin II +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Options { + targets?: TargetsOptions; + bugfixes?: boolean; + spec?: boolean; + loose?: boolean; + modules?: ModuleOption; + debug?: boolean; + include?: PluginList; + exclude?: PluginList; + useBuiltIns?: UseBuiltInsOption; + corejs?: CorejsOption; + forceAllTransforms?: boolean; + configPath?: string; + ignoreBrowserslistConfig?: boolean; + shippedProposals?: boolean; +} + +/** + * "targets" config option: + * https://babeljs.io/docs/en/babel-preset-env#targets + */ +export type TargetsOptions = ( + | BrowserslistQuery + | ReadonlyArray + | { [key in Target]?: string; } + | { esmodules: true } + | { node: (string | 'current' | true) } + | { safari: (string | 'tp') } + | { browsers: (string | ReadonlyArray) } +); + +export type BrowserslistQuery = string; + +/** + * List of supported Browserslist targets: + * Source: https://github.com/browserslist/browserslist#browsers + */ +export type Target = ( + | 'Android' + | 'Baidu' + | 'BlackBerry' | 'bb' + | 'Chrome' + | 'ChromeAndroid' | 'and_chr' + | 'Edge' + | 'Electron' + | 'Explorer' | 'ie' + | 'ExplorerMobile' | 'ie_mob' + | 'Firefox' | 'ff' + | 'FirefoxAndroid' | 'and_ff' + | 'iOS' | 'ios_saf' + | 'Node' + | 'Opera' + | 'OperaMini' | 'op_mini' + | 'OperaMobile' | 'op_mob' + | 'QQAndroid' | 'and_qq' + | 'Safari' + | 'Samsung' + | 'UCAndroid' | 'and_uc' + | 'kaios' +); + +/** + * https://babeljs.io/docs/en/babel-preset-env#modules + */ +export type ModuleOption = ( + | 'amd' + | 'umd' + | 'systemjs' + | 'commonjs' + | 'cjs' + | 'auto' + | false +); + +export type PluginList = ReadonlyArray; +export type PluginListItem = (string | RegExp); + +export type UseBuiltInsOption = ( + | 'usage' + | 'entry' + | false +); + +export type CorejsOption = ( + | CorejsVersion + | { version: CorejsVersion, proposals: boolean } +); + +export type CorejsVersion = (2 | 3); diff --git a/types/babel__preset-env/tsconfig.json b/types/babel__preset-env/tsconfig.json new file mode 100644 index 0000000000..20a0f426a6 --- /dev/null +++ b/types/babel__preset-env/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "strict": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@babel/preset-env": [ + "babel__preset-env" + ] + } + }, + "files": [ + "index.d.ts", + "babel__preset-env-tests.ts" + ] +} diff --git a/types/babel__preset-env/tslint.json b/types/babel__preset-env/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/babel__preset-env/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/babel__standalone/index.d.ts b/types/babel__standalone/index.d.ts index ae77350ff6..fc7fbdb725 100644 --- a/types/babel__standalone/index.d.ts +++ b/types/babel__standalone/index.d.ts @@ -4,9 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Minimum TypeScript Version: 3.4 -import { TransformOptions, types, FileResultCallback } from '@babel/core'; +import { TransformOptions, types, FileResultCallback, BabelFileResult } from '@babel/core'; -export function transform(code: string, options: TransformOptions): string; +export function transform(code: string, options: TransformOptions): BabelFileResult; export function transformFromAst(ast: types.Node, code: string | undefined, opts: TransformOptions | undefined, callback?: FileResultCallback): void; diff --git a/types/babel__traverse/babel__traverse-tests.ts b/types/babel__traverse/babel__traverse-tests.ts index 9bc410d0ae..b1c80bdcea 100644 --- a/types/babel__traverse/babel__traverse-tests.ts +++ b/types/babel__traverse/babel__traverse-tests.ts @@ -99,6 +99,11 @@ const v1: Visitor = { path.scope.rename("n", "x"); path.scope.rename("n"); + + // $ExpectError + path.pushContainer('returnType', t.stringLiteral('hello')); + // $ExpectError + path.unshiftContainer('returnType', t.stringLiteral('hello')); }, ExportDefaultDeclaration(path) { { @@ -121,6 +126,16 @@ const v1: Visitor = { // $ExpectType NodePath booleanPath; } + { + const [newPath] = path.insertBefore(t.stringLiteral('hello')); + // $ExpectType NodePath + newPath; + } + { + const [newPath] = path.insertAfter(t.stringLiteral('hello')); + // $ExpectType NodePath + newPath; + } }, Program(path) { { @@ -128,6 +143,11 @@ const v1: Visitor = { // $ExpectType NodePath newPath; } + { + const [newPath] = path.pushContainer('body', t.stringLiteral('hello')); + // $ExpectType NodePath + newPath; + } { const [stringPath, booleanPath] = path.unshiftContainer('body', [ t.stringLiteral('hello'), @@ -138,6 +158,16 @@ const v1: Visitor = { // $ExpectType NodePath booleanPath; } + { + const [stringPath, booleanPath] = path.pushContainer('body', [ + t.stringLiteral('hello'), + t.booleanLiteral(false) + ]); + // $ExpectType NodePath + stringPath; + // $ExpectType NodePath + booleanPath; + } { const [stringPath, booleanPath] = path.unshiftContainer<[t.StringLiteral, t.BooleanLiteral]>('body', [ t.stringLiteral('hello'), @@ -148,6 +178,16 @@ const v1: Visitor = { // $ExpectType NodePath booleanPath; } + { + const [stringPath, booleanPath] = path.pushContainer<[t.StringLiteral, t.BooleanLiteral]>('body', [ + t.stringLiteral('hello'), + t.booleanLiteral(false) + ]); + // $ExpectType NodePath + stringPath; + // $ExpectType NodePath + booleanPath; + } } }; diff --git a/types/babel__traverse/index.d.ts b/types/babel__traverse/index.d.ts index a3537b9e3f..da05fc3627 100644 --- a/types/babel__traverse/index.d.ts +++ b/types/babel__traverse/index.d.ts @@ -32,6 +32,8 @@ export interface TraverseOptions extends Visitor { noScope?: boolean; } +export type ArrayKeys = { [P in keyof T]: T[P] extends any[] ? P : never }[keyof T]; + export class Scope { constructor(path: NodePath, parentScope?: Scope); path: NodePath; @@ -419,13 +421,13 @@ export class NodePath { // ------------------------- modification ------------------------- /** Insert the provided nodes before the current one. */ - insertBefore(nodes: Node | Node[]): any; + insertBefore(nodes: Nodes): NodePaths; /** * Insert the provided nodes after the current one. When inserting nodes after an * expression, ensure that the completion record is correct by pushing the current node. */ - insertAfter(nodes: Node | Node[]): any; + insertAfter(nodes: Nodes): NodePaths; /** Update all sibling node paths after `fromIndex` by `incrementBy`. */ updateSiblingKeys(fromIndex: number, incrementBy: number): void; @@ -435,14 +437,14 @@ export class NodePath { * @param listKey - The key at which the child nodes are stored (usually body). * @param nodes - the nodes to insert. */ - unshiftContainer(listKey: string, nodes: Nodes): NodePaths; + unshiftContainer(listKey: ArrayKeys, nodes: Nodes): NodePaths; /** * Insert child nodes at the end of the current node. * @param listKey - The key at which the child nodes are stored (usually body). * @param nodes - the nodes to insert. */ - pushContainer(listKey: string, nodes: Node | Node[]): void; + pushContainer(listKey: ArrayKeys, nodes: Nodes): NodePaths; /** Hoist the current node to the highest scope possible and return a UID referencing it. */ hoist(scope: Scope): void; diff --git a/types/baretest/baretest-tests.ts b/types/baretest/baretest-tests.ts new file mode 100644 index 0000000000..ce296d5915 --- /dev/null +++ b/types/baretest/baretest-tests.ts @@ -0,0 +1,37 @@ +import baretest = require('baretest'); + +const test = baretest('my program'); + +function doSetup(): void {} +function doCleanup(): void {} +function assertSomeThings(): void {} + +test.before(doSetup); + +test.after(doCleanup); + +test('it can do things', assertSomeThings); + +test.skip('it can create world peace', assertSomeThings); + +test('it can do things asynchronously', async () => { + return; +}); + +// $ExpectError +test("you shouldn't return from a test function", () => { + return 2 + 2; +}); + +// $ExpectError +test("you shouldn't take parameters in a test function", (people: number) => {}); + +// $ExpectError +test("you shouldn't return from an async test function", async () => { + return 'data from an API under test'; +}); + +(async () => { + const result = await test.run(); + result; // $ExpectType boolean +})(); diff --git a/types/baretest/index.d.ts b/types/baretest/index.d.ts new file mode 100644 index 0000000000..80c086c79a --- /dev/null +++ b/types/baretest/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for baretest 2.0 +// Project: https://volument.com/baretest +// Definitions by: Rory O’Kane +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = baretest; + +declare function baretest(headline: string): TesterFunctionObject; + +type TesterFunctionObject = TesterFunction & TesterSubFunctions; + +type TesterFunction = (name: string, fn: SyncOrAsyncVoidFunction) => void; +interface TesterSubFunctions { + only: (name: string, fn: SyncOrAsyncVoidFunction) => void; + skip: (name?: string, fn?: SyncOrAsyncVoidFunction) => void; + before: (fn: SyncOrAsyncVoidFunction) => void; + after: (fn: SyncOrAsyncVoidFunction) => void; + run: () => Promise; +} + +type SyncOrAsyncVoidFunction = () => void | Promise; diff --git a/types/baretest/tsconfig.json b/types/baretest/tsconfig.json new file mode 100644 index 0000000000..9b1d46e319 --- /dev/null +++ b/types/baretest/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "baretest-tests.ts" + ] +} diff --git a/types/baretest/tslint.json b/types/baretest/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/baretest/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bent/index.d.ts b/types/bent/index.d.ts index 61943b623b..718815256a 100644 --- a/types/bent/index.d.ts +++ b/types/bent/index.d.ts @@ -2,9 +2,10 @@ // Project: https://github.com/mikeal/bent#readme // Definitions by: Ovyerus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 +// TypeScript Version: 3.0 /// +/// import { PassThrough, Stream } from 'stream'; diff --git a/types/blueimp-load-image/index.d.ts b/types/blueimp-load-image/index.d.ts index 453ac60093..7bee90077d 100644 --- a/types/blueimp-load-image/index.d.ts +++ b/types/blueimp-load-image/index.d.ts @@ -76,7 +76,7 @@ export interface CropTrueOptions { export interface CropFalseOptions { crop?: false; } -export type CropOptions = CanvasTrueOptions | CropFalseOptions; +export type CropOptions = CropTrueOptions | CropFalseOptions; // Setting 'orientation' automatically sets 'meta' to true // so setting it to false is not valid in that case diff --git a/types/bookshelf/bookshelf-tests.ts b/types/bookshelf/bookshelf-tests.ts index 81c42f7680..ff56b0497b 100644 --- a/types/bookshelf/bookshelf-tests.ts +++ b/types/bookshelf/bookshelf-tests.ts @@ -701,17 +701,15 @@ qb.where({id: 1}).select().then(resp => { /* model.refresh(), see http://bookshelfjs.org/#Model-instance-refresh */ -/* model.related(), see http://bookshelfjs.org/#Model-instance-related */ +/* model.related(), see https://bookshelfjs.org/api.html#Model-instance-related */ class Trip extends bookshelf.Model {} class Trips extends bookshelf.Collection {} new Photo({id: 1}).fetch({ withRelated: ['account'] }).then(photo => { - if (photo) { - var account = photo.related('account'); - if (account.id) { - return ( account.related('trips')).fetch(); - } + var account = photo.related('account') as Account; + if (account.id) { + return (account.related('trips') as Trips).fetch(); } }); @@ -974,10 +972,12 @@ let tabs = new TabSet([tab1, tab2, tab3]); /* Collection.extend(), see http://bookshelfjs.org/#Collection-static-extend */ -/* Collection.forge(), see http://bookshelfjs.org/#Collection-static-forge */ +/* Collection.forge(), see https://bookshelfjs.org/api.html#Collection-static-forge */ class Accounts extends bookshelf.Collection { - model: Account + get model() { + return Account + } } var accounts = Accounts.forge([ @@ -985,7 +985,7 @@ var accounts = Accounts.forge([ {name: 'Person2'} ]); -Promise.all(accounts.invoke('save')).then(() => { +Promise.all(accounts.invokeMap('save')).then(() => { // collection models should now be saved... }); @@ -1219,63 +1219,26 @@ ships.trigger('fetched'); } } -/* Lodash methods, see http://bookshelfjs.org/#Collection-subsection-lodash-methods */ +/* Lodash methods, see https://bookshelfjs.org/api.html#Collection-subsection-lodash-methods */ -/* all(), see http://lodash.com/docs/#all */ - -/* any(), see http://lodash.com/docs/#any */ - -/* chain(), see http://lodash.com/docs/#chain */ - -/* collect(), see http://lodash.com/docs/#collect */ - -/* contains(), see http://lodash.com/docs/#contains */ - -/* countBy(), see http://lodash.com/docs/#countBy */ - -/* detect(), see http://lodash.com/docs/#detect */ - -/* difference(), see http://lodash.com/docs/#difference */ - -/* drop(), see http://lodash.com/docs/#drop */ - -/* each(), see http://lodash.com/docs/#each */ - -/* every(), see http://lodash.com/docs/#every */ - -/* filter(), see http://lodash.com/docs/#filter */ - -/* find(), see http://lodash.com/docs/#find */ - -/* first(), see http://lodash.com/docs/#first */ - -/* foldl(), see http://lodash.com/docs/#foldl */ - -/* foldr(), see http://lodash.com/docs/#foldr */ - -/* forEach(), see http://lodash.com/docs/#forEach */ - -/* groupBy(), see http://lodash.com/docs/#groupBy */ - -/* head(), see http://lodash.com/docs/#head */ - -/* include(), see http://lodash.com/docs/#include */ - -/* indexOf(), see http://lodash.com/docs/#indexOf */ - -/* initial(), see http://lodash.com/docs/#initial */ - -/* inject(), see http://lodash.com/docs/#inject */ - -/* invoke(), see http://lodash.com/docs/#invoke */ - -/* isEmpty(), see http://lodash.com/docs/#isEmpty */ - -/* last(), see http://lodash.com/docs/#last */ - -/* lastIndexOf(), see http://lodash.com/docs/#lastIndexOf */ - -/* map(), see http://lodash.com/docs/#map */ +/* +- countBy() +- every() +- filter() +- find() +- forEach() +- groupBy() +- includes() +- invokeMap() +- isEmpty() +- map() +- reduce() +- reduceRight() +- reject() +- some() +- sortBy() +- toArray() +*/ // TODO No example provided on Bookshelf website diff --git a/types/bookshelf/index.d.ts b/types/bookshelf/index.d.ts index 2e5a4b71c6..3990e1e19c 100644 --- a/types/bookshelf/index.d.ts +++ b/types/bookshelf/index.d.ts @@ -1,10 +1,10 @@ -// Type definitions for bookshelfjs v1.0.1 +// Type definitions for bookshelfjs v1.1.1 // Project: http://bookshelfjs.org/ // Definitions by: Andrew Schurman // Vesa Poikajärvi // Ian Serpa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2 +// Minimum TypeScript Version: 3.6 import Knex = require('knex'); import knex = require('knex'); @@ -214,32 +214,12 @@ declare namespace Bookshelf { where(match: { [key: string]: any }, firstOnly: boolean): T | Collection; // lodash methods - all( - predicate?: Lodash.ListIterator | Lodash.DictionaryIterator | string, - thisArg?: any, - ): boolean; - all(predicate?: R): boolean; - any( - predicate?: Lodash.ListIterator | Lodash.DictionaryIterator | string, - thisArg?: any, - ): boolean; - any(predicate?: R): boolean; - collect( - predicate?: Lodash.ListIterator | Lodash.DictionaryIterator | string, - thisArg?: any, - ): T[]; - collect(predicate?: R): T[]; - contains(value: any, fromIndex?: number): boolean; + includes(value: any, fromIndex?: number): boolean; countBy( predicate?: Lodash.ListIterator | Lodash.DictionaryIterator | string, thisArg?: any, ): Lodash.Dictionary; countBy(predicate?: R): Lodash.Dictionary; - detect( - predicate?: Lodash.ListIterator | Lodash.DictionaryIterator | string, - thisArg?: any, - ): T; - detect(predicate?: R): T; every( predicate?: Lodash.ListIterator | Lodash.DictionaryIterator | string, thisArg?: any, @@ -256,8 +236,6 @@ declare namespace Bookshelf { ): T; find(predicate?: R): T; first(): T; - foldl(callback?: Lodash.MemoIterator, accumulator?: R, thisArg?: any): R; - foldr(callback?: Lodash.MemoIterator, accumulator?: R, thisArg?: any): R; forEach(callback?: Lodash.ListIterator, thisArg?: any): Lodash.List; forEach(callback?: Lodash.DictionaryIterator, thisArg?: any): Lodash.Dictionary; forEach(callback?: Lodash.ObjectIterator, thisArg?: any): T; @@ -266,9 +244,7 @@ declare namespace Bookshelf { thisArg?: any, ): Lodash.Dictionary; groupBy(predicate?: R): Lodash.Dictionary; - include(value: any, fromIndex?: number): boolean; - inject(callback?: Lodash.MemoIterator, accumulator?: R, thisArg?: any): R; - invoke(methodName: string | Function, ...args: any[]): any; + invokeMap(methodName: string | Function, ...args: any[]): any; isEmpty(): boolean; keys(): string[]; last(): T; @@ -286,12 +262,7 @@ declare namespace Bookshelf { thisArg?: any, ): T[]; reject(predicate?: R): T[]; - rest(): T[]; - select( - predicate?: Lodash.ListIterator | Lodash.DictionaryIterator | string, - thisArg?: any, - ): T[]; - select(predicate?: R): T[]; + tail(): T[]; some( predicate?: Lodash.ListIterator | Lodash.DictionaryIterator | string, thisArg?: any, diff --git a/types/bookshelf/package.json b/types/bookshelf/package.json index 6c3b8365ac..5d5151e955 100644 --- a/types/bookshelf/package.json +++ b/types/bookshelf/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "knex": "^0.17.0" + "knex": "^0.20.13" } } diff --git a/types/bookshelf/tsconfig.json b/types/bookshelf/tsconfig.json index e983e9b53c..f74781805d 100644 --- a/types/bookshelf/tsconfig.json +++ b/types/bookshelf/tsconfig.json @@ -5,10 +5,7 @@ "lib": [ "es6" ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, + "strict": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/bootstrap-fileinput/bootstrap-fileinput-tests.ts b/types/bootstrap-fileinput/bootstrap-fileinput-tests.ts new file mode 100644 index 0000000000..47720e7406 --- /dev/null +++ b/types/bootstrap-fileinput/bootstrap-fileinput-tests.ts @@ -0,0 +1,79 @@ +$('#input-id').fileinput(); +const plugin = $('#input-id').fileinput({ showUpload: false, previewFileType: 'any' }); +$('document').on('ready', () => { + $('#input-id') + .fileinput({ + uploadUrl: 'http://localhost/file-upload.php', + uploadExtraData: { + uploadToken: 'SOME-TOKEN', // for access control / security + }, + maxFileCount: 5, + allowedFileTypes: ['image'], // allow only images + showCancel: true, + overwriteInitial: false, + theme: 'fas', + deleteUrl: 'http://localhost/file-delete.php', + }) + .on('fileuploaded', (event, previewId, index, fileId) => { + console.log('File Uploaded', `ID: ${fileId}, Thumb ID: ${previewId}`); + }) + .on('fileuploaderror', (event, data, msg) => { + console.log('File Upload Error', `ID: ${data.fileId}, Thumb ID: ${data.previewId}`); + }) + .on('filebatchuploadcomplete', (event, preview, config, tags, extraData) => { + console.log('File Batch Uploaded', preview, config, tags, extraData); + }); + + $('#input-id').fileinput('disable'); + $('#input-id').fileinput('enable'); + $('#input-id').fileinput('reset'); + $('#input-id').fileinput('destroy'); + $('#input-id') + .fileinput('destroy') + .fileinput({ showPreview: false }); + $('#input-id').attr('disabled', 'disabled'); + $('#input-id').fileinput('refresh'); + $('#input-id').fileinput('refresh', { browseLabel: 'Select...', removeLabel: 'Delete' }); + $('#input-id') + .fileinput('refresh', { showCaption: false }) + .fileinput('disable'); + $('#input-id') + .fileinput('clear') + .fileinput('disable'); + $('#input-id') + .fileinput('upload') + .fileinput('disable'); + $('#input-id') + .fileinput('cancel') + .fileinput('disable'); + $('#input-id') + .fileinput('pause') + .fileinput('disable'); + $('#input-id') + .fileinput('lock') + .fileinput('disable'); + $('#input-id') + .fileinput('resume') + .fileinput('unlock'); + const fileObj: File = null!; + $('#input-id').fileinput('addToStack', fileObj); + $('#input-id').fileinput('addToStack', fileObj, '#input-id'); + $('#input-id').fileinput('clearFileStack'); + const filestack = $('#input-id').fileinput('getFileStack'); + const fstack: File[] = []; + $.each(filestack, (fileId, fileObj) => { + if (fileObj !== undefined) { + fstack.push(fileObj); + } + }); + const files = $('#input-id').fileinput('getFileList'); + const filesCount = $('#input-id').fileinput('getFilesCount'); + const totalFilesCount = $('#input-id').fileinput('getFilesCount', true); + $('#input-id').fileinput('readFiles', files); + $('#input-id').fileinput('zoom', 'preview-123882'); + const preview = $('#input-id').fileinput('getPreview'); // $ExpectType PreviewInfo + const exif = $('#input-id').fileinput('getExif', 'yourThumbFrameId'); + $('#input1').fileinput('getFrames'); + $('#input2').fileinput('getFrames', '.file-preview-initial'); + $('#input3').fileinput('getFrames', ':not(.file-preview-success)'); +}); diff --git a/types/bootstrap-fileinput/index.d.ts b/types/bootstrap-fileinput/index.d.ts index 61a53b12bb..f891efe9f7 100644 --- a/types/bootstrap-fileinput/index.d.ts +++ b/types/bootstrap-fileinput/index.d.ts @@ -1,27 +1,118 @@ -// Type definitions for bootstrap-fileinput +// Type definitions for bootstrap-fileinput 5.0 // Project: https://github.com/kartik-v/bootstrap-fileinput // Definitions by: Ché Coxshall +// Piotr Błażejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 /// -export = BootstrapFileInput; -export as namespace BootstrapFileInput; - -declare global { - interface JQuery { - fileinput: (options?: BootstrapFileInput.FileInputOptions) => JQuery; - } +// tslint:disable:unified-signatures self-documenting code and JSDoc require non-unified signatures +interface JQuery { + fileinput(options?: BootstrapFileInput.FileInputOptions): this; + /** + * Disable the file input + */ + fileinput(method: 'disable'): this; + /** + * Enable the file input + */ + fileinput(method: 'enable'): this; + /** + * Softer reset of the file input than the clear method. + * It cleans up the preview thumbnails (except successful uploads and initialPreview) and cleans up the ajax upload file stack. + */ + fileinput(method: 'reset'): this; + /** + * Destroys the file input plugin and reverts to a normal native file input + */ + fileinput(method: 'destroy'): this; + /** + * Refreshes the file input plugin based on options provided + */ + fileinput(method: 'refresh', options?: BootstrapFileInput.FileInputOptions): this; + /** + * Clear the file input. + * This method clears the preview of all non-uploaded files, clears the ajax filestack, and also clears the native file input. + */ + fileinput(method: 'clear'): this; + /** + * Trigger ajax upload of the files that are selected. Applicable only if `uploadUrl` is set. + */ + fileinput(method: 'upload'): this; + /** + * Cancel an ongoing ajax upload of the files + */ + fileinput(method: 'cancel'): this; + /** + * Pause an ongoing resumable ajax upload of the files (applicable only when `enableResumableUpload` property to `true`). + */ + fileinput(method: 'pause'): this; + /** + * Resume a paused resumable ajax upload of the files (applicable only when enableResumableUpload property to true) + */ + fileinput(method: 'resume'): this; + /** + * Locks the file input by disabling all actions/buttons except a cancel button to abort ongoing AJAX requests (for ajax uploads only). + */ + fileinput(method: 'lock'): this; + /** + * Unlocks and enables the file input back again by reversing the outcome of the `lock` action + */ + fileinput(method: 'unlock'): this; + /** + * This method pushes (appends) a file object to the cached file stack array for upload (note that this only adds files to the internal stack and does not update the preview) + */ + fileinput(method: 'addToStack', fileObj: File, id?: string): this; + /** + * This method clears the entire file upload array stack (note that this only clears files from the internal stack and does not update the preview). + */ + fileinput(method: 'clearFileStack'): this; + /** + * This method returns an object (associative array) containing the file objects selected indexed by file identifer (see `generateFileId` option). + */ + fileinput(method: 'getFileStack'): BootstrapFileInput.FileStack; + /** + * This method returns an array of file objects (in case you do not wish to read an object/ associative array as returned by `getFileStack`) + */ + fileinput(method: 'getFileList'): FileList; + /** + * This method returns the count of all files pending upload and files already uploaded (based on initial preview) + */ + fileinput(method: 'getFilesCount', includeInitial?: boolean): number; + /** + * This method reads a FileList object, appends/pushes it to the file object stack, and also updates the preview to display the files based on the plugin settings. + */ + fileinput(method: 'readFiles', files: FileList): this; + /** + * Zooms the content in detailed preview for the passed thumbnail frame id parameter. + * @param frameId - the HTML identifier for the file preview thumbnail frame for which the exif data will be returned + */ + fileinput(method: 'zoom', frameId: string): this; + /** + * Returns the initial preview content, the initial preview configuration, and initial preview thumb tags + */ + fileinput(method: 'getPreview'): BootstrapFileInput.PreviewInfo; + /** + * Gets the exif data for the specified file thumbnail frame (applicable only for JPEG image file types). + * The exif data is returned as an object using the `piexif.js` library. + * @param frameId - the HTML identifier for the file preview thumbnail frame for which the exif data will be returned. + */ + fileinput(method: 'getExif', frameId: string): object | null; + /** + * Returns the list of file preview thumbnail frames as jQuery objects. + * @param cssFilter - additional CSS filter to be applied to restrict and return the relevant thumbnail preview frames + */ + fileinput(method: 'getFrames', cssFilter?: string): this; } +// tslint:enable:unified-signatures -declare module BootstrapFileInput { +declare namespace BootstrapFileInput { interface FileInputOptions { /** - Language configuration for the plugin to enable the plugin to display messages for your locale (you must set the ISO code for the language). - You can have multiple language widgets on the same page. - The locale JS file for the language code must be defined as mentioned in the translations section: http://plugins.krajee.com/file-input#translations - */ + * Language configuration for the plugin to enable the plugin to display messages for your locale (you must set the ISO code for the language). + * You can have multiple language widgets on the same page. + * The locale JS file for the language code must be defined as mentioned in the translations section: http://plugins.krajee.com/file-input#translations + */ language?: string; /** @@ -29,944 +120,959 @@ declare module BootstrapFileInput { */ theme?: string; /** - Whether to display the file caption. - Defaults to true. - */ + * Whether to display the file caption. + * Defaults to true. + */ showCaption?: boolean; /** - Whether to display the file preview. - Defaults to true. - */ + * Whether to display the file preview. + * Defaults to true. + */ showPreview?: boolean; /** - Whether to display the file remove/clear button. - Defaults to true. - */ + * Whether to display the file remove/clear button. + * Defaults to true. + */ showRemove?: boolean; /** - Whether to display the file upload button. - Defaults to true. - This will default to a form submit button, unless the uploadUrl is specified. - */ + * Whether to display the file upload button. + * Defaults to true. + * This will default to a form submit button, unless the uploadUrl is specified. + */ showUpload?: boolean; /** - Whether to display the file upload cancel button. - Defaults to true. - This will be only enabled and displayed when an AJAX upload is in process. - */ + * Whether to display the file upload cancel button. + * Defaults to true. + * This will be only enabled and displayed when an AJAX upload is in process. + */ showCancel?: boolean; /** - Whether to display the close icon in the preview. - Defaults to true. - This will be only parsed when showPreview is true or when you are using the {close} tag in your preview templates. - */ + * Whether to display the close icon in the preview. + * Defaults to true. + * This will be only parsed when showPreview is true or when you are using the {close} tag in your preview templates. + */ showClose?: boolean; /** - Whether to persist display of the uploaded file thumbnails in the preview window (for ajax uploads) until the remove/clear button is pressed. - Defaults to true. - When set to false, a next batch of files selected for upload will clear these thumbnails from preview. - */ + * Whether to persist display of the uploaded file thumbnails in the preview window (for ajax uploads) until the remove/clear button is pressed. + * Defaults to true. + * When set to false, a next batch of files selected for upload will clear these thumbnails from preview. + */ showUploadedThumbs?: boolean; /** - Whether to automatically replace the files in the preview after the maxFileCount limit is reached and a new set of file(s) is/are selected. - This will only work if a valid maxFileCount is set. - Defaults to false. - */ + * Whether to automatically replace the files in the preview after the maxFileCount limit is reached and a new set of file(s) is/are selected. + * This will only work if a valid maxFileCount is set. + * Defaults to false. + */ autoReplace?: boolean; /** - Any additional CSS class to append to the caption container. - */ + * Any additional CSS class to append to the caption container. + */ captionClass?: string; /** - Any additional CSS class to append to the preview container. - */ + * Any additional CSS class to append to the preview container. + */ previewClass?: string; /** - Any additional CSS class to append to the main plugin container. - */ + * Any additional CSS class to append to the main plugin container. + */ mainClass?: string; /** - The initial preview content to be displayed. - You can pass the minimal HTML markup for displaying your image, text, or file. - If set as a string, this will display a single file in the initial preview if there is no delimiter. You can set a delimiter (as defined in initialDelimiter) to show multiple files in initial preview. - If set as an array, it will display all files in the array as an initial preview (useful for multiple file upload scenarios). - The following CSS classes will need to be added for displaying each file type as per the plugin style theme: - image files: Include CSS class file-preview-image - text files: Include CSS class file-preview-text - other files: Include CSS class file-preview-other - */ + * The initial preview content to be displayed. + * You can pass the minimal HTML markup for displaying your image, text, or file. + * If set as a string, this will display a single file in the initial preview if there is no delimiter. + * You can set a delimiter (as defined in initialDelimiter) to show multiple files in initial preview. + * If set as an array, it will display all files in the array as an initial preview (useful for multiple file upload scenarios). + * The following CSS classes will need to be added for displaying each file type as per the plugin style theme: + * image files: Include CSS class file-preview-image + * text files: Include CSS class file-preview-text + * other files: Include CSS class file-preview-other + */ initialPreview?: string | any[]; /** - the count of initial preview items that will be added to the count of files selected in preview. This is applicable when displaying the right caption, when overwriteInitial is set to false. - */ + * the count of initial preview items that will be added to the count of files selected in preview. + * This is applicable when displaying the right caption, when overwriteInitial is set to false. + */ initialPreviewCount?: number; /** - the delimiter to be used for splitting the initial preview content as individual file thumbnails (applicable only if initialPreview is passed as a string instead of array). Defaults to *$$*. - */ + * the delimiter to be used for splitting the initial preview content as individual file thumbnails (applicable only if initialPreview is passed as a string instead of array). + * Defaults to *$$*. + */ initialPreviewDelimiter?: string; /** - the configuration for setting up important properties for each initialPreview item (that is setup as part of initialPreview). - */ + * the configuration for setting up important properties for each initialPreview item (that is setup as part of initialPreview). + */ initialPreviewConfig?: PreviewConfig[]; /** - whether the delete button will be displayed for each thumbnail that has been created with initialPreview. - */ + * whether the delete button will be displayed for each thumbnail that has been created with initialPreview. + */ initialPreviewShowDelete?: boolean; /** - whether the file thumbnail should be removed from preview on error. Defaults to false. - */ + * whether the file thumbnail should be removed from preview on error. Defaults to false. + */ removeFromPreviewOnError?: boolean; /** - this will be a list of tags used in thumbnail templates that will be replaced dynamically within the thumbnail markup, when the thumbnail is rendered. - */ - previewThumbTags?: { [key: string]: string; } + * this will be a list of tags used in thumbnail templates that will be replaced dynamically within the thumbnail markup, when the thumbnail is rendered. + */ + previewThumbTags?: { [key: string]: string }; /** - this is an extension of previewThumbTags specifically for initial preview content - but will be configured as an array of objects corresponding to each initial preview thumbnail. The initial preview thumbnails set via initialPreview will read this configuration for replacing tags. - */ - initialPreviewThumbTags?: { [key: string]: string; } + * this is an extension of previewThumbTags specifically for initial preview content - but will be configured as an array of objects corresponding to each initial preview thumbnail. + * The initial preview thumbnails set via initialPreview will read this configuration for replacing tags. + */ + initialPreviewThumbTags?: { [key: string]: string }; /** - the extra data that will be passed as data to the initial preview delete url/AJAX server call via POST. - This will be overridden by the initialPreviewConfig['extra'] property. - This property is only applicable for ajax deletions in initial preview and when you have set a value for initialPreviewConfig['url'] or deleteUrl. - This can be setup either as an object (associative array of keys and values) or as a function callback. - Note - The ajax delete action will send the following data to server via POST: - key: the key setting as setup in initialPreviewConfig['key'] - any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. - */ + * the extra data that will be passed as data to the initial preview delete url/AJAX server call via POST. + * This will be overridden by the initialPreviewConfig['extra'] property. + * This property is only applicable for ajax deletions in initial preview and when you have set a value for initialPreviewConfig['url'] or deleteUrl. + * This can be setup either as an object (associative array of keys and values) or as a function callback. + * Note + * The ajax delete action will send the following data to server via POST: + * key: the key setting as setup in initialPreviewConfig['key'] + * any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. + */ deleteExtraData?: {} | { (): {} }; /** - the URL for deleting the image/content in the initial preview via AJAX post response. This will be overridden by the initialPreviewConfig['url'] property. - Note - The ajax delete action will send the following data to server via POST: - key: the key setting as setup in initialPreviewConfig['key'] - any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. - */ + * the URL for deleting the image/content in the initial preview via AJAX post response. This will be overridden by the initialPreviewConfig['url'] property. + * Note + * The ajax delete action will send the following data to server via POST: + * key: the key setting as setup in initialPreviewConfig['key'] + * any other extra data passed as key: value pairs either via initialPreviewConfig['extra'] OR deleteExtraData if former is not set. + */ deleteUrl?: string; /** - the initial preview caption text to be displayed. - If you do not set a value here and initialPreview is set to true this will default to "{preview-file-count} files selected", where {preview-file-count} is the count of the files passed in initialPreview. - */ + * the initial preview caption text to be displayed. + * If you do not set a value here and initialPreview is set to true this will default to "{preview-file-count} files selected", + * where {preview-file-count} is the count of the files passed in initialPreview. + */ initialCaption?: string; /** - whether you wish to overwrite the initial preview content and caption setup. - This defaults to true, whereby, any initialPreview content set will be overwritten, when new file is uploaded or when files are cleared. - Setting it to false will help displaying a saved image or file from database always - useful especially when using the multiple file upload feature. - */ + * whether you wish to overwrite the initial preview content and caption setup. + * This defaults to true, whereby, any initialPreview content set will be overwritten, when new file is uploaded or when files are cleared. + * Setting it to false will help displaying a saved image or file from database always - useful especially when using the multiple file upload feature. + */ overwriteInitial?: boolean; /** - the templates configuration for rendering each part of the layout. - */ + * the templates configuration for rendering each part of the layout. + */ layoutTemplates?: LayoutTemplates; /** - the templates configuration for rendering each preview file type. - */ + * the templates configuration for rendering each preview file type. + */ previewTemplates?: PreviewTemplates; /** - the list of allowed file types for upload. - This by default is set to null which means the plugin supports all file types for upload. - If an invalid file type is found, then a validation error message as set in msgInvalidFileType will be raised. - Note: - You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). - */ - allowedFileTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[]; + * the list of allowed file types for upload. + * This by default is set to null which means the plugin supports all file types for upload. + * If an invalid file type is found, then a validation error message as set in msgInvalidFileType will be raised. + * Note: + * You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. + * In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). + */ + allowedFileTypes?: Array<'image' | 'html' | 'text' | 'video' | 'audio' | 'flash' | 'object'>; /** - the list of allowed file extensions for upload. - This by default is set to null which means the plugin supports all file extensions for upload. - If an invalid file extension is found, then a validation error message as set in msgInvalidFileExtension will be raised. - Note: - You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). - */ + * the list of allowed file extensions for upload. + * This by default is set to null which means the plugin supports all file extensions for upload. + * If an invalid file extension is found, then a validation error message as set in msgInvalidFileExtension will be raised. + * Note: + * You need to be careful in case you are setting both allowedFileTypes and allowedFileExtensions. + * In this case, the allowedFileTypes property is validated first and generally precedes the allowedFileExtensions setting (and the latter validation maybe skipped). + */ allowedFileExtensions?: string[]; /** - the list of allowed preview types for your widget. - This by default supports all file types for preview. - The plugin by default treats each file as an object if it does not match any of the previous types. - To disable this behavior, you can remove object from the list of allowedPreviewTypes OR fine tune it through allowedPreviewMimeTypes. - To disable content preview for all file-types and show the previewIcon instead as a thumbnail, set this to null, empty, or false. - */ - allowedPreviewTypes?: ("image" | "html" | "text" | "video" | "audio" | "flash" | "object")[]; + * the list of allowed preview types for your widget. + * This by default supports all file types for preview. + * The plugin by default treats each file as an object if it does not match any of the previous types. + * To disable this behavior, you can remove object from the list of allowedPreviewTypes OR fine tune it through allowedPreviewMimeTypes. + * To disable content preview for all file-types and show the previewIcon instead as a thumbnail, set this to null, empty, or false. + */ + allowedPreviewTypes?: Array<'image' | 'html' | 'text' | 'video' | 'audio' | 'flash' | 'object'>; /** - the list of allowed mime types for preview. - This is set to null by default which means all possible mime types are allowed. - This setting works in combination with allowedPreviewTypes to filter only the needed file types allowed for preview. - */ + * the list of allowed mime types for preview. + * This is set to null by default which means all possible mime types are allowed. + * This setting works in combination with allowedPreviewTypes to filter only the needed file types allowed for preview. + */ allowedPreviewMimeTypes?: string[]; /** - the default content / markup to show by default in the preview window whenever the files are cleared or the input is cleared. - This can be useful for use cases like showing the default user profile picture or profile image before upload to overwrite. - This is a bit different from initialPreview in the sense, that the initialPreview content will always be displayed unless it is deleted or overwritten based on overwriteInitial. - The defaultPreviewContent on the other hand will only be shown ONLY on initialization OR whenever you clear the preview. - At other times when files have been selected this will be overwritten temporarily until file(s) selected is/are cleared. - This property can be useful to display for example a default user profile picture (or saved picture) in the preview window unless the user selects a picture. - */ + * the default content / markup to show by default in the preview window whenever the files are cleared or the input is cleared. + * This can be useful for use cases like showing the default user profile picture or profile image before upload to overwrite. + * This is a bit different from initialPreview in the sense, that the initialPreview content will always be displayed unless it is deleted or overwritten based on overwriteInitial. + * The defaultPreviewContent on the other hand will only be shown ONLY on initialization OR whenever you clear the preview. + * At other times when files have been selected this will be overwritten temporarily until file(s) selected is/are cleared. + * This property can be useful to display for example a default user profile picture (or saved picture) in the preview window unless the user selects a picture. + */ defaultPreviewContent?: string; /** - the list of additional custom tags that will be replaced in the layout templates. - */ + * the list of additional custom tags that will be replaced in the layout templates. + */ customLayoutTags?: {}; /** - the list of additional custom tags that will be replaced in the preview templates. - */ + * the list of additional custom tags that will be replaced in the preview templates. + */ customPreviewTags?: {}; /** - the format settings (width and height) for rendering each preview file type. - */ + * the format settings (width and height) for rendering each preview file type. + */ previewSettings?: PreviewSettings; /** - the settings to validate and identify each file type when a file is selected for upload. - This is a list of callbacks, which accepts the file mime type and file name as a parameter. - */ + * the settings to validate and identify each file type when a file is selected for upload. + * This is a list of callbacks, which accepts the file mime type and file name as a parameter. + */ fileTypeSettings?: FileTypeSettings; /** - the icon to be shown in each preview file thumbnail when an unreadable file type for preview is detected. Defaults to  . - */ + * the icon to be shown in each preview file thumbnail when an unreadable file type for preview is detected. Defaults to  . + */ previewFileIcon?: string; /** - the CSS class to be applied to the preview file icon container. Defaults to file-icon-4x. - */ + * the CSS class to be applied to the preview file icon container. Defaults to file-icon-4x. + */ previewFileIconClass?: string; /** - the preview icon markup settings for each file extension (type). - You need to set this as key: value pairs, where the key corresponds to a file extension (e.g. doc, docx, xls etc.), and the value corresponds to the markup of the icon to be rendered. - If this is not set OR a file extension is not set here, the preview will default to previewFileIcon. - Note that displaying the icons instead of file content is controlled via allowedPreviewTypes and allowedPreviewMimeTypes - */ + * the preview icon markup settings for each file extension (type). + * You need to set this as key: value pairs, where the key corresponds to a file extension (e.g. doc, docx, xls etc.), and the value corresponds to the markup of the icon to be rendered. + * If this is not set OR a file extension is not set here, the preview will default to previewFileIcon. + * Note that displaying the icons instead of file content is controlled via allowedPreviewTypes and allowedPreviewMimeTypes + */ previewFileIconSettings?: PreviewFileIconSettings; /** - the extensions to be auto derived for each file extension (type). - This is useful if you want to set the same icon for multiple file extension types. - You need to set this as `key: value` pairs, where the key corresponds to a file extension as set in previewFileIconSettings (e.g. doc, docx, xls etc.). - The value will be a function callback that accepts the following parameter: - ext: string, the file extension (without the . [dot]) of the file currently selected in the preview. - You can configure the callback to match the set of file extensions (via regex or similar) for each `key` and return a boolean output if the file extension matches. - */ + * the extensions to be auto derived for each file extension (type). + * This is useful if you want to set the same icon for multiple file extension types. + * You need to set this as `key: value` pairs, where the key corresponds to a file extension as set in previewFileIconSettings (e.g. doc, docx, xls etc.). + * The value will be a function callback that accepts the following parameter: + * ext: string, the file extension (without the . [dot]) of the file currently selected in the preview. + * You can configure the callback to match the set of file extensions (via regex or similar) for each `key` and return a boolean output if the file extension matches. + */ previewFileExtSettings?: PreviewFileExtSettings; /** - the CSS class for the each of the button labels for browse, remove, upload, and cancel. - Defaults to hidden-xs, which automatically hides the button labels for small screen devices and renders as smaller iconic buttons to fit to the screen. - */ + * the CSS class for the each of the button labels for browse, remove, upload, and cancel. + * Defaults to hidden-xs, which automatically hides the button labels for small screen devices and renders as smaller iconic buttons to fit to the screen. + */ buttonLabelClass?: string; /** - the label to display for the file picker/browse button. Defaults to Browse …. - */ + * the label to display for the file picker/browse button. Defaults to Browse …. + */ browseLabel?: string; /** - the icon to display before the label for the file picker/browse button. Defaults to  . - */ + * the icon to display before the label for the file picker/browse button. Defaults to  . + */ browseIcon?: string; /** - the CSS class for the file picker/browse button. Defaults to btn btn-primary. - */ + * the CSS class for the file picker/browse button. Defaults to btn btn-primary. + */ browseClass?: string; /** - the label to display for the file remove button. Defaults to Remove. - */ + * the label to display for the file remove button. Defaults to Remove. + */ removeLabel?: string; /** - the icon to display before the label for the file picker/remove button. Defaults to  . - */ + * the icon to display before the label for the file picker/remove button. Defaults to  . + */ removeIcon?: string; /** - the CSS class for the file remove button. Defaults to btn btn-default. - */ + * the CSS class for the file remove button. Defaults to btn btn-default. + */ removeClass?: string; /** - the title to display on hover for the file remove button. Defaults to Clear selected files. - */ + * the title to display on hover for the file remove button. Defaults to Clear selected files. + */ removeTitle?: string; /** - the label to display for the file upload button. Defaults to Upload. - */ + * the label to display for the file upload button. Defaults to Upload. + */ uploadLabel?: string; /** - the icon to display before the label for the file upload button. Defaults to  . - */ + * the icon to display before the label for the file upload button. Defaults to  . + */ uploadIcon?: string; /** - the CSS class for the file upload button. Defaults to btn btn-default. - */ + * the CSS class for the file upload button. Defaults to btn btn-default. + */ uploadClass?: string; /** - the title to display on hover for the file remove button. - Defaults to Upload selected files. - */ + * the title to display on hover for the file remove button. + * Defaults to Upload selected files. + */ uploadTitle?: string; /** - the URL for the upload processing action (typically for ajax based processing). - Defaults to null. - If this is not set or null, then the upload button action will default to form submission. - NOTE: - This is MANDATORY if you want to use advanced features like drag & drop, append/remove files, selectively upload files via ajax etc. - The plugin automatically send $_FILES data to the server with the input `name` attribute as the key if provided. - If input name is not set, the key defaults to file-data. - */ + * the URL for the upload processing action (typically for ajax based processing). + * Defaults to null. + * If this is not set or null, then the upload button action will default to form submission. + * NOTE: + * This is MANDATORY if you want to use advanced features like drag & drop, append/remove files, selectively upload files via ajax etc. + * The plugin automatically send $_FILES data to the server with the input `name` attribute as the key if provided. + * If input name is not set, the key defaults to file-data. + */ uploadUrl?: string; /** - whether the batch upload of multiple files will be asynchronous/in parallel. - Defaults to true. - */ + * whether the batch upload of multiple files will be asynchronous/in parallel. + * Defaults to true. + */ uploadAsync?: boolean; /** - the extra data that will be passed as data to the url/AJAX server call via POST. - This property is only applicable for ajax uploads and when you have set a value for uploadUrl. - This can be setup either as an object (associative array of keys and values) or as a function callback. - As an object, it can be set for example as: - { id: 100, value: '100 Details' } - Note that for uploading individual file via thumbnail, the function callback can also receive the thumbnail previewId and index as parameters. These are described below: - previewId: the identifier for the preview file container (only available when uploading each thumbnail file) - index: the zero-based sequential index of the loaded file in the preview list (only available when uploading each thumbnail file) - */ + * the extra data that will be passed as data to the url/AJAX server call via POST. + * This property is only applicable for ajax uploads and when you have set a value for uploadUrl. + * This can be setup either as an object (associative array of keys and values) or as a function callback. + * As an object, it can be set for example as: + * { id: 100, value: '100 Details' } + * Note that for uploading individual file via thumbnail, the function callback can also receive the thumbnail previewId and index as parameters. These are described below: + * previewId: the identifier for the preview file container (only available when uploading each thumbnail file) + * index: the zero-based sequential index of the loaded file in the preview list (only available when uploading each thumbnail file) + */ uploadExtraData?: {} | ((previewId?: string, index?: number) => {}); /** - the minimum allowed image height in px if you are uploading image files. - Defaults to null which means no limit on image height. - */ + * the minimum allowed image height in px if you are uploading image files. + * Defaults to null which means no limit on image height. + */ minImageHeight?: number; /** - the maximum allowed image width in px if you are uploading image files. - Defaults to null which means no limit on image width. - Note that if you set resizeImage property to true, then the entire image will be resized within this width (depending on resizePreference). - */ + * the maximum allowed image width in px if you are uploading image files. + * Defaults to null which means no limit on image width. + * Note that if you set resizeImage property to true, then the entire image will be resized within this width (depending on resizePreference). + */ maxImageWidth?: number; /** - the maximum allowed image height in px if you are uploading image files. - Defaults to null which means no limit on image height. - Note that if you set resizeImage property to true, then the entire image will be resized within this height (depending on resizePreference). - */ + * the maximum allowed image height in px if you are uploading image files. + * Defaults to null which means no limit on image height. + * Note that if you set resizeImage property to true, then the entire image will be resized within this height (depending on resizePreference). + */ maxImageHeight?: number; /** - whether to add ability to resize uploaded images. Defaults to false. - Note that resizing images requires HTML5 canvas support which is supported on most modern browsers. - In addition, you must include the JavaScript-Canvas-to-Blob plugin by blueimp by including canvas-to-blob.js in your application. - This JS file must be loaded before fileinput.js on the page. - The JavaScript-Canvas-to-Blob source files are available in js/plugins folder of bootstrap-fileinput project page. - The canvas-to-blob.js plugin is a polyfill for canvas.toBlob method and is needed for allowing the resized image files via HTML5 canvas to be returned as a blob - */ + * whether to add ability to resize uploaded images. Defaults to false. + * Note that resizing images requires HTML5 canvas support which is supported on most modern browsers. + * In addition, you must include the JavaScript-Canvas-to-Blob plugin by blueimp by including canvas-to-blob.js in your application. + * This JS file must be loaded before fileinput.js on the page. + * The JavaScript-Canvas-to-Blob source files are available in js/plugins folder of bootstrap-fileinput project page. + * The canvas-to-blob.js plugin is a polyfill for canvas.toBlob method and is needed for allowing the resized image files via HTML5 canvas to be returned as a blob + */ resizeImage?: boolean; /** - preference to resize the image based on width or height. - Defaults to width. - This property is parsed only when resizeImage is true. - If set to width, the maxImageWidth property is first tested and if image size is greater than this, then the image is resized to maxImageWidth. - The image height is resized and adjusted in the same ratio as width. - In case, the image width is already less than maxImageWidth then the maxImageHeight property is used to resize and width is adjusted in same ratio. - This will behave conversely, when resizePreference is set to height - the maxImageHeight will be first tested against image height and then the rest of steps will be similarly parsed with preference given to height instead of width as before. - */ - resizePreference?: "width" | "height"; + * preference to resize the image based on width or height. + * Defaults to width. + * This property is parsed only when resizeImage is true. + * If set to width, the maxImageWidth property is first tested and if image size is greater than this, then the image is resized to maxImageWidth. + * The image height is resized and adjusted in the same ratio as width. + * In case, the image width is already less than maxImageWidth then the maxImageHeight property is used to resize and width is adjusted in same ratio. + * This will behave conversely, when resizePreference is set to height - the maxImageHeight will be first tested against image height + * and then the rest of steps will be similarly parsed with preference given to height instead of width as before. + */ + resizePreference?: 'width' | 'height'; /** - the quality of the resized image. This must be a decimal number between 0.00 to 1.00. - Defaults to 0.92. - */ + * the quality of the resized image. This must be a decimal number between 0.00 to 1.00. + * Defaults to 0.92. + */ resizeImageQuality?: number; /** - the default image mime type of the converted image after resize. - Defaults to image/jpeg. - */ + * the default image mime type of the converted image after resize. + * Defaults to image/jpeg. + */ resizeDefaultImageType?: string; /** - the maximum file size for upload in KB. - If set to 0, it means size allowed is unlimited. - Defaults to 0. - */ + * the maximum file size for upload in KB. + * If set to 0, it means size allowed is unlimited. + * Defaults to 0. + */ maxFileSize?: number; /** - the minimum number of files allowed for each multiple upload. - If set to 0, it means number of files are optional. - Defaults to 0. - */ + * the minimum number of files allowed for each multiple upload. + * If set to 0, it means number of files are optional. + * Defaults to 0. + */ minFileCount?: number; /** - the maximum number of files allowed for each multiple upload. - If set to 0, it means number of files allowed is unlimited. - Defaults to 0. - */ + * the maximum number of files allowed for each multiple upload. + * If set to 0, it means number of files allowed is unlimited. + * Defaults to 0. + */ maxFileCount?: number; /** - whether to include initial preview file count (server uploaded files) in validating minFileCount and maxFileCount. - Defaults to false. - */ + * whether to include initial preview file count (server uploaded files) in validating minFileCount and maxFileCount. + * Defaults to false. + */ validateInitialCount?: boolean; /** - the message that will be displayed when ZERO files are found. - Defaults to No. - */ + * the message that will be displayed when ZERO files are found. + * Defaults to No. + */ msgNo?: string; /** - the message that will be displayed within the progress bar when file upload is aborted or cancelled. - Defaults to Cancelled. - */ + * the message that will be displayed within the progress bar when file upload is aborted or cancelled. + * Defaults to Cancelled. + */ msgCancelled?: string; /** - the title displayed (before the file name) on hover of the zoom button for zooming the file content in a modal window. - This is currently applicable only for text file previews. - Defaults to View details. - */ + * the title displayed (before the file name) on hover of the zoom button for zooming the file content in a modal window. + * This is currently applicable only for text file previews. + * Defaults to View details. + */ msgZoomTitle?: string; /** - the heading of the modal dialog that displays the zoomed file content. - This is currently applicable only for text file previews. - Defaults to Detailed Preview. - */ + * the heading of the modal dialog that displays the zoomed file content. + * This is currently applicable only for text file previews. + * Defaults to Detailed Preview. + */ msgZoomModalHeading?: string; /** - the message to be displayed when the file size exceeds maximum size. - Defaults to: - File "{name}" ({size} KB) exceeds maximum allowed upload size of {maxSize} KB. Please retry your upload! - where: - {name}: will be replaced by the file name being uploaded - {size}: will be replaced by the uploaded file size - {maxSize}: will be replaced by the maxFileSize parameter. - */ + * the message to be displayed when the file size exceeds maximum size. + * Defaults to: + * File "{name}" ({size} KB) exceeds maximum allowed upload size of {maxSize} KB. Please retry your upload! + * where: + * {name}: will be replaced by the file name being uploaded + * {size}: will be replaced by the uploaded file size + * {maxSize}: will be replaced by the maxFileSize parameter. + */ msgSizeTooLarge?: string; /** - message to be displayed when the file count is less than the minimum count as set in minFileCount. - Defaults to: - You must select at least {n} {files} to upload. Please retry your upload! - where: - {n}: will be replaced by the allowed minimum files as set in minFileCount. - {files}: will be replaced with fileSingle or filePlural properties in locale file depending on the minFileCount. - */ + * message to be displayed when the file count is less than the minimum count as set in minFileCount. + * Defaults to: + * You must select at least {n} {files} to upload. Please retry your upload! + * where: + * {n}: will be replaced by the allowed minimum files as set in minFileCount. + * {files}: will be replaced with fileSingle or filePlural properties in locale file depending on the minFileCount. + */ msgFilesTooLess?: string; /** - the message to be displayed when the file count exceeds maximum count as set in maxFileCount. - Defaults to: - Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}. Please retry your upload! - where: - {n}: will be replaced by number of files selected for upload - {m}: will be replaced by the allowed maximum files as set in maxFileCount - */ + * the message to be displayed when the file count exceeds maximum count as set in maxFileCount. + * Defaults to: + * Number of files selected for upload ({n}) exceeds maximum allowed limit of {m}. Please retry your upload! + * where: + * {n}: will be replaced by number of files selected for upload + * {m}: will be replaced by the allowed maximum files as set in maxFileCount + */ msgFilesTooMany?: string; /** - the exception message to be displayed when the file selected is not found by the FileReader. - Defaults to: - File "{name}" not found! - where: - {name}: will be replaced by the file name being uploaded - */ + * the exception message to be displayed when the file selected is not found by the FileReader. + * Defaults to: + * File "{name}" not found! + * where: + * {name}: will be replaced by the file name being uploaded + */ msgFileNotFound?: string; /** - the exception message to be displayed when the file selected is not allowed to be accessed due to a security exception. - Defaults to: - Security restrictions prevent reading the file "{name}". - where: - {name}: will be replaced by the file name being uploaded - */ + * the exception message to be displayed when the file selected is not allowed to be accessed due to a security exception. + * Defaults to: + * Security restrictions prevent reading the file "{name}". + * where: + * {name}: will be replaced by the file name being uploaded + */ msgFileSecured?: string; /** - the exception message to be displayed when the file selected is not readable by the FileReader API. - Defaults to: - File "{name}" is not readable. - where: - {name}: will be replaced by the file name being uploaded - */ + * the exception message to be displayed when the file selected is not readable by the FileReader API. + * Defaults to: + * File "{name}" is not readable. + * where: + * {name}: will be replaced by the file name being uploaded + */ msgFileNotReadable?: string; /** - the exception message to be displayed when the file preview upload is aborted. - Defaults to: - File preview aborted for "{name}". - where: - {name}: will be replaced by the file name being uploaded - */ + * the exception message to be displayed when the file preview upload is aborted. + * Defaults to: + * File preview aborted for "{name}". + * where: + * {name}: will be replaced by the file name being uploaded + */ msgFilePreviewAborted?: string; /** - the exception message to be displayed for any other error when previewing the file. - Defaults to: - An error occurred while reading the file "{name}". - where: - {name}: will be replaced by the file name being uploaded - */ + * the exception message to be displayed for any other error when previewing the file. + * Defaults to: + * An error occurred while reading the file "{name}". + * where: + * {name}: will be replaced by the file name being uploaded + */ msgFilePreviewError?: string; /** - the message to be displayed when the file type is not in one of the file types set in allowedFileTypes. - Defaults to: - Invalid type for file "{name}". Only "{types}" files are supported. - where: - {name}: will be replaced by the file name being uploaded - {types}: will be replaced by the comma separated list of types defined in allowedFileTypes. - */ + * the message to be displayed when the file type is not in one of the file types set in allowedFileTypes. + * Defaults to: + * Invalid type for file "{name}". Only "{types}" files are supported. + * where: + * {name}: will be replaced by the file name being uploaded + * {types}: will be replaced by the comma separated list of types defined in allowedFileTypes. + */ msgInvalidFileType?: string; /** - the message to be displayed when the file type is not in one of the file extensions set in allowedFileExtensions. - Defaults to: - Invalid extension for file "{name}". Only "{extensions}" files are supported. - where: - {name}: will be replaced by the file name being uploaded - {extensions}: will be replaced by the comma separated list of extensions defined in allowedFileExtensions. - */ + * the message to be displayed when the file type is not in one of the file extensions set in allowedFileExtensions. + * Defaults to: + * Invalid extension for file "{name}". Only "{extensions}" files are supported. + * where: + * {name}: will be replaced by the file name being uploaded + * {extensions}: will be replaced by the comma separated list of extensions defined in allowedFileExtensions. + */ msgInvalidFileExtension?: string; /** - the message to be displayed when an ongoing ajax file upload is aborted by pressing the Cancel button. - Defaults to The file upload was aborted. - If this is set to null or empty, the internal ajax error message will be displayed - Defaults to File Upload Error. - */ + * the message to be displayed when an ongoing ajax file upload is aborted by pressing the Cancel button. + * Defaults to The file upload was aborted. + * If this is set to null or empty, the internal ajax error message will be displayed - Defaults to File Upload Error. + */ msgUploadAborted?: string; /** - the exception message to be displayed within the caption container (instead of msgFilesSelected), when a validation error is encountered. - Defaults to File Upload Error. - */ + * the exception message to be displayed within the caption container (instead of msgFilesSelected), when a validation error is encountered. + * Defaults to File Upload Error. + */ msgValidationError?: string; /** - the css class for the validation error message displayed in the caption container. - Defaults to text-danger. - */ + * the css class for the validation error message displayed in the caption container. + * Defaults to text-danger. + */ msgValidationErrorClass?: string; /** - the icon to be displayed before the validation error in the caption container. - Defaults to - */ + * the icon to be displayed before the validation error in the caption container. + * Defaults to + */ msgValidationErrorIcon?: string; /** - the css class for the error message to be displayed in the preview window when the file size exceeds maxSize. - Defaults to file-error-message. - */ + * the css class for the error message to be displayed in the preview window when the file size exceeds maxSize. + * Defaults to file-error-message. + */ msgErrorClass?: string; /** - the message displayed when the files are getting read and loaded for preview. - Defaults to - Loading file {index} of {files} … - The following special variables will be replaced: - {index}: the sequence number of the current file being loaded. - {files}: the total number of files selected for upload. - */ + * the message displayed when the files are getting read and loaded for preview. + * Defaults to + * Loading file {index} of {files} … + * The following special variables will be replaced: + * {index}: the sequence number of the current file being loaded. + * {files}: the total number of files selected for upload. + */ msgLoading?: string; /** - the progress message displayed as each file is loaded for preview. - Defaults to: - Loading file {index} of {files} - {name} - {percent}% completed. - The following variables will be replaced: - {index}: the sequence number of the current file being loaded. - {files}: the total number of files selected for upload. - {percent}: the percentage of file read and loaded. - {name}: the name of the current file being loaded. - */ + * the progress message displayed as each file is loaded for preview. + * Defaults to: + * Loading file {index} of {files} - {name} - {percent}% completed. + * The following variables will be replaced: + * {index}: the sequence number of the current file being loaded. + * {files}: the total number of files selected for upload. + * {percent}: the percentage of file read and loaded. + * {name}: the name of the current file being loaded. + */ msgProgress?: string; /** - the progress message displayed in caption window when multiple (more than one) files are selected. - Defaults to: - {n} files selected. - The following variables will be replaced: - {n}: the number of files selected. - */ + * the progress message displayed in caption window when multiple (more than one) files are selected. + * Defaults to: + * {n} files selected. + * The following variables will be replaced: + * {n}: the number of files selected. + */ msgSelected?: string; /** - the message displayed when a folder has been dragged to the drop zone. - Defaults to: - Drag & drop files only! {n} folder(s) dropped were skipped. - The following variables will be replaced: - {n}: the number of folders dropped. - */ + * the message displayed when a folder has been dragged to the drop zone. + * Defaults to: + * Drag & drop files only! {n} folder(s) dropped were skipped. + * The following variables will be replaced: + * {n}: the number of folders dropped. + */ msgFoldersNotAllowed?: string; /** - the exception message to be displayed when the file selected for preview is an image and its width is less than the minImageWidth setting. - Defaults to: - Width of image file "{name}" must be at least {size} px. - where: - {name}: will be replaced by the file name being uploaded. - {size}: will be replaced by the minImageWidth setting. - */ + * the exception message to be displayed when the file selected for preview is an image and its width is less than the minImageWidth setting. + * Defaults to: + * Width of image file "{name}" must be at least {size} px. + * where: + * {name}: will be replaced by the file name being uploaded. + * {size}: will be replaced by the minImageWidth setting. + */ msgImageWidthSmall?: string; /** - the exception message to be displayed when the file selected for preview is an image and its height is less than the minImageHeight setting. - Defaults to: - Height of image file "{name}" must be at least {size} px. - where: - {name}: will be replaced by the file name being uploaded. - {size}: will be replaced by the minImageHeight setting. - */ + * the exception message to be displayed when the file selected for preview is an image and its height is less than the minImageHeight setting. + * Defaults to: + * Height of image file "{name}" must be at least {size} px. + * where: + * {name}: will be replaced by the file name being uploaded. + * {size}: will be replaced by the minImageHeight setting. + */ msgImageHeightSmall?: string; /** - the exception message to be displayed when the file selected for preview is an image and its width exceeds the maxImageWidth setting. - Defaults to: - Width of image file "{name}" cannot exceed {size} px. - where: - {name}: will be replaced by the file name being uploaded. - {size}: will be replaced by the maxImageWidth setting. - */ + * the exception message to be displayed when the file selected for preview is an image and its width exceeds the maxImageWidth setting. + * Defaults to: + * Width of image file "{name}" cannot exceed {size} px. + * where: + * {name}: will be replaced by the file name being uploaded. + * {size}: will be replaced by the maxImageWidth setting. + */ msgImageWidthLarge?: string; /** - the exception message to be displayed when the file selected for preview is an image and its height exceeds the maxImageHeight setting. - Defaults to: - Height of image file "{name}" cannot exceed {size} px. - where: - {name}: will be replaced by the file name being uploaded. - {size}: will be replaced by the maxImageHeight setting. - */ + * the exception message to be displayed when the file selected for preview is an image and its height exceeds the maxImageHeight setting. + * Defaults to: + * Height of image file "{name}" cannot exceed {size} px. + * where: + * {name}: will be replaced by the file name being uploaded. + * {size}: will be replaced by the maxImageHeight setting. + */ msgImageHeightLarge?: string; /** - the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). - Defaults to progress-bar progress-bar-success progress-bar-striped active. - */ + * the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). + * Defaults to progress-bar progress-bar-success progress-bar-striped active. + */ progressClass?: string; /** - the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). - Defaults to progress-bar progress-bar-success progress-bar-striped active. - */ + * the upload progress bar CSS class to be applied when AJAX upload is in process (applicable only for ajax uploads). + * Defaults to progress-bar progress-bar-success progress-bar-striped active. + */ progressCompleteClass?: string; /** - the upload progress bar CSS class to be applied when AJAX upload is cancelled or aborted. - Defaults to progress-bar progress-bar-danger. - */ + * the upload progress bar CSS class to be applied when AJAX upload is cancelled or aborted. + * Defaults to progress-bar progress-bar-danger. + */ progressErrorClass?: string; /** - the type of files that are to be displayed in the preview window. - Defaults to image. - Can be one of the following: - image: Only image type files will be shown in preview. - text: Only text type files will be shown in preview. - any: Both image and text files content will be shown in preview. - Files other than image or text will be displayed as a thumbnail with the filename in the preview window. - */ - previewFileType?: "image" | "text" | "any"; + * the type of files that are to be displayed in the preview window. + * Defaults to image. + * Can be one of the following: + * image: Only image type files will be shown in preview. + * text: Only text type files will be shown in preview. + * any: Both image and text files content will be shown in preview. + * Files other than image or text will be displayed as a thumbnail with the filename in the preview window. + */ + previewFileType?: 'image' | 'text' | 'any'; /** - the icon for zooming the file content in a new modal dialog. - This is currently applicable only for text file previews. - Defaults to - */ + * the icon for zooming the file content in a new modal dialog. + * This is currently applicable only for text file previews. + * Defaults to + */ zoomIndicator?: string; /** - the identifier for the container element displaying the error (e.g. '#id'). - If not set, will default to the container with CSS class kv-fileinput-error inside the preview container (identified by elPreviewContainer). - The msgErrorClass will be automatically appended to this container before displaying the error. - */ + * the identifier for the container element displaying the error (e.g. '#id'). + * If not set, will default to the container with CSS class kv-fileinput-error inside the preview container (identified by elPreviewContainer). + * The msgErrorClass will be automatically appended to this container before displaying the error. + */ elErrorContainer?: string; /** - the identifier for the container element containing the caption (e.g. '#id'). - If not set, will default to the container with CSS class file-caption inside the main plugin container. - */ + * the identifier for the container element containing the caption (e.g. '#id'). + * If not set, will default to the container with CSS class file-caption inside the main plugin container. + */ elCaptionContainer?: string; /** - the identifier for the container element containing the caption text (e.g. '#id'). - If not set, will default to the container with CSS class file-caption-name inside the main plugin container. - */ + * the identifier for the container element containing the caption text (e.g. '#id'). + * If not set, will default to the container with CSS class file-caption-name inside the main plugin container. + */ elCaptionText?: string; /** - the identifier for the container element containing the preview (e.g. '#id'). - If not set, will default to the container with CSS class file-preview inside the main plugin container. - */ + * the identifier for the container element containing the preview (e.g. '#id'). + * If not set, will default to the container with CSS class file-preview inside the main plugin container. + */ elPreviewContainer?: string; /** - the identifier for the element containing the preview image thumbnails (e.g. '#id'). - If not set, will default to the container with CSS class file-preview-thumbnails inside the main plugin container. - */ + * the identifier for the element containing the preview image thumbnails (e.g. '#id'). + * If not set, will default to the container with CSS class file-preview-thumbnails inside the main plugin container. + */ elPreviewImage?: string; /** - the identifier for the element containing the preview progress status (e.g. '#id'). - If not set, will default to the container with CSS class file-preview-status inside the main plugin container. - */ + * the identifier for the element containing the preview progress status (e.g. '#id'). + * If not set, will default to the container with CSS class file-preview-status inside the main plugin container. + */ elPreviewStatus?: string; /** - a callback to convert the filename as a slug string eliminating special characters. - If not set, it will use the plugin's own internal slugDefault method. - This callback function includes the filename as parameter and must return a converted filename string. - */ + * a callback to convert the filename as a slug string eliminating special characters. + * If not set, it will use the plugin's own internal slugDefault method. + * This callback function includes the filename as parameter and must return a converted filename string. + */ slugCallback?: (filename: string) => string; /** - whether to enable a drag and drop zone for dragging and dropping files to. - This is available only for ajax based uploads. - Defaults to true. - */ + * whether to enable a drag and drop zone for dragging and dropping files to. + * This is available only for ajax based uploads. + * Defaults to true. + */ dropZoneEnabled?: boolean; /** - title to be displayed in the drag and drop zone. - This is available only for ajax based uploads. - Defaults to: - Drag & drop files here …. - */ + * title to be displayed in the drag and drop zone. + * This is available only for ajax based uploads. + * Defaults to: + * Drag & drop files here …. + */ dropZoneTitle?: string; /** - CSS class for the drag & drop zone title. - Defaults to file-drop-zone-title. - */ + * CSS class for the drag & drop zone title. + * Defaults to file-drop-zone-title. + */ dropZoneTitleClass?: string; /** - configuration for setting up file actions for newly selected file thumbnails in the preview window. - */ + * configuration for setting up file actions for newly selected file thumbnails in the preview window. + */ fileActionsettings?: FileActionSettings; /** - markup for additional action buttons to display within the initial preview thumbnails (for example displaying an image edit button). - The following tag can be used in the markup and will be automatically replaced: - {dataKey}: Will be replaced with the key set within initialPreviewConfig. - */ + * markup for additional action buttons to display within the initial preview thumbnails (for example displaying an image edit button). + * The following tag can be used in the markup and will be automatically replaced: + * {dataKey}: Will be replaced with the key set within initialPreviewConfig. + */ otherActionButtons?: string; /** - the encoding to be used while reading a text file. - Applicable only for previewing text files. - Defaults to UTF-8. - */ + * the encoding to be used while reading a text file. + * Applicable only for previewing text files. + * Defaults to UTF-8. + */ textEncoding?: string; /** - additional ajax settings to pass to the plugin before submitting the ajax request for upload. - Applicable only for ajax uploads. - This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. - Refer the jQuery ajax documentation for the various settings you can configure. - */ + * additional ajax settings to pass to the plugin before submitting the ajax request for upload. + * Applicable only for ajax uploads. + * This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. + * Refer the jQuery ajax documentation for the various settings you can configure. + */ ajaxSettings?: JQueryAjaxSettings; /** - additional ajax settings to pass to the plugin before submitting the delete ajax request in each initial preview thumbnail. - Applicable only for ajax uploads. - This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. - Refer the jQuery ajax documentation for the various settings you can configure. - */ + * additional ajax settings to pass to the plugin before submitting the delete ajax request in each initial preview thumbnail. + * Applicable only for ajax uploads. + * This can be useful to pass additional tokens to headers or one can use it for setting other ajax options for advanced cases. + * Refer the jQuery ajax documentation for the various settings you can configure. + */ ajaxDeleteSettings?: JQueryAjaxSettings; /** - whether to show details of the error stack from the server log when an error is encountered via ajax response. - Defaults to true. - */ + * whether to show details of the error stack from the server log when an error is encountered via ajax response. + * Defaults to true. + */ showAjaxErrorDetails?: boolean; } interface PreviewConfig { /** - the caption or filename to display for each initial preview item content. - */ + * the caption or filename to display for each initial preview item content. + */ caption: string; /** - the CSS width of the image/ content displayed. - */ + * the CSS width of the image/ content displayed. + */ width: string; /** - the URL for deleting the image/ content in the initial preview via AJAX post response.This will default to deleteUrl if not set. - */ + * the URL for deleting the image/ content in the initial preview via AJAX post response.This will default to deleteUrl if not set. + */ url: string; /** - the key that will be passed as data to the url via AJAX POST. - */ + * the key that will be passed as data to the url via AJAX POST. + */ key: string | {}; /** - the additional frame css class to set for the file's thumbnail frame. - */ + * the additional frame css class to set for the file's thumbnail frame. + */ frameClass: string; /** - the HTML attribute settings (set as key:value pairs) for the thumbnail frame. - */ + * the HTML attribute settings (set as key:value pairs) for the thumbnail frame. + */ frameAttr: {}; /** - the extra data that will be passed as data to the initial preview delete url / AJAX server call via POST.This will default to deleteExtraData if not set. - */ - extra: {} | Function; + * the extra data that will be passed as data to the initial preview delete url / AJAX server call via POST. + * This will default to deleteExtraData if not set. + */ + extra: {} | (() => {}); + } + + interface PreviewInfo { + readonly content: string[]; + readonly config: PreviewConfig[]; + readonly tags: string[]; } interface LayoutTemplates { /** - the template for rendering the widget with caption. - The following tags will be parsed and replaced automatically: - {class}: the CSS class as set in the mainClass property. - {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. - {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. - {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. - {remove}: the file remove/clear button and will be displayed only if showRemove is true. - {upload}: the file upload button and will be displayed only if showUpload is true. - {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. - {browse}: the main file browse button to select your files for input. - */ + * the template for rendering the widget with caption. + * The following tags will be parsed and replaced automatically: + * {class}: the CSS class as set in the mainClass property. + * {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. + * {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. + * {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. + * {remove}: the file remove/clear button and will be displayed only if showRemove is true. + * {upload}: the file upload button and will be displayed only if showUpload is true. + * {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. + * {browse}: the main file browse button to select your files for input. + */ main1?: string; /** - the template for rendering the widget without caption. - The following tags will be parsed and replaced automatically: - {class}: the CSS class as set in the mainClass property. - {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. - {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. - {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. - {remove}: the file remove/clear button and will be displayed only if showRemove is true. - {upload}: the file upload button and will be displayed only if showUpload is true. - {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. - {browse}: the main file browse button to select your files for input. - */ + * the template for rendering the widget without caption. + * The following tags will be parsed and replaced automatically: + * {class}: the CSS class as set in the mainClass property. + * {close}: will be replaced with the close (cross) icon (by default on top right of the preview window). The layout template to control this markup is layoutTemplates.close. + * {preview}: the content parsed by the previewTemplate and will be displayed only if showPreview is true. + * {caption}: the content parsed by the captionTemplate and will be displayed only if showCaption is true. + * {remove}: the file remove/clear button and will be displayed only if showRemove is true. + * {upload}: the file upload button and will be displayed only if showUpload is true. + * {cancel}: the file upload cancel button that will be displayed when AJAX upload is in process to abort the AJAX upload. + * {browse}: the main file browse button to select your files for input. + */ main2?: string; /** - the template for rendering the preview. - The following tags will be parsed and replaced automatically: - {class}: the CSS class as set in the previewClass property. - */ + * the template for rendering the preview. + * The following tags will be parsed and replaced automatically: + * {class}: the CSS class as set in the previewClass property. + */ preview?: string; /** - the icon to render before the caption text. - */ + * the icon to render before the caption text. + */ icon?: string; /** - the template for rendering the caption. - The following tags will be parsed and replaced automatically: - {class}: the CSS class as set in the captionClass property. - */ + * the template for rendering the caption. + * The following tags will be parsed and replaced automatically: + * {class}: the CSS class as set in the captionClass property. + */ caption?: string; /** - the template for rendering the modal (for text file preview zooming). - */ + * the template for rendering the modal (for text file preview zooming). + */ modal?: string; /** - the template for the progress bar when upload is in progress (for batch/mass uploads and within each preview thumbnail for async/single uploads). - The upload progress bar when displayed within each thumbnail will be wrapped inside a container having a CSS class of `file-thumb-progress`. - The following tags will be parsed and replaced automatically: - {percent}: will be replaced with the upload progress percentage. - */ + * the template for the progress bar when upload is in progress (for batch/mass uploads and within each preview thumbnail for async/single uploads). + * The upload progress bar when displayed within each thumbnail will be wrapped inside a container having a CSS class of `file-thumb-progress`. + * The following tags will be parsed and replaced automatically: + * {percent}: will be replaced with the upload progress percentage. + */ progress?: string; /** - the template for the footer section of each file preview thumbnail. - The following tags will be parsed and replaced automatically: - {actions}: will be replaced with the output of the actions template. - {class}: the CSS class as set in the progressClass or progressCompleteClass property (depending on the progress percentage). - */ + * the template for the footer section of each file preview thumbnail. + * The following tags will be parsed and replaced automatically: + * {actions}: will be replaced with the output of the actions template. + * {class}: the CSS class as set in the progressClass or progressCompleteClass property (depending on the progress percentage). + */ footer?: string; /** - the template for the file action buttons to be displayed within the thumbnail footer. - The following tags will be parsed and replaced automatically: - {upload}: will be replaced with the output of the actionUpload template. - {delete}: will be replaced with the output of the actionDelete template. - */ + * the template for the file action buttons to be displayed within the thumbnail footer. + * The following tags will be parsed and replaced automatically: + * {upload}: will be replaced with the output of the actionUpload template. + * {delete}: will be replaced with the output of the actionDelete template. + */ actions?: string; /** - the template for the file delete action button within the thumbnail footer. - The following tags will be parsed and replaced automatically: - {removeClass}: the css class for the remove button. Will be replaced with the removeClass set within fileActionSettings. - {removeIcon}: the icon for the remove button. Will be replaced with the removeIcon set within fileActionSettings. - {removeTitle}: the title to display on hover for the remove button. Will be replaced with the removeTitle set within fileActionSettings. - {dataUrl}: the URL for deleting the file thumbnail for initialPreview content only. Will be replaced with the url set within initialPreviewConfig. - {dataKey}: the key (additional data) that will be passed to the URL above via POST to the AJAX call. Will be replaced with the key set within initialPreviewConfig. - */ + * the template for the file delete action button within the thumbnail footer. + * The following tags will be parsed and replaced automatically: + * {removeClass}: the css class for the remove button. Will be replaced with the removeClass set within fileActionSettings. + * {removeIcon}: the icon for the remove button. Will be replaced with the removeIcon set within fileActionSettings. + * {removeTitle}: the title to display on hover for the remove button. Will be replaced with the removeTitle set within fileActionSettings. + * {dataUrl}: the URL for deleting the file thumbnail for initialPreview content only. Will be replaced with the url set within initialPreviewConfig. + * {dataKey}: the key (additional data) that will be passed to the URL above via POST to the AJAX call. Will be replaced with the key set within initialPreviewConfig. + */ actionDelete?: string; /** - the template for the file upload action button within the thumbnail footer. - The following tags will be parsed and replaced automatically: - {uploadClass}: the css class for the upload button. Will be replaced with the uploadClass set within fileActionSettings. - {uploadIcon}: the icon for the upload button. Will be replaced with the uploadIcon set within fileActionSettings. - {uploadTitle}: the title to display on hover for the upload button. Will be replaced with the uploadTitle set within fileActionSettings. - */ + * the template for the file upload action button within the thumbnail footer. + * The following tags will be parsed and replaced automatically: + * {uploadClass}: the css class for the upload button. Will be replaced with the uploadClass set within fileActionSettings. + * {uploadIcon}: the icon for the upload button. Will be replaced with the uploadIcon set within fileActionSettings. + * {uploadTitle}: the title to display on hover for the upload button. Will be replaced with the uploadTitle set within fileActionSettings. + */ actionUpload?: string; /** - The template for upload, remove, and cancel buttons. - The following tags will be parsed and replaced automatically: - {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. - {title}: the title to display on button hover. - {css}: the CSS class for the button. This is derived from settings for uploadClass or removeClass or cancelClass. - {status}: the disabled status for the button if available (else will be blank). - {icon}: the button icon as identified by uploadIcon or removeIcon or cancelIcon. - {label}: the button label as identified by uploadLabel or removeLabel or cancelLabel. - */ + * The template for upload, remove, and cancel buttons. + * The following tags will be parsed and replaced automatically: + * {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. + * {title}: the title to display on button hover. + * {css}: the CSS class for the button. This is derived from settings for uploadClass or removeClass or cancelClass. + * {status}: the disabled status for the button if available (else will be blank). + * {icon}: the button icon as identified by uploadIcon or removeIcon or cancelIcon. + * {label}: the button label as identified by uploadLabel or removeLabel or cancelLabel. + */ btnDefault?: string; /** - The template for upload button when used with ajax (i.e. when uploadUrl is set). - The following tags will be parsed and replaced automatically: - {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. - {title}: the title to display on button hover. - {css}: the CSS class for the button. This is derived from settings for uploadClass. - {status}: the disabled status for the button if available (else will be blank). - {icon}: the button icon as identified by uploadIcon. - {label}: the button label as identified by uploadLabel. - {href}: applicable only for Upload button for ajax uploads and will be replaced with the uploadUrl property. - */ + * The template for upload button when used with ajax (i.e. when uploadUrl is set). + * The following tags will be parsed and replaced automatically: + * {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. + * {title}: the title to display on button hover. + * {css}: the CSS class for the button. This is derived from settings for uploadClass. + * {status}: the disabled status for the button if available (else will be blank). + * {icon}: the button icon as identified by uploadIcon. + * {label}: the button label as identified by uploadLabel. + * {href}: applicable only for Upload button for ajax uploads and will be replaced with the uploadUrl property. + */ btnLink?: string; /** - The template for the browse button. - {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. - {title}: the title to display on button hover. - {css}: the CSS class for the button. This is derived from settings for browseClass. - {status}: the disabled status for the button if available (else will be blank). - {icon}: the button icon as identified by browseIcon. - {label}: the button label as identified by browseLabel. - */ + * The template for the browse button. + * {type}: the HTML button type, defaults to button for most buttons and submit for form based uploads. + * {title}: the title to display on button hover. + * {css}: the CSS class for the button. This is derived from settings for browseClass. + * {status}: the disabled status for the button if available (else will be blank). + * {icon}: the button icon as identified by browseIcon. + * {label}: the button label as identified by browseLabel. + */ btnBrowse?: string; } interface PreviewTemplates { /** - the preview template for image files. - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ + * the preview template for image files. + * The following tags will be parsed and replaced automatically: + * {previewId}: will be replaced with the generated identifier for the preview frame container. + * {data}: will be replaced with the data source for each preview type. + * {width}: will be replaced with the width for the file type as set in previewSettings. + * {height}: will be replaced with the height for the file type as set in previewSettings. + * {caption}: will be replaced with the file name. + * {type}: will be replaced with the file type. + */ image?: string; /** - the preview template for text files. - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - {dialog}: Will be replaced with the JS code to launch the modal dialog. - {zoomTitle}: This will be replaced with the msgZoomTitle property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). - {zoomInd}: This will be replaced with the zoomIndicator property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). - {heading}: This represents the modal dialog heading title. This will be replaced with the msgZoomModalHeading property. - */ + * the preview template for text files. + * The following tags will be parsed and replaced automatically: + * {previewId}: will be replaced with the generated identifier for the preview frame container. + * {data}: will be replaced with the data source for each preview type. + * {width}: will be replaced with the width for the file type as set in previewSettings. + * {height}: will be replaced with the height for the file type as set in previewSettings. + * {caption}: will be replaced with the file name. + * {type}: will be replaced with the file type. + * {dialog}: Will be replaced with the JS code to launch the modal dialog. + * {zoomTitle}: This will be replaced with the msgZoomTitle property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). + * {zoomInd}: This will be replaced with the zoomIndicator property. This is the title that is displayed on hover of the zoom button (which on clicking will display the text file). + * {heading}: This represents the modal dialog heading title. This will be replaced with the msgZoomModalHeading property. + */ text?: string; /** - the preview template for html files. - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ + * the preview template for html files. + * The following tags will be parsed and replaced automatically: + * {previewId}: will be replaced with the generated identifier for the preview frame container. + * {data}: will be replaced with the data source for each preview type. + * {width}: will be replaced with the width for the file type as set in previewSettings. + * {height}: will be replaced with the height for the file type as set in previewSettings. + * {caption}: will be replaced with the file name. + * {type}: will be replaced with the file type. + */ html?: string; /** - the preview template for video files (supported by HTML 5 video tag). - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ + * the preview template for video files (supported by HTML 5 video tag). + * The following tags will be parsed and replaced automatically: + * {previewId}: will be replaced with the generated identifier for the preview frame container. + * {data}: will be replaced with the data source for each preview type. + * {width}: will be replaced with the width for the file type as set in previewSettings. + * {height}: will be replaced with the height for the file type as set in previewSettings. + * {caption}: will be replaced with the file name. + * {type}: will be replaced with the file type. + */ video?: string; /** - the preview template for audio files (supported by HTML 5 audio tag). - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ + * the preview template for audio files (supported by HTML 5 audio tag). + * The following tags will be parsed and replaced automatically: + * {previewId}: will be replaced with the generated identifier for the preview frame container. + * {data}: will be replaced with the data source for each preview type. + * {width}: will be replaced with the width for the file type as set in previewSettings. + * {height}: will be replaced with the height for the file type as set in previewSettings. + * {caption}: will be replaced with the file name. + * {type}: will be replaced with the file type. + */ audio?: string; /** - the preview template for flash files (supported currently on webkit browsers). - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ + * the preview template for flash files (supported currently on webkit browsers). + * The following tags will be parsed and replaced automatically: + * {previewId}: will be replaced with the generated identifier for the preview frame container. + * {data}: will be replaced with the data source for each preview type. + * {width}: will be replaced with the width for the file type as set in previewSettings. + * {height}: will be replaced with the height for the file type as set in previewSettings. + * {caption}: will be replaced with the file name. + * {type}: will be replaced with the file type. + */ flash?: string; /** - the preview template for all other files - by default treated as object. To disable this behavior, configure the allowedPreviewTypes property. - The following tags will be parsed and replaced automatically: - {previewId}: will be replaced with the generated identifier for the preview frame container. - {data}: will be replaced with the data source for each preview type. - {width}: will be replaced with the width for the file type as set in previewSettings. - {height}: will be replaced with the height for the file type as set in previewSettings. - {caption}: will be replaced with the file name. - {type}: will be replaced with the file type. - */ + * the preview template for all other files - by default treated as object. To disable this behavior, configure the allowedPreviewTypes property. + * The following tags will be parsed and replaced automatically: + * {previewId}: will be replaced with the generated identifier for the preview frame container. + * {data}: will be replaced with the data source for each preview type. + * {width}: will be replaced with the width for the file type as set in previewSettings. + * {height}: will be replaced with the height for the file type as set in previewSettings. + * {caption}: will be replaced with the file name. + * {type}: will be replaced with the file type. + */ object?: string; /** - this template is used ONLY for rendering the initialPreview markup content passed directly as a raw format. - The following tags will be parsed and replaced automatically: - {content}: will be replaced with the raw HTML markup as set in initialPreview.. - */ + * this template is used ONLY for rendering the initialPreview markup content passed directly as a raw format. + * The following tags will be parsed and replaced automatically: + * {content}: will be replaced with the raw HTML markup as set in initialPreview.. + */ generic?: string; } interface PreviewSettings { - image?: { width?: string; height?: string; }; - html?: { width?: string; height?: string; }; - text?: { width?: string; height?: string; }; - video?: { width?: string; height?: string; }; - audio?: { width?: string; height?: string; }; - flash?: { width?: string; height?: string; }; - object?: { width?: string; height?: string; }; - other?: { width?: string; height?: string; }; + image?: { width?: string; height?: string }; + html?: { width?: string; height?: string }; + text?: { width?: string; height?: string }; + video?: { width?: string; height?: string }; + audio?: { width?: string; height?: string }; + flash?: { width?: string; height?: string }; + object?: { width?: string; height?: string }; + other?: { width?: string; height?: string }; } interface FileTypeSettings { @@ -990,60 +1096,64 @@ declare module BootstrapFileInput { interface FileActionSettings { /** - icon for remove button to be displayed in each file thumbnail. - */ + * icon for remove button to be displayed in each file thumbnail. + */ removeIcon: string; /** - CSS class for the remove button in each file thumbnail. - */ + * CSS class for the remove button in each file thumbnail. + */ removeClass: string; /** - title for remove button in each file thumbnail. - */ + * title for remove button in each file thumbnail. + */ removeTitle: string; /** - icon for upload button to be displayed in each file thumbnail. - */ + * icon for upload button to be displayed in each file thumbnail. + */ uploadIcon: string; /** - CSS class for the remove button in each file thumbnail. - */ + * CSS class for the remove button in each file thumbnail. + */ uploadClass: string; /** - title for remove button in each file thumbnail. - */ + * title for remove button in each file thumbnail. + */ uploadTitle: string; /** - an indicator (HTML markup) for new pending upload displayed in each file thumbnail. - */ + * an indicator (HTML markup) for new pending upload displayed in each file thumbnail. + */ indicatorNew: string; /** - an indicator (HTML markup) for successful upload displayed in each file thumbnail. - */ + * an indicator (HTML markup) for successful upload displayed in each file thumbnail. + */ indicatorSuccess: string; /** - an indicator (HTML markup) for error in upload displayed in each file thumbnail. - */ + * an indicator (HTML markup) for error in upload displayed in each file thumbnail. + */ indicatorError: string; /** - an indicator (HTML markup) for ongoing upload displayed in each file thumbnail. - */ + * an indicator (HTML markup) for ongoing upload displayed in each file thumbnail. + */ indicatorLoading: string; /** - title to display on hover of indicator for new pending upload in each file thumbnail. - */ + * title to display on hover of indicator for new pending upload in each file thumbnail. + */ indicatorNewTitle: string; /** - title to display on hover of indicator for successful in each file thumbnail. - */ + * title to display on hover of indicator for successful in each file thumbnail. + */ indicatorSuccessTitle: string; /** - title to display on hover of indicator for error in upload in each file thumbnail. - */ + * title to display on hover of indicator for error in upload in each file thumbnail. + */ indicatorErrorTitle: string; /** - title to display on hover of indicator for ongoing upload in each file thumbnail. - */ + * title to display on hover of indicator for ongoing upload in each file thumbnail. + */ indicatorLoadingTitle: string; } + + interface FileStack { + [fileId: string]: File; + } } diff --git a/types/bootstrap-fileinput/tsconfig.json b/types/bootstrap-fileinput/tsconfig.json index 71e6b79545..5e8d02389b 100644 --- a/types/bootstrap-fileinput/tsconfig.json +++ b/types/bootstrap-fileinput/tsconfig.json @@ -18,6 +18,7 @@ "forceConsistentCasingInFileNames": true }, "files": [ - "index.d.ts" + "index.d.ts", + "bootstrap-fileinput-tests.ts" ] } diff --git a/types/bootstrap-fileinput/tslint.json b/types/bootstrap-fileinput/tslint.json index 696b1dc99d..3db14f85ea 100644 --- a/types/bootstrap-fileinput/tslint.json +++ b/types/bootstrap-fileinput/tslint.json @@ -1,16 +1 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "array-type": false, - "ban-types": false, - "callable-types": false, - "dt-header": false, - "export-just-namespace": false, - "jsdoc-format": false, - "max-line-length": false, - "no-internal-module": false, - "no-redundant-jsdoc": false, - "prefer-method-signature": false, - "semicolon": false - } -} \ No newline at end of file +{ "extends": "dtslint/dt.json" } diff --git a/types/bootstrap-filestyle/index.d.ts b/types/bootstrap-filestyle/index.d.ts new file mode 100644 index 0000000000..9f1200d4cb --- /dev/null +++ b/types/bootstrap-filestyle/index.d.ts @@ -0,0 +1,30 @@ +// Type definitions for bootstrap-filestyle 1.2 +// Project: https://github.com/markusslima/bootstrap-filestyle +// Definitions by: Mustafa Salaheldin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +interface FilestyleOptions { + buttonText?: string; + iconName?: string; + buttonName?: string; + size?: string; + input?: boolean; + badge?: boolean; + icon?: boolean; + buttonBefore?: boolean; + disabled?: boolean; + placeholder?: string; +} + +interface JQuery { + filestyle(options?: FilestyleOptions): JQuery; + + filestyle(method: 'clear' | 'destroy' | 'htmlIcon' | 'htmlInput' | 'pushNameFiles'): JQuery; + + filestyle(method: 'disabled' | 'buttonBefore' | 'icon' | 'input', value: boolean): JQuery; + + filestyle(method: 'size' | 'placeholder' | 'buttonText' | 'buttonName' | 'iconName', value: string): JQuery; +} diff --git a/types/docx-templates/tsconfig.json b/types/bootstrap-filestyle/tsconfig.json similarity index 87% rename from types/docx-templates/tsconfig.json rename to types/bootstrap-filestyle/tsconfig.json index 7d32f5f32c..e723c4e112 100644 --- a/types/docx-templates/tsconfig.json +++ b/types/bootstrap-filestyle/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ + "dom", "es6" ], "noImplicitAny": true, @@ -16,5 +17,7 @@ "noEmit": true, "forceConsistentCasingInFileNames": true }, - "files": ["index.d.ts", "docx-templates-tests.ts"] + "files": [ + "index.d.ts" + ] } diff --git a/types/bootstrap-filestyle/tslint.json b/types/bootstrap-filestyle/tslint.json new file mode 100644 index 0000000000..e0b2b629b7 --- /dev/null +++ b/types/bootstrap-filestyle/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "interface-name": [true, "never-prefix"] + + } +} diff --git a/types/bootstrap-maxlength/tsconfig.json b/types/bootstrap-maxlength/tsconfig.json index ba4c754fd6..b812fa849f 100644 --- a/types/bootstrap-maxlength/tsconfig.json +++ b/types/bootstrap-maxlength/tsconfig.json @@ -6,7 +6,7 @@ "dom" ], "noImplicitAny": true, - "noImplicitThis": false, + "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", diff --git a/types/bootstrap-multiselect/index.d.ts b/types/bootstrap-multiselect/index.d.ts new file mode 100644 index 0000000000..d3b10ddc73 --- /dev/null +++ b/types/bootstrap-multiselect/index.d.ts @@ -0,0 +1,313 @@ +// Type definitions for bootstrap-multiselect 0.9 +// Project: https://github.com/davidstutz/bootstrap-multiselect +// Definitions by: Mustafa Salaheldin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +interface Templates { + button?: string; + ul?: string; + filter?: string; + filterClearBtn?: string; + li?: string; + divider?: string; + liGroup?: string; +} + +interface MultiSelectOptionElement { + label: string; + title?: string; + value?: string | number; + selected?: boolean; + disabled?: boolean; + children?: MultiSelectOptionElement[]; + attributes?: {[name: string]: any}; +} + +interface MultiSelectOptions { + /** + * XSS injection is a serious threat for all modern web applications. Setting enableHTML to false (default setting) will create a XSS safe multiselect. + */ + enableHTML?: boolean; + + /** + * If set to true, optgroup's will be clickable, allowing to easily select multiple options belonging to the same group. + * enableClickableOptGroups is not available in single selection mode, i.e. when the multiple attribute is not present. + * When using selectedClass, the selected classes are also applied on the option groups. + */ + enableClickableOptGroups?: boolean; + + /** + * If set to true, optgroup's will be collapsible. + */ + enableCollapsibleOptGroups?: boolean; + + /** + * If set to true, the multiselect will be disabled if no options are given. + */ + disableIfEmpty?: boolean; + + /** + * The text shown if the multiselect is disabled. + * Note that this option is set to the empty string '' by default, + * that is nonSelectedText is shown if the multiselect is disabled and no options are selected. + */ + disabledText?: string; + + /** + * The dropdown can also be dropped right. + */ + dropRight?: boolean; + + /** + * The dropdown can also be dropped up. Note that it is recommended to also set {@link maxHeight}. + * The plugin calculates the necessary height of the dropdown and takes the minimum of the calculated value and maxHeight. + */ + dropUp?: boolean; + + /** + * The maximum height of the dropdown. This is useful when using the plugin with plenty of options. + */ + maxHeight?: number; + + /** + * The name used for the generated checkboxes. + * See {@link https://davidstutz.github.io/bootstrap-multiselect/#post|Server-Side Processing} for details. + */ + checkboxName?: string; + + /** + * A function which is triggered on the change event of the options. + * Note that the event is not triggered when selecting or deselecting options using the select and deselect methods provided by the plugin. + * @param option The option item that was changed, wrapped in a JQuery object. + * @param checked Whether the checkbox was checked or not. + */ + onChange?: (option: JQuery, checked: boolean) => void; + + /** + * A function which is triggered when the multiselect is finished initializing. + */ + onInitialized?: (select: HTMLSelectElement, container: HTMLElement) => void; + + /** + * A callback called when the dropdown is shown. + * The onDropdownShow option is not available when using Twitter Bootstrap 2.3. + */ + onDropdownShow?: (event: Event) => void; + + /** + * A callback called when the dropdown is closed. + * The onDropdownHide option is not available when using Twitter Bootstrap 2.3. + */ + onDropdownHide?: (event: Event) => void; + + /** + * A callback called after the dropdown has been shown. + * The onDropdownShown option is not available when using Twitter Bootstrap 2.3. + */ + onDropdownShown?: (event: Event) => void; + + /** + * A callback called after the dropdown has been closed. + * The onDropdownHidden option is not available when using Twitter Bootstrap 2.3. + */ + onDropdownHidden?: (event: Event) => void; + + /** + * The class of the multiselect button. + * @exampl. + * $('#example-buttonClass').multiselect({ + * buttonClass: 'btn btn-link' + * }); + */ + buttonClass?: string; + + /** + * Inherit the class of the button from the original select. + */ + inheritClass?: boolean; + + /** + * The container holding both the button as well as the dropdown. + * @exampl. + * $('#example-buttonContainer').multiselect({ + * buttonContainer: '
' + * }); + */ + buttonContainer?: string; + + /** + * The width of the multiselect button may be fixed using this option. + * Actually, buttonWidth describes the width of the .btn-group container and the width of the button is set to 100%. + * @example. + * $('#example-buttonWidth').multiselect({ + * buttonWidth: '400px' + * }); + */ + buttonWidth?: string; + + /** + * A callback specifying the text shown on the button dependent on the currently selected options. + * The callback gets the currently selected options and the select as argument and returns the string shown as button text. + * The default buttonText callback returns nonSelectedText in the case no option is selected, + * {@link nSelectedText} in the case more than {@link numberDisplayed} options are selected + * and the names of the selected options if less than {@link numberDisplayed} options are selected. + * @param options + * @param select + */ + buttonText?: (options: HTMLOptionsCollection, select: HTMLSelectElement) => string; + + /** + * A callback specifying the title of the button. + * The callback gets the currently selected options and the select as argument and returns the title of the button as string. + * The default buttonTitle callback returns nonSelectedText in the case no option is selected and the names of the selected options of less than {@link numberDisplayed} options are selected. + * If more than numberDisplayed options are selected, {@link nSelectedText} is returned. + * @param options + * @param select + */ + buttonTitle?: (options: HTMLOptionElement[], select: HTMLSelectElement) => string; + + /** + * The text displayed when no option is selected. This option is used in the default buttonText and buttonTitle functions. + */ + nonSelectedText?: string; + + /** + * The text displayed if more than {@link numberDisplayed} options are selected. This option is used by the default buttonText and buttonTitle callbacks. + */ + nSelectedText?: string; + + /** + * allSelectedText is the text displayed if all options are selected. You can disable displaying the allSelectedText by setting it to false. + */ + allSelectedText?: string | boolean; + + /** + * This option is used by the buttonText and buttonTitle functions to determine of too much options would be displayed. + */ + numberDisplayed?: number; + + /** + * Sets the separator for the list of selected items for mouse-over. Defaults to ', '. Set to '\n' for a neater display. + */ + delimiterText?: string; + + /** + * A callback used to define the labels of the options. + */ + optionLabel?: (element: HTMLElement) => string; + + /** + * A callback used to define the classes for the li elements containing checkboxes and labels. + */ + optionClass?: (element: HTMLElement) => string; + + /** + * The class(es) applied on selected options. + */ + selectedClass?: string; + + /** + * Set to true or false to enable or disable the select all option. + */ + includeSelectAllOption?: boolean; + + /** + * Setting both {@link includeSelectAllOption} and {@link enableFiltering} to true, the select all option does always select only the visible option. + * With setting selectAllJustVisible to false this behavior is changed such that always all options (irrespective of whether they are visible) are selected. + */ + selectAllJustVisible?: boolean; + + /** + * The text displayed for the select all option. + */ + selectAllText?: string; + + /** + * The select all option is added as additional option within the select. + * To distinguish this option from the original options the value used for the select all option can be configured using the selectAllValue option. + */ + selectAllValue?: string | number; + + /** + * This option allows to control the name given to the select all option. + * See {@link https://davidstutz.github.io/bootstrap-multiselect/#post|Server-Side Processing} for more details. + */ + selectAllName?: string; + + /** + * If set to true (default), the number of selected options will be shown in parantheses when all options are seleted. + */ + selectAllNumber?: boolean; + + /** + * This function is triggered when the select all option is used to select all options. + * Note that this can also be triggered manually using the {@link .multiselect('selectAll')} method. + * Note that the onChange option is not triggered when (de)selecting all options using the select all option. + * The onSelectAll option is only triggered if the select all option was checked. + * it is not triggered if all options were checked manually (causing the select all option to be checked as well). + */ + onSelectAll?: () => void; + + /** + * This function is triggered when the select all option is used to deselect all options. + * Note that this can also be triggered manually using the {@link .multiselect('deselectAll')} method. + * Note that the onChange option is not triggered when (de)selecting all options using the select all option. + * The onDeselectAll option is only triggered if the select all option was unchecked. + * it is not triggered if all options were unchecked manually (causing the select all option to be unchecked as well). + */ + onDeselectAll?: () => void; + + /** + * Set to true or false to enable or disable the filter. A filter input will be added to dynamically filter all options. + */ + enableFiltering?: boolean; + + /** + * The filter as configured above will use case sensitive filtering. + * by setting enableCaseInsensitiveFiltering to true this behavior can be changed to use case insensitive filtering. + */ + enableCaseInsensitiveFiltering?: boolean; + + /** + * Set to true to enable full value filtering, that is all options are shown where the query is a prefix of. + */ + enableFullValueFiltering?: boolean; + + /** + * The options are filtered based on their text. This behavior can be changed to use the value of the options or both the text and the value. + */ + filterBehavior?: 'text' | 'value' | 'both'; + + /** + * The placeholder used for the filter input. + * @example $('#example-filter-placeholder').multiselect({ + * enableFiltering: true, + * filterPlaceholder: 'Search for something...' + * }); + */ + filterPlaceholder?: string; + + /** + * The generated HTML markup can be controlled using templates. Basically, templates are simple configuration options. + */ + templates?: Templates; +} + +interface JQuery { + multiselect(options?: MultiSelectOptions): JQuery; + + multiselect(method: 'destroy' | 'refresh' | 'rebuild' | 'updateButtonText'| 'disable' | 'enable'): JQuery; + + multiselect(method: 'select' | 'deselect', value: string | string[] | number, triggerOnChange?: boolean): JQuery; + + multiselect(method: 'selectAll' | 'deselectAll', justVisible?: boolean): JQuery; + + multiselect(method: 'setOptions', options: MultiSelectOptions): JQuery; + + multiselect(method: 'dataprovider', data: MultiSelectOptionElement[]): JQuery; + + multiselect(method: 'setAllSelectedText', value: string): JQuery; +} diff --git a/types/bootstrap-multiselect/tsconfig.json b/types/bootstrap-multiselect/tsconfig.json new file mode 100644 index 0000000000..e723c4e112 --- /dev/null +++ b/types/bootstrap-multiselect/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts" + ] +} diff --git a/types/bootstrap-multiselect/tslint.json b/types/bootstrap-multiselect/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bootstrap-multiselect/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bootstrap/bootstrap-tests.ts b/types/bootstrap/bootstrap-tests.ts index df172d9484..e196040b4e 100755 --- a/types/bootstrap/bootstrap-tests.ts +++ b/types/bootstrap/bootstrap-tests.ts @@ -51,6 +51,7 @@ $("#carousel").carousel({ keyboard: true, slide: false, pause: "hover", + ride: 'carousel', wrap: true, touch: false, }); @@ -169,6 +170,10 @@ $("#modal").modal({ backdrop: "static", }); +$("#modal").on('hidePrevented.bs.modal', e => { + const {data, target: modal} = e; +}); + // -------------------------------------------------------------------------------------- // Popover // -------------------------------------------------------------------------------------- @@ -307,6 +312,9 @@ $("#tooltip").tooltip({ img: ['src', 'alt', 'title', 'width', 'height'], }, sanitizeFn: (x: string) => x.replace("<", ""), + popperConfig: { + placement: 'bottom', + }, }); $("#tooltip").tooltip({ diff --git a/types/bootstrap/index.d.ts b/types/bootstrap/index.d.ts index 1cd7c858b3..608777ac69 100755 --- a/types/bootstrap/index.d.ts +++ b/types/bootstrap/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for Bootstrap 4.3 // Project: https://github.com/twbs/bootstrap/, https://getbootstrap.com // Definitions by: denisname +// Piotr Błażejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -74,6 +75,13 @@ export interface CarouselOption { */ pause?: "hover" | false; + /** + * Autoplays the carousel after the user manually cycles the first item. + * If `carousel`, autoplays the carousel on load. + * @default false + */ + ride?: 'carousel' | boolean; + /** * Whether the carousel should cycle continuously or have hard stops. * @@ -371,6 +379,12 @@ export interface TooltipOption { * @default null */ sanitizeFn?: null | ((input: string) => string); + + /** + * To change Bootstrap's default Popper.js config, + * see {@link https://popper.js.org/docs/v1/ Popper.js's configuration} + */ + popperConfig?: null | object; } // -------------------------------------------------------------------------------------- @@ -449,7 +463,7 @@ export type AlertEvent = "close.bs.alert" | "closed.bs.alert"; export type CarouselEvent = "slide.bs.carousel" | "slid.bs.carousel"; export type CollapseEvent = "show.bs.collapse" | "shown.bs.collapse" | "hide.bs.collapse" | "hidden.bs.collapse"; export type DropdownEvent = "show.bs.dropdown" | "shown.bs.dropdown" | "hide.bs.dropdown" | "hidden.bs.dropdown"; -export type ModalEvent = "show.bs.modal" | "shown.bs.modal" | "hide.bs.modal" | "hidden.bs.modal"; +export type ModalEvent = "show.bs.modal" | "shown.bs.modal" | "hide.bs.modal" | "hidden.bs.modal" | "hidePrevented.bs.modal"; export type PopoverEvent = "show.bs.popover" | "shown.bs.popover" | "hide.bs.popover" | "hidden.bs.popover" | "inserted.bs.popover"; export type ScrollspyEvent = "activate.bs.scrollspy"; export type TapEvent = "show.bs.tab" | "shown.bs.tab" | "hide.bs.tab" | "hidden.bs.tab"; diff --git a/types/brainhubeu__react-carousel/brainhubeu__react-carousel-tests.tsx b/types/brainhubeu__react-carousel/brainhubeu__react-carousel-tests.tsx index 7513fab121..7dbb54b12e 100644 --- a/types/brainhubeu__react-carousel/brainhubeu__react-carousel-tests.tsx +++ b/types/brainhubeu__react-carousel/brainhubeu__react-carousel-tests.tsx @@ -49,12 +49,13 @@ class MyCarousel extends React.Component { slidesPerPage={1} slidesPerScroll={3} stopAutoPlayOnHover - value={value}> + value={value} + rtl={false}> image-1 image-2 image-3 - + ); } diff --git a/types/brainhubeu__react-carousel/index.d.ts b/types/brainhubeu__react-carousel/index.d.ts index 747f0a758d..47af95fdd3 100644 --- a/types/brainhubeu__react-carousel/index.d.ts +++ b/types/brainhubeu__react-carousel/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for @brainhubeu/react-carousel 1.10 +// Type definitions for @brainhubeu/react-carousel 1.13 // Project: https://github.com/brainhubeu/react-carousel // Definitions by: Jack Allen +// Jeff Wen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -13,6 +14,7 @@ export interface DotsProps { thumbnails?: ImgProps[]; value?: number; onChange?(value: number): void; + rtl?: boolean; } export class Dots extends React.Component { @@ -40,6 +42,7 @@ export interface CarouselProps { animationSpeed?: number; dots?: boolean; breakpoints?: any; + rtl?: boolean; } export default class extends React.Component { diff --git a/types/braintree-web/index.d.ts b/types/braintree-web/index.d.ts index f99e11883b..bd6544f735 100644 --- a/types/braintree-web/index.d.ts +++ b/types/braintree-web/index.d.ts @@ -653,6 +653,7 @@ declare namespace braintree { * @function create * @param {object} options Creation options: * @param {Client} options.client A {@link Client} instance. + * @param {string} options.authorization A tokenizationKey or clientToken. Can be used in place of `options.client`. * @param {fieldOptions} options.fields A {@link module:braintree-web/hosted-fields~fieldOptions set of options for each field}. * @param {styleOptions} options.styles {@link module:braintree-web/hosted-fields~styleOptions Styles} applied to each field. * @param {callback} callback The second argument, `data`, is the {@link HostedFields} instance. @@ -685,8 +686,8 @@ declare namespace braintree { * } * }, callback); */ - create(options: { client: Client, fields: HostedFieldFieldOptions, styles?: any }): Promise; - create(options: { client: Client, fields: HostedFieldFieldOptions, styles?: any }, callback: callback): void; + create(options: { client?: Client, authorization?: string, fields: HostedFieldFieldOptions, styles?: any }): Promise; + create(options: { client?: Client, authorization?: string, fields: HostedFieldFieldOptions, styles?: any }, callback: callback): void; /** @@ -1154,6 +1155,7 @@ declare namespace braintree { * @static * @function create * @param {object} options Creation options: + * @param {string} [options.authorization] A tokenizationKey or clientToken. Can be used in place of `options.client`. * @param {Version} options.version=1 The version of 3DS to use. Pass in 2 to use 3DS 2.0. * @param {Client} options.client A {@link Client} instance. * @param {callback} callback The second argument, `data`, is the {@link ThreeDSecure} instance. @@ -1165,8 +1167,8 @@ declare namespace braintree { */ create(options: { client: Client }): Promise; create(options: { client: Client }, callback: callback): void; - create(options: { version: number, client: Client }): Promise; - create(options: { version: number, client: Client }, callback: callback): void; + create(options: { authorization?: string, version?: 1 | '1' | 2 | '2' | '2-bootstrap3-modal' | '2-inline-iframe', client?: Client }): Promise; + create(options: { authorization?: string, version?: 1 | '1' | 2 | '2' | '2-bootstrap3-modal' | '2-inline-iframe', client?: Client }, callback: callback): void; /** * @description The current version of the SDK, i.e. `3.0.2`. diff --git a/types/braintree-web/test/node.ts b/types/braintree-web/test/node.ts index 2f4b2a9f93..8bf2fbfef1 100644 --- a/types/braintree-web/test/node.ts +++ b/types/braintree-web/test/node.ts @@ -47,6 +47,7 @@ braintree.client.create({ braintree.hostedFields.create({ client: clientInstance, + authorization: clientToken, styles: { 'input': { 'font-size': '16pt', @@ -409,6 +410,41 @@ braintree.client.create({ let existingNonce = "fake-valid-nonce"; let submitNonceToServer: (nonce: string) => void; +braintree.client.create( + { + authorization: clientToken, + }, + (error: braintree.BraintreeError, clientInstance: braintree.Client) => { + braintree.threeDSecure.create( + { + client: clientInstance, + version: '2', + }, + (createError, threeDSecure) => { + // implementation + }, + ); + braintree.threeDSecure.create( + { + client: clientInstance, + version: 1, + }, + (createError, threeDSecure) => { + // implementation + }, + ); + braintree.threeDSecure.create( + { + client: clientInstance, + version: '2-bootstrap3-modal', + }, + (createError, threeDSecure) => { + // implementation + }, + ); + }, +); + braintree.threeDSecure.verifyCard({ nonce: existingNonce, amount: 123.45, // $ExpectType number diff --git a/types/braintree-web/test/web.ts b/types/braintree-web/test/web.ts index ee1aa9ef45..2e181adf8d 100644 --- a/types/braintree-web/test/web.ts +++ b/types/braintree-web/test/web.ts @@ -48,6 +48,7 @@ braintree.client.create({ braintree.hostedFields.create({ client: clientInstance, + authorization: clientToken, styles: { 'input': { 'font-size': '16pt', @@ -410,6 +411,41 @@ braintree.client.create({ let existingNonce = "fake-valid-nonce"; let submitNonceToServer: (nonce: string) => void; +braintree.client.create( + { + authorization: clientToken, + }, + (error: braintree.BraintreeError, clientInstance: braintree.Client) => { + braintree.threeDSecure.create( + { + client: clientInstance, + version: '2', + }, + (createError, threeDSecure) => { + // implementation + }, + ); + braintree.threeDSecure.create( + { + client: clientInstance, + version: 1, + }, + (createError, threeDSecure) => { + // implementation + }, + ); + braintree.threeDSecure.create( + { + client: clientInstance, + version: '2-bootstrap3-modal', + }, + (createError, threeDSecure) => { + // implementation + }, + ); + }, +); + braintree.threeDSecure.verifyCard({ nonce: existingNonce, amount: 123.45, // $ExpectType number diff --git a/types/braintree-web/tslint.json b/types/braintree-web/tslint.json index 181c9a1e64..b85d2acc3d 100644 --- a/types/braintree-web/tslint.json +++ b/types/braintree-web/tslint.json @@ -13,6 +13,7 @@ "no-mergeable-namespace": false, "no-padding": false, "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, "no-unnecessary-qualifier": false, "no-unnecessary-type-assertion": false, "no-var-keyword": false, @@ -27,4 +28,4 @@ "trim-file": false, "unified-signatures": false } -} \ No newline at end of file +} diff --git a/types/braintree/index.d.ts b/types/braintree/index.d.ts index 9c63615dd6..4978980519 100644 --- a/types/braintree/index.d.ts +++ b/types/braintree/index.d.ts @@ -25,13 +25,24 @@ declare namespace braintree { Sandbox = 'Sandbox', } - export interface GatewayConfig { + export type GatewayConfig = KeyGatewayConfig | ClientGatewayConfig | AccessTokenGatewayConfig; + + export interface KeyGatewayConfig { environment: Environment; merchantId: string; publicKey: string; privateKey: string; } + export interface ClientGatewayConfig { + clientId: string; + clientSecret: string; + } + + export interface AccessTokenGatewayConfig { + accessToken: string; + } + export class BraintreeGateway { constructor(config: GatewayConfig); config: any; @@ -44,6 +55,7 @@ declare namespace braintree { discount: DiscountGateway; dispute: DisputeGateway; merchantAccount: MerchantAccountGateway; + oauth: OAuthGateway; paymentMethod: PaymentMethodGateway; paymentMethodNonce: PaymentMethodNonceGateway; plan: PlanGateway; @@ -74,6 +86,7 @@ declare namespace braintree { subscription: T extends Subscription ? Subscription : never; transaction: T extends Transaction ? Transaction : never; clientToken: T extends ClientToken ? string : never; + credentials: T extends OAuthToken ? OAuthToken : never; } /** @@ -150,6 +163,13 @@ declare namespace braintree { find(merchantAccountId: string): Promise; } + interface OAuthGateway { + createTokenFromCode(request: OAuthCreateTokenFromCodeRequest): Promise>; + createTokenFromRefreshToken(request: OAuthCreateTokenFromRefreshTokenRequest): Promise>; + revokeAccessToken(accessToken: string): Promise>; + connectUrl(urlRequest: OAuthConnectUrlRequest): string; + } + interface PaymentMethodGateway { create(request: PaymentMethodCreateRequest): Promise>; delete(token: string): Promise; @@ -157,7 +177,7 @@ declare namespace braintree { grant( sharedPaymentMethodToken: string, options: { allowVaulting?: boolean; includeBillingPostalCode?: boolean; revokeAfter?: Date }, - ): Promise>; + ): Promise>; revoke(sharedPaymentMethodToken: string): Promise; update(token: string, updates: PaymentMethodUpdateRequest): Promise>; } @@ -719,6 +739,30 @@ declare namespace braintree { export type MerchantAccountStatus = 'Pending' | 'Active' | 'Suspended'; + /** + * OAuth + */ + + export interface OAuthToken { + accessToken: string; + expiresAt: string; + refreshToken: string; + } + + export interface OAuthCreateTokenFromCodeRequest { + code: string; + } + + export interface OAuthCreateTokenFromRefreshTokenRequest { + refreshToken: string; + } + + export interface OAuthConnectUrlRequest { + redirectUri: string; + scope: string; + state?: string; + } + /** * Payment Method */ diff --git a/types/braintree__sanitize-url/braintree__sanitize-url-tests.ts b/types/braintree__sanitize-url/braintree__sanitize-url-tests.ts new file mode 100644 index 0000000000..104adaad48 --- /dev/null +++ b/types/braintree__sanitize-url/braintree__sanitize-url-tests.ts @@ -0,0 +1,3 @@ +import * as sanitizeUrl from "braintree__sanitize-url"; + +sanitizeUrl.sanitizeUrl(""); // $ExpectType string diff --git a/types/braintree__sanitize-url/index.d.ts b/types/braintree__sanitize-url/index.d.ts new file mode 100644 index 0000000000..ce1db18f94 --- /dev/null +++ b/types/braintree__sanitize-url/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for @braintree/sanitize-url 4.0 +// Project: https://github.com/braintree/sanitize-url#readme +// Definitions by: Krzysztof Żuraw +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function sanitizeUrl(url: string): string; diff --git a/types/braintree__sanitize-url/tsconfig.json b/types/braintree__sanitize-url/tsconfig.json new file mode 100644 index 0000000000..49aaf50baf --- /dev/null +++ b/types/braintree__sanitize-url/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", + "braintree__sanitize-url-tests.ts" + ] +} diff --git a/types/braintree__sanitize-url/tslint.json b/types/braintree__sanitize-url/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/braintree__sanitize-url/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/browser-image-compression/browser-image-compression-tests.ts b/types/browser-image-compression/browser-image-compression-tests.ts new file mode 100644 index 0000000000..6c6515a2e9 --- /dev/null +++ b/types/browser-image-compression/browser-image-compression-tests.ts @@ -0,0 +1,22 @@ +import imageCompression = require('browser-image-compression'); + +async function handleImageUpload({ target }: { target: EventTarget & { files: FileList } }) { + const imageFile = target.files[0]; + console.log('originalFile instanceof Blob', imageFile instanceof Blob); // true + console.log(`originalFile size ${imageFile.size / 1024 / 1024} MB`); + + const options = { + maxSizeMB: 1, + maxWidthOrHeight: 1920, + useWebWorker: true + }; + try { + const compressedFile = await imageCompression(imageFile, options); + console.log('compressedFile instanceof Blob', compressedFile instanceof Blob); // true + console.log(`compressedFile size ${compressedFile.size / 1024 / 1024} MB`); // smaller than maxSizeMB + + // await uploadToServer(compressedFile); // write your own logic + } catch (error) { + console.log(error); + } +} diff --git a/types/browser-image-compression/index.d.ts b/types/browser-image-compression/index.d.ts new file mode 100644 index 0000000000..94ff80ddf7 --- /dev/null +++ b/types/browser-image-compression/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for browser-image-compression 1.0 +// Project: https://github.com/Donaldcwl/browser-image-compression +// Definitions by: Donald +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Options { + /** @default Number.POSITIVE_INFINITY */ + maxSizeMB?: number; + /** @default undefined */ + maxWidthOrHeight?: number; + /** @default false */ + useWebWorker?: boolean; + /** @default 10 */ + maxIteration?: number; + /** Default to be the exif orientation from the image file */ + exifOrientation?: number; + /** A function takes one progress argument (progress from 0 to 100) */ + onProgress?: (progress: number) => void; + /** Default to be the original mime type from the image file */ + fileType?: string; +} + +declare function imageCompression(image: File | Blob, options: Options): Promise; + +export as namespace imageCompression; + +export = imageCompression; diff --git a/types/browser-image-compression/tsconfig.json b/types/browser-image-compression/tsconfig.json new file mode 100644 index 0000000000..0ea0eb99f6 --- /dev/null +++ b/types/browser-image-compression/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "esModuleInterop": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "browser-image-compression-tests.ts" + ] +} diff --git a/types/browser-image-compression/tslint.json b/types/browser-image-compression/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/browser-image-compression/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/browser-resolve/browser-resolve-tests.ts b/types/browser-resolve/browser-resolve-tests.ts index 25872b4b07..f19fa2f7f8 100644 --- a/types/browser-resolve/browser-resolve-tests.ts +++ b/types/browser-resolve/browser-resolve-tests.ts @@ -1,37 +1,46 @@ -import browserResolve = require('browser-resolve'); +import resolve = require('browser-resolve'); -function basic_test_async(callback: (err?: Error, resolved?: string) => void) { - browserResolve('typescript', function(error, resolved) { - if (error) { - return callback(error); - } - callback(null, resolved); - }); -} +const basic_test_async = (callback: (err?: Error | null, resolved?: string) => void) => { + // $ExpectType void + resolve('typescript', (error, resolved) => { + if (error) { + callback(error); + return; + } + callback(null, resolved); + }); +}; -function basic_test_sync() { - var resolved = browserResolve.sync('typescript'); -} +// $ExpectType string +resolve.sync('typescript'); -function options_test_async() { - browserResolve('typescript', { - browser: 'jsnext:main', +resolve( + 'typescript', + { + browser: 'jsnext:main', + filename: './browser-resolve/browser-resolve.js', + modules: { + fs: './fs-shim.js', + }, + }, + (error, resolved) => { + if (error) { + console.error(error); + return; + } + console.log(resolved); + }, +); + +resolve.sync('typescript', { filename: './browser-resolve/browser-resolve.js', - modules: { - fs: './fs-shim.js' - } - }, function(error, resolved) { - if (error) { - console.error(error); - return; - } - console.log(resolved); - }); -} + modules: {}, +}); -function options_test_sync() { - var resolved = browserResolve.sync('typescript', { - filename: './browser-resolve/browser-resolve.js', - modules: {} - }); -} +resolve.sync('@scope/my-module', { + browser: 'module', + packageFilter: pkg => { + pkg.module = pkg.module || pkg.browser; + return pkg; + }, +}); diff --git a/types/browser-resolve/index.d.ts b/types/browser-resolve/index.d.ts index 22b45dd8d2..09a05cd099 100644 --- a/types/browser-resolve/index.d.ts +++ b/types/browser-resolve/index.d.ts @@ -1,59 +1,62 @@ -// Type definitions for browser-resolve +// Type definitions for browser-resolve 1.11 // Project: https://github.com/defunctzombie/node-browser-resolve // Definitions by: Mario Nebl +// Piotr Błażejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - -import * as resolve from 'resolve'; +import * as resv from 'resolve'; /** - * Callback invoked when resolving asynchronously - * - * @param error - * @param resolved Absolute path to resolved identifier - */ -type resolveCallback = (err?: Error, resolved?: string) => void; - -/** - * Resolve a module path and call cb(err, path [, pkg]) + * Resolve a module path and call cb(err, path) * * @param id Identifier to resolve * @param callback */ -declare function browserResolve(id: string, cb: resolveCallback): void; +declare function resolve(id: string, cb: resolve.Callback): void; /** - * Resolve a module path and call cb(err, path [, pkg]) + * Resolve a module path and call cb(err, path) * * @param id Identifier to resolve * @param options Options to use for resolving, optional. * @param callback */ -declare function browserResolve(id: string, opts: browserResolve.AsyncOpts, cb: resolveCallback): void; +declare function resolve(id: string, opts: resolve.AsyncOpts, cb: resolve.Callback): void; -/** - * Returns a module path - * - * @param id Identifier to resolve - * @param options Options to use for resolving, optional. - */ -declare function browserResolveSync(id: string, opts?: browserResolve.SyncOpts): string; +declare namespace resolve { + interface Opts { + /** + * the 'browser' property to use from package.json + * @default 'browser' + */ + browser?: string; + /** + * the calling filename where the require() call originated (in the source) + */ + filename?: string; + /** + * modules object with id to path mappings to consult before doing manual resolution + * (use to provide core modules) + */ + modules?: any; + } -declare namespace browserResolve { - interface Opts { - // the 'browser' property to use from package.json (defaults to 'browser') - browser?: string; - // the calling filename where the require() call originated (in the source) - filename?: string; - // modules object with id to path mappings to consult before doing manual resolution (use to provide core modules) - modules?: any; - } + type AsyncOpts = resv.AsyncOpts & Opts; + type SyncOpts = resv.SyncOpts & Opts; - export interface AsyncOpts extends resolve.AsyncOpts, Opts { } - export interface SyncOpts extends resolve.SyncOpts, Opts { } + /** + * Callback invoked when resolving asynchronously + * @param error + * @param resolved Absolute path to resolved identifier + */ + type Callback = (err: Error | null, resolved?: string) => void; - export var sync: typeof browserResolveSync; + /** + * Returns a module path + * @param id Identifier to resolve + * @param options Options to use for resolving. + */ + function sync(id: string, opts?: SyncOpts): string; } -export = browserResolve; +export = resolve; diff --git a/types/browser-resolve/tsconfig.json b/types/browser-resolve/tsconfig.json index 5f873c7ee5..940081c9b7 100644 --- a/types/browser-resolve/tsconfig.json +++ b/types/browser-resolve/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -20,4 +20,4 @@ "index.d.ts", "browser-resolve-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/browser-resolve/tslint.json b/types/browser-resolve/tslint.json index 373848ed01..f93cf8562a 100644 --- a/types/browser-resolve/tslint.json +++ b/types/browser-resolve/tslint.json @@ -1,15 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "callable-types": false, - "dt-header": false, - "no-redundant-jsdoc": false, - "no-reference-import": false, - "no-var-keyword": false, - "no-void-expression": false, - "only-arrow-functions": false, - "prefer-const": false, - "prefer-method-signature": false, - "strict-export-declare-modifiers": false - } -} \ No newline at end of file + "extends": "dtslint/dt.json" +} diff --git a/types/bson/index.d.ts b/types/bson/index.d.ts index ce851e6f7a..915cc9853f 100644 --- a/types/bson/index.d.ts +++ b/types/bson/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Hiroki Horiuchi // Federico Caselli // Justin Grant +// Mikael Lirbank // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -182,6 +183,12 @@ export class Double { */ constructor(value: number); + /** + * https://github.com/mongodb/js-bson/blob/master/lib/double.js#L17 + */ + value: number; + + valueOf(): number; } diff --git a/types/buffer-json/buffer-json-tests.ts b/types/buffer-json/buffer-json-tests.ts new file mode 100644 index 0000000000..e1c91b1d52 --- /dev/null +++ b/types/buffer-json/buffer-json-tests.ts @@ -0,0 +1,4 @@ +import * as BJSON from 'buffer-json'; + +BJSON.parse('{ foo: \'bar\' }'); +BJSON.stringify({ foo: 'bar' }); diff --git a/types/buffer-json/index.d.ts b/types/buffer-json/index.d.ts new file mode 100644 index 0000000000..7b95c4dbd4 --- /dev/null +++ b/types/buffer-json/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for buffer-json 2.0 +// Project: https://github.com/jprichardson/buffer-json +// Definitions by: chroventer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Converts a JavaScript object or value to a JSON string. + * @param value The value to convert to a JSON string. + * @param space A String or Number object that's used to insert white space into the output JSON string for readability purposes. + * @return A JSON string representing the given value. + */ +export function stringify(value: any, space?: string | number): string; + +/** + * Parses a JSON string, constructing the JavaScript value or object described by the string. + * An optional reviver function can be provided to perform a transformation on the resulting object before it is returned. + * @param text The string to parse as JSON. + * @return The `Object` corresponding to the given JSON text. + */ +export function parse(text: string): any; + +/** + * A function that transform the value computed by parsing before being returned. + * @param key + * @param value + */ +export function replacer(key: string, value: string): any; + +/** + * A function that alters the behavior of the stringification process. + * @param key + * @param value + */ +export function reviver(key: string, value: any): any; diff --git a/types/buffer-json/tsconfig.json b/types/buffer-json/tsconfig.json new file mode 100644 index 0000000000..2c00b8eda6 --- /dev/null +++ b/types/buffer-json/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", + "buffer-json-tests.ts" + ] +} diff --git a/types/buffer-json/tslint.json b/types/buffer-json/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/buffer-json/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index bec7be8986..d5890e6fc4 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -681,10 +681,10 @@ declare namespace Bull { removeRepeatableByKey(key: string): Promise; /** - * Returns a promise that will return an array of job instances of the given types. + * Returns a promise that will return an array of job instances of the given job statuses. * Optional parameters for range and ordering are provided. */ - getJobs(types: string[], start?: number, end?: number, asc?: boolean): Promise>>; + getJobs(types: JobStatus[], start?: number, end?: number, asc?: boolean): Promise>>; /** * Returns a object with the logs according to the start and end arguments. The returned count @@ -698,9 +698,9 @@ declare namespace Bull { getJobCounts(): Promise; /** - * Returns a promise that resolves with the job counts for the given queue of the given types. + * Returns a promise that resolves with the job counts for the given queue of the given job statuses. */ - getJobCountByTypes(types: string[] | string): Promise; + getJobCountByTypes(types: JobStatus[] | JobStatus): Promise; /** * Returns a promise that resolves with the quantity of completed jobs. diff --git a/types/callback-to-async-iterator/callback-to-async-iterator-tests.ts b/types/callback-to-async-iterator/callback-to-async-iterator-tests.ts new file mode 100644 index 0000000000..50a8ae134b --- /dev/null +++ b/types/callback-to-async-iterator/callback-to-async-iterator-tests.ts @@ -0,0 +1,5 @@ +import { callbackToAsyncIterator } from "callback-to-async-iterator"; + +callbackToAsyncIterator(() => {}); // $ExpectType AsyncIterator + +callbackToAsyncIterator(() => {}); // $ExpectType AsyncIterator diff --git a/types/callback-to-async-iterator/index.d.ts b/types/callback-to-async-iterator/index.d.ts new file mode 100644 index 0000000000..63d483b188 --- /dev/null +++ b/types/callback-to-async-iterator/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for callback-to-async-iterator 1.1 +// Project: https://github.com/withspectrum/callback-to-async-iterator#readme +// Definitions by: Zachary Svoboda +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Minimum TypeScript Version: 3.6 + +export interface AsyncifyOptions { + onClose: () => void | T; + onError: () => Error; + buffering: boolean; +} + +export function callbackToAsyncIterator( + listener: (callback: (message: T) => void) => void, + options?: AsyncifyOptions, +): AsyncIterator; diff --git a/types/callback-to-async-iterator/tsconfig.json b/types/callback-to-async-iterator/tsconfig.json new file mode 100644 index 0000000000..e9513e5f61 --- /dev/null +++ b/types/callback-to-async-iterator/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "esnext.asynciterable" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "callback-to-async-iterator-tests.ts" + ] +} diff --git a/types/callback-to-async-iterator/tslint.json b/types/callback-to-async-iterator/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/callback-to-async-iterator/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/can-autoplay/can-autoplay-tests.ts b/types/can-autoplay/can-autoplay-tests.ts new file mode 100644 index 0000000000..7941d96b82 --- /dev/null +++ b/types/can-autoplay/can-autoplay-tests.ts @@ -0,0 +1,21 @@ +import canAutoPlay = require('can-autoplay'); + +canAutoPlay + .video({ timeout: 100, muted: true }) + .then(({ result, error }) => { + if (result) { + // Can autoplay + } else { + // Can not autoplay + } + }); + +canAutoPlay + .video() + .then(({ result, error }) => { + if (result) { + // Can autoplay + } else { + // Can not autoplay + } + }); diff --git a/types/can-autoplay/index.d.ts b/types/can-autoplay/index.d.ts new file mode 100644 index 0000000000..4722d2b80f --- /dev/null +++ b/types/can-autoplay/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for can-autoplay 3.0 +// Project: https://github.com/video-dev/can-autoplay +// Definitions by: Viacheslav Borodulin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Options { + inline?: boolean; + muted?: boolean; + timeout?: number; +} + +export interface CheckResponse { + result: boolean; + error: Error; +} + +export function audio(options?: Options): Promise; +export function video(options?: Options): Promise; diff --git a/types/can-autoplay/tsconfig.json b/types/can-autoplay/tsconfig.json new file mode 100644 index 0000000000..5fc9d33834 --- /dev/null +++ b/types/can-autoplay/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", + "can-autoplay-tests.ts" + ] +} diff --git a/types/can-autoplay/tslint.json b/types/can-autoplay/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/can-autoplay/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/carbon-components-react/carbon-components-react-tests.tsx b/types/carbon-components-react/carbon-components-react-tests.tsx index e248e933ab..29e011f47d 100644 --- a/types/carbon-components-react/carbon-components-react-tests.tsx +++ b/types/carbon-components-react/carbon-components-react-tests.tsx @@ -5,6 +5,7 @@ import { DataTableCustomRenderProps, DataTableHeader, DataTableRow, + DatePickerInput, Dropdown, FileUploader, NumberInput, @@ -14,10 +15,15 @@ import { TableBatchActions, TableHeader, TableRow, + Tag, TileGroup, TooltipDefinition, TextArea, TextInput, + FormItem, + FileUploaderDropContainer, + FileUploaderItem, + MultiSelect, } from 'carbon-components-react'; import Link from 'carbon-components-react/lib/components/UIShell/Link'; @@ -182,12 +188,12 @@ interface T5RowType extends DataTableRow { col2: number; } const t5RowItems: T5RowType[] = [ - { id: "row0", col1: 0, col2: 0}, - { id: "row1", col1: 1, col2: 1}, + { id: "row0", col1: 0, col2: 0 }, + { id: "row1", col1: 1, col2: 1 }, ]; const t5Headers: DataTableHeader[] = [ - {key: 'col1', header: 'First column'}, - {key: 'col2', header: 'Second column'} + { key: 'col1', header: 'First column' }, + { key: 'col2', header: 'Second column' } ]; const t5 = ( { render() { - return (
); + return (
); } } -const TestComp2 = (props: TestCompProps) => (
); +const TestComp2 = (props: TestCompProps) => (
); const uisLinkT1 = ( Test ); const uisLinkT2 = ( - > element="img" src="src"/> + > element="img" src="src" /> ); const uisLinkT3 = ( element={TestComp1} someProp={2}>ASDF @@ -265,12 +271,21 @@ interface TestCompPropsOverwrite { someProp: string, } -const TestComp3 = (props: TestCompPropsOverwrite) => (
); +const TestComp3 = (props: TestCompPropsOverwrite) => (
); const uisLinkT5 = ( element={TestComp3} someProp="asdf">Testing Overwrite ); +// DatePickerInput +const datePickerInputWithHideLabel = ( + +); + // Dropdown const dropdownItemCanBeElement = ( {}} - handleTabClick={() => {}} - handleTabKeyDown={() => {}} + handleTabClick={() => { }} + handleTabKeyDown={() => { }} href="#" tabIndex={0} disabled + selected={false} /> ); @@ -330,9 +345,22 @@ const SliderHasOnChange = ( /> ); +// Tag +const ChipTagFilterUndef = ( + +); + +const ChipTagFalse = ( + +); + +const FilterTag = ( + {}}/> +); + // TextArea const textAreaWithDefaultRef = ( -