diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 43267255d1..9d89a82028 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -57,6 +57,7 @@ /types/agent-base/ @Shinigami92 /types/agora-rtc-sdk/ @menthays /types/airbnb-prop-types/ @milesj +/types/airtable/ @bvalosek /types/ajv-errors/ @afshawnlotfi /types/ajv-merge-patch/ @littlepiggy03 /types/ale-url-parser/ @msn0 @@ -68,14 +69,18 @@ /types/algoliasearch-helper/ @gburgett @haroenv @samouss /types/ali-app/ @taoqf /types/ali-oss/ @ptrdu +/types/align-text/ @claasahl /types/all-keys/ @BendingBender /types/all-property-names/ @BendingBender /types/allure-js-commons/ @zaqqaz /types/almost-equal/ @cmaddalozzo /types/alt/ @Shearerbeard /types/amap-js-api/ @breeze9527 +/types/amap-js-api-autocomplete/ @breeze9527 +/types/amap-js-api-geocoder/ @breeze9527 /types/amap-js-api-indoor-map/ @breeze9527 /types/amap-js-api-map3d/ @breeze9527 +/types/amap-js-api-place-search/ @breeze9527 /types/amap-js-sdk/ @agasbzj /types/amazon-cognito-auth-js/ @scottescue /types/amazon-product-api/ @MattiLehtinen @alien35 @@ -241,7 +246,7 @@ /types/async-cache/ @BendingBender /types/async-lock/ @elisee @afharo @rhymmor /types/async-polling/ @Goldsmith42 -/types/async-retry/ @albertywu @MeLlamoPablo +/types/async-retry/ @albertywu @MeLlamoPablo @rafsawicki /types/async.nexttick/ @pyrho /types/asynciterator/ @rubensworks /types/athenajs/ @warpdesign @@ -262,7 +267,7 @@ /types/auth-header/ @ForbesLindesay /types/auth0/ @westy92 @ianhowe76 @dauledk /types/auth0-angular/ @homesar -/types/auth0-js/ @adrianchia @mdurrant @peterblazejewicz +/types/auth0-js/ @adrianchia @mdurrant @peterblazejewicz @bkotrys /types/auth0-js/v7/ @advancedrei /types/auth0-lock/ @carusology @goldcaddy77 @lfaudreejr @willcaul /types/auth0.widget/ @advancedrei @@ -281,7 +286,7 @@ /types/aws-param-store/ @jasonthomasgray /types/aws-serverless-express/ @threesquared @jcaffey @mattmeye @albertovasquez /types/aws4/ @ajcrites -/types/axe-webdriverjs/ @JoshuaKGoldberg +/types/axe-webdriverjs/ @JoshuaKGoldberg @tylerkrupicka /types/axel/ @ruslan-molodyko /types/axios-case-converter/ @dkniffin /types/axios-token-interceptor/ @innovation-team @@ -358,7 +363,7 @@ /types/better-curry/ @pocesar /types/better-queue/ @maozedong /types/better-scroll/ @stoneChen @cnjack -/types/better-sqlite3/ @Morfent @matrumz @sant123 @loghorn @andykais +/types/better-sqlite3/ @Morfent @matrumz @sant123 @loghorn @andykais @mrkstwrt /types/bezier-easing/ @ptlis /types/bezier-js/ @danmarshall @Epskampie /types/bgiframe/ @sumegizoltan @@ -490,6 +495,7 @@ /types/bunyan-prettystream/ @jasonswearingen @enlight /types/bunyan-seq/ @raybooysen /types/bunyan-winston-adapter/ @stevehipwell +/types/burns/ @timolinn /types/busboy/ @jacobbaskin /types/business-rules-engine/ @rsamec /types/bwip-js/ @MugeSo @@ -500,7 +506,7 @@ /types/bytewise/ @danwbyrne /types/c3/ @mcliment @gerinjacob @denyo @dmitryshindin @timn /types/cache-manager/ @GausSim -/types/cacheable-request/ @BendingBender +/types/cacheable-request/ @BendingBender @paulmelnikow /types/cached-path-relative/ @TeamworkGuy2 /types/cadesplugin/ @Delagen @kmvi /types/cal-heatmap/ @RetroChrisB @@ -541,6 +547,7 @@ /types/cavy/ @tyler-hoffman /types/cbor/ @pushplay /types/ccap/ @taoqf +/types/center-align/ @claasahl /types/centra/ @twooster /types/cesium/ @Zuzon @hnipps @szechyjs @golyalpha /types/cfn-response/ @ivoisbelongtous @@ -569,6 +576,7 @@ /types/chalk-animation/ @BendingBender /types/chance/ @cbowdon @brikou @cafesanu /types/change-emitter/ @iskandersierra +/types/changelog-parser/ @adamzerella /types/chardet/ @Gebatzens /types/charm/ @Xananax /types/charset/ @cspotcode @@ -865,7 +873,8 @@ /types/d3/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3/v4/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3/v3/ @gustavderdrache @borisyankov @MatthiasJobst -/types/d3-array/ @gustavderdrache @borisyankov @tomwanzek @denisname +/types/d3-array/ @gustavderdrache @borisyankov @tomwanzek @denisname @ledragon +/types/d3-array/v1/ @gustavderdrache @borisyankov @tomwanzek @denisname @ledragon /types/d3-axis/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3-box/ @lk-chen /types/d3-brush/ @tomwanzek @gustavderdrache @borisyankov @@ -949,7 +958,7 @@ /types/debounce/ @denis-sokolov @joshuakgoldberg @wcarson /types/debounce-fn/ @BendingBender /types/debounce-promise/ @whtsky -/types/debug/ @swook @galtalmor @zamb3zi @brasten @npenin +/types/debug/ @swook @galtalmor @zamb3zi @brasten @npenin @kristianmitk /types/decay/ @enaeseth /types/decode-entities/ @waspothegreat /types/decode-uri-component/ @BendingBender @@ -1072,7 +1081,7 @@ /types/download/ @nicojs /types/downloadjs/ @cwmoo740 @josuedevmark /types/dplayer/ @Guanyunhan -/types/draft-js/ @dmitryrogozhny @eelco @ghotiphud @schwers @michael-yx-wu @willisplummer @smvilar @sulf @pablopunk @claudiopro +/types/draft-js/ @dmitryrogozhny @eelco @ghotiphud @schwers @michael-yx-wu @willisplummer @smvilar @sulf @pablopunk @claudiopro @khawkinson /types/drag-timetable/ @chinkan /types/draggabilly/ @jaydubu /types/dragscroll/ @spkellydev @@ -1095,7 +1104,7 @@ /types/dv/ @taoqf /types/dvtng-jss/ @Ptival /types/dw-bxslider-4/ @namerci -/types/dwt/ @yushulx @jbh @lincoln2018 @Tom-Dynamsoft +/types/dwt/ @yushulx @jbh @lincoln2018 @Tom-Dynamsoft @dsueltenfuss /types/dygraphs/ @danvk /types/dymo-label-framework/ @thijskuipers /types/dynatable/ @francoismassart @@ -1127,7 +1136,6 @@ /types/ejs/ @benliddicott /types/ejs-locals/ @jt000 /types/ejson/ @shantanubhadoria -/types/elastic-apm-node/ @shahaed /types/elasticsearch/ @CasperSkydt @bfsmith @ddunkin @pushplay @mlamp @ahmadferdous @SimonSchick @brabster @deerawan /types/electron-config/ @mrfunkycold @unindented /types/electron-debug/ @unindented @@ -1153,6 +1161,7 @@ /types/elliptic/ @danwbyrne @Gilthoniel /types/elm/ @thSoft /types/elo-rank/ @apavlinovic +/types/elv/ @garyaparker /types/email-templates/ @cyrilschumacher @gurisko @blankstar85 /types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia @mike-north @BryanCrotaz /types/ember/v2/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia @mike-north @@ -1318,7 +1327,7 @@ /types/express-formidable/ @tdolsen @evanshortiss /types/express-graphql/ @isman-usoh @nitintutlani @hubel @zya @mlamp @firede /types/express-handlebars/ @stpettersens @yhaskell -/types/express-http-proxy/ @ulrichb @Danscho +/types/express-http-proxy/ @ulrichb @Danscho @carboneater /types/express-jsonschema/ @atd-schubert /types/express-jwt/ @wokim @kacepe @Sl1MBoy @milan-mimra /types/express-less/ @xieyubo @@ -1366,10 +1375,11 @@ /types/eyes/ @brynbellomy /types/ez-plus/ @AndersonFriaca /types/f1/ @neolwc -/types/fabric/ @oklemencic @joewashear007 @mrand01 @NotWoods @bmartinson @RogerioTeixeira @BradleyHill @bmkrol823 @glenngartner +/types/fabric/ @oklemencic @joewashear007 @mrand01 @NotWoods @bmartinson @RogerioTeixeira @BradleyHill @bmkrol823 @glenngartner @codertx /types/facebook-instant-games/ @menushka @oyvindjam /types/facebook-js-sdk/ @amritk @mahmoudzohdi @fluidsonic /types/facebook-pixel/ @noctishsu +/types/facepaint/ @DogPawHat @antonsamper /types/factory-girl/ @stackbuilders @sestrella @elcuy /types/faker/ @bensw @basp @Kuniwak @mattbishop /types/faker/v3/ @Kuniwak @@ -1386,6 +1396,7 @@ /types/fast-json-stable-stringify/ @BendingBender /types/fast-levenshtein/ @mizunashi-mana /types/fast-list/ @BendingBender +/types/fast-ratelimit/ @JorgenVatle /types/fast-stats/ @rogierschouten /types/fast64/ @rarmatei /types/fastclick/ @shinnn @@ -1441,6 +1452,7 @@ /types/finch/ @DavidSichau /types/find/ @andypyrope /types/find-cache-dir/ @BendingBender +/types/find-down/ @ffflorian /types/find-java-home/ @sjx233 /types/find-package-json/ @BendingBender /types/find-parent-dir/ @ikatyang @@ -1478,7 +1490,7 @@ /types/flot/ @burlandm @Anticom @admiralsmaster /types/flowdoc/ @animify /types/flowjs/ @ryan10132 -/types/fluent/ @huy-nguyen +/types/fluent/ @huy-nguyen @jamesnimlos /types/fluent-ffmpeg/ @tcaesvk @DingWeizhe @mabidina /types/fluent-langneg/ @huy-nguyen /types/fluent-react/ @huy-nguyen @@ -1492,6 +1504,7 @@ /types/fm-websync/ @markusmauch /types/fnv-lite/ @marcind /types/focus-within/ @eramdam +/types/follow-redirects/ @forivall /types/fontfaceobserver/ @RandScullard /types/fontoxml/ @rolandzwaga /types/force-graph/ @p-kimberley @@ -1506,6 +1519,7 @@ /types/form-urlencoded/ @alepee /types/format-duration/ @Roaders /types/format-io/ @amitbeck +/types/format-number/ @codelovesme /types/format-unicorn/ @kruncher /types/formidable/ @Nemo157 /types/forms/ @suXinjke @@ -1721,12 +1735,11 @@ /types/get-folder-size/ @mszczepanczyk /types/get-func-name/ @BendingBender /types/get-node-dimensions/ @vincekovacs -/types/get-port/ @plantain-00 @BendingBender /types/get-range/ @BendingBender /types/get-res/ @satyarohith /types/get-stdin/ @DanielRosenwasser /types/get-urls/ @BendingBender -/types/get-value/ @DanielRosenwasser +/types/get-value/ @DanielRosenwasser @TheMallen /types/getenv/ @impankratov /types/getopts/ @azasypkin /types/getos/ @BendingBender @@ -1824,7 +1837,8 @@ /types/gramps__rest-helpers/ @claude /types/graphite-udp/ @EricByers /types/graphlib-dot/ @DomParfitt -/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio @divyenduz @bradzacher @clayne11 @JCMais @langpavel @mc0 +/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio @divyenduz @bradzacher @clayne11 @JCMais @langpavel @mc0 @martijnwalraven +/types/graphql-api-koa/ @mike-marcacci /types/graphql-date/ @enaeseth /types/graphql-deduplicator/ @lfades /types/graphql-depth-limit/ @eritikass @@ -1833,6 +1847,7 @@ /types/graphql-iso-date/ @jwaldrip /types/graphql-list-fields/ @filipows /types/graphql-query-complexity/ @abhikmitra +/types/graphql-react/ @mike-marcacci /types/graphql-relay/ @arvitaly @nitintutlani @Grelinfo /types/graphql-resolve-batch/ @nayni /types/graphql-resolvers/ @mike-engel @@ -1851,6 +1866,7 @@ /types/grpc-error/ @danwbyrne /types/grunt/ @jeffmay @basarat /types/gsap/ @codebelt @ProbablePrime @philipbulley @leomeloxp @AdemHodzic +/types/gtag.js/ @rokt33r /types/gtin/ @RafaelKr /types/guardian__prosemirror-invisibles/ @dddotsev /types/guid/ @maroy1986 @@ -1891,6 +1907,7 @@ /types/gulp-inject/ @k-kagurazaka /types/gulp-insert/ @shantmarouti /types/gulp-install/ @peterjuras +/types/gulp-intercept/ @TokugawaTakesi /types/gulp-jade/ @berwyn /types/gulp-jasmine/ @andypyrope /types/gulp-jasmine-browser/ @tkrotoff @@ -1924,6 +1941,7 @@ /types/gulp-strip-debug/ @peterjuras /types/gulp-svg-sprite/ @tkqubo /types/gulp-svgmin/ @Aankhen +/types/gulp-tap/ @TokugawaTakesi /types/gulp-task-listing/ @joeskeen /types/gulp-template/ @pe8ter /types/gulp-tsd/ @k-kagurazaka @@ -2005,6 +2023,7 @@ /types/hjson/ @crunchie84 /types/hls.js/ @jgainfort @brookback @adripanico @beraliv /types/hoek/ @prashaantt +/types/hogan.js/ @AndrewLeedham /types/hoist-non-react-statics/ @JounQin @jamesreggio /types/holderjs/ @renjfk /types/hooker/ @misak113 @@ -2026,9 +2045,10 @@ /types/html-webpack-template/ @bumbleblym /types/html2canvas/ @rwhepburn @tan9 @sschocke @Ristaaf /types/html5-history/ @akashishu777 +/types/html5-to-pdf/ @samalexander /types/html5plus/ @dcloudio /types/htmlbars-inline-precompile/ @chriskrycho -/types/htmlparser2/ @staticfunction @LinusU +/types/htmlparser2/ @staticfunction @LinusU @johandavidson /types/htmltojsx/ @basarat /types/http-assert/ @jkeylu @stripedpajamas /types/http-aws-es/ @marcogrcr @@ -2053,6 +2073,7 @@ /types/humanize-plus/ @DenisCarriere /types/humanize-url/ @BendingBender /types/humanparser/ @MichalPodeszwa +/types/hummus-recipe/ @erikberressem /types/humps/ @nikeee /types/hyco-ws/ @mrcabellom /types/hyper-aws4/ @bambutz @@ -2078,6 +2099,7 @@ /types/icheck/ @qcz /types/icon-gen/ @ffflorian /types/iconv/ @delphinus35 +/types/identicon.js/ @D0miH /types/idyll/ @iocat /types/idyll-ast/ @iocat /types/idyll-compiler/ @iocat @@ -2104,6 +2126,7 @@ /types/immediate/ @BendingBender /types/imperium/ @gaetansenn /types/impress/ @borisyankov +/types/imul/ @djcsdy /types/in-app-purchase/ @l-jonas @IchordeDionysos /types/in-range/ @DanielRosenwasser /types/inboxsdk/ @rdoursenaud @amiram @@ -2119,7 +2142,7 @@ /types/iniparser/ @chrootsu /types/init-package-json/ @kfarnung /types/ink/ @cprecioso -/types/ink-select-input/ @lukostry +/types/ink-select-input/ @lukostry @shatodj /types/ink-spinner/ @lukostry /types/ink-table/ @lukostry /types/ink-testing-library/ @MancunianSam @@ -2192,6 +2215,7 @@ /types/is-git-url/ @BendingBender /types/is-glob/ @mrmlnc /types/is-hotkey/ @petester42 @kalley +/types/is-image/ @DenisFrezzato /types/is-installed-globally/ @BendingBender /types/is-integer/ @djcsdy /types/is-ip/ @coderslagoon @@ -2443,7 +2467,7 @@ /types/js-beautify/ @JoshuaKGoldberg @hansrwindhoff /types/js-clipper/ @omni360 /types/js-combinatorics/ @outring -/types/js-cookie/ @theodorejb @BendingBender @alepee +/types/js-cookie/ @theodorejb @BendingBender @alepee @yutod /types/js-data-angular/ @reppners /types/js-fixtures/ @kazimanzurrashid /types/js-git/ @Bartvds @@ -2754,6 +2778,7 @@ /types/libxmljs/ @fdecampredon @ComFreek /types/libxslt/ @alejo90 /types/license-checker/ @rogierschouten @unindented @alechemy +/types/license-checker-webpack-plugin/ @ChaosinaCan /types/liftoff/ @BendingBender /types/lil-uri/ @wcarson /types/lil-uuid/ @Pr1st0n @@ -3113,6 +3138,7 @@ /types/lusca/ @crutchcorn /types/luxon/ @colbydehart @FourwingsY @jsiebern @mastermatt @pietrovismara @dawnmist /types/lwip/ @AyaMorisawa +/types/lyricist/ @DadUndead /types/lz-string/ @M0ns1gn0r /types/lzma-native/ @leshow /types/macrotask/ @BendingBender @@ -3154,6 +3180,7 @@ /types/markdown-it-container/ @hronex /types/markdown-it-lazy-headers/ @knom /types/markdown-pdf/ @MonsieurMan +/types/markdown-to-jsx/ @ecraig12345 /types/markdownlint/ @ark120202 /types/marked/ @worr @BendingBender @CrossR @mwickett @htkzhtm /types/marked-terminal/ @bkendall @@ -3203,6 +3230,8 @@ /types/material__top-app-bar/ @BrentDouglas @ckosti /types/materialize-css/ @huww98 @MaximBalaganskiy @MonizDave @broccoliarchy /types/materialize-css/v0/ @eriklieben @leonyu @SinghSukhdeep @jfcere @scote @LiadIdan +/types/math-sign/ @djcsdy +/types/math-trunc/ @djcsdy /types/math3d/ @laszlojakab @jimsmart /types/mathjax/ @rolandzwaga /types/mathjs/ @siavol @andnp @bradbesserman @pawkrol @@ -3361,7 +3390,7 @@ /types/morris.js/ @mareek @sindilevich /types/mosca/ @GabrielGouv @jerray /types/motor-hat/ @muntyan -/types/mousetrap/ @qcz @alanhchoi +/types/mousetrap/ @qcz @alanhchoi @nicbarker /types/move-concurrently/ @mgroenhoff /types/moveto/ @shermendev @pea3nut /types/moviedb/ @basarat @0x6368656174 @@ -3420,6 +3449,7 @@ /types/natural-compare/ @doniyor2109 /types/natural-compare-lite/ @doniyor2109 /types/natural-sort/ @a-morales @fluggo +/types/naver-whale/ @tbvjaos510 /types/navermaps/ @ckboyjiy /types/navigation/ @grahammendick /types/navigation-react/ @grahammendick @@ -3511,8 +3541,9 @@ /types/node-dijkstra/ @nokutu /types/node-dir/ @panuhorsmalahti /types/node-dogstatsd/ @chrisbobo @xzyfer +/types/node-downloader-helper/ @RemyJeancolas /types/node-emoji/ @jonestristand @styu @rimiti -/types/node-fetch/ @torstenwerner @nikcorg @vinaybedre @kyranet @AndrewLeedham +/types/node-fetch/ @torstenwerner @nikcorg @vinaybedre @kyranet @AndrewLeedham @JasonLi914 /types/node-fibers/ @caryhaynie /types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 @beenotung @joeflateau @Apologiz @timhwang21 @supaiku0 @andersk @saschazar21 /types/node-gcm/ @horiuchi @@ -3562,6 +3593,7 @@ /types/node_redis/ @borisyankov /types/nodecredstash/ @migstopheles /types/nodegit/ @dolanmiu @tniessen @pvigier +/types/nodejs-license-file/ @trodi /types/nodemailer/ @rogierschouten @dex4er @bioball /types/nodemailer/v3/ @rogierschouten /types/nodemailer-direct-transport/ @rogierschouten @@ -3574,7 +3606,7 @@ /types/nodeunit/ @jedigo /types/noisejs/ @izmhr /types/nomnom/ @panopticoncentral -/types/nonogram-solver/ @me +/types/nonogram-solver/ @ffflorian /types/nookies/ @andreasbergqvist /types/nopt/ @jbondc /types/normalize-package-data/ @jdxcode @@ -3651,6 +3683,7 @@ /types/okta__okta-vue/ @innovation-team /types/ol/ @yairtawil /types/omggif/ @ffflorian +/types/omit-empty/ @pastelsky /types/on-finished/ @czechboy0 @BendingBender /types/on-headers/ @jjeffery @BendingBender /types/on-wake-up/ @ajafff @@ -3728,14 +3761,14 @@ /types/pad/ @mhegazy /types/page/ @43081j /types/paho-mqtt/ @amikhalev -/types/pako/ @cappellin @calebegg +/types/pako/ @cappellin @calebegg @hlthi /types/palx/ @mikefowler /types/pangu/ @plantain-00 /types/papaparse/ @torpedro @rainshen49 @jfloff @johnnyreilly @albertorestifo @BehindTheMath @3af @jliuhtonen /types/paper/ @clark-stevenson @Xakaloz @sebaswebdev @rfried /types/parallel-transform/ @djcsdy /types/paralleljs/ @jbaldwin -/types/parcel-bundler/ @pinage404 +/types/parcel-bundler/ @pinage404 @nick-woodward /types/parcel-env/ @fathyb /types/parent-package-json/ @sgmccli /types/parents/ @TeamworkGuy2 @@ -3751,6 +3784,7 @@ /types/parse-git-config/v2/ @leonard-thieu @deltaidea /types/parse-github-url/ @ajafff /types/parse-glob/ @glen-84 +/types/parse-human-date-range/ @forivall /types/parse-json/ @mrmlnc /types/parse-link-header/ @zelein /types/parse-mockdb/ @dpoetzsch @@ -3957,6 +3991,7 @@ /types/preact-i18n/ @ltetzlaff /types/precise/ @codeanimal /types/precond/ @olsio +/types/prefixfree/ @ExE-Boss /types/preloadjs/ @endel /types/prelude-ls/ @AyaMorisawa /types/prettier/ @ikatyang @@ -3971,8 +4006,8 @@ /types/preval.macro/ @huan086 /types/printf/ @AluisioASG /types/priorityqueuejs/ @geoffreak -/types/prismic-dom/ @nickw444 @sbilstein -/types/prismjs/ @eriklieben @andrewiggins @mmiszy +/types/prismic-dom/ @nickw444 @sbilstein @douglasnomizo +/types/prismjs/ @RunDevelopment @ExE-Boss @eriklieben @andrewiggins @mmiszy /types/private-ip/ @coderslagoon /types/procfs-stats/ @cyrilschumacher /types/progress/ @sebastian-lenz @@ -4068,6 +4103,7 @@ /types/qlik-visualizationextensions/ @konne /types/qr-image/ @taoqf /types/qrcode/ @plantain-00 +/types/qrcode-svg/ @ericbf /types/qrcode.react/ @mleko /types/qs/ @RWander @leonyu @tehbelinda @zyml @artursvonda @CarlosBonetti /types/qs-middleware/ @davecardwell @@ -4105,6 +4141,7 @@ /types/rangyinputs/ @ersimont /types/raphael/ @CheCoxshall /types/rappid/ @DenEwout +/types/rasha/ @Just1B /types/raspi/ @nebrius /types/raspi-board/ @nebrius /types/raspi-gpio/ @nebrius @@ -4136,7 +4173,7 @@ /types/rdflib/ @cenotelie /types/re-base/ @jordandrako /types/reach__router/ @kingdaro -/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei @Jessidhia @pshrmn @saranshkataria +/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei @Jessidhia @pshrmn @saranshkataria @lukyth @eps1lon /types/react/v15/ @bbenezech @pzavolinsky @digiguru @ericanderson @tkrotoff @DovydasNavickas @onigoetz /types/react-adal/ @dkorolev1 /types/react-albus/ @sseppola @conradreuter @kuirak @@ -4151,6 +4188,7 @@ /types/react-autocomplete/ @lstanden /types/react-autosuggest/ @nicolas-schmitt @pjo256 @robessog @tbayne @cdeutsch @rosskevin /types/react-avatar-editor/ @diogocorrea @gabsprates @lsenta @davidspiess +/types/react-axe/ @akshaykarthik /types/react-beautiful-dnd/ @varHarrie @bradleyayers @paustint @marknelissen @enricoboccadifuoco @lonyele @lukyth /types/react-better-password/ @mhuynh1 /types/react-big-calendar/ @piotrwitek @paustint @pikpok @eps1lon @strongpauly @janb87 @ldthorne @siavelis @@ -4165,7 +4203,7 @@ /types/react-breadcrumbs/ @guoyunhe /types/react-breadcrumbs-dynamic/ @mitsuruog /types/react-broadcast/ @kandros -/types/react-burger-menu/ @radziksh +/types/react-burger-menu/ @radziksh @dacevedo12 @germanp173 /types/react-cache/ @skovy /types/react-calendar-heatmap/ @9renpoto /types/react-calendar-timeline/ @radziksh @acemac @@ -4177,7 +4215,7 @@ /types/react-coinhive/ @sktbcbbs /types/react-collapse/ @Kimahriman /types/react-collapsible/ @knegusen -/types/react-color/ @LKay @markspolakovs @mntdn @nkgrnkgr @0815Strohhut +/types/react-color/ @LKay @markspolakovs @mntdn @nkgrnkgr @0815Strohhut @dnlfrst /types/react-confirm/ @santiagodoldan @marknelissen /types/react-content-loader/ @alaatm @samwalshnz /types/react-copy-to-clipboard/ @mabels @BernabeFelix @@ -4217,6 +4255,7 @@ /types/react-dropzone/v2/ @matdube @LynxEyes @goblindegook @benbayard /types/react-dynamic-number/ @eugrdn /types/react-easy-chart/ @danzel +/types/react-editext/ @alioguzhan /types/react-event-listener/ @asvetliakov /types/react-fa/ @flaub @patsissons @LKay /types/react-facebook-login/ @apare @jankarres @@ -4251,7 +4290,7 @@ /types/react-headroom/ @zerocho /types/react-helmet/ @evanbb @isman-usoh @lith-light-g @sammkj @yuit /types/react-helmet/v4/ @evanbb @isman-usoh -/types/react-helmet-async/ @forabi +/types/react-helmet-async/ @forabi @unindented /types/react-highcharts/ @j1r1k /types/react-highlight/ @joshuakgoldberg /types/react-highlight-words/ @mhegazy @diogodca @kellyrmilligan @@ -4290,7 +4329,7 @@ /types/react-json/ @spielc /types/react-json-pretty/ @LKay /types/react-json-tree/ @gnestor @zainafzal08 -/types/react-jsonschema-form/ @iamdanfox @iplus26 @phbou72 @LucianBuzzo @sthenault @sbusch @medfreeman +/types/react-jsonschema-form/ @iamdanfox @iplus26 @phbou72 @LucianBuzzo @sthenault @sbusch @medfreeman @saadtazi /types/react-jss/ @eps1lon @jlaw90 /types/react-kawaii/ @ZhangYiJiang /types/react-lazyload/ @m0a @@ -4300,6 +4339,7 @@ /types/react-leaflet-markercluster/ @Kimahriman /types/react-lifecycle-component/ @pixelshaded /types/react-lifecycles-compat/ @bySabi +/types/react-linkify/ @majames @jackywang529 /types/react-list/ @buptyyf @tomshen /types/react-loadable/ @Jessidhia @odensc @ianks @tlaziuk @iMobs /types/react-loader/ @artfuldev @@ -4319,7 +4359,7 @@ /types/react-motion-loop/ @j-em /types/react-motion-slider/ @asvetliakov /types/react-motion-ui-pack/ @jsonunger -/types/react-native/ @alloy @huhuanming @iRoachie @skn0tt @timwangdev @kamal @nelyousfi @alexdunne @swissmanu @bm-software @tkrotoff @a-tarasyuk @mvdam @esemesek @mrnickel @souvik-ghosh @nossbigg @saranshkataria +/types/react-native/ @alloy @huhuanming @iRoachie @skn0tt @timwangdev @kamal @nelyousfi @alexdunne @swissmanu @bm-software @tkrotoff @a-tarasyuk @mvdam @esemesek @mrnickel @souvik-ghosh @nossbigg @saranshkataria @franzmoro /types/react-native-android-taskdescription/ @christianchown /types/react-native-auth0/ @ascariandrea @marknelissen /types/react-native-autocomplete-input/ @ifiokjr @@ -4393,14 +4433,16 @@ /types/react-native-svg-uri/ @iRoachie /types/react-native-swiper/ @CaiHuan @huhuanming @mhcgrq /types/react-native-tab-navigator/ @iRoachie -/types/react-native-tab-view/ @kaoDev @iRoachie @timwangdev @geriux +/types/react-native-tab-view/ @kaoDev @iRoachie @timwangdev @geriux @kazyk /types/react-native-text-input-mask/ @RodrigoAWeber /types/react-native-toast-native/ @bm-software /types/react-native-touch-id/ @huhuanming @gazaret @jinshin1013 +/types/react-native-uuid/ @hmajid2301 /types/react-native-uuid-generator/ @burtek -/types/react-native-vector-icons/ @iRoachie @timwangdev +/types/react-native-vector-icons/ @iRoachie @timwangdev @robertying /types/react-native-version-number/ @VincentLanglet /types/react-native-video/ @huhuanming +/types/react-native-view-pdf/ @thesergiomiguel /types/react-native-zeroconf/ @mattapet /types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @magrinj @TizioFittizio @stigi @LinusU @jshosomichi @jakebooyah @brunoro @DenisFrezzato @mickaelw @maxdavidson @alechill @builtbyproxy @jkillian @jeroenvervaeke @chagasaway @denissb @skovhus @azrosen92 @hmajid2301 /types/react-navigation/v2/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @magrinj @TizioFittizio @stigi @LinusU @jshosomichi @jakebooyah @brunoro @DenisFrezzato @mickaelw @maxdavidson @alechill @builtbyproxy @jkillian @jeroenvervaeke @chagasaway @@ -4443,7 +4485,7 @@ /types/react-redux-i18n/ @clementdevos /types/react-redux-toastr/ @Smiche @artyomsv @kulmajaba /types/react-relay/ @graphcool @voxmatt @alloy @npirotte @ckknight @kastermester @mattkrick -/types/react-request/ @dannycochran +/types/react-request/ @dannycochran @angusfretwell @jonathanly /types/react-resizable/ @airhorns /types/react-resize-detector/ @matthew-matvei @aMoniker @rdrgn /types/react-resolver/ @forabi @@ -4490,6 +4532,7 @@ /types/react-sparklines/ @henrinormak /types/react-spinkit/ @tkqubo @mleko @pelotom @zzanol /types/react-spinkit/v1/ @tkqubo @mleko @pelotom +/types/react-spinner/ @jakeboone02 /types/react-splitter-layout/ @snaptags /types/react-star-rating-component/ @marpstar /types/react-sticky/ @curtisw0 @ajhyndman @@ -4507,7 +4550,8 @@ /types/react-table/ @royxue @psakalo @Havret @andys8 @Gelio /types/react-table-filter/ @gjsln /types/react-tabs/ @yu-i9 @danez @Equationist -/types/react-tag-autocomplete/ @jlismore +/types/react-tabs-redux/ @ntnbrtnkv +/types/react-tag-autocomplete/ @jlismore @Rahul-Sagore /types/react-tag-input/ @Ogglas @jankarres @matthewberryman /types/react-tagcloud/ @wassname /types/react-tagsinput/ @mykter @@ -4537,6 +4581,7 @@ /types/react-vertical-timeline-component/ @stephane-monnot /types/react-virtual-keyboard/ @bsurai /types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @Stevearzh @mgoszcz2 @brandonhall @sbusch +/types/react-virtualized-auto-sizer/ @otofu-square /types/react-virtualized-select/ @seansfkelley /types/react-visibility-sensor/ @JRasmusBm @gcangussu /types/react-webcam/ @squat @@ -4563,10 +4608,10 @@ /types/readline-transform/ @dex4er /types/reapop/ @Barrokgl /types/rebass/ @rhysd @ryee-dev @jamesmckenzie @gretzky @angusfretwell -/types/rebass__grid/ @antonvasin @vittorio @lhache @lavoaster +/types/rebass__grid/ @antonvasin @vittorio @lhache @lavoaster @autoric @akameco /types/recaptcha2/ @l-jonas /types/recase/ @18steps -/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan @pkeuter @jrsaunde @paulmelnikow @crusectrl @apalugniok @RobertStigsson @kousaku-maron @iflp +/types/recharts/ @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan @pkeuter @jrsaunde @crusectrl @apalugniok @RobertStigsson @kousaku-maron @iflp /types/recharts-scale/ @johnnyreilly /types/rechoir/ @BendingBender /types/recluster/ @dex4er @@ -4657,10 +4702,12 @@ /types/remarkable/ @makepost @chigix /types/remote-origin-url/ @BendingBender /types/remote-redux-devtools/ @ColinEberhardt @unindented @mamodom @colindekker +/types/remotedev-serialize/ @jaulz /types/remove-markdown/ @RagibHasin /types/rename/ @Aankhen /types/repeat-element/ @adamzerella /types/repeat-string/ @adamzerella +/types/repeating/ @claasahl /types/replace-ext/ @DeividasBakanas /types/replace-string/ @BendingBender /types/replacestream/ @dex4er @@ -4723,6 +4770,7 @@ /types/rgrove__parse-xml/ @petejohanson /types/rheostat/ @SashaBayan @kourge @StefanWerW /types/rickshaw/ @niemyjski +/types/right-align/ @claasahl /types/rimraf/ @soywiz @e-cloud @bash /types/riot/ @Stubb0rn /types/riot-api-nodejs/ @zafixlrp @@ -4767,6 +4815,7 @@ /types/rss/ @secondwtq /types/rsvp/ @chriskrycho /types/rsync/ @philippstucki +/types/rtl-detect/ @imprevo /types/rtlcss/ @adamzerella /types/rtree/ @oefirouz /types/run-parallel/ @mrmlnc @@ -4808,7 +4857,7 @@ /types/sane/ @BendingBender /types/sane-email-validation/ @ForbesLindesay /types/sanitize-filename/ @Nemo157 -/types/sanitize-html/ @rogierschouten @afshin @BehindTheMath @biermeester @WillGibson @sirMerr +/types/sanitize-html/ @rogierschouten @afshin @BehindTheMath @biermeester @WillGibson @sirMerr @johandavidson /types/sap__xsenv/ @mad-mike /types/sarif/ @rscrivens /types/sasl-anonymous/ @BendingBender @@ -4824,6 +4873,7 @@ /types/sat/ @omni360 /types/satnav/ @DotNetNerd /types/saywhen/ @SeanSobey +/types/sbd/ @thatcort /types/sc-auth/ @DanielRose /types/sc-broker/ @DanielRose /types/sc-broker-cluster/ @DanielRose @@ -4859,7 +4909,7 @@ /types/secp256k1/ @anler /types/seed-random/ @l-jonas /types/seededshuffle/ @urish -/types/seedrandom/ @kernhanda +/types/seedrandom/ @kernhanda @EugeneZ /types/seen/ @admvx /types/segment-analytics/ @fongandrew /types/select2/ @borisyankov @denisname @@ -4868,6 +4918,7 @@ /types/selectize/ @adidahiya @naBausch /types/selenium-standalone/ @SanderDeWaal1992 /types/selenium-webdriver/ @BillArmstrong @Kuniwak @cnishina @SupernaviX @bendxn @oddui +/types/selenium-webdriver/v3/ @BillArmstrong @Kuniwak @cnishina @SupernaviX @bendxn @oddui /types/selenium-webdriver/v2/ @BillArmstrong @Kuniwak @cnishina /types/semantic-release/ @lgaticaq /types/semantic-ui/ @leonard-thieu @@ -4892,7 +4943,7 @@ /types/semantic-ui-transition/ @leonard-thieu /types/semantic-ui-visibility/ @leonard-thieu /types/semaphore/ @mhfrantz @Alorel -/types/semver/ @Bartvds @BendingBender @LucianBuzzo +/types/semver/ @Bartvds @BendingBender @LucianBuzzo @ajafff /types/semver-compare/ @vincekovacs /types/semver-diff/ @chrismbarr /types/semver-regex/ @BendingBender @@ -4933,7 +4984,7 @@ /types/shallowequal/ @seansfkelley @BendingBender @arndissler /types/shallowequal/v0/ @seansfkelley /types/shapefile/ @DenisCarriere @Thw0rted -/types/sharedb/ @soney +/types/sharedb/ @soney @ericyhwang /types/sharedworker/ @nakakura /types/sharepoint/ @gandjustas @andrei-markeev @baywet @teroarvola @dennispg /types/sharp/ @lith-light-g @wooseopkim @BTOdell @JamieWoodbury @@ -4943,7 +4994,7 @@ /types/sheetify/ @toddself /types/shell-escape/ @nenadalm /types/shell-quote/ @jason0x43 @CameronDiver -/types/shelljs/ @nikeee @voy @gkalpak @pheromonez @aldafu +/types/shelljs/ @nikeee @voy @gkalpak @pheromonez @aldafu @ExE-Boss /types/shelljs-exec-proxy/ @qlonik /types/shimmer/ @kjin /types/shipit-cli/ @cyrilschumacher @@ -5016,12 +5067,12 @@ /types/slackdown/ @nju33 /types/slackify-html/ @hypexr /types/slash/ @BendingBender -/types/slate/ @andykent @majelbstoat @JanLoebel @YangusKhan @kalley @Kornil @isubasti @sgreav @jackall3n +/types/slate/ @andykent @majelbstoat @JanLoebel @YangusKhan @kalley @Kornil @isubasti @sgreav @jackall3n @benjiro /types/slate-base64-serializer/ @YangusKhan /types/slate-html-serializer/ @YangusKhan /types/slate-irc/ @elisee /types/slate-plain-serializer/ @YangusKhan @mkiefel -/types/slate-react/ @andykent @majelbstoat @JanLoebel @PatrickSachs @YangusKhan @isubasti @sgreav @Kornil @jackall3n +/types/slate-react/ @andykent @majelbstoat @JanLoebel @PatrickSachs @YangusKhan @isubasti @sgreav @Kornil @jackall3n @benjiro /types/sleep/ @rajarz /types/slice-ansi/ @dwieeb /types/slick-carousel/ @Kocal @@ -5156,15 +5207,15 @@ /types/storybook__addon-jest/ @halfmatthalfcat /types/storybook__addon-knobs/ @joscha @martynaskadisa @amacleay @MLoughry @alanhchoi /types/storybook__addon-links/ @joscha @jessepinho -/types/storybook__addon-notes/ @joscha @amacleay @MLoughry /types/storybook__addon-options/ @joscha @simonhn @amacleay @gaetanmaisse @adam187 /types/storybook__addon-storyshots/ @bradleyayers /types/storybook__addon-viewport/ @Vinnl /types/storybook__addons/ @bmatcuk /types/storybook__channels/ @bmatcuk +/types/storybook__preact/ @9renpoto /types/storybook__react/ @joscha @wapgear @dandean /types/storybook__react-native/ @joscha @wapgear @alechill @iRoachie @ceyhuno -/types/storybook__vue/ @pntgupta @jurgisrudaks +/types/storybook__vue/ @pntgupta @jurgisrudaks @yoyoys /types/strange/ @wanganjun /types/stream-array/ @Tyler-Murphy /types/stream-buffers/ @Jason3S @@ -5173,6 +5224,7 @@ /types/stream-each/ @djcsdy /types/stream-json/ @uhop /types/stream-meter/ @mugeso +/types/stream-mock/ @ivank /types/stream-series/ @k-kagurazaka /types/stream-shift/ @djcsdy /types/stream-throttle/ @danwbyrne @@ -5213,6 +5265,7 @@ /types/strong-log-transformer/ @azasypkin /types/strophe/ @DavidKDeutsch /types/strophe.js/ @DavidKDeutsch +/types/strophejs-plugin-roster/ @LeartS /types/structured-source/ @azu /types/styled-components/ @Igorbek @Igmat @lavoaster @Jessidhia @jkillian @eps1lon @flavordaaave /types/styled-components/v3/ @Igorbek @Igmat @@ -5254,7 +5307,7 @@ /types/svg-sprite/ @tkqubo /types/svg-sprite-loader/ @rynclark /types/svg2png/ @hansrwindhoff @sccgithub -/types/svg4everybody/ @BendingBender +/types/svg4everybody/ @BendingBender @bryceosterhaus /types/svgjs.draggable/ @LiFeleSs /types/svgjs.resize/ @jkevingutierrez /types/svgo/ @bradleyayers @giladgray @Aankhen @@ -5314,7 +5367,7 @@ /types/tcp-ping/ @stegano /types/tcp-port-used/ @gautejohan /types/teddy/ @lannonbr -/types/tedious/ @rogierschouten @cjthompson @v-suhame +/types/tedious/ @rogierschouten @cjthompson @v-suhame @guiampm /types/tedious-connection-pool/ @sandorfr /types/telebot/ @mariotsi /types/temp/ @DanielRosenwasser @@ -5386,7 +5439,7 @@ /types/tldjs/ @geoffreak /types/tlds/ @ajshres /types/tmi.js/ @wpapsco -/types/tmp/ @optical @Perlmint +/types/tmp/ @optical @Perlmint @pluma /types/to-absolute-glob/ @ajafff /types/to-camel-case/ @j-f1 /types/to-markdown/ @SuperPaintman @@ -5402,6 +5455,7 @@ /types/topo/ @BendingBender /types/topojson/ @ricardo-mello @chenzhutian @denisname /types/topojson-client/ @denisname @ricardo-mello +/types/topojson-server/ @ricardo-mello @chenzhutian @denisname @russellporter /types/topojson-simplify/ @denisname @ricardo-mello /types/topojson-specification/ @denisname /types/toposort/ @danwbyrne @@ -5410,6 +5464,7 @@ /types/touch/ @mizunashi-mana @BendingBender /types/touch-events/ @kevinb7 /types/tough-cookie/ @leonard-thieu @LiJinyao @no2chem +/types/tough-cookie-file-store/ @forivall /types/tough-cookie-filestore/ @friedow /types/traceback/ @misak113 /types/tracking/ @pimterry @bratter @@ -5431,7 +5486,7 @@ /types/triplesec/ @threesquared /types/trouter/ @stahlstift /types/trunk8/ @niemyjski -/types/trusted-types/ @vrana +/types/trusted-types/ @vrana @engelsdamien /types/tryer/ @bengry /types/ts-nameof/ @dsherret /types/tspromise/ @soywiz @@ -5447,7 +5502,7 @@ /types/twig/ @soywiz @enko @mtizziani /types/twilio/ @nickiannone @ashleybrener /types/twilio-common/ @gatimus -/types/twilio-video/ @minddocdev @darioblanco +/types/twilio-video/ @minddocdev @darioblanco @ktsn /types/twit/ @Volox @sapphiredev @abraham @siwalikm @plhery @justgoscha /types/twitch-ext/ @beheh @FedeDR /types/twitter/ @BendingBender @@ -5468,6 +5523,7 @@ /types/typography/ @boyeborg @krzysztofzuraw @dominicfallows /types/typpy/ @BendingBender /types/tz-format/ @samverschueren +/types/tz-offset/ @RMHonor /types/ua-parser-js/ @superduper @legendecas @MeLlamoPablo /types/ua-string/ @BendingBender /types/uglify-es/ @alan-agius4 @@ -5492,11 +5548,13 @@ /types/underscore.string/ @rygine /types/undertaker/ @tkqubo @GiedriusGrabauskas /types/undertaker-registry/ @GiedriusGrabauskas +/types/ungap__url-search-params/ @nick121212 @nrathi /types/uni-app/ @dcloudio /types/unidecode/ @vfernandestoptal /types/uniq/ @hansrwindhoff /types/uniqid/ @idchlife /types/unique-hash-stream/ @BendingBender +/types/unique-push-id/ @namick /types/unique-random/ @Kuniwak /types/unique-random-array/ @BendingBender /types/unique-string/ @BendingBender @@ -5544,11 +5602,13 @@ /types/user-home/ @mhegazy /types/useragent/ @geoffreak /types/username/ @kayahr @krivachy +/types/uslug/ @rokt33r /types/utf8/ @zelein /types/utif/ @smajl @nkprince007 @massic80 /types/util-deprecate/ @BendingBender /types/util.promisify/ @adamvoss /types/utils-merge/ @chrootsu +/types/utm/ @civilizeddev /types/uuid/ @iamolivinius @felipeochoa @cjbarth /types/uuid-1345/ @mugeso /types/uuid-js/ @mhegazy @@ -5564,7 +5624,7 @@ /types/vali-date/ @SamVerschueren /types/valiant/ @whatasoda /types/valid-url/ @stevehipwell -/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno @builtinnya @qqilihq +/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno @builtinnya @qqilihq @keatz55 /types/validatorjs/ @LKay @danmana @MatiasOlivera /types/vanilla-modal/ @samnau /types/vanilla-tilt/ @BrunnerLivio @@ -5671,7 +5731,7 @@ /types/webgl2/ @nkemnitz @karhu /types/webidl2/ @saschanaz /types/webmidi/ @lostfictions -/types/webpack/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @alan-agius4 @elliottsj @jason0x43 @dennispg @christophehurpeau @ZSkycat @johnnyreilly @rwaskiewicz @kuehlein @grgur +/types/webpack/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @alan-agius4 @elliottsj @jason0x43 @dennispg @christophehurpeau @ZSkycat @johnnyreilly @rwaskiewicz @kuehlein @grgur @rubenspgcavalcante /types/webpack/v3/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @alan-agius4 @elliottsj @jason0x43 @christophehurpeau @rwaskiewicz @kuehlein /types/webpack-assets-manifest/ @FranklinWhale /types/webpack-bundle-analyzer/ @kryops @@ -5692,6 +5752,7 @@ /types/webpack-merge/v0/ @deevus /types/webpack-node-externals/ @mtraynham /types/webpack-notifier/ @bumbleblym +/types/webpack-plugin-serve/ @PlayMa256 /types/webpack-serve/ @rynclark @Jokcy @ZSkycat /types/webpack-serve/v1/ @rynclark @Jokcy @ZSkycat /types/webpack-sources/ @e-cloud @chriseppstein @@ -5751,6 +5812,7 @@ /types/wonder.js/ @yyc-git /types/word-extractor/ @saboya /types/word-list-json/ @dovidm +/types/word-wrap/ @claasahl /types/word2vector/ @renekeijzer /types/wordcloud/ @joeskeen /types/wordpress__jest-console/ @mistic100 @@ -5758,6 +5820,7 @@ /types/wordwrap/ @ark120202 /types/workbox-sw/ @wessberg /types/workbox-webpack-plugin/ @kgroat +/types/workbox-webpack-plugin/v3/ @kgroat /types/worker-threads-pool/ @BendingBender /types/workerpool/ @Alorel /types/wpapi/ @guoyunhe @@ -5781,7 +5844,7 @@ /types/xdg-basedir/ @tlaziuk /types/xml/ @YuJianrong /types/xml-parser/ @mhfrantz -/types/xml2js/ @michelsalib @jasonrm @ccurrens @edwardhinkle @BehindTheMath @claasahl +/types/xml2js/ @michelsalib @jasonrm @ccurrens @edwardhinkle @BehindTheMath @claasahl @redlickigrzegorz /types/xml2json/ @dolanmiu /types/xmlbuilder/ @wallymathieu @GaikwadPratik /types/xmldoc/ @Xstoudi @ajsheehan @notlaforge @@ -5803,7 +5866,7 @@ /types/yandex-maps/ @Delagen @gastwork13 /types/yandex-money-sdk/ @chrootsu /types/yar/ @SimonSchick -/types/yargs/ @poelstra @mizunashi-mana @pushplay @jeffkenney @JimiC @steffenvv +/types/yargs/ @poelstra @mizunashi-mana @pushplay @jeffkenney @JimiC @steffenvv @forivall /types/yargs/v11/ @poelstra @mizunashi-mana @pushplay @jeffkenney @JimiC /types/yargs/v10/ @poelstra @mizunashi-mana @pushplay @jeffkenney @JimiC /types/yargs/v8/ @poelstra @mizunashi-mana @pushplay @jeffkenney diff --git a/README.md b/README.md index 7faea9035b..27dbbd1638 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ When a package [bundles](http://www.typescriptlang.org/docs/handbook/declaration You can remove it by running `npm run not-needed -- typingsPackageName asOfVersion sourceRepoURL [libraryName]`. - `typingsPackageName`: This is the name of the directory to delete. -- `asOfVersion`: A stub will be published to `@types/foo` with this version. Should be higher than any currently published version. +- `asOfVersion`: A stub will be published to `@types/foo` with this version. Should be higher than any currently published version, and should be a version of `foo` on npm. - `sourceRepoURL`: This should point to the repository that contains the typings. - `libraryName`: Name of npm package that replaces the Definitely Typed types. Usually this is identical to "typingsPackageName", in which case you can omit it. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ecd56b7e2e..3356ae6704 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,4 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml +# Learn more at: https://aka.ms/yaml jobs: - job: npmRunTest pool: @@ -16,7 +13,10 @@ jobs: inputs: verbose: false - - script: 'git checkout -- . && npm run test' + - script: | + git checkout -- . && npm run test + if [[ $BUILD_REASON == "Schedule" ]]; then git config --global user.email "types@microsoft.com" && git config --global user.name "TypeScript Bot" && npm run update-codeowners; fi + displayName: 'npm run test' trigger: diff --git a/notNeededPackages.json b/notNeededPackages.json index 3286978309..36ad9cc418 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -30,6 +30,18 @@ "sourceRepoURL": "https://github.com/epoberezkin/ajv", "asOfVersion": "1.0.0" }, + { + "libraryName": "all-keys", + "typingsPackageName": "all-keys", + "sourceRepoURL": "https://github.com/sindresorhus/all-keys", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "all-keys", + "typingsPackageName": "all-property-names", + "sourceRepoURL": "https://github.com/sindresorhus/all-keys", + "asOfVersion": "3.0.0" + }, { "libraryName": "angular-touchspin", "typingsPackageName": "angular-touchspin", @@ -48,6 +60,12 @@ "sourceRepoURL": "https://github.com/nonplus/angular-ui-router-uib-modal", "asOfVersion": "0.0.11" }, + { + "libraryName": "ansi-escapes", + "typingsPackageName": "ansi-escapes", + "sourceRepoURL": "https://github.com/sindresorhus/ansi-escapes", + "asOfVersion": "4.0.0" + }, { "libraryName": "antd", "typingsPackageName": "antd", @@ -84,6 +102,24 @@ "sourceRepoURL": "https://github.com/ranisalt/node-argon2", "asOfVersion": "0.15.0" }, + { + "libraryName": "array-move", + "typingsPackageName": "array-move", + "sourceRepoURL": "https://github.com/sindresorhus/array-move", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "array-uniq", + "typingsPackageName": "array-uniq", + "sourceRepoURL": "https://github.com/sindresorhus/array-uniq", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "arrify", + "typingsPackageName": "arrify", + "sourceRepoURL": "https://github.com/sindresorhus/arrify", + "asOfVersion": "2.0.0" + }, { "libraryName": "artyom.js", "typingsPackageName": "artyom.js", @@ -570,6 +606,12 @@ "sourceRepoURL": "https://github.com/eggjs/egg", "asOfVersion": "1.5.0" }, + { + "libraryName": "elastic-apm-node", + "typingsPackageName": "elastic-apm-node", + "sourceRepoURL": "https://github.com/elastic/apm-agent-nodejs", + "asOfVersion": "2.7.0" + }, { "libraryName": "electron", "typingsPackageName": "electron", @@ -864,6 +906,12 @@ "sourceRepoURL": "https://handsontable.com/", "asOfVersion": "0.35.0" }, + { + "libraryName": "hard-rejection", + "typingsPackageName": "hard-rejection", + "sourceRepoURL": "https://github.com/sindresorhus/hard-rejection", + "asOfVersion": "2.0.0" + }, { "libraryName": "has-yarn", "typingsPackageName": "has-yarn", @@ -1002,6 +1050,18 @@ "sourceRepoURL": "http://ionicframework.com", "asOfVersion": "3.19.0" }, + { + "libraryName": "is-absolute-url", + "typingsPackageName": "is-absolute-url", + "sourceRepoURL": "https://github.com/sindresorhus/is-absolute-url", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "is-fullwidth-code-point", + "typingsPackageName": "is-fullwidth-code-point", + "sourceRepoURL": "https://github.com/sindresorhus/is-fullwidth-code-point", + "asOfVersion": "3.0.0" + }, { "libraryName": "is-lower-case", "typingsPackageName": "is-lower-case", @@ -1020,6 +1080,12 @@ "sourceRepoURL": "https://github.com/jonschlinkert/is-plain-object", "asOfVersion": "2.0.4" }, + { + "libraryName": "is-relative-url", + "typingsPackageName": "is-relative-url", + "sourceRepoURL": "https://github.com/sindresorhus/is-relative-url", + "asOfVersion": "3.0.0" + }, { "libraryName": "is-scoped", "typingsPackageName": "is-scoped", @@ -1104,6 +1170,12 @@ "sourceRepoURL": "https://github.com/jsplumb/jsPlumb", "asOfVersion": "2.5.7" }, + { + "libraryName": "junk", + "typingsPackageName": "junk", + "sourceRepoURL": "https://github.com/sindresorhus/junk", + "asOfVersion": "3.0.0" + }, { "libraryName": "keycloak-js", "typingsPackageName": "keycloak-js", @@ -1182,6 +1254,12 @@ "sourceRepoURL": "https://github.com/brunolm/LinqSharp", "asOfVersion": "1.0.0" }, + { + "libraryName": "load-json-file", + "typingsPackageName": "load-json-file", + "sourceRepoURL": "https://github.com/sindresorhus/load-json-file", + "asOfVersion": "5.1.0" + }, { "libraryName": "localforage", "typingsPackageName": "localforage", @@ -1218,6 +1296,12 @@ "sourceRepoURL": "https://github.com/nomiddlename/log4js-node", "asOfVersion": "2.3.5" }, + { + "libraryName": "loud-rejection", + "typingsPackageName": "loud-rejection", + "sourceRepoURL": "https://github.com/sindresorhus/loud-rejection", + "asOfVersion": "2.0.0" + }, { "libraryName": "lower-case", "typingsPackageName": "lower-case", @@ -1332,6 +1416,12 @@ "sourceRepoURL": "https://github.com/apache/couchdb-nano", "asOfVersion": "7.0.0" }, + { + "libraryName": "typescript", + "typingsPackageName": "navigator-permissions", + "sourceRepoURL": "https://developer.mozilla.org/en-US/docs/Web/API/Permissions", + "asOfVersion": "2.0.0" + }, { "libraryName": "ng-table", "typingsPackageName": "ng-table", @@ -1428,6 +1518,18 @@ "sourceRepoURL": "https://github.com/sindresorhus/ora", "asOfVersion": "3.2.0" }, + { + "libraryName": "os-name", + "typingsPackageName": "os-name", + "sourceRepoURL": "https://github.com/sindresorhus/os-name", + "asOfVersion": "3.1.0" + }, + { + "libraryName": "p-all", + "typingsPackageName": "p-all", + "sourceRepoURL": "https://github.com/sindresorhus/p-all", + "asOfVersion": "2.0.0" + }, { "libraryName": "p-any", "typingsPackageName": "p-any", @@ -1452,6 +1554,18 @@ "sourceRepoURL": "https://github.com/sindresorhus/p-debounce", "asOfVersion": "2.0.0" }, + { + "libraryName": "p-defer", + "typingsPackageName": "p-defer", + "sourceRepoURL": "https://github.com/sindresorhus/p-defer", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "p-do-whilst", + "typingsPackageName": "p-do-whilst", + "sourceRepoURL": "https://github.com/sindresorhus/p-do-whilst", + "asOfVersion": "1.0.0" + }, { "libraryName": "p-each-series", "typingsPackageName": "p-each-series", @@ -1470,6 +1584,24 @@ "sourceRepoURL": "https://github.com/kevva/p-every", "asOfVersion": "2.0.0" }, + { + "libraryName": "p-forever", + "typingsPackageName": "p-forever", + "sourceRepoURL": "https://github.com/sindresorhus/p-forever", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "p-is-promise", + "typingsPackageName": "p-is-promise", + "sourceRepoURL": "https://github.com/sindresorhus/p-is-promise", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "p-lazy", + "typingsPackageName": "p-lazy", + "sourceRepoURL": "https://github.com/sindresorhus/p-lazy", + "asOfVersion": "2.0.0" + }, { "libraryName": "p-limit", "typingsPackageName": "p-limit", @@ -1506,6 +1638,12 @@ "sourceRepoURL": "https://github.com/sindresorhus/p-memoize", "asOfVersion": "3.0.0" }, + { + "libraryName": "p-min-delay", + "typingsPackageName": "p-min-delay", + "sourceRepoURL": "https://github.com/sindresorhus/p-min-delay", + "asOfVersion": "3.0.0" + }, { "libraryName": "p-one", "typingsPackageName": "p-one", @@ -1542,6 +1680,12 @@ "sourceRepoURL": "https://github.com/sindresorhus/p-reduce", "asOfVersion": "2.0.0" }, + { + "libraryName": "p-reflect", + "typingsPackageName": "p-reflect", + "sourceRepoURL": "https://github.com/sindresorhus/p-reflect", + "asOfVersion": "2.0.0" + }, { "libraryName": "p-retry", "typingsPackageName": "p-retry", @@ -1554,6 +1698,12 @@ "sourceRepoURL": "https://github.com/sindresorhus/p-series", "asOfVersion": "2.0.0" }, + { + "libraryName": "p-settle", + "typingsPackageName": "p-settle", + "sourceRepoURL": "https://github.com/sindresorhus/p-settle", + "asOfVersion": "3.0.0" + }, { "libraryName": "p-some", "typingsPackageName": "p-some", @@ -1572,12 +1722,48 @@ "sourceRepoURL": "https://github.com/sindresorhus/p-throttle", "asOfVersion": "2.1.0" }, + { + "libraryName": "p-time", + "typingsPackageName": "p-time", + "sourceRepoURL": "https://github.com/sindresorhus/p-time", + "asOfVersion": "2.0.0" + }, { "libraryName": "p-timeout", "typingsPackageName": "p-timeout", "sourceRepoURL": "https://github.com/sindresorhus/p-timeout", "asOfVersion": "3.0.0" }, + { + "libraryName": "p-times", + "typingsPackageName": "p-times", + "sourceRepoURL": "https://github.com/sindresorhus/p-times", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "p-try", + "typingsPackageName": "p-try", + "sourceRepoURL": "https://github.com/sindresorhus/p-try", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "p-wait-for", + "typingsPackageName": "p-wait-for", + "sourceRepoURL": "https://github.com/sindresorhus/p-wait-for", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "p-waterfall", + "typingsPackageName": "p-waterfall", + "sourceRepoURL": "https://github.com/sindresorhus/p-waterfall", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "p-whilst", + "typingsPackageName": "p-whilst", + "sourceRepoURL": "https://github.com/sindresorhus/p-whilst", + "asOfVersion": "2.0.0" + }, { "libraryName": "package-json", "typingsPackageName": "package-json", @@ -2028,6 +2214,12 @@ "sourceRepoURL": "https://github.com/sindresorhus/screenfull.js", "asOfVersion": "4.1.0" }, + { + "libraryName": "sdbm", + "typingsPackageName": "sdbm", + "sourceRepoURL": "https://github.com/sindresorhus/sdbm", + "asOfVersion": "1.1.0" + }, { "libraryName": "sendgrid", "typingsPackageName": "sendgrid", @@ -2040,6 +2232,12 @@ "sourceRepoURL": "https://github.com/blakeembrey/sentence-case", "asOfVersion": "1.1.3" }, + { + "libraryName": "serialize-error", + "typingsPackageName": "serialize-error", + "sourceRepoURL": "https://github.com/sindresorhus/serialize-error", + "asOfVersion": "4.0.0" + }, { "libraryName": "sharp-timer", "typingsPackageName": "sharp-timer", @@ -2070,12 +2268,36 @@ "sourceRepoURL": "https://github.com/sindresorhus/df", "asOfVersion": "3.0.0" }, + { + "libraryName": "djb2a", + "typingsPackageName": "sindresorhus__djb2a", + "sourceRepoURL": "https://github.com/sindresorhus/djb2a", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "@sindresorhus/fnv1a", + "typingsPackageName": "sindresorhus__fnv1a", + "sourceRepoURL": "https://github.com/sindresorhus/fnv1a", + "asOfVersion": "1.1.0" + }, { "libraryName": "@sindresorhus/slugify", "typingsPackageName": "sindresorhus__slugify", "sourceRepoURL": "https://github.com/sindresorhus/slugify", "asOfVersion": "0.9.1" }, + { + "libraryName": "@sindresorhus/string-hash", + "typingsPackageName": "sindresorhus__string-hash", + "sourceRepoURL": "https://github.com/sindresorhus/string-hash", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "@sindresorhus/to-milliseconds", + "typingsPackageName": "sindresorhus__to-milliseconds", + "sourceRepoURL": "https://github.com/sindresorhus/to-milliseconds", + "asOfVersion": "1.1.0" + }, { "libraryName": "sip.js", "typingsPackageName": "sip.js", @@ -2142,12 +2364,36 @@ "sourceRepoURL": "https://github.com/storybooks/storybook", "asOfVersion": "5.0.0" }, + { + "libraryName": "string-length", + "typingsPackageName": "string-length", + "sourceRepoURL": "https://github.com/sindresorhus/string-length", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "string-width", + "typingsPackageName": "string-width", + "sourceRepoURL": "https://github.com/sindresorhus/string-width", + "asOfVersion": "4.0.0" + }, + { + "libraryName": "strip-ansi", + "typingsPackageName": "strip-ansi", + "sourceRepoURL": "https://github.com/chalk/strip-ansi", + "asOfVersion": "5.2.0" + }, { "libraryName": "striptags", "typingsPackageName": "striptags", "sourceRepoURL": "https://github.com/ericnorris/striptags", "asOfVersion": "3.1.1" }, + { + "libraryName": "subsume", + "typingsPackageName": "subsume", + "sourceRepoURL": "https://github.com/sindresorhus/subsume", + "asOfVersion": "2.1.0" + }, { "libraryName": "Sugar", "typingsPackageName": "sugar", @@ -2208,6 +2454,12 @@ "sourceRepoURL": "https://github.com/terser-js/terser", "asOfVersion": "3.12.0" }, + { + "libraryName": "three", + "typingsPackageName": "three", + "sourceRepoURL": "https://github.com/mrdoob/three.js", + "asOfVersion": "0.103.0" + }, { "libraryName": "time-span", "typingsPackageName": "time-span", @@ -2298,6 +2550,12 @@ "sourceRepoURL": "https://github.com/blakeembrey/upper-case-first", "asOfVersion": "1.1.2" }, + { + "libraryName": "urllib", + "typingsPackageName": "urllib", + "sourceRepoURL": "https://github.com/node-modules/urllib", + "asOfVersion": "2.33.0" + }, { "libraryName": "UUID.js", "typingsPackageName": "uuidjs", @@ -2340,6 +2598,12 @@ "sourceRepoURL": "https://github.com/vuejs/vue-router", "asOfVersion": "2.0.0" }, + { + "libraryName": "typescript", + "typingsPackageName": "w3c-permissions", + "sourceRepoURL": "https://www.w3.org/TR/permissions/", + "asOfVersion": "2.0.0" + }, { "libraryName": "wait-for-localhost", "typingsPackageName": "wait-for-localhost", @@ -2352,6 +2616,12 @@ "sourceRepoURL": "https://github.com/sindresorhus/wallpaper", "asOfVersion": "4.3.0" }, + { + "libraryName": "typescript", + "typingsPackageName": "webassembly-js-api", + "sourceRepoURL": "https://github.com/winksaville/test-webassembly-js-ts", + "asOfVersion": "2.0.0" + }, { "libraryName": "webcola", "typingsPackageName": "webcola", @@ -2376,6 +2646,12 @@ "sourceRepoURL": "http://webix.com", "asOfVersion": "5.1.1" }, + { + "libraryName": "webpack-chain", + "typingsPackageName": "webpack-chain", + "sourceRepoURL": "https://github.com/neutrinojs/webpack-chain", + "asOfVersion": "5.2.0" + }, { "libraryName": "winston", "typingsPackageName": "winston", @@ -2448,6 +2724,12 @@ "sourceRepoURL": "none", "asOfVersion": "2.1.0" }, + { + "libraryName": "yn", + "typingsPackageName": "yn", + "sourceRepoURL": "https://github.com/sindresorhus/yn", + "asOfVersion": "3.1.0" + }, { "libraryName": "zapier-platform-core", "typingsPackageName": "zapier-platform-core", diff --git a/types/aframe/index.d.ts b/types/aframe/index.d.ts index 67257c6f65..eb28f8e5bf 100644 --- a/types/aframe/index.d.ts +++ b/types/aframe/index.d.ts @@ -235,7 +235,6 @@ export interface Scene extends Entity { behaviors: Behavior[]; camera: THREE.Camera; canvas: HTMLCanvasElement; - effect: THREE.VREffect; isMobile: boolean; object3D: THREE.Scene; renderer: THREE.WebGLRenderer; diff --git a/types/aframe/package.json b/types/aframe/package.json new file mode 100644 index 0000000000..815d98a16c --- /dev/null +++ b/types/aframe/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "three": "^0.103.0" + } +} diff --git a/types/airbnb-prop-types/airbnb-prop-types-tests.ts b/types/airbnb-prop-types/airbnb-prop-types-tests.ts index 9272fe6ddc..cf8535947e 100644 --- a/types/airbnb-prop-types/airbnb-prop-types-tests.ts +++ b/types/airbnb-prop-types/airbnb-prop-types-tests.ts @@ -152,6 +152,9 @@ AirbnbPropTypes.range(0, 10); // $ExpectType Requireable<5> AirbnbPropTypes.range<5>(0, 10); +// $ExpectType Requireable> +AirbnbPropTypes.ref(); + // $ExpectType Requireable AirbnbPropTypes.requiredBy('foo', PropTypes.string); // $ExpectType Validator diff --git a/types/airbnb-prop-types/index.d.ts b/types/airbnb-prop-types/index.d.ts index 10c58556c7..da3e3b9eb2 100644 --- a/types/airbnb-prop-types/index.d.ts +++ b/types/airbnb-prop-types/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for airbnb-prop-types 2.11 +// Type definitions for airbnb-prop-types 2.13 // Project: https://github.com/airbnb/prop-types // Definitions by: Miles Johnson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -24,6 +24,12 @@ export type ReactFunctionComponentLike = (...args: any[]) => PropTypes.ReactNode export type ReactTypeLike = string | ReactClassComponentLike | ReactFunctionComponentLike; +export interface ReactRefLike { + readonly current: T | null; +} + +export type ReactLegacyRefLike = ((instance: T | null) => void) | ReactRefLike; + export interface Specifier { max?: number; min?: number; @@ -156,6 +162,8 @@ export function range(min?: number, max?: number): PropTypes.R export function range(min?: number, max?: number): PropTypes.Requireable; +export function ref(): PropTypes.Requireable>; + export function requiredBy

( requiredByPropName: string, propType: PropTypes.Validator

, diff --git a/types/algoliasearch/algoliasearch-tests.ts b/types/algoliasearch/algoliasearch-tests.ts index fa6e29dbab..4c68a75831 100644 --- a/types/algoliasearch/algoliasearch-tests.ts +++ b/types/algoliasearch/algoliasearch-tests.ts @@ -207,6 +207,11 @@ browser.on('error', function onError(err) { browser.stop(); +index.setSettings({ hitsPerPage: 10 }, () => {}) +index.setSettings({ hitsPerPage: 10 }, { forwardToReplicas: true }, () => {}) +index.setSettings({ hitsPerPage: 10 }).then(() => {}) +index.setSettings({ hitsPerPage: 10 }, { forwardToReplicas: true }).then(() => {}) + index.browse("", { advancedSyntax: false, attributesToRetrieve: ['dogs'] diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index 86cedc9b93..8c32304c9e 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -7,6 +7,7 @@ // Kai Eichinger // Nery Ortez // Antoine Rousseau +// Luca Pasquale // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -359,6 +360,15 @@ declare namespace algoliasearch { settings: IndexSettings, cb: (err: Error, res: Task) => void ): void; + /** + * Set an index settings + * https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings + */ + setSettings( + settings: IndexSettings, + extra: { forwardToReplicas: boolean }, + cb: (err: Error, res: Task) => void + ): void; /** * Clear cache of an index * https://github.com/algolia/algoliasearch-client-js#cache @@ -587,7 +597,7 @@ declare namespace algoliasearch { * Set an index settings * https://github.com/algolia/algoliasearch-client-js#set-settings---setsettings */ - setSettings(settings: IndexSettings): Promise; + setSettings(settings: IndexSettings, extra?: { forwardToReplicas: boolean }): Promise; /** * Search in an index * https://github.com/algolia/algoliasearch-client-js#search-in-an-index---search diff --git a/types/align-text/index.d.ts b/types/align-text/index.d.ts index 652eb5f453..ad72062b34 100644 --- a/types/align-text/index.d.ts +++ b/types/align-text/index.d.ts @@ -31,7 +31,7 @@ interface Callback { | TransformResult; } -declare function align_text(text: string, fn: number | Callback): string; -declare function align_text(text: string[], fn: number | Callback): string[]; +declare function align_text(text: string, fn?: number | Callback): string; +declare function align_text(text: any[], fn?: number | Callback): string[]; export = align_text; diff --git a/types/align-text/test/array.ts b/types/align-text/test/array.ts new file mode 100644 index 0000000000..4d5fef3479 --- /dev/null +++ b/types/align-text/test/array.ts @@ -0,0 +1,6 @@ +import align from "align-text"; + +const text = ["abc", true, 123456, { hello: "world" }]; +align(text, 4); + +align(text); diff --git a/types/align-text/test/simple.ts b/types/align-text/test/simple.ts index 0571e5aad0..65ef81fcf0 100644 --- a/types/align-text/test/simple.ts +++ b/types/align-text/test/simple.ts @@ -4,3 +4,5 @@ const text = ["abc", "abc", "abc"]; align(text, 4); align("abc", 2); + +align("abc"); diff --git a/types/align-text/tsconfig.json b/types/align-text/tsconfig.json index 5184832b59..bdea3b3399 100644 --- a/types/align-text/tsconfig.json +++ b/types/align-text/tsconfig.json @@ -17,6 +17,7 @@ "index.d.ts", "test/simple.ts", "test/center-simple.ts", - "test/center-complex.ts" + "test/center-complex.ts", + "test/array.ts" ] } diff --git a/types/all-keys/all-keys-tests.ts b/types/all-keys/all-keys-tests.ts deleted file mode 100644 index 6bbb6021c7..0000000000 --- a/types/all-keys/all-keys-tests.ts +++ /dev/null @@ -1,5 +0,0 @@ -import allKeys = require('all-keys'); - -allKeys(Symbol.prototype); // $ExpectType Set -allKeys(Symbol.prototype, { includeObjectPrototype: false }); // $ExpectType Set -allKeys(Symbol.prototype, { includeSymbols: false }); // $ExpectType Set diff --git a/types/all-keys/index.d.ts b/types/all-keys/index.d.ts deleted file mode 100644 index 9301c8f929..0000000000 --- a/types/all-keys/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Type definitions for all-keys 2.0 -// Project: https://github.com/sindresorhus/all-keys#readme -// Definitions by: BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 - -export = allKeys; - -/** - * Get all property keys of an object including non-enumerable and inherited ones. - * Like [Reflect.ownKeys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys) - * but traverses up the prototype-chain. - */ -declare function allKeys(obj: object, options?: allKeys.Options): Set; - -declare namespace allKeys { - interface Options { - /** - * Include `Object.prototype` properties like `isPrototypeOf`. - * @default true - */ - includeObjectPrototype?: boolean; - /** - * Include [Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) keys. - * @default true - */ - includeSymbols?: boolean; - } -} diff --git a/types/all-property-names/all-property-names-tests.ts b/types/all-property-names/all-property-names-tests.ts deleted file mode 100644 index b32daa59a3..0000000000 --- a/types/all-property-names/all-property-names-tests.ts +++ /dev/null @@ -1,4 +0,0 @@ -import allPropertyNames = require('all-property-names'); - -// $ExpectType Set -allPropertyNames(Symbol.prototype); diff --git a/types/all-property-names/index.d.ts b/types/all-property-names/index.d.ts deleted file mode 100644 index 0b396ec94d..0000000000 --- a/types/all-property-names/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Type definitions for all-property-names 1.0 -// Project: https://github.com/sindresorhus/all-property-names#readme -// Definitions by: BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 - -export = allPropertyNames; - -declare function allPropertyNames(input: object): Set; diff --git a/types/amap-js-api-autocomplete/amap-js-api-autocomplete-tests.ts b/types/amap-js-api-autocomplete/amap-js-api-autocomplete-tests.ts new file mode 100644 index 0000000000..fb1b0d9b6b --- /dev/null +++ b/types/amap-js-api-autocomplete/amap-js-api-autocomplete-tests.ts @@ -0,0 +1,108 @@ +declare const div: HTMLDivElement; + +const input = document.createElement('input'); +// $ExpectType Autocomplete +const autoComplete = new AMap.Autocomplete(); +// $ExpectType Autocomplete +new AMap.Autocomplete({}); +// $ExpectType Autocomplete +new AMap.Autocomplete({ + type: 'type', + city: 'city', + datatype: 'all', + citylimit: true, + input: 'input', + output: 'output', + outPutDirAuto: true +}); +// $ExpectType Autocomplete +new AMap.Autocomplete({ + type: 'type', + city: 'city', + datatype: 'all', + citylimit: true, + input, + output: div, + outPutDirAuto: true +}); + +autoComplete.search('keyword', (status, result) => { + const temp: 'error' | 'complete' | 'no_data' = status; + if (typeof result !== 'string') { + // $ExpectType number + result.count; + // $ExpectType string + result.info; + // $ExpectType Tip[] + result.tips; + { + const tip = result.tips[0]; + // $ExpectType string + tip.adcode; + // $ExpectType string + tip.address; + // $ExpectType any[] + tip.city; + // $ExpectType string + tip.district; + // $ExpectType string + tip.id; + // $ExpectType LngLat + tip.location; + // $ExpectType string + tip.name; + // $ExpectType string + tip.typecode; + } + } else { + // $ExpectType string + result; + } +}); + +// $ExpectType void +autoComplete.setType(); +// $ExpectType void +autoComplete.setType('type'); + +// $ExpectType void +autoComplete.setCity(); +// $ExpectType void +autoComplete.setCity('city'); + +// $ExpectType void +autoComplete.setCityLimit(false); + +autoComplete.on('complete', (event: AMap.Autocomplete.EventMap['complete']) => { + // $ExpectType "complete" + event.type; + // $ExpectType string + event.info; + if ('tips' in event) { + // $ExpectType number + event.count; + // $ExpectType Tip[] + event.tips; + } +}); + +autoComplete.on('error', (event: AMap.Autocomplete.EventMap['error']) => { + // $ExpectType "error" + event.type; + // $ExpectType string + event.info; +}); + +autoComplete.on('select', (event: AMap.Autocomplete.EventMap['select']) => { + // $ExpectType "select" + event.type; + // $ExpectType Tip + event.tip; +}); + +autoComplete.on('choose', (event: AMap.Autocomplete.EventMap['choose']) => { + // $ExpectType "choose" + event.type; + // $ExpectType Tip + event.tip; +}); diff --git a/types/amap-js-api-autocomplete/index.d.ts b/types/amap-js-api-autocomplete/index.d.ts new file mode 100644 index 0000000000..4bfc934395 --- /dev/null +++ b/types/amap-js-api-autocomplete/index.d.ts @@ -0,0 +1,144 @@ +// Type definitions for non-npm package amap-js-api-autocomplete 1.4 +// Project: https://lbs.amap.com/api/javascript-api/reference/search#m_AMap.Autocomplete +// Definitions by: breeze9527 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +declare namespace AMap { + namespace Autocomplete { + interface EventMap { + complete: Event<'complete', SearchResult | { info: string }>; + error: Event<'error', { info: string }>; + select: Event<'select', { tip: Tip }>; + choose: Event<'choose', { tip: Tip }>; + } + type DataType = 'all' | 'bus' | 'poi' | 'busline'; + interface Options { + /** + * èŸ“ć…„æç€șæ—¶é™ćźšPOIç±»ćž‹ïŒŒć€šäžȘç±»ćž‹ç”šâ€œ|”戆隔 + */ + type?: string; + /** + * èŸ“ć…„æç€șæ—¶é™ćźšćŸŽćž‚ + */ + city?: string; + /** + * èż”ć›žçš„æ•°æźç±»ćž‹ + */ + datatype?: DataType; + /** + * æ˜ŻćŠćŒșćˆ¶é™ćˆ¶ćœšèźŸçœźçš„ćŸŽćž‚ć†…æœçŽą + */ + citylimit?: boolean; + /** + * æŒ‡ćźšèŸ“ć…„æĄ† + */ + input?: string | HTMLInputElement; + /** + * æŒ‡ćźšèŸ“ć‡șéąæż + */ + output?: string | HTMLDivElement; + /** + * æ˜ŻćŠćœšinput䜍äșŽéĄ”éąèŸƒäž‹æ–čçš„æ—¶ć€™è‡ȘćŠšć°†èŸ“ć…„éąæżæ˜Ÿç€ș朹input侊æ–čä»„éżć…èą«éźæŒĄ + */ + outPutDirAuto?: boolean; + + // internal + closeResultOnScroll?: boolean; + lang?: Lang; + } + interface Tip { + /** + * 損称 + */ + name: string; + /** + * æ‰€ć±žćŒș㟟 + */ + district: string; + /** + * ćŒșćŸŸçŒ–ç  + */ + adcode: string; + /** + * 朰杀 + */ + address: string; + /** + * 柎澂 + */ + city: any[]; + /** + * ID + */ + id: string; + /** + * ćæ ‡ç»çșŹćșŠ + */ + location: LngLat; + /** + * ç±»ćž‹çŒ–ç  + */ + typecode: string; + } + interface SearchResult { + /** + * æŸ„èŻąçŠ¶æ€èŻŽæ˜Ž + */ + info: string; + /** + * èŸ“ć…„æç€șæĄæ•° + */ + count: number; + /** + * èŸ“ć…„æç€șćˆ—èĄš + */ + tips: Tip[]; + } + type SearchStatus = 'complete' | 'error' | 'no_data'; + } + class Autocomplete extends EventEmitter { + /** + * èŸ“ć…„æç€șæ čæźèŸ“ć…„ć…łé”źć­—æç€șćŒčé…äżĄæŻ + * @param options 选éĄč + */ + constructor(options?: Autocomplete.Options); + /** + * æ čæźèŸ“ć…„ć…łé”źć­—æç€șćŒčé…äżĄæŻ + * @param keyword 慳锼歗 + * @param callback ć›žè°ƒ + */ + search( + keyword: string, + callback: (status: Autocomplete.SearchStatus, result: Autocomplete.SearchResult | string) => void + ): void; + /** + * èźŸçœźæç€șPoiç±»ćž‹ïŒŒć€šäžȘç±»ćž‹ç”šâ€œ|”戆隔 + * @param type Poi类枋 + */ + setType(type?: string): void; + /** + * èźŸçœźćŸŽćž‚ + * @param city 柎澂 + */ + setCity(city?: string): void; + /** + * èźŸçœźæ˜ŻćŠćŒșćˆ¶é™ćˆ¶ćŸŽćž‚ + * @param cityLimit æ˜ŻćŠćŒșćˆ¶é™ćˆ¶ćŸŽćž‚ + */ + setCityLimit(cityLimit: boolean): void; + + // internal + /** + * èźŸçœźæŸ„èŻąèŻ­èš€ + * @param lang èŻ­èš€ + */ + setLang(lang?: Lang): void; + /** + * èż”ć›žæŸ„èŻąèŻ­èš€ + */ + getLang(): Lang | undefined; + } +} diff --git a/types/p-defer/tsconfig.json b/types/amap-js-api-autocomplete/tsconfig.json similarity index 90% rename from types/p-defer/tsconfig.json rename to types/amap-js-api-autocomplete/tsconfig.json index 06eb650dbe..f6019445f5 100644 --- a/types/p-defer/tsconfig.json +++ b/types/amap-js-api-autocomplete/tsconfig.json @@ -1,11 +1,11 @@ { "compilerOptions": { "module": "commonjs", - "target": "es6", "lib": [ "es6", "dom" ], + "noEmit": true, "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -15,11 +15,10 @@ "../" ], "types": [], - "noEmit": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "p-defer-tests.ts" + "amap-js-api-autocomplete-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/elastic-apm-node/tslint.json b/types/amap-js-api-autocomplete/tslint.json similarity index 100% rename from types/elastic-apm-node/tslint.json rename to types/amap-js-api-autocomplete/tslint.json diff --git a/types/amap-js-api-geocoder/amap-js-api-geocoder-tests.ts b/types/amap-js-api-geocoder/amap-js-api-geocoder-tests.ts new file mode 100644 index 0000000000..51feb02694 --- /dev/null +++ b/types/amap-js-api-geocoder/amap-js-api-geocoder-tests.ts @@ -0,0 +1,227 @@ +declare const lnglat: AMap.LngLat; +declare const lnglatTuple: [number, number]; + +// $ExpectType Geocoder +new AMap.Geocoder(); +// $ExpectType Geocoder +new AMap.Geocoder({}); +// $ExpectType Geocoder +const geocoder = new AMap.Geocoder({ + city: 'city', + radius: 10, + lang: 'zh_cn', + batch: true, + extensions: 'all' +}); + +// $ExpectType void +geocoder.getLocation('address', (status, result) => { + // $ExpectType SearchStatus + status; + if (typeof result !== 'string') { + const geocode = result.geocodes[0]; + const addressComponent = geocode.addressComponent; + // $ExpectType string + result.info; + // $ExpectType string + result.resultNum; + // $ExpectType string + geocode.adcode; + // $ExpectType string + geocode.formattedAddress; + // $ExpectType string + geocode.level; + // $ExpectType LngLat + geocode.location; + // $ExpectType string + addressComponent.building; + // $ExpectType string + addressComponent.building; + // $ExpectType string + addressComponent.buildingType; + // $ExpectType string + addressComponent.city; + // $ExpectType string + addressComponent.citycode; + // $ExpectType string + addressComponent.district; + // $ExpectType string + addressComponent.neighborhood; + // $ExpectType string + addressComponent.neighborhoodType; + // $ExpectType string + addressComponent.province; + // $ExpectType string + addressComponent.street; + // $ExpectType string + addressComponent.streetNumber; + // $ExpectType string + addressComponent.township; + } else { + // $ExpectType string + result; + } +}); + +// $ExpectType void +geocoder.getLocation(['address', 'address'], () => { }); + +// $ExpectType void +geocoder.setCity(); +// $ExpectType void +geocoder.setCity('city'); + +// $ExpectType void +geocoder.getAddress(lnglat, (status, result) => { + // $ExpectType SearchStatus + status; + if (typeof result !== 'string') { + // $ExpectType string + result.info; + + // $ExpectType ReGeocode + const regeocode = result.regeocode; + // $ExpectType ReGeocodeAddressComponent + const addressComponent = regeocode.addressComponent; + { + // $ExpectType string + addressComponent.adcode; + // $ExpectType string + addressComponent.building; + // $ExpectType string + addressComponent.buildingType; + // $ExpectType BuildingArea[] + addressComponent.businessAreas; + { + const businessArea = addressComponent.businessAreas[0]; + // $ExpectType string + businessArea.id; + // $ExpectType LngLat + businessArea.location; + // $ExpectType string + businessArea.name; + } + // $ExpectType string + addressComponent.city; + // $ExpectType string + addressComponent.citycode; + // $ExpectType string + addressComponent.district; + // $ExpectType string + addressComponent.neighborhood; + // $ExpectType string + addressComponent.neighborhoodType; + // $ExpectType string + addressComponent.province; + // $ExpectType string + addressComponent.street; + // $ExpectType string + addressComponent.streetNumber; + // $ExpectType string + addressComponent.township; + } + // $ExpectType Cross[] + regeocode.crosses; + { + const cross = regeocode.crosses[0]; + // $ExpectType string + cross.direction; + // $ExpectType number + cross.distance; + // $ExpectType string + cross.first_id; + // $ExpectType string + cross.first_name; + // $ExpectType LngLat + cross.location; + // $ExpectType string + cross.second_id; + // $ExpectType string + cross.second_name; + } + // $ExpectType string + regeocode.formattedAddress; + // $ExpectType ReGeocodePoi[] + regeocode.pois; + { + const poi = regeocode.pois[0]; + // $ExpectType string + poi.address; + // $ExpectType string + poi.businessArea; + // $ExpectType string + poi.direction; + // $ExpectType number + poi.distance; + // $ExpectType string + poi.id; + // $ExpectType LngLat + poi.location; + // $ExpectType string + poi.name; + // $ExpectType string + poi.tel; + // $ExpectType string + poi.type; + } + // $ExpectType Road[] + regeocode.roads; + { + const road = regeocode.roads[0]; + // $ExpectType string + road.direction; + // $ExpectType number + road.distance; + // $ExpectType string + road.id; + // $ExpectType LngLat + road.location; + // $ExpectType string + road.name; + } + } else { + // $ExpectType string + result; + } +}); + +// $ExpectType void +geocoder.getAddress([lnglat, lnglat], (status, result) => { + if (typeof result !== 'string') { + // $ExpectType ReGeocode[] + result.regeocodes; + } +}); + +geocoder.on('error', (event: AMap.Geocoder.EventMap['error']) => { + // $ExpectType "error" + event.type; + // $ExpectType string + event.info; +}); + +geocoder.on('complete', (event: AMap.Geocoder.EventMap['complete']) => { + // $ExpectType "complete" + event.type; + if ('info' in event) { + // $ExpectType string + event.info; + } + if ('geocodes' in event) { + // $ExpectType string + event.resultNum; + } + if ('regeocode' in event) { + // $ExpectType ReGeocode + event.regeocode; + } + if ('regeocodes' in event) { + // $ExpectType ReGeocode[] + event.regeocodes; + } +}); + +// $ExpectType void +geocoder.getAddress(lnglatTuple, () => { }); +// $ExpectType void +geocoder.getAddress([lnglatTuple, lnglatTuple], () => { }); diff --git a/types/amap-js-api-geocoder/index.d.ts b/types/amap-js-api-geocoder/index.d.ts new file mode 100644 index 0000000000..91b0d12db5 --- /dev/null +++ b/types/amap-js-api-geocoder/index.d.ts @@ -0,0 +1,373 @@ +// Type definitions for non-npm package amap-js-api-geocoder 1.4 +// Project: https://lbs.amap.com/api/javascript-api/reference/lnglat-to-address#m_AMap.Geocoder +// Definitions by: breeze9527 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +declare namespace AMap { + namespace Geocoder { + interface EventMap { + complete: Event<'complete', GeocodeResult | {} | ReGeocodeResult | BatchReGeocodeResult>; + error: Event<'error', { info: string }>; + } + interface Options { + /** + * 柎澂 + */ + city?: string; + /** + * 䞭濃ç‚č + */ + radius?: number; + /** + * èŻ­èš€ç±»ćž‹ + */ + lang?: Lang; + /** + * æ˜ŻćŠæ‰čé‡æŸ„èŻą + */ + batch?: boolean; + /** + * æ˜ŻćŠèż”ć›žèŻŠç»†äżĄæŻ + */ + extensions?: 'base' | 'all'; + } + interface BuildingArea { + /** + * ć”Żäž€æ ‡èŻ† + */ + id: string; + /** + * 損称 + */ + name: string; + /** + * 䞭濃ç‚č经çșŹćșŠ + */ + location: LngLat; + } + interface GeocodeAddressComponent { + /** + * 瀟ćŒș + */ + neighborhood: string; + /** + * 瀟ćŒș类枋 + */ + neighborhoodType: string; + /** + * 愌/性掊 + */ + building: string; + /** + * æ„Œç±»ćž‹ + */ + buildingType: string; + /** + * 省 + */ + province: string; + /** + * 柎澂 + */ + city: string; + /** + * ćŒș + */ + district: string; + /** + * äčĄé•‡ + */ + township: string; + /** + * ćŸŽćž‚çŒ–ç  + */ + citycode: string; + /** + * èĄ—é“ + */ + street: string; + /** + * é—šç‰Œć· + */ + streetNumber: string; + } + interface ReGeocodeAddressComponent { + /** + * ćŸŽćž‚çŒ–ç  + */ + citycode: string; + /** + * ćŒșćŸŸçŒ–ç  + */ + adcode: string; + /** + * æ‰€ć±žć•†ćœˆäżĄæŻ + */ + businessAreas: BuildingArea[]; + /** + * 瀟ćŒș + */ + neighborhoodType: string; + /** + * 瀟ćŒș类枋 + */ + neighborhood: string; + /** + * 愌/性掊 + */ + building: string; + /** + * æ„Œç±»ćž‹ + */ + buildingType: string; + /** + * èĄ—é“ + */ + street: string; + /** + * é—šç‰Œć· + */ + streetNumber: string; + /** + * 省 + */ + province: string; + /** + * 柎澂 + */ + city: string; + /** + * ćŒș + */ + district: string; + /** + * äčĄé•‡ + */ + township: string; + } + interface Geocode { + /** + * ćœ°ć€ç»„æˆć…ƒçŽ  + */ + addressComponent: GeocodeAddressComponent; + /** + * æ ŒćŒćŒ–ćœ°ć€ + */ + formattedAddress: string; + /** + * ćæ ‡ + */ + location: LngLat; + /** + * ćŒșćŸŸçŒ–ç  + */ + adcode: string; + /** + * ç»™ćźšćœ°ć€ćŒč配çș§ćˆ« + */ + level: string; + } + interface GeocodeResult { + /** + * çŠ¶æ€èŻŽæ˜Ž + */ + info: string; + /** + * ćœ°ç†çŒ–ç ç»“æžœæ•°ç›ź + */ + resultNum: string; + /** + * ćœ°ç†çŒ–ç ç»“æžœ + */ + geocodes: Geocode[]; + } + interface Road { + /** + * ć”Żäž€æ ‡èŻ† + */ + id: string; + /** + * 損称 + */ + name: string; + /** + * é“è·ŻçŠ»æŸ„èŻąç‚čæœ€èż‘距犻 + */ + distance: number; + /** + * é“è·ŻäžŠçŠ»æŸ„èŻąç‚čæœ€èż‘çš„ç‚čćæ ‡ + */ + location: LngLat; + /** + * äžŽæŸ„èŻąç‚č的盾ćŻčæ–č䜍 + */ + direction: string; + } + interface Cross { + /** + * é“è·ŻçŠ»æŸ„èŻąç‚čæœ€èż‘距犻 + */ + distance: number; + /** + * äžŽæŸ„èŻąç‚č的盾ćŻčæ–č䜍 + */ + direction: string; + /** + * 经çșŹćșŠ + */ + location: LngLat; + /** + * çŹŹäž€æĄé“è·Żid + */ + first_id: string; + /** + * çŹŹäž€æĄé“è·Żćç§° + */ + first_name: string; + /** + * 珏äșŒæĄé“è·Żid + */ + second_id: string; + /** + * 珏äșŒæĄé“è·Żćç§° + */ + second_name: string; + } + interface ReGeocodePoi { + /** + * ć”Żäž€æ ‡èŻ† + */ + id: string; + /** + * 損称 + */ + name: string; + /** + * 类枋 + */ + type: string; + /** + * ç””èŻ + */ + tel: string; + /** + * èŻ„Poićˆ°èŻ·æ±‚ćæ ‡çš„è·çŠ» + */ + distance: number; + /** + * èŻ„Poi盾ćŻčäșŽèŻ·æ±‚ćæ ‡çš„æ–č搑 + */ + direction: string; + /** + * ć€äżĄæŻ + */ + address: string; + /** + * ćæ ‡ + */ + location: LngLat; + /** + * 敆月損称 + */ + businessArea: string; + } + interface ReGeocodeAoi { + adcode: string; + area: string; + id: string; + location: LngLat; + name: string; + type: string; + } + interface ReGeocode { + /** + * ćœ°ć€ç»„æˆć…ƒçŽ  + */ + addressComponent: ReGeocodeAddressComponent; + /** + * æ ŒćŒćŒ–ćœ°ć€ + */ + formattedAddress: string; + /** + * é“è·ŻäżĄæŻćˆ—èĄš + */ + roads: Road[]; + /** + * é“è·Żè·ŻćŁćˆ—èĄš + */ + crosses: Cross[]; + /** + * ć…Žè¶Łç‚čćˆ—èĄš + */ + pois: ReGeocodePoi[]; + aois?: ReGeocodeAoi[]; + } + interface ReGeocodeResult { + /** + * çŠ¶æ€èŻŽæ˜Ž + */ + info: string; + /** + * é€†ćœ°ç†çŒ–ç ç»“æžœ + */ + regeocode: ReGeocode; + } + interface BatchReGeocodeResult { + /** + * çŠ¶æ€èŻŽæ˜Ž + */ + info: string; + /** + * æ‰čé‡é€†ćœ°ç†çŒ–ç ç»“æžœ + */ + regeocodes: ReGeocode[]; + } + type SearchStatus = 'complete' | 'no_data' | 'error'; + } + class Geocoder extends EventEmitter { + /** + * ćœ°ç†çŒ–ç äžŽé€†ćœ°ç†çŒ–ç  + * @param options 选éĄč + */ + constructor(options?: Geocoder.Options); + /** + * æ čæźç»™ćźšçš„ćœ°ć€æèż°èż›èĄŒè§Łæž + * @param address ćœ°ć€æèż° + * @param callback ć›žè°ƒ + */ + getLocation( + address: string | string[], + callback: (status: Geocoder.SearchStatus, result: Geocoder.GeocodeResult | string) => void + ): void; + /** + * èźŸçœźćœ°ć€æèż°æ‰€ćœšćŸŽćž‚ + * @param city 柎澂 + */ + setCity(city?: string): void; + /** + * æ čæźç»™ćźšćæ ‡èż›èĄŒè§Łæž + * @param location ćæ ‡ + * @param callback ć›žè°ƒ + */ + getAddress( + location: LocationValue, + callback: (status: Geocoder.SearchStatus, result: Geocoder.ReGeocodeResult | string) => void + ): void; + /** + * æ čæźç»™ćźšćæ ‡èż›èĄŒè§Łæž + * @param locations ćæ ‡æ•°ç»„ + * @param callback ć›žè°ƒ + */ + getAddress( + locations: LocationValue[], + callback: (status: Geocoder.SearchStatus, result: Geocoder.BatchReGeocodeResult | string) => void + ): void; + + // internal + setLang(lang?: Lang): void; + getLang(): Lang | undefined; + } +} diff --git a/types/navigator-permissions/tsconfig.json b/types/amap-js-api-geocoder/tsconfig.json similarity index 92% rename from types/navigator-permissions/tsconfig.json rename to types/amap-js-api-geocoder/tsconfig.json index c072886b33..58571ba460 100644 --- a/types/navigator-permissions/tsconfig.json +++ b/types/amap-js-api-geocoder/tsconfig.json @@ -5,6 +5,7 @@ "es6", "dom" ], + "noEmit": true, "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -14,11 +15,10 @@ "../" ], "types": [], - "noEmit": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "navigator-permissions-tests.ts" + "amap-js-api-geocoder-tests.ts" ] } diff --git a/types/amap-js-api-geocoder/tslint.json b/types/amap-js-api-geocoder/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/amap-js-api-geocoder/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/amap-js-api-geolocation/amap-js-api-geolocation-tests.ts b/types/amap-js-api-geolocation/amap-js-api-geolocation-tests.ts new file mode 100644 index 0000000000..97ba5804a5 --- /dev/null +++ b/types/amap-js-api-geolocation/amap-js-api-geolocation-tests.ts @@ -0,0 +1,151 @@ +declare const map: AMap.Map; +// $ExpectType Geolocation +new AMap.Geolocation(); +// $ExpectType Geolocation +new AMap.Geolocation({}); +// $ExpectType Geolocation +const geolocation = new AMap.Geolocation({ + enableHighAccuracy: true, + timeout: 2000, + noIpLocate: 0, + noGeoLocation: 0, + GeoLocationFirst: true, + maximumAge: 100, + convert: true, + showButton: true, + buttonDom: 'button', + buttonPosition: 'LT', + buttonOffset: new AMap.Pixel(10, 10), + showMarker: true, + markerOptions: {}, + showCircle: true, + circleOptions: {}, + panToLocation: true, + zoomToAccuracy: true, + useNative: false, + extensions: 'all' +}); + +// $ExpectType boolean +geolocation.isSupported(); + +// $ExpectType void +geolocation.getCurrentPosition((status, result) => { + const statusTemp: 'complete' | 'error' = status; + if (result.status === 1) { + // $ExpectType GeolocationResult + result; + // $ExpectType number | null + result.accuracy; + // $ExpectType ReGeocodeAddressComponent + result.addressComponent; + // $ExpectType ReGeocodeAoi[] | undefined + result.aois; + // $ExpectType Cross[] + result.crosses; + // $ExpectType string + result.formattedAddress; + // $ExpectType string + result.info; + // $ExpectType boolean + result.isConverted; + const type: 'ip' | 'html5' | 'sdk' = result.location_type; + // $ExpectType string + result.message; + // $ExpectType ReGeocodePoi[] + result.pois; + // $ExpectType LngLat + result.position; + // $ExpectType Road[] + result.roads; + // $ExpectType 1 + result.status; + } else { + // $ExpectType ErrorStatus + result; + // $ExpectType string + result.info; + // $ExpectType string + result.message; + } +}); + +const watchId: string | undefined | null = geolocation.watchPosition(); + +// $ExpectType string | undefined +geolocation.clearWatch('id'); + +// $ExpectType void +geolocation.getCityInfo((status, result) => { + const statusTemp: 'complete' | 'error' = status; + if (result.status === 1) { + // $ExpectType CityResult + result; + // $ExpectType string + result.adcode; + // $ExpectType number[] + result.bounds; + // $ExpectType [number, number] + result.center; + // $ExpectType string + result.city; + // $ExpectType string + result.citycode; + // $ExpectType string + result.country; + // $ExpectType string + result.info; + // $ExpectType boolean + result.isConverted; + // $ExpectType string + result.message; + // $ExpectType string + result.province; + // $ExpectType 1 + result.status; + } else { + // $ExpectType ErrorStatus + result; + } +}); + +geolocation.on('complete', (event: AMap.Geolocation.EventMap['complete']) => { + // $ExpectType "complete" + event.type; + // $ExpectType number | null + event.accuracy; + // $ExpectType ReGeocodeAddressComponent + event.addressComponent; + // $ExpectType ReGeocodeAoi[] | undefined + event.aois; + // $ExpectType Cross[] + event.crosses; + // $ExpectType string + event.formattedAddress; + // $ExpectType string + event.info; + // $ExpectType boolean + event.isConverted; + const type: 'ip' | 'html5' | 'sdk' = event.location_type; + // $ExpectType string + event.message; + // $ExpectType ReGeocodePoi[] + event.pois; + // $ExpectType LngLat + event.position; + // $ExpectType Road[] + event.roads; + // $ExpectType 1 + event.status; +}); + +geolocation.on('error', (event: AMap.Geolocation.EventMap['error']) => { + // $ExpectType "error" + event.type; + // $ExpectType string + event.info; + // $ExpectType string + event.message; + // $ExpectType 0 + event.status; +}); diff --git a/types/amap-js-api-geolocation/index.d.ts b/types/amap-js-api-geolocation/index.d.ts new file mode 100644 index 0000000000..b6c3b4acbf --- /dev/null +++ b/types/amap-js-api-geolocation/index.d.ts @@ -0,0 +1,234 @@ +// Type definitions for non-npm package amap-js-api-geolocation 1.4 +// Project: https://lbs.amap.com/api/javascript-api/reference/location#m_AMap.Geolocation +// Definitions by: breeze9527 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// +/// + +declare namespace AMap { + namespace Geolocation { + interface EventMap { + complete: Event<'complete', GeolocationResult>; + error: Event<'error', ErrorStatus>; + } + type ButtonPosition = 'LT' | 'LB' | 'RT' | 'RB'; + interface Options { + /** + * æ˜ŻćŠäœżç”šé«˜çČŸćșŠ + */ + enableHighAccuracy?: boolean; + /** + * è¶…æ—¶æŻ«ç§’æ•° + */ + timeout?: number; + /** + * æ˜ŻćŠçŠæ­ąäœżç”šIPćźšäœïŒŒé»˜èź€ć€Œäžș0 + * 0: ćŻä»„äœżç”šIPćźšäœ + * 1: 手æœșèźŸć€‡çŠæ­ąäœżç”šIPćźšäœ + * 2: PCäžŠçŠæ­ąäœżç”šIPćźšäœ + * 3: æ‰€æœ‰ç»ˆç«ŻçŠæ­ąäœżç”šIPćźšäœ + */ + noIpLocate?: number; + /** + * æ˜ŻćŠçŠæ­ąäœżç”šæ”è§ˆć™šGeolocationćźšäœïŒŒé»˜èź€ć€Œäžș0 + * 0: ćŻä»„äœżç”šæ”è§ˆć™šćźšäœ + * 1: 手æœșèźŸć€‡çŠæ­ąäœżç”šæ”è§ˆć™šćźšäœ + * 2: PCäžŠçŠæ­ąäœżç”šæ”è§ˆć™šćźšäœ + * 3: æ‰€æœ‰ç»ˆç«ŻçŠæ­ąäœżç”šæ”è§ˆć™šćźšäœ + */ + noGeoLocation?: number; + /** + * æ˜ŻćŠPC端äžșäŒ˜ć…ˆäœżç”šæ”è§ˆć™šćźšäœ + */ + GeoLocationFirst?: boolean; + /** + * çŒ“ć­˜æŻ«ç§’æ•° + */ + maximumAge?: number; + /** + * æ˜ŻćŠèœŹæąæˆé«˜ćŸ·ćæ ‡ + */ + convert?: boolean; + /** + * æ˜ŻćŠæ˜Ÿç€șćźšäœæŒ‰é’ź + */ + showButton?: boolean; + /** + * è‡Ș漚äč‰ćźšäœæŒ‰é’źçš„憅ćźč + */ + buttonDom?: string | HTMLElement; + /** + * ćźšäœæŒ‰é’źćŻćœé çš„äœçœź + * “LTâ€ïŒšć·ŠäžŠè§’ + * “LBâ€ïŒšć·Šäž‹è§’ + * “RTâ€ïŒšćłäžŠè§’ + * “RBâ€ïŒšćłäž‹è§’ + */ + buttonPosition?: ButtonPosition; + /** + * æŒ‰é’źè·çŠ»ćœé äœçœźçš„ćç§»é‡ + */ + buttonOffset?: Pixel; + /** + * ćźšäœæˆćŠŸæ—¶æ˜ŻćŠćœšćźšäœäœçœźæ˜Ÿç€ș侀äžȘMarker + */ + showMarker?: boolean; + /** + * ćźšäœç‚čMarkerçš„é…çœź + */ + markerOptions?: Marker.Options; + /** + * ćźšäœæˆćŠŸćč¶äž”有çČŸćșŠäżĄæŻæ—¶ïŒŒæ˜ŻćŠç”šäž€äžȘ朆月circleèĄšç€șçČŸćșŠèŒƒć›Ž + */ + showCircle?: boolean; + /** + * ćźšäœç‚čCircleçš„é…çœź + */ + circleOptions?: Circle.Options; + /** + * ćźšäœæˆćŠŸćŽïŒŒæ˜ŻćŠæŠŠćźšäœćŸ—ćˆ°çš„ćæ ‡èźŸçœźäžșćœ°ć›Ÿäž­ćżƒç‚čćæ ‡ + */ + panToLocation?: boolean; + /** + * ćźšäœæˆćŠŸäž”æ˜Ÿç€șçČŸćșŠèŒƒć›Žæ—¶ïŒŒæ˜ŻćŠæŠŠćœ°ć›Ÿè§†é‡Žè°ƒæ•Žćˆ°æ­Łć„œæ˜Ÿç€șçČŸćșŠèŒƒć›Ž + */ + zoomToAccuracy?: boolean; + /** + * æ˜ŻćŠäœżç”šćź‰ć“ćźšäœsdkç”šæ„èż›èĄŒćźšäœ + */ + useNative?: boolean; + /** + * æ˜ŻćŠèż”ć›žèŻŠç»†äżĄæŻ + */ + extensions?: 'all' | 'base'; + // internal + convertUrl?: string; + stopWhenPermissionDenied?: boolean; + } + type LocationType = 'html5' | 'ip' | 'sdk'; + interface GeolocationResult extends Geocoder.ReGeocode { + /** + * ćźšäœç»“æžœ + */ + position: LngLat; + /** + * çČŸćșŠ + */ + accuracy: number | null; + /** + * ćźšäœç»“æžœçš„æ„æș + */ + location_type: LocationType; + /** + * ćœąæˆćœ“ć‰ćźšäœç»“æžœçš„äž€äș›äżĄæŻ + */ + message: string; + /** + * æ˜ŻćŠć·Čç»èœŹæąæˆé«˜ćŸ·ćæ ‡ + */ + isConverted: boolean; + /** + * çŠ¶æ€äżĄæŻ + */ + info: string; + /** + * 状态码 + */ + status: 1; + } + interface ErrorStatus { + /** + * é”™èŻŻäżĄæŻ + */ + info: string; + /** + * é€ æˆćźšäœć€±èŽ„ç»“æžœçš„äž€äș›æœ‰ç”šäżĄæŻ + */ + message: string; + /** + * 状态码 + */ + status: 0; + } + interface CityResult { + /** + * ćŒșćŸŸçŒ–ç  + */ + adcode: string; + /** + * èŒƒć›Ž + */ + bounds: number[]; + /** + * 䞭濃ç‚č + */ + center: [number, number]; + /** + * 柎澂 + */ + city: string; + /** + * ćŸŽćž‚çŒ–ç  + */ + citycode: string; + /** + * ć›œćź¶ + */ + country: string; + /** + * çŠ¶æ€äżĄæŻ + */ + info: string; + /** + * æ˜ŻćŠć·ČèœŹæąæˆé«˜ćŸ·ćæ ‡ + */ + isConverted: boolean; + /** + * äżĄæŻæèż° + */ + message: string; + /** + * 省仜 + */ + province: string; + /** + * 状态码 + */ + status: 1; + } + type SearchStatus = 'complete' | 'error'; + } + + class Geolocation extends EventEmitter { + /** + * ćźšäœæœćŠĄ + * @param options 选éĄč + */ + constructor(options?: Geolocation.Options); + /** + * æ˜ŻćŠæ”ŻæŒæ”è§ˆć™šćźšäœ + */ + isSupported(): boolean; + /** + * èŽ·ć–ç”šæˆ·ćœ“ć‰çš„çČŸçĄźäœçœźäżĄæŻ + * @param callback ć›žè°ƒ + */ + getCurrentPosition(callback: (status: Geolocation.SearchStatus, result: Geolocation.GeolocationResult | Geolocation.ErrorStatus) => void): void; + /** + * äœżç”šæ”è§ˆć™šćźšäœæŽ„ćŁç›‘æŽ§ćœ“ć‰äœçœźïŒŒç§»ćŠšç«Żæœ‰æ•ˆ + */ + watchPosition(): string | undefined | null; + /** + * ć–æ¶ˆćŻčćœ“ć‰äœçœźçš„ç›‘æŽ§ + * @param wathcId 监控id + */ + clearWatch(wathcId: string): string | undefined; + /** + * èż›èĄŒIPćŸŽćž‚æŸ„èŻą + * @param callback ć›žè°ƒ + */ + getCityInfo(callback: (status: Geolocation.SearchStatus, result: Geolocation.CityResult | Geolocation.ErrorStatus) => void): void; + } +} diff --git a/types/amap-js-api-geolocation/tsconfig.json b/types/amap-js-api-geolocation/tsconfig.json new file mode 100644 index 0000000000..c744dd5888 --- /dev/null +++ b/types/amap-js-api-geolocation/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noEmit": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amap-js-api-geolocation-tests.ts" + ] +} diff --git a/types/amap-js-api-geolocation/tslint.json b/types/amap-js-api-geolocation/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/amap-js-api-geolocation/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/amap-js-api/amap-js-api-tests.ts b/types/amap-js-api/amap-js-api-tests.ts index 57f7fb07d2..f1f699d32e 100644 --- a/types/amap-js-api/amap-js-api-tests.ts +++ b/types/amap-js-api/amap-js-api-tests.ts @@ -60,6 +60,16 @@ testArrayBounds.getCenter(); // $ExpectType Bounds const testBounds = new AMap.Bounds(lnglat, lnglat); +// $ExpectType Bounds +new AMap.Bounds(); +// $ExpectError +new AMap.Bounds([0, 0, 0]); +// $ExpectType Bounds +new AMap.Bounds([0, 0, 0, 0]); +// $ExpectType Bounds +new AMap.Bounds(lnglatTuple, lnglatTuple); +// $ExpectType Bounds +new AMap.Bounds(0, 0, 0, 0); // $ExpectType boolean testBounds.contains(lnglat); @@ -1968,7 +1978,7 @@ const testCircle = new AMap.Circle({ cursor: 'pointer', radius: 1000, strokeColor: '#FF0000', - strokeOpcity: 0.8, + strokeOpacity: 0.8, strokeWeight: 3, fillColor: '#00FF00', fillOpacity: 0.5, @@ -2004,7 +2014,7 @@ testCircle.setOptions({ cursor: 'pointer', radius: 1000, strokeColor: '#FF0000', - strokeOpcity: 0.8, + strokeOpacity: 0.8, strokeWeight: 3, fillColor: '#00FF00', fillOpacity: 0.5, diff --git a/types/amap-js-api/bounds.d.ts b/types/amap-js-api/bounds.d.ts index f594969292..caba988fb2 100644 --- a/types/amap-js-api/bounds.d.ts +++ b/types/amap-js-api/bounds.d.ts @@ -1,11 +1,24 @@ declare namespace AMap { class Bounds { + /** + * ćœ°ç‰©ćŻčè±Ąçš„ç»çșŹćșŠçŸ©ćœąèŒƒć›Žă€‚ + * @param coords ç”±è„żć—è§’ïŒŒäžœćŒ—è§’ç»çșŹćșŠç»„æˆçš„æ•°ç»„ïŒŒćˆ†ćˆ«æ˜Ż[è„żć—è§’ç»ćșŠïŒŒ è„żć—è§’çșŹćșŠïŒŒäžœćŒ—角经ćșŠïŒŒäžœćŒ—è§’çșŹćșŠ] + */ + constructor(coords?: [number, number, number, number]); /** * ćœ°ç‰©ćŻčè±Ąçš„ç»çșŹćșŠçŸ©ćœąèŒƒć›Žă€‚ * @param southWest è„żć—è§’ç»çșŹćșŠ * @param northEast äžœćŒ—è§’ç»çșŹćșŠ */ - constructor(southWest: LngLat, northEast: LngLat); + constructor(southWest: LocationValue, northEast: LocationValue); + /** + * ćœ°ç‰©ćŻčè±Ąçš„ç»çșŹćșŠçŸ©ćœąèŒƒć›Žă€‚ + * @param southWestLng è„żć—è§’ç»ćșŠ + * @param southWestLat è„żć—è§’çșŹćșŠ + * @param northEastLng äžœćŒ—è§’ç»ćșŠ + * @param northEastLat äžœćŒ—è§’çșŹćșŠ + */ + constructor(southWestLng: number, southWestLat: number, northEastLng: number, northEastLat: number); /** * æŒ‡ćźšç‚čćæ ‡æ˜ŻćŠćœšçŸ©ćœąèŒƒć›Žć†… * @param point ćˆ¶ćźšćæ ‡ diff --git a/types/amap-js-api/event.d.ts b/types/amap-js-api/event.d.ts index d90ee4c720..e9d139629d 100644 --- a/types/amap-js-api/event.d.ts +++ b/types/amap-js-api/event.d.ts @@ -8,10 +8,9 @@ declare namespace AMap { * @param once è§Šć‘äž€æŹĄ * @param unshift 曎æ”čäș‹ä»¶éĄșćș */ - on( + on( eventName: string, - // tslint:disable-next-line:no-unnecessary-generics - handler: (this: C, event: E) => void, + handler: (this: C, event: any) => void, context?: C, once?: boolean, unshift?: boolean @@ -22,10 +21,9 @@ declare namespace AMap { * @param handler äș‹ä»¶ćŠŸèƒœć‡œæ•° * @param context äș‹ä»¶äžŠäž‹æ–‡ */ - off( + off( eventName: string, - // tslint:disable-next-line - handler: ((this: C, event: E) => void) | 'mv', + handler: ((this: C, event: any) => void) | 'mv', context?: C ): this; /** @@ -61,13 +59,11 @@ declare namespace AMap { * @param handler äș‹ä»¶ćŠŸèƒœć‡œæ•° * @param context äș‹ä»¶äžŠäž‹æ–‡ */ - function addListener( + function addListener( // tslint:disable-next-line: no-unnecessary-generics instance: I, eventName: string, - // tslint:disable-next-line: no-unnecessary-generics - handler: (this: C, event: E) => void, - // tslint:disable-next-line: no-unnecessary-generics + handler: (this: C, event: any) => void, context?: C ): EventListener<1>; /** @@ -77,13 +73,11 @@ declare namespace AMap { * @param handler äș‹ä»¶ćŠŸèƒœć‡œæ•° * @param context äș‹ä»¶äžŠäž‹æ–‡ */ - function addListenerOnce( + function addListenerOnce( // tslint:disable-next-line: no-unnecessary-generics instance: I, eventName: string, - // tslint:disable-next-line: no-unnecessary-generics - handler: (this: C, event: E) => void, - // tslint:disable-next-line: no-unnecessary-generics + handler: (this: C, event: any) => void, context?: C ): EventListener<1>; /** diff --git a/types/amap-js-api/overlay/circle.d.ts b/types/amap-js-api/overlay/circle.d.ts index c718119e5a..bb3caf4e60 100644 --- a/types/amap-js-api/overlay/circle.d.ts +++ b/types/amap-js-api/overlay/circle.d.ts @@ -13,7 +13,7 @@ declare namespace AMap { cursor?: string; radius?: number; strokeColor?: string; - strokeOpcity?: number; + strokeOpacity?: number; strokeWeight?: number; fillColor?: string; fillOpacity?: number; diff --git a/types/amap-js-api/type-util.d.ts b/types/amap-js-api/type-util.d.ts index 1ced3d69c1..5edb14c615 100644 --- a/types/amap-js-api/type-util.d.ts +++ b/types/amap-js-api/type-util.d.ts @@ -1,12 +1,12 @@ -type Omit = { - [K in Exclude]: T[K] -}; +declare namespace AMap { + type Omit = { + [K in Exclude]: T[K] + }; -type OptionalKey = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; -// type OmitUndefined = Omit; -// type PickUndefined = Omit>; + type OptionalKey = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; -type Merge = - { [K in Exclude>]-?: O[K]; } & - { [K in Extract, OptionalKey>]?: O[K]; } & - T; + type Merge = + { [K in Exclude>]-?: O[K]; } & + { [K in Extract, OptionalKey>]?: O[K]; } & + T; +} diff --git a/types/ansi-escapes/ansi-escapes-tests.ts b/types/ansi-escapes/ansi-escapes-tests.ts deleted file mode 100644 index 7de77e797f..0000000000 --- a/types/ansi-escapes/ansi-escapes-tests.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as ansi from "ansi-escapes"; - -console.log(ansi.cursorUp(2) + ansi.cursorLeft === "\u001B[2A\u001B[1000D"); diff --git a/types/ansi-escapes/index.d.ts b/types/ansi-escapes/index.d.ts deleted file mode 100644 index d01e74661a..0000000000 --- a/types/ansi-escapes/index.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Type definitions for ansi-escapes 3.0 -// Project: https://github.com/sindresorhus/ansi-escapes -// Definitions by: Rong Shen -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare namespace Ansi { - interface ImageOptions { - width?: number; - height?: number; - preserveAspectRatio?: boolean; - } - - interface Term { - setCwd(cwd: string): string; - } - - interface AnsiEscapes { - cursorTo(x: number, y?: number): string; - cursorMove(x: number, y?: number): string; - cursorUp(count?: number): string; - cursorDown(count?: number): string; - cursorForward(count?: number): string; - cursorBackward(count?: number): string; - - cursorLeft: string; - cursorSavePosition: string; - cursorRestorePosition: string; - cursorGetPosition: string; - cursorNextLine: string; - cursorPrevLine: string; - cursorHide: string; - cursorShow: string; - - eraseLines(count: number): string; - - eraseEndLine: string; - eraseStartLine: string; - eraseLine: string; - eraseDown: string; - eraseUp: string; - eraseScreen: string; - scrollUp: string; - scrollDown: string; - - clearScreen: string; - beep: string; - - link(text: string, url: string): string; - image(buf: Buffer, opts?: ImageOptions): string; - iTerm: Term; - } -} - -declare const ansiEscapes: Ansi.AnsiEscapes; -export = ansiEscapes; diff --git a/types/arcgis-js-api/index.d.ts b/types/arcgis-js-api/index.d.ts index 4e43778473..536c0ff3f0 100644 --- a/types/arcgis-js-api/index.d.ts +++ b/types/arcgis-js-api/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ArcGIS API for JavaScript 4.10 +// Type definitions for ArcGIS API for JavaScript 4.11 // Project: http://js.arcgis.com // Definitions by: Esri // Bjorn Svensson @@ -88,7 +88,47 @@ declare namespace __esri { export type ItemTestCallback = (item: T, index: number) => boolean; - interface Collection extends Evented {} + export type CollectionAfterAddEventHandler = (event: CollectionAfterEvent) => void; + + export type CollectionAfterChangesEventHandler = (event: CollectionAfterChangesEvent) => void; + + export type CollectionAfterRemoveEventHandler = (event: CollectionAfterEvent) => void; + + export type CollectionChangeEventHandler = (event: CollectionChangeEvent) => void; + + export type CollectionBeforeAddEventHandler = (event: CollectionBeforeEvent) => void; + + export type CollectionBeforeChangesEventHandler = (event: CollectionBeforeEvent) => void; + + export type CollectionBeforeRemoveEventHandler = (event: CollectionBeforeEvent) => void; + + export interface CollectionAfterEvent { + item: T; + } + + export interface CollectionAfterChangesEvent {} + + export interface CollectionBeforeEvent { + item: T; + preventDefault(): void; + } + + export interface CollectionChangeEvent { + added: T[]; + removed: T[]; + moved: T[]; + } + + interface Collection extends Evented { + on(type: "after-add", listener: CollectionAfterAddEventHandler): IHandle; + on(type: "after-changes", listener: CollectionAfterChangesEventHandler): IHandle; + on(type: "after-remove", listener: CollectionAfterRemoveEventHandler): IHandle; + on(type: "before-add", listener: CollectionBeforeAddEventHandler): IHandle; + on(type: "before-changes", listener: CollectionBeforeChangesEventHandler): IHandle; + on(type: "before-remove", listener: CollectionBeforeRemoveEventHandler): IHandle; + on(type: "change", listener: CollectionChangeEventHandler): IHandle; + on(type: string, listener: (event: any) => void): IHandle; + } type Constructor = new (...params: any[]) => T; @@ -186,6 +226,10 @@ declare namespace __esri { export type FeatureLayerLayerviewDestroyEventHandler = (event: FeatureLayerLayerviewDestroyEvent) => void; + export type GeoJSONLayerLayerviewCreateEventHandler = (event: GeoJSONLayerLayerviewCreateEvent) => void; + + export type GeoJSONLayerLayerviewDestroyEventHandler = (event: GeoJSONLayerLayerviewDestroyEvent) => void; + export type GeoRSSLayerLayerviewCreateEventHandler = (event: GeoRSSLayerLayerviewCreateEvent) => void; export type GeoRSSLayerLayerviewDestroyEventHandler = (event: GeoRSSLayerLayerviewDestroyEvent) => void; @@ -509,7 +553,7 @@ declare namespace __esri { */ clone(): Color; /** - * Takes a named string, hex string, array of rgb or rgba values, an object with r, g, b, and a properties, or another Color object and sets this color instance to the input value. + * Takes an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object and sets this color instance to the input value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#setColor) * @@ -562,7 +606,7 @@ declare namespace __esri { interface ColorConstructor { /** - * Creates a new color object by passing either a hex, rgba, or named color value. + * Creates a new color object by passing either a hex, rgb(a), hsl(a) or [named color value](https://www.w3.org/wiki/CSS/Properties/color/keywords). Hex, hsl(a) and named color values can be passed as a string: * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) */ @@ -1068,7 +1112,7 @@ declare namespace __esri { * @param event The event payload. * */ - emit(type: string, event?: any): void; + emit(type: string, event?: any): boolean; /** * Indicates whether there is an event listener on the instance that matches the provided event name. * @@ -1083,11 +1127,11 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Evented.html#on) * - * @param type The name of event to listen for. + * @param type A event type, or an array of event types, to listen for. * @param listener The function to call when the event is fired. * */ - on(type: string, listener: EventHandler): IHandle; + on(type: string | string[], listener: EventHandler): IHandle; } interface EventedConstructor { @@ -1100,11 +1144,11 @@ declare namespace __esri { interface HandleOwner extends Accessor { /** - * Handle registry. + * Handle registry to help manage `handles`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles) */ - handles: void; + handles: Handles; } interface HandleOwnerConstructor { @@ -1115,11 +1159,11 @@ declare namespace __esri { interface HandleOwnerProperties { /** - * Handle registry. + * Handle registry to help manage `handles`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles) */ - handles?: void; + handles?: HandlesProperties; } interface Handles extends Accessor { @@ -1169,6 +1213,22 @@ declare namespace __esri { interface HandlesProperties {} + /** + * A handle to a [highlight](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#highlight) call result. The handle can be used to remove the installed highlight. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle) + */ + export interface Handle extends Object { + /** + * Removes the handle. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle) + * + * + */ + remove(): void; + } + interface JSONSupport { /** * Converts an instance of [this class]() to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. @@ -1422,37 +1482,13 @@ declare namespace __esri { error?: any; } - export type Executor = () => void; + export type Executor = (resolve: ResolveCallback, reject: RejectCallback) => void; export type FilterPredicateCallback = (value: any, index: number) => IPromise; - /** - * A function that will reject the promise created in [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#create). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#RejectCallback) - */ - export interface RejectCallback extends Object { - /** - * The error with which the promise rejected. Defined only if the promise is rejected. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#RejectCallback) - */ - error?: any; - } + export type RejectCallback = (error?: any) => void; - /** - * A function that will resolve the promise created in [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#create). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#ResolveCallback) - */ - export interface ResolveCallback extends Object { - /** - * The value with which the promise resolved. Defined only if the promise is fulfilled. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#ResolveCallback) - */ - value?: any | IPromise; - } + export type ResolveCallback = (value?: any | IPromise) => void; interface requireUtils { /** @@ -1529,7 +1565,7 @@ declare namespace __esri { remove(): void; } - export type PhaseCallback = (event: PhaseEvent) => void; + export type PhaseCallback = (event?: PhaseEvent) => void; /** * A set of [callbacks](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallback) that will be called at specific phases of the animation frame. @@ -1834,7 +1870,7 @@ declare namespace __esri { export const watchUtils: watchUtils; - export type EventAttachedCallback = (target: any, propName: string, obj: Accessor, eventName: string) => void; + export type EventAttachedCallback = (target?: any, propName?: string, obj?: Accessor, eventName?: string) => void; /** * Represents a watch created when an object invokes [watch()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#watch). @@ -3728,6 +3764,18 @@ declare namespace __esri { * */ rotate(angleX: number, angleY: number, angleZ: number, params?: MeshRotateParams): Mesh; + /** + * Scales the mesh geometry by the specified factor. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [scale()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#scale). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#scale) + * + * @param factor The amount to scale the geometry. + * @param params Additional parameters. + * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * @param params.origin The origin point for scaling. If not specified, the mesh will be scaled around the mesh extent center. + * + */ + scale(factor: number, params?: MeshScaleParams): Mesh; /** * Notifies that any cached values that depend on vertex attributes need to be recalculated. Use this method after modifying the vertex attributes in place so that values that depend on them (such as the calculation of the extent) are recalculated accordingly. * @@ -3754,8 +3802,9 @@ declare namespace __esri { * * @param location The location bottom center of the box. * @param params Additional parameters. - * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.unit The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * @param params.material The material to be used for the mesh. * @param params.imageFace The face for generating image uv coordinates. By default, a single set of unwrapped UV coordinates are generated for all the faces. By setting the `imageFace` parameter to one of `east`, `west`, `north`, `south`, `up` or `down`, the specified face will have full sized UV coordinates while the other faces will pertain their regular unwrapped UV coordinates. This is useful for applying an image only to a single face of the box. The provided `material` parameter will be applied to the specified `imageFace`. The resulting mesh will have two components, the first contains the selected image face and the second contains the other faces of the box. * @@ -3768,13 +3817,26 @@ declare namespace __esri { * * @param location The location of the bottom center of the cylinder. * @param params Additional parameters. - * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a specific unit is specified. * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.unit The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance). * @param params.material The material to be used for the mesh. * */ createCylinder(location: Point, params?: MeshCreateCylinderParams): Mesh; + /** + * Creates a new mesh geometry from a glTF model referenced by the `url` parameter. The spatial reference of the resulting mesh is the same as the `location` parameter. For more information on the supported glTF features you can read the [Visualizing points with 3D symbols](https://developers.arcgis.com/javascript/latest/guide/visualizing-points-3d/index.html) guide topic. Animations are currently not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromGLTF) + * + * @param location The location of the origin of the model. If the location doesn't contain a z value, z is assumed to be `0`. + * @param url The URL of the glTF model. The URL should point to a glTF file (.gltf or .glb) which can reference additional binary (.bin) and image files (.jpg, .png). + * @param params Additional parameters. + * @param params.geographic Whether the model coordinates should be relative to the geographic or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + */ + createFromGLTF(location: Point, url: string, params?: MeshCreateFromGLTFParams): IPromise; /** * Creates a new mesh geometry from a polygon geometry. The resulting mesh contains only a position vertex attribute and a single component with faces. The default shading will be set to `flat`. The spatial reference of the resulting mesh is the same as the input polygon. The resulting mesh will not contain any uv nor normal vertex attributes. * @@ -3793,9 +3855,10 @@ declare namespace __esri { * * @param location The location of the bottom center of the plane. * @param params Additional parameters. - * @param params.size A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.size A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * @param params.facing Direction the plane is facing. Possible values are `east`, `west`, `north`, `south`, `up` and `down`. Defaults to `up`, * @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.unit The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * @param params.material The material to be used for the mesh. * */ @@ -3807,8 +3870,9 @@ declare namespace __esri { * * @param location The location of the bottom center of the sphere. * @param params Additional parameters. - * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * @param params.unit The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance). * @param params.material The material to be used for the mesh. * @@ -3852,7 +3916,7 @@ declare namespace __esri { export interface MeshCreateBoxParams extends Object { /** - * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) */ @@ -3863,6 +3927,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) */ geographic?: boolean; + /** + * The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox) + */ + unit?: string; /** * The material to be used for the mesh. * @@ -3909,7 +3979,7 @@ declare namespace __esri { export interface MeshCreateCylinderParams extends Object { /** - * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a specific unit is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) */ @@ -3920,6 +3990,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) */ geographic?: boolean; + /** + * The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder) + */ + unit?: string; /** * The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance). * @@ -3964,6 +4040,15 @@ declare namespace __esri { height?: number; } + export interface MeshCreateFromGLTFParams extends Object { + /** + * Whether the model coordinates should be relative to the geographic or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromGLTF) + */ + geographic?: boolean; + } + export interface MeshCreateFromPolygonParams extends Object { /** * The material to be used for the mesh. @@ -3984,7 +4069,7 @@ declare namespace __esri { export interface MeshCreatePlaneParams extends Object { /** - * A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location. + * A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) */ @@ -4001,6 +4086,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) */ geographic?: boolean; + /** + * The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane) + */ + unit?: string; /** * The material to be used for the mesh. * @@ -4035,7 +4126,7 @@ declare namespace __esri { export interface MeshCreateSphereParams extends Object { /** - * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location. + * A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location, unless a unit is specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) */ @@ -4046,6 +4137,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) */ geographic?: boolean; + /** + * The unit of the size (defaults to the unit of the location's spatial reference). **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere) + */ + unit?: string; /** * The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance). * @@ -4114,6 +4211,21 @@ declare namespace __esri { origin?: Point; } + export interface MeshScaleParams extends Object { + /** + * Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#scale) + */ + geographic?: boolean; + /** + * The origin point for scaling. If not specified, the mesh will be scaled around the mesh extent center. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#scale) + */ + origin?: Point; + } + export interface MeshVertexAttributesProperties extends Object { /** * A flat array of vertex positions. Vertex positions have x, y and z coordinates and they should be in the spatial reference system of the geometry. @@ -4261,6 +4373,7 @@ declare namespace __esri { longitude: number; /** * The m-coordinate of the point in map units. + * > **M-values** (measure) allow attribute values to be stored at the vertex of a point. A common usage for storing a measurement in the vertices along a linear feature are [linear referencing](https://desktop.arcgis.com/en/arcmap/latest/extensions/roads-and-highways/advanced-linear-referencing-multiple-linear-referencing-methods.htm) applications. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#m) * @@ -4373,6 +4486,7 @@ declare namespace __esri { longitude?: number; /** * The m-coordinate of the point in map units. + * > **M-values** (measure) allow attribute values to be stored at the vertex of a point. A common usage for storing a measurement in the vertices along a linear feature are [linear referencing](https://desktop.arcgis.com/en/arcmap/latest/extensions/roads-and-highways/advanced-linear-referencing-multiple-linear-referencing-methods.htm) applications. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#m) * @@ -4530,7 +4644,7 @@ declare namespace __esri { interface PolygonConstructor { /** - * A polygon contains an array of [rings](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#rings) and a [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#spatialReference). Each ring is represented as an array points. The first and last points of a ring must be the same. A polygon also has boolean-valued [hasM](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) and [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) fields. + * A polygon contains an array of [rings](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#rings) and a [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#spatialReference). Each ring is represented as an array of points. The first and last points of a ring must be the same. A polygon also has boolean-valued [hasM](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) and [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) fields. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) */ @@ -4784,59 +4898,6 @@ declare namespace __esri { export const projection: projection; - interface ScreenPoint extends Accessor { - /** - * X-coordinate in pixels relative to the top-left corner of the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#x) - * - * @default 0 - */ - x: number; - /** - * Y-coordinate in pixels relative to the top-left corner of the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#y) - * - * @default 0 - */ - y: number; - - /** - * Creates a deep clone of ScreenPoint object. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#clone) - * - * - */ - clone(): ScreenPoint; - } - - interface ScreenPointConstructor { - new (properties?: ScreenPointProperties): ScreenPoint; - } - - export const ScreenPoint: ScreenPointConstructor; - - interface ScreenPointProperties { - /** - * X-coordinate in pixels relative to the top-left corner of the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#x) - * - * @default 0 - */ - x?: number; - /** - * Y-coordinate in pixels relative to the top-left corner of the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#y) - * - * @default 0 - */ - y?: number; - } - interface SpatialReference extends Accessor, JSONSupport { /** * Indicates if the spatial reference refers to a geographic coordinate system. @@ -5006,7 +5067,7 @@ declare namespace __esri { */ data: HTMLImageElement | HTMLCanvasElement | ImageData; /** - * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. In all other cases it defaults to `false`. + * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. If instead a url to a .png file was provided, it is assumed that transparency is present. In all other cases it defaults to `false`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#transparent) * @@ -5056,7 +5117,7 @@ declare namespace __esri { */ data?: HTMLImageElement | HTMLCanvasElement | ImageData; /** - * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. In all other cases it defaults to `false`. + * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. If instead a url to a .png file was provided, it is assumed that transparency is present. In all other cases it defaults to `false`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#transparent) * @@ -5102,11 +5163,11 @@ declare namespace __esri { */ faces: Uint32Array; /** - * The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)). + * The material determines how the component is visualized. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) */ - material: MeshComponentMaterial; + material: MeshMaterial; /** * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported: * @@ -5151,11 +5212,11 @@ declare namespace __esri { */ faces?: Uint32Array | number[] | Uint16Array; /** - * The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)). + * The material determines how the component is visualized. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) */ - material?: MeshComponentMaterialProperties; + material?: MeshMaterialProperties; /** * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported: * @@ -5171,22 +5232,217 @@ declare namespace __esri { shading?: string; } - export interface MeshComponentMaterialProperties extends Object { + interface MeshMaterial extends Accessor { /** - * the material color. + * Specifies how transparency on the object is handled. If `alphaMode` is set to either `mask` or `auto` this property specifies the cutoff value below which masking happens (that is, the coresponding part of the Mesh is rendered fully transparent). * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaCutoff) + * + * @default 0.5 */ - color?: ValueMeshColorProperties | ImageMeshColorProperties; + alphaCutoff: number; + /** + * Specifies how transparency on the object is handled. See also `alphaCutoff`. + * + * | Type | Description | + * |------|-------------| + * | opaque | Alpha is ignored, and the object is rendered fully opaque. | + * | blend | Alpha values are used for gradual transparency, blending between the object and its background. | + * | mask | Alpha values are used for binary transparency, either displaying the object, or its background. See also `alphaCutoff`. | + * | auto | The implementation mixes the `mask` and `blend` settings, masking below `alphaCutoff` and blending above it. | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaMode) + * + * @default "auto" + */ + alphaMode: string; + /** + * Allows to specify a single, uniform color for the mesh component. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#color) + */ + color: Color; + /** + * Allows to specify a texture to get color information from. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#colorTexture) + */ + colorTexture: MeshTexture; + /** + * Specifies whether both sides of each triangle are displayed, or only the front sides. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#doubleSided) + * + * @default true + */ + doubleSided: boolean; + /** + * Allows to specify a texture to get normal information from. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. Normal mapping requires also for tangents to be specified in the mesh vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#normalTexture) + */ + normalTexture: MeshTexture; } - export interface MeshComponentMaterial extends AnonymousAccessor { + interface MeshMaterialConstructor { /** - * the material color. + * The material determines how a mesh component is visualized. Among other properties, MeshMaterial specifies a color that may be a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) value, as well as a colorTexture that may be a [MeshTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html)), which is mapped to the uv coordinate specified for each vertex in the [Mesh.vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes). * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html) */ - color: ValueMeshColor | ImageMeshColor; + + new (properties?: MeshMaterialProperties): MeshMaterial; + } + + export const MeshMaterial: MeshMaterialConstructor; + + interface MeshMaterialProperties { + /** + * Specifies how transparency on the object is handled. If `alphaMode` is set to either `mask` or `auto` this property specifies the cutoff value below which masking happens (that is, the coresponding part of the Mesh is rendered fully transparent). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaCutoff) + * + * @default 0.5 + */ + alphaCutoff?: number; + /** + * Specifies how transparency on the object is handled. See also `alphaCutoff`. + * + * | Type | Description | + * |------|-------------| + * | opaque | Alpha is ignored, and the object is rendered fully opaque. | + * | blend | Alpha values are used for gradual transparency, blending between the object and its background. | + * | mask | Alpha values are used for binary transparency, either displaying the object, or its background. See also `alphaCutoff`. | + * | auto | The implementation mixes the `mask` and `blend` settings, masking below `alphaCutoff` and blending above it. | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#alphaMode) + * + * @default "auto" + */ + alphaMode?: string; + /** + * Allows to specify a single, uniform color for the mesh component. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#color) + */ + color?: Color | number[] | string; + /** + * Allows to specify a texture to get color information from. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#colorTexture) + */ + colorTexture?: MeshTextureProperties | HTMLImageElement | HTMLCanvasElement | ImageData | string; + /** + * Specifies whether both sides of each triangle are displayed, or only the front sides. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#doubleSided) + * + * @default true + */ + doubleSided?: boolean; + /** + * Allows to specify a texture to get normal information from. The texture is accessed using the uv coordinate specified for each vertex in the mesh vertex attributes. Normal mapping requires also for tangents to be specified in the mesh vertex attributes. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshMaterial.html#normalTexture) + */ + normalTexture?: MeshTextureProperties | HTMLImageElement | HTMLCanvasElement | ImageData | string; + } + + interface MeshTexture extends Accessor { + /** + * A direct reference to the image data. The image data can be an [image element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [canvas element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). The data property is mutually exclusive with the url property, setting the data will clear the url (if there is one). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#data) + */ + data: HTMLImageElement | HTMLCanvasElement | ImageData; + /** + * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. If instead a url to a .png file was provided, it is assumed that transparency is present. In all other cases it defaults to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#transparent) + * + * @default undefined + */ + transparent: boolean; + /** + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. The url property is mutually exclusive with the data property, setting the url will clear the data (if there is one). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#url) + */ + url: string; + /** + * Specifies how uv coordinates outside the [0, 1] range are handled. One of "repeat", "clamp" or "mirror". Can also be specified separately for the two texture axes using an object: + * ```js + * { + * vertical: "clamp", + * horizontal: "repeat" + * } + * ``` + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#wrap) + * + * @default "repeat" + */ + wrap: string | any; + + /** + * Creates a deep clone. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#clone) + * + * + */ + clone(): MeshTexture; + } + + interface MeshTextureConstructor { + /** + * MeshTexture represents image data to be used for a MeshMaterial. It is mapped to the mesh by its uv vertex attributes. MeshTexture instances can be used with the [MeshComponent.material.colorTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) and [MeshComponent.material.normalTexture](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) properties. Images can be referred to either by url or directly by data ( [image element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [canvas element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html) + */ + + new (properties?: MeshTextureProperties): MeshTexture; + } + + export const MeshTexture: MeshTextureConstructor; + + interface MeshTextureProperties { + /** + * A direct reference to the image data. The image data can be an [image element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [canvas element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). The data property is mutually exclusive with the url property, setting the data will clear the url (if there is one). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#data) + */ + data?: HTMLImageElement | HTMLCanvasElement | ImageData; + /** + * Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. If instead a url to a .png file was provided, it is assumed that transparency is present. In all other cases it defaults to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#transparent) + * + * @default undefined + */ + transparent?: boolean; + /** + * The url to the image resource. This can either be a remote url (absolute or relative) or a data url. The url property is mutually exclusive with the data property, setting the url will clear the data (if there is one). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#url) + */ + url?: string; + /** + * Specifies how uv coordinates outside the [0, 1] range are handled. One of "repeat", "clamp" or "mirror". Can also be specified separately for the two texture axes using an object: + * ```js + * { + * vertical: "clamp", + * horizontal: "repeat" + * } + * ``` + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshTexture.html#wrap) + * + * @default "repeat" + */ + wrap?: string | any; } interface meshUtils { @@ -5208,7 +5464,7 @@ declare namespace __esri { params?: meshUtilsCreateFromElevationParams ): IPromise; /** - * Georeferences vertices specified in a Cartesian coordinate system. This is useful when converting general 3D model meshes not typically georeferenced. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from a local (0, 0, 0) Cartesian system to the properly georeferenced coordinates at the specified `location`. The `location`'s coordinate system determines the units of the converted positions. If the coordinate system is WGS84, metric units are used. + * Georeferences vertices specified in a Cartesian coordinate system. This is useful when converting general 3D model meshes not typically georeferenced. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from a local (0, 0, 0) Cartesian system to the properly georeferenced coordinates at the specified `location`. The unit of the source data defaults to the unit of the `location`'s spatial reference. If the coordinate system is WGS84, metric units are used as the default. The unit of the source data may be specified in the additional `params` in which case a linear unit scale will automatically be applied to bring the source data in the unit of the spatial reference. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) * @@ -5216,6 +5472,7 @@ declare namespace __esri { * @param location The location at which to georeference the position and normal buffers. * @param params Optional parameters. * @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system. + * @param params.unit Indicates the unit of the source data. A linear scale will be applied to the position attributes to convert the source data to the unit of the spatial reference at which the mesh is being georeferenced. By default the unit of the source data is assumed to be the same as the target spatial reference. **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * */ georeference( @@ -5233,7 +5490,7 @@ declare namespace __esri { */ merge(geometries: Mesh[]): Mesh; /** - * Projects georeferenced vertices to a Cartesian coordinate system. This is useful for converting existing scene geometry so that it can be used as source material for generating new 3D meshes. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from georeferenced coordinates at the specified `location` to a local (0, 0, 0) Cartesian system. The units of the input positions are determined by the `location`'s coordinate system. If the coordinate system is WGS84, metric units are used. + * Projects georeferenced vertices to a Cartesian coordinate system. This is useful for converting existing scene geometry so that it can be used as source material for generating new 3D meshes. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from georeferenced coordinates at the specified `location` to a local (0, 0, 0) Cartesian system. The unit of the resulting data defaults to the unit of the `location`'s spatial reference. If the coordinate system is WGS84, metric units are used as the default. The unit of the resulting data may be specified in the additional `params` in which case a linear unit scale will automatically be applied. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#ungeoreference) * @@ -5241,6 +5498,7 @@ declare namespace __esri { * @param location The location to which the position and normal buffers are georeferenced. * @param params Optional parameters. * @param params.geographic Indicates whether the coordinates are georeferenced relative to the globe or the projected coordinate system. + * @param params.unit Indicates the unit of the resulting data. A linear scale will be applied to the position attributes to convert the source data to the specified unit. By default the unit of the resulting data will be the same as the source spatial reference. **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet * */ ungeoreference( @@ -5285,6 +5543,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) */ geographic?: boolean; + /** + * Indicates the unit of the source data. A linear scale will be applied to the position attributes to convert the source data to the unit of the spatial reference at which the mesh is being georeferenced. By default the unit of the source data is assumed to be the same as the target spatial reference. **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference) + */ + unit?: string; } export interface meshUtilsUngeoreferenceParams extends Object { @@ -5294,6 +5558,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#ungeoreference) */ geographic?: boolean; + /** + * Indicates the unit of the resulting data. A linear scale will be applied to the position attributes to convert the source data to the specified unit. By default the unit of the resulting data will be the same as the source spatial reference. **Possible Values:** millimeters | centimeters | decimeters | meters | kilometers | inches | feet | yards | miles | nautical-miles | us-feet + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#ungeoreference) + */ + unit?: string; } /** @@ -5556,9 +5826,10 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#getEffectivePopupTemplate) * + * @param defaultPopupTemplateEnabled Whether support for default popup templates is enabled. When true, a default popup template may be created automatically if neither the graphic nor its layer have a popup template defined. * */ - getEffectivePopupTemplate(): PopupTemplate; + getEffectivePopupTemplate(defaultPopupTemplateEnabled?: boolean): PopupTemplate; /** * Sets a new value to the specified attribute. * @@ -5902,7 +6173,7 @@ declare namespace __esri { userId: string; /** - * Destroys the credential. When the credential is destroyed, you should remove any map layers that are using this credential. + * Destroys the credential. When the credential is destroyed, you should remove any map layers that are using this credential. Any tokens generated via OAuth will automatically be revoked. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#destroy) * @@ -6024,7 +6295,7 @@ declare namespace __esri { */ checkSignInStatus(resUrl: string): IPromise; /** - * Destroys all credentials. + * Destroys all credentials. It is good practice to call this method if working with an application that contains sign-out functionality as any tokens generated via OAuth will automatically be revoked. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#destroyCredentials) * @@ -6044,12 +6315,12 @@ declare namespace __esri { /** * Returns the [OAuthInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html) configuration for the passed in Portal server URL. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#findOauthInfo) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#findOAuthInfo) * * @param url The URL to a Portal. * */ - findOauthInfo(url: string): OAuthInfo; + findOAuthInfo(url: string): OAuthInfo; /** * Returns information about the server that is hosting the specified URL. * @@ -7049,6 +7320,15 @@ declare namespace __esri { */ readonly sublayers: Collection; + /** + * Loads the layer and all of its sublayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#loadAll) + * + * + */ + loadAll(): IPromise; + on(name: "layerview-create", eventHandler: BuildingSceneLayerLayerviewCreateEventHandler): IHandle; on(name: "layerview-destroy", eventHandler: BuildingSceneLayerLayerviewDestroyEventHandler): IHandle; @@ -7127,7 +7407,21 @@ declare namespace __esri { */ definitionExpression: string; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#listMode) + * + * @default show + */ + listMode: "show" | "hide"; + /** + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupEnabled) * @@ -7135,7 +7429,7 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. + * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate) */ @@ -7152,6 +7446,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#type) */ readonly type: "building-component"; + + /** + * Creates a default popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: BuildingComponentSublayerCreatePopupTemplateOptions): PopupTemplate; } interface BuildingComponentSublayerConstructor { @@ -7170,7 +7476,21 @@ declare namespace __esri { */ definitionExpression?: string; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#listMode) + * + * @default show + */ + listMode?: "show" | "hide"; + /** + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupEnabled) * @@ -7178,7 +7498,7 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. + * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate) */ @@ -7191,7 +7511,39 @@ declare namespace __esri { renderer?: RendererProperties; } + export interface BuildingComponentSublayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + interface BuildingGroupSublayer extends BuildingSublayer { + /** + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * hide-children | Hide the children layers from the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#listMode) + * + * @default show + */ + listMode: "show" | "hide" | "hide-children"; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of sublayers. * @@ -7204,6 +7556,15 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#type) */ readonly type: "building-group"; + + /** + * Loads all contained sublayers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#loadAll) + * + * + */ + loadAll(): IPromise; } interface BuildingGroupSublayerConstructor { @@ -7214,7 +7575,23 @@ declare namespace __esri { export const BuildingGroupSublayer: BuildingGroupSublayerConstructor; - interface BuildingGroupSublayerProperties extends BuildingSublayerProperties {} + interface BuildingGroupSublayerProperties extends BuildingSublayerProperties { + /** + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * hide-children | Hide the children layers from the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#listMode) + * + * @default show + */ + listMode?: "show" | "hide" | "hide-children"; + } interface BuildingSublayer extends Accessor { /** @@ -7286,7 +7663,7 @@ declare namespace __esri { visible?: boolean; } - interface CSVLayer extends Layer { + interface CSVLayer extends Layer, PortalLayer, ScaleRangeLayer, TemporalLayer { /** * Copyright information for the layer. * @@ -7333,7 +7710,7 @@ declare namespace __esri { */ fields: Field[]; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible) property of this layer must be set to `true`. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). * > **Known Limitations** Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo) @@ -7355,14 +7732,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#latitudeField) */ latitudeField: string; - /** - * Indicates whether the layer will be included in the legend. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#legendEnabled) - * - * @default true - */ - legendEnabled: boolean; /** * The longitude field name. If not specified, the API will look for following field names in the CSV source: "lon", "lng", "long", "longitude", "x", "xcenter", "longitude83", "longdecdeg", "POINT-X". * @@ -7370,21 +7739,11 @@ declare namespace __esri { */ longitudeField: string; /** - * The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) value, and greater than or equal to the service specification. + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#fields) containing a unique value or identifier for each feature in the layer. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) - * - * @default 0 + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#objectIdField) */ - maxScale: number; - /** - * The minimum scale (most zoomed out) at which the layer is visible in the view. If the map is zoomed out beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a minimum scale. The minScale value should always be larger than the [maxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) value, and lesser than or equal to the service specification. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) - * - * @default 0 - */ - minScale: number; + objectIdField: string; /** * An array of field names to include in the CSVLayer. If not specified, the layer will include all fields. * @@ -7392,7 +7751,7 @@ declare namespace __esri { */ outFields: string[]; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupEnabled) * @@ -7400,7 +7759,7 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate) */ @@ -7436,6 +7795,17 @@ declare namespace __esri { */ url: string; + /** + * Creates a popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: CSVLayerCreatePopupTemplateOptions): PopupTemplate; /** * Creates query parameters that can be used to fetch features that satisfy the layer's current filters, and definitions. * @@ -7522,11 +7892,17 @@ declare namespace __esri { */ new (properties?: CSVLayerProperties): CSVLayer; + + fromJSON(json: any): CSVLayer; } export const CSVLayer: CSVLayerConstructor; - interface CSVLayerProperties extends LayerProperties { + interface CSVLayerProperties + extends LayerProperties, + PortalLayerProperties, + ScaleRangeLayerProperties, + TemporalLayerProperties { /** * Copyright information for the layer. * @@ -7573,7 +7949,7 @@ declare namespace __esri { */ fields?: FieldProperties[]; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible) property of this layer must be set to `true`. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). * > **Known Limitations** Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo) @@ -7595,14 +7971,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#latitudeField) */ latitudeField?: string; - /** - * Indicates whether the layer will be included in the legend. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#legendEnabled) - * - * @default true - */ - legendEnabled?: boolean; /** * The longitude field name. If not specified, the API will look for following field names in the CSV source: "lon", "lng", "long", "longitude", "x", "xcenter", "longitude83", "longdecdeg", "POINT-X". * @@ -7610,21 +7978,11 @@ declare namespace __esri { */ longitudeField?: string; /** - * The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) value, and greater than or equal to the service specification. + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#fields) containing a unique value or identifier for each feature in the layer. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) - * - * @default 0 + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#objectIdField) */ - maxScale?: number; - /** - * The minimum scale (most zoomed out) at which the layer is visible in the view. If the map is zoomed out beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a minimum scale. The minScale value should always be larger than the [maxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) value, and lesser than or equal to the service specification. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) - * - * @default 0 - */ - minScale?: number; + objectIdField?: string; /** * An array of field names to include in the CSVLayer. If not specified, the layer will include all fields. * @@ -7632,7 +7990,7 @@ declare namespace __esri { */ outFields?: string[]; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupEnabled) * @@ -7640,7 +7998,7 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate) */ @@ -7677,6 +8035,23 @@ declare namespace __esri { url?: string; } + export interface CSVLayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + export interface CSVLayerElevationInfo extends Object { /** * Defines how the graphic is placed with respect to the terrain surface. See the table below for a list of possible values. @@ -7742,111 +8117,6 @@ declare namespace __esri { view: View; } - interface DynamicLayer { - /** - * The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#portalItem) - */ - portalItem: PortalItem; - /** - * The URL to the REST endpoint of the map service. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#url) - */ - url: string; - - /** - * This method fetches the image for the specified extent and size. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage) - * - * @param extent The extent of the view. - * @param width The width of the view in pixels. - * @param height The height of the view in pixels. - * @param options The parameter options is an object with the following properties. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. - * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * - */ - fetchImage( - extent: Extent, - width: number, - height: number, - options?: DynamicLayerFetchImageOptions - ): IPromise; - /** - * This method returns a URL to an image for a given extent, width and height. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl) - * - * @param extent The extent of the exported image. - * @param width The width of the view in pixels. - * @param height The height of the view in pixels. - * @param options The parameter options is an object with the following properties. - * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. - * - */ - getImageUrl( - extent: Extent, - width: number, - height: number, - options?: DynamicLayerGetImageUrlOptions - ): IPromise | string; - } - - interface DynamicLayerConstructor { - new (): DynamicLayer; - } - - export const DynamicLayer: DynamicLayerConstructor; - - interface DynamicLayerProperties { - /** - * The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#portalItem) - */ - portalItem?: PortalItemProperties; - /** - * The URL to the REST endpoint of the map service. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#url) - */ - url?: string; - } - - export interface DynamicLayerFetchImageOptions extends Object { - /** - * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage) - */ - rotation?: number; - /** - * The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage) - */ - pixelRatio?: number; - } - - export interface DynamicLayerGetImageUrlOptions extends Object { - /** - * The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl) - */ - pixelRatio?: number; - /** - * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl) - */ - rotation?: number; - } - interface ElevationLayer extends Layer, ArcGISCachedService, PortalLayer { /** * URL pointing to the Elevation layer resource on an ArcGIS Image Server. @@ -8053,7 +8323,7 @@ declare namespace __esri { demResolution: number; } - interface FeatureLayer extends Layer, PortalLayer, ScaleRangeLayer, RefreshableLayer { + interface FeatureLayer extends Layer, PortalLayer, ScaleRangeLayer, RefreshableLayer, TemporalLayer { /** * Describes the layer's supported capabilities. * @@ -8061,7 +8331,7 @@ declare namespace __esri { */ readonly capabilities: FeatureLayerCapabilities; /** - * The copyright text as defined by the map service. + * Copyright information for the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#copyright) */ @@ -8084,6 +8354,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#dynamicDataSource) */ dynamicDataSource: DynamicMapLayer | DynamicDataLayer; + /** + * The editor tracking fields, which record who adds or edits the data through the feature service and when edits are made. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#editFieldsInfo) + */ + readonly editFieldsInfo: EditFieldsInfo; /** * Specifies how features are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. * @@ -8109,19 +8385,11 @@ declare namespace __esri { */ readonly gdbVersion: string; /** - * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). When creating a FeatureLayer from client-side features, this property is inferred by the geometryType of the features provided in the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. **Possible Values:** point | multipoint | polyline | polygon | extent | mesh + * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). When creating a FeatureLayer from client-side features, this property is inferred by the geometryType of the features provided in the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. **Possible Values:** point | multipoint | polyline | polygon | multipatch | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ geometryType: string; - /** - * Indicates if attachments are enabled on the feature layer. Use `FeatureLayer.capabilities.data.supportsAttachment` instead. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#hasAttachments) - * - * @default false - */ - readonly hasAttachments: boolean; /** * Indicates whether the client-side features in the layer have `M` (measurement) values. Use the `supportsM` property in the FeatureLayer's [capabilities.data](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) object to verify if `M` values are supported on [feature service](https://developers.arcgis.com/rest/services-reference/feature-service.htm) features. * @@ -8145,9 +8413,16 @@ declare namespace __esri { */ historicMoment: Date; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. The [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible) property of this layer must be set to `true` for labels to display in the view. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * Returns `true` if the layer is loaded from a non-spatial table in a service. Non-spatial table does not have a spatial column that represents geographic features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#isTable) + * + * @default false + */ + isTable: boolean; + /** + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). * > **Known Limitations** - * * Currently only FeatureLayers with point and polygon geometries are supported. * * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo) @@ -8189,13 +8464,15 @@ declare namespace __esri { */ objectIdField: string; /** - * An array of field names from the service to include in the FeatureLayer. If not specified, the layer will only return the `OBJECTID` field. To fetch the values from all fields in the layer, use `["*"]`. This is particularly useful when editing features. + * An array of field names from the service to include with each feature. To fetch the values from all fields in the layer, use `["*"]`. Fields specified in `outFields` will be requested alongside with required fields for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo) and setting the [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo) for the layer. The required fields and `outFields` are used populate [FeatureLayerView.availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields). Set this property to include the fields that will be used for client-side [filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) and [queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) if the fields are not part of required fields mentioned above. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) + * + * @default null */ outFields: string[]; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupEnabled) * @@ -8203,7 +8480,7 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) */ @@ -8263,12 +8540,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#templates) */ templates: FeatureTemplate[]; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token) - */ - readonly token: string; /** * The name of the field holding the type ID or subtypes for the features. See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm). * @@ -8282,7 +8553,7 @@ declare namespace __esri { */ types: FeatureType[]; /** - * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. + * The URL of the REST endpoint of the layer, non-spatial table or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) */ @@ -8317,7 +8588,18 @@ declare namespace __esri { */ applyEdits(edits: FeatureLayerApplyEditsEdits): IPromise; /** - * Creates query parameters that can be used to fetch features that satisfy the layer's current filters, and definitions. + * Creates a popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: FeatureLayerCreatePopupTemplateOptions): PopupTemplate; + /** + * Creates query parameter object that can be used to fetch features that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#definitionExpression), [gdbVersion](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#gdbVersion), and [historicMoment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#historicMoment). It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities). It sets the query parameter's [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields) property to `["*"]`. The results will include geometries of features and values for all [available fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields) for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) or all fields in the layer for [server side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createQuery) * @@ -8343,6 +8625,15 @@ declare namespace __esri { * */ getFeatureType(feature: Graphic): FeatureType; + /** + * Returns the [Field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html) instance for a field name. This method first looks for the field by its `name`, and if not found does a case-insensitive search for it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#getField) + * + * @param fieldName Name of the field. + * + */ + getField(fieldName: string): Field; /** * Returns the [Domain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Domain.html) associated with the given field name. The domain can be either a [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html) or [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html). * @@ -8436,7 +8727,7 @@ declare namespace __esri { interface FeatureLayerConstructor { /** - * A FeatureLayer is a single layer that can be created from a [Map Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-map-service.htm) or [Feature Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-feature-service-.htm); ArcGIS Online or ArcGIS Enterprise portal items; or from an array of client-side features. It is composed of discrete features, each of which has a [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) that allows it to be rendered in either a 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) as a [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) with spatial context. Features also contain data [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) that provide additional information about the real-world feature it represents; attributes may be viewed in [popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) windows and used for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) the layer. FeatureLayers may be [queried](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures), [analyzed](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html), and [rendered](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer) to visualize data in a spatial context. + * A FeatureLayer is a single layer that can be created from a [Map Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-map-service.htm) or [Feature Service](http://server.arcgis.com/en/server/latest/publish-services/windows/what-is-a-feature-service-.htm); ArcGIS Online or ArcGIS Enterprise portal items; or from an array of client-side features. The layer can be either a spatial (has geographic features) or non-spatial (table). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) */ @@ -8452,9 +8743,10 @@ declare namespace __esri { extends LayerProperties, PortalLayerProperties, ScaleRangeLayerProperties, - RefreshableLayerProperties { + RefreshableLayerProperties, + TemporalLayerProperties { /** - * The copyright text as defined by the map service. + * Copyright information for the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#copyright) */ @@ -8496,7 +8788,7 @@ declare namespace __esri { */ fields?: FieldProperties[]; /** - * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). When creating a FeatureLayer from client-side features, this property is inferred by the geometryType of the features provided in the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. **Possible Values:** point | multipoint | polyline | polygon | extent | mesh + * The geometry type of features in the layer. All features must be of the same type. This property is read-only when the layer is created from a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url). When creating a FeatureLayer from client-side features, this property is inferred by the geometryType of the features provided in the layer's [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source) property. **Possible Values:** point | multipoint | polyline | polygon | multipatch | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#geometryType) */ @@ -8508,9 +8800,16 @@ declare namespace __esri { */ historicMoment?: DateProperties; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. The [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelsVisible) property of this layer must be set to `true` for labels to display in the view. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * Returns `true` if the layer is loaded from a non-spatial table in a service. Non-spatial table does not have a spatial column that represents geographic features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#isTable) + * + * @default false + */ + isTable?: boolean; + /** + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). * > **Known Limitations** - * * Currently only FeatureLayers with point and polygon geometries are supported. * * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo) @@ -8552,13 +8851,15 @@ declare namespace __esri { */ objectIdField?: string; /** - * An array of field names from the service to include in the FeatureLayer. If not specified, the layer will only return the `OBJECTID` field. To fetch the values from all fields in the layer, use `["*"]`. This is particularly useful when editing features. + * An array of field names from the service to include with each feature. To fetch the values from all fields in the layer, use `["*"]`. Fields specified in `outFields` will be requested alongside with required fields for [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo) and setting the [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo) for the layer. The required fields and `outFields` are used populate [FeatureLayerView.availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields). Set this property to include the fields that will be used for client-side [filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) and [queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) if the fields are not part of required fields mentioned above. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) + * + * @default null */ outFields?: string[]; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupEnabled) * @@ -8566,7 +8867,7 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) */ @@ -8627,13 +8928,45 @@ declare namespace __esri { */ types?: FeatureTypeProperties[]; /** - * The URL of the REST endpoint of the layer or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. + * The URL of the REST endpoint of the layer, non-spatial table or service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. If the url points directly to a service, then the layer must be specified in the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) property. If no [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#layerId) is given, then the first layer in the service will be loaded. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#url) */ url?: string; } + /** + * The fields that record who adds or edits data in the feature service and when the edit is made. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + export interface EditFieldsInfo extends Object { + /** + * The name of the field that stores the name of the user who created the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + creatorField: string; + /** + * The name of the field that stores the date and time the feature was created. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + creationDateField: string; + /** + * The name of the field that stores the name of the user who last edited the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + editorField: string; + /** + * The name of the field that stores the date and time the feature was last edited. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#EditFieldsInfo) + */ + editDateField: string; + } + /** * FeatureEditResult represents the result of adding, updating or deleting a feature. * @@ -8862,6 +9195,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsDistinct: boolean; + /** + * Indicates if the query operation supports `disjoint` [spatial relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship). This is valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) + */ + supportsDisjointSpatialRelationship: boolean; /** * Indicates if the layer's query response includes the extent of features. At 10.3, this option is only available for hosted feature services. At 10.3.1, it is available for hosted and non-hosted feature services. * @@ -8869,7 +9208,7 @@ declare namespace __esri { */ supportsExtent: boolean; /** - * Indicates if the layer's query response contains geometry attributes, including shape area and length attributes. This operation is only supported in ArcGIS Online hosted feature services. + * Indicates if the layer's query response contains geometry attributes, including shape area and length attributes. This operation is supported in ArcGIS Online hosted feature services created since December 2016 and ArcGIS Enterprise feature services since version 10.7. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ @@ -8892,6 +9231,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) */ supportsPagination: boolean; + /** + * Indicates if the query response includes the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry). This is valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) + */ + supportsQueryGeometry: boolean; /** * Indicates if the query operation supports the projection of geometries onto a virtual grid. Requires an ArcGIS Server service 10.6.1 or greater. * @@ -8957,6 +9302,23 @@ declare namespace __esri { supportsPagination: boolean; } + export interface FeatureLayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + export interface FeatureLayerElevationInfo extends Object { /** * Defines how the feature is placed with respect to the terrain surface. If the geometry consists of multiple points (e.g. lines or polygons), the elevation is evaluated separately for each point. See the table below for a list of possible values. @@ -9046,6 +9408,782 @@ declare namespace __esri { message: string; } + interface GeoJSONLayer extends Layer, ScaleRangeLayer, TemporalLayer { + /** + * Describes the layer's supported capabilities. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + readonly capabilities: GeoJSONLayerCapabilities; + /** + * Copyright information for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#copyright) + */ + copyright: string; + /** + * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#definitionExpression) + */ + definitionExpression: string; + /** + * The name of the layer's primary display field. The value of this property matches the name of one of the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#displayField) + */ + displayField: string; + /** + * Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + elevationInfo: GeoJSONLayerElevationInfo; + /** + * Configures the method for decluttering overlapping features in the view. If this property is not set (or set to `null`), every feature is drawn individually. Currently this property is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) for point features with non-draped [Icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html) or [Text](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html) symbol layers. ![declutter](https://developers.arcgis.com/javascript/assets/img/samples/city-points-declutter.gif) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#featureReduction) + */ + featureReduction: GeoJSONLayerFeatureReduction; + /** + * An array of fields in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#fields) + */ + fields: Field[]; + /** + * The geometry type of features in the layer. All features must be of the same type. **Possible Values:** point | multipoint | polyline | polygon + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#geometryType) + */ + geometryType: string; + /** + * Indicates whether the client-side features in the layer have `Z` (elevation) values. Refer to [elevationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) for details regarding placement and rendering of features with z-values in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Use the `supportsZ` property in the layer's [capabilities.data](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) object to verify if `Z` values are supported on the features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#hasZ) + * + * @default undefined + */ + readonly hasZ: boolean; + /** + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * > **Known Limitations** + * * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo) + */ + labelingInfo: LabelClass[]; + /** + * Indicates whether to display labels for this layer. If `true`, labels will appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo) property. + * > **Known Limitations** + * * Currently 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only support one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) per feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelsVisible) + * + * @default true + */ + labelsVisible: boolean; + /** + * Indicates whether the layer will be included in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#legendEnabled) + * + * @default true + */ + legendEnabled: boolean; + /** + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#fields) containing a unique value or identifier for each feature in the layer. `id` property of the feature object in the GeoJSON will be used as ObjectID. If `id` property is not present and `objectIDField` is not specified, `ObjectID` field will be generated for each feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField) + */ + objectIdField: string; + /** + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupEnabled) + * + * @default true + */ + popupEnabled: boolean; + /** + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupTemplate) + */ + popupTemplate: PopupTemplate; + /** + * The renderer assigned to the layer. The renderer defines how to visualize each feature in the layer. Depending on the renderer type, features may be visualized with the same symbol, or with varying symbols based on the values of provided attribute fields or functions. If not specified, a default renderer will be generated based on the geometry type. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#renderer) + */ + renderer: Renderer; + /** + * Apply perspective scaling to screen-size point symbols in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). When `true`, screen sized objects such as [icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [labels](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html) or [callouts](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-Callout3D.html) integrate better in the 3D scene by applying a certain perspective projection to the sizing of features. This only applies when using a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). `layer.screenSizePerspectiveEnabled = true` ![screen-size-perspective](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols-screenSize-perspective.png) `layer.screenSizePerspectiveEnabled = false` ![no-screen-size-perspective](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols-no-screenSize-perspective.png) + * > **Known Limitations** Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes with point features located far from the ground surface. In these cases it may be better to turn off screen size perspective. As screen size perspective changes the size based on distance to the camera, it should be set to false when using {@link module:esri/renderers/Renderer#SizeVisualVariable size visual variables}. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#screenSizePerspectiveEnabled) + * + * @default true + */ + screenSizePerspectiveEnabled: boolean; + /** + * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the GeoJSON file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#spatialReference) + * + * @default SpatialReference.WGS84 + */ + spatialReference: SpatialReference; + /** + * An array of feature templates defined in the layer. See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#templates) + */ + templates: FeatureTemplate[]; + /** + * The URL of the GeoJSON file. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#url) + */ + url: string; + + /** + * Applies edits to features in a layer. New features can be created and existing features can be updated or deleted on the cilent side. Feature geometries and/or attributes may be modified. If client-side features are added, removed or updated at runtime using [applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) then use [queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryFeatures) to return updated features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) + * + * @param edits Object containing features to be added, updated or deleted. + * @param edits.addFeatures Array of features to be added. Values of non nullable fields must be provided when adding new features. Date fields must have [numeric](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) values representing universal time. + * @param edits.updateFeatures Array of features to be updated. Each feature must have valid [objectId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField). Values of non nullable fields must be provided when updating features. Date fields must have [numeric](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) values representing universal time. + * @param edits.deleteFeatures An array of features or objects to be deleted. When an array of features is passed, each feature must have a valid [objectId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField). When an array of objects is used, each object must have a valid `objectId` property. + * + */ + applyEdits(edits: GeoJSONLayerApplyEditsEdits): IPromise; + /** + * Creates a popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: GeoJSONLayerCreatePopupTemplateOptions): PopupTemplate; + /** + * Creates query parameter object that can be used to fetch features that satisfy the layer's configurations such as [definitionExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#definitionExpression). It will return `Z` and `M` values based on the layer's [data capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities). It sets the query parameter's [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields) property to `["*"]`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#createQuery) + * + * + */ + createQuery(): Query; + /** + * Returns the [Field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html) instance for a field name. This method first looks for the field by its `name`, and if not found does a case-insensitive search for it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#getField) + * + * @param fieldName Name of the field. + * + */ + getField(fieldName: string): Field; + /** + * Returns the Domain associated with the given field name. The domain can be either a CodedValueDomain or RangeDomain. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#getFieldDomain) + * + * @param fieldName Name of the field. + * @param options An object specifying additional options. See the object specification table below for the required properties of this object. + * @param options.feature The feature to which the [Domain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Domain.html) is assigned. + * + */ + getFieldDomain(fieldName: string, options?: GeoJSONLayerGetFieldDomainOptions): Domain; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the layer and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If no parameters are specified, then the extent and count of all features satisfying the layer's configuration/filters are returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryExtent) + * + * @param params Specifies the attributes and spatial filter of the query. If no parameters are specified, then the extent and count of all features satisfying the layer's configuration/filters are returned. + * + */ + queryExtent(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the layer and returns the number of features that satisfy the query. If no parameters are specified, the total number of features satisfying the layer's configuration/filters is returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryFeatureCount) + * + * @param params Specifies the attributes and spatial filter of the query. If no parameters are specified, the total number of features satisfying the layer's configuration/filters is returned. + * + */ + queryFeatureCount(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the layer and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html), which can be accessed using the `.then()` method once the promise resolves. A [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) features, which can be added to the [view's graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics). This array will not be populated if zero results are found. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryFeatures) + * + * @param params Specifies the attributes and spatial filter of the query. If no parameters are specified, then all features satisfying the layer's configuration/filters are returned. + * + */ + queryFeatures(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the layer and returns an array of Object IDs for features that satisfy the input query. If no parameters are specified, then the Object IDs of all features satisfying the layer's configuration/filters are returned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryObjectIds) + * + * @param params Specifies the attributes and spatial filter of the query. If no parameters are specified, then the Object IDs of all features satisfying the layer's configuration/filters are returned. + * + */ + queryObjectIds(params?: Query | QueryProperties): IPromise; + + on(name: "layerview-create", eventHandler: GeoJSONLayerLayerviewCreateEventHandler): IHandle; + + on(name: "layerview-destroy", eventHandler: GeoJSONLayerLayerviewDestroyEventHandler): IHandle; + } + + interface GeoJSONLayerConstructor { + /** + * The GeoJSONLayer class is used to create a layer based on [GeoJSON](http://geojson.org/). GeoJSON is a format for encoding a variety of geographic data structures. The GeoJSON data must comply with the [RFC 7946 specification](https://tools.ietf.org/html/rfc7946) which states that the coordinates are in SpatialReference.WGS84. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) + */ + + new (properties?: GeoJSONLayerProperties): GeoJSONLayer; + } + + export const GeoJSONLayer: GeoJSONLayerConstructor; + + interface GeoJSONLayerProperties extends LayerProperties, ScaleRangeLayerProperties, TemporalLayerProperties { + /** + * Copyright information for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#copyright) + */ + copyright?: string; + /** + * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#definitionExpression) + */ + definitionExpression?: string; + /** + * The name of the layer's primary display field. The value of this property matches the name of one of the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#displayField) + */ + displayField?: string; + /** + * Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + elevationInfo?: GeoJSONLayerElevationInfo; + /** + * Configures the method for decluttering overlapping features in the view. If this property is not set (or set to `null`), every feature is drawn individually. Currently this property is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) for point features with non-draped [Icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html) or [Text](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html) symbol layers. ![declutter](https://developers.arcgis.com/javascript/assets/img/samples/city-points-declutter.gif) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#featureReduction) + */ + featureReduction?: GeoJSONLayerFeatureReduction; + /** + * An array of fields in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#fields) + */ + fields?: FieldProperties[]; + /** + * The geometry type of features in the layer. All features must be of the same type. **Possible Values:** point | multipoint | polyline | polygon + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#geometryType) + */ + geometryType?: string; + /** + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks). + * > **Known Limitations** + * * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo) + */ + labelingInfo?: LabelClassProperties[]; + /** + * Indicates whether to display labels for this layer. If `true`, labels will appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo) property. + * > **Known Limitations** + * * Currently 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only support one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) per feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelsVisible) + * + * @default true + */ + labelsVisible?: boolean; + /** + * Indicates whether the layer will be included in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#legendEnabled) + * + * @default true + */ + legendEnabled?: boolean; + /** + * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#fields) containing a unique value or identifier for each feature in the layer. `id` property of the feature object in the GeoJSON will be used as ObjectID. If `id` property is not present and `objectIDField` is not specified, `ObjectID` field will be generated for each feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField) + */ + objectIdField?: string; + /** + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupEnabled) + * + * @default true + */ + popupEnabled?: boolean; + /** + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#popupTemplate) + */ + popupTemplate?: PopupTemplateProperties; + /** + * The renderer assigned to the layer. The renderer defines how to visualize each feature in the layer. Depending on the renderer type, features may be visualized with the same symbol, or with varying symbols based on the values of provided attribute fields or functions. If not specified, a default renderer will be generated based on the geometry type. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#renderer) + */ + renderer?: RendererProperties; + /** + * Apply perspective scaling to screen-size point symbols in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). When `true`, screen sized objects such as [icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [labels](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html) or [callouts](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-Callout3D.html) integrate better in the 3D scene by applying a certain perspective projection to the sizing of features. This only applies when using a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). `layer.screenSizePerspectiveEnabled = true` ![screen-size-perspective](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols-screenSize-perspective.png) `layer.screenSizePerspectiveEnabled = false` ![no-screen-size-perspective](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols-no-screenSize-perspective.png) + * > **Known Limitations** Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes with point features located far from the ground surface. In these cases it may be better to turn off screen size perspective. As screen size perspective changes the size based on distance to the camera, it should be set to false when using {@link module:esri/renderers/Renderer#SizeVisualVariable size visual variables}. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#screenSizePerspectiveEnabled) + * + * @default true + */ + screenSizePerspectiveEnabled?: boolean; + /** + * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the GeoJSON file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#spatialReference) + * + * @default SpatialReference.WGS84 + */ + spatialReference?: SpatialReferenceProperties; + /** + * An array of feature templates defined in the layer. See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#templates) + */ + templates?: FeatureTemplateProperties[]; + /** + * The URL of the GeoJSON file. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#url) + */ + url?: string; + } + + export interface GeoJSONLayerApplyEditsEdits extends Object { + /** + * Array of features to be added. Values of non nullable fields must be provided when adding new features. Date fields must have [numeric](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) values representing universal time. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) + */ + addFeatures?: Graphic[]; + /** + * Array of features to be updated. Each feature must have valid [objectId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField). Values of non nullable fields must be provided when updating features. Date fields must have [numeric](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) values representing universal time. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) + */ + updateFeatures?: Graphic[]; + /** + * An array of features or objects to be deleted. When an array of features is passed, each feature must have a valid [objectId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#objectIdField). When an array of objects is used, each object must have a valid `objectId` property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) + */ + deleteFeatures?: Graphic[] | any[]; + } + + export interface GeoJSONLayerCapabilities extends Object { + /** + * Describes characteristics of the data in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + data: GeoJSONLayerCapabilitiesData; + /** + * Describes editing capabilities that can be performed on the features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + editing: GeoJSONLayerCapabilitiesEditing; + /** + * Describes operations that can be performed on features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + operations: GeoJSONLayerCapabilitiesOperations; + /** + * Describes [query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) operations that can be performed on features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + query: GeoJSONLayerCapabilitiesQuery; + /** + * Indicates if the layer's query operation supports querying features or records related to features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + queryRelated: GeoJSONLayerCapabilitiesQueryRelated; + } + + export interface GeoJSONLayerCapabilitiesData extends Object { + /** + * Indicates if the attachment is enabled on the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsAttachment: boolean; + /** + * Indicates if the features in the layer support M values. Requires ArcGIS Server service 10.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsM: boolean; + /** + * Indicates if the features in the layer support Z values. Requires ArcGIS Server service 10.1 or greater. See [elevationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) for details regarding placement and rendering of features with z-values in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsZ: boolean; + } + + export interface GeoJSONLayerCapabilitiesEditing extends Object { + /** + * Indicates if anonymous users can delete features created by others. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDeleteByAnonymous: boolean; + /** + * Indicates if logged in users can delete features created by others. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDeleteByOthers: boolean; + /** + * Indicates if the geometry of the features in the layer can be edited. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsGeometryUpdate: boolean; + /** + * Indicates if the `globalid` values provided by the client are used in [applyEdits](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsGlobalId: boolean; + /** + * Indicates if the `rollbackOnFailure` parameter can be set to `true` or `false` when running the synchronizeReplica operation. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsRollbackOnFailure: boolean; + /** + * Indicates if anonymous users can update features created by others. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUpdateByAnonymous: boolean; + /** + * Indicates if logged in users can update features created by others. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUpdateByOthers: boolean; + /** + * Indicates if `m-values` must be provided when updating features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUpdateWithoutM: boolean; + /** + * Indicates if the layer supports uploading attachments by [UploadId](https://developers.arcgis.com/rest/services-reference/item.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUploadWithItemId: boolean; + } + + export interface GeoJSONLayerCapabilitiesOperations extends Object { + /** + * Indicates if new features can be [added](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) to the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsAdd: boolean; + /** + * Indicates if features can be [deleted](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits) from the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDelete: boolean; + /** + * Indicates if features in the layer can be [updated](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsUpdate: boolean; + /** + * Indicates if features in the layer can be [edited](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#applyEdits). Use `supportsAdd`, `supportsUpdate` and `supportsDelete` to determine which editing operations are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsEditing: boolean; + /** + * Indicates if values of one or more field values in the layer can be updated. See the [Calculate REST operation](https://developers.arcgis.com/rest/services-reference/calculate-feature-service-layer-.htm) document for more information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsCalculate: boolean; + /** + * Indicates if features in the layer can be [queried](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryFeatures). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQuery: boolean; + /** + * Indicates if the layer supports [REST API queryAttachments](https://developers.arcgis.com/rest/services-reference/query-attachments-feature-service-layer-.htm) operation, which is supported with hosted feature services at version 10.5 and greater. If `false`, [queryAttachments() method](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#queryAttachments) can only return attachments for one feature at a time. If `true`, `queryAttachments()` can return attachments for array of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQueryAttachments: boolean; + /** + * Indicates if the layer supports a SQL-92 expression or where clause. This operation is only supported in ArcGIS Online hosted feature services. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsValidateSql: boolean; + /** + * Indicates if resized attachments are supported in the layer. This is useful for showing thumbnails in [Popups](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsResizeAttachments: boolean; + } + + export interface GeoJSONLayerCapabilitiesQuery extends Object { + /** + * Indicates if the geometry centroid associated with each polygon feature can be returned. This operation is only supported in ArcGIS Online hosted feature services. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsCentroid: boolean; + /** + * Indicates if the layer's query operation supports a buffer distance for input geometries. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDistance: boolean; + /** + * Indicates if the layer supports queries for distinct values based on fields specified in the [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#outFields). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDistinct: boolean; + /** + * Indicates if the query operation supports `disjoint` [spatial relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship). This is valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsDisjointSpatialRelationship: boolean; + /** + * Indicates if the layer's query response includes the extent of features. At 10.3, this option is only available for hosted feature services. At 10.3.1, it is available for hosted and non-hosted feature services. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsExtent: boolean; + /** + * Indicates if the layer's query response contains geometry attributes, including shape area and length attributes. This operation is only supported in ArcGIS Online hosted feature services. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsGeometryProperties: boolean; + /** + * Indicates if the layer supports the [having](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#having) clause on the service. Requires an ArcGIS Server service 10.6.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsHavingClause: boolean; + /** + * Indicates if features returned in the query response can be ordered by one or more fields. Requires an ArcGIS Server service 10.3 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsOrderBy: boolean; + /** + * Indicates if the query response supports pagination. Requires an ArcGIS Server service 10.3 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsPagination: boolean; + /** + * Indicates if the query response includes the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry). This is valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQueryGeometry: boolean; + /** + * Indicates if the query operation supports the projection of geometries onto a virtual grid. Requires an ArcGIS Server service 10.6.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQuantization: boolean; + /** + * Indicates if the query operation supports quantization designed to be used in edit mode (highest resolution at the given spatial reference). Requires an ArcGIS Server service 10.6.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsQuantizationEditMode: boolean; + /** + * Indicates if the number of features returned by the query operation can be controlled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsResultType: boolean; + /** + * Indicates if the query operation supports SQL expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsSqlExpression: boolean; + /** + * Indicates if the query operation supports using standardized queries. Learn more about [standardized queries here](http://server.arcgis.com/en/server/latest/administer/linux/about-standardized-queries.htm). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsStandardizedQueriesOnly: boolean; + /** + * Indicates if the layer supports field-based statistical functions. Requires ArcGIS Server service 10.1 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsStatistics: boolean; + /** + * Indicates if the layer supports historic moment query. Requires ArcGIS Server service 10.5 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsHistoricMoment: boolean; + } + + export interface GeoJSONLayerCapabilitiesQueryRelated extends Object { + /** + * Indicates if the layer's query response includes the number of features or records related to features in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsCount: boolean; + /** + * Indicates if the related features or records returned in the query response can be ordered by one or more fields. Requires ArcGIS Server service 10.3 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsOrderBy: boolean; + /** + * Indicates if the query response supports pagination for related features or records. Requires ArcGIS Server service 10.3 or greater. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#capabilities) + */ + supportsPagination: boolean; + } + + export interface GeoJSONLayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + + export interface GeoJSONLayerElevationInfo extends Object { + /** + * Defines how the graphic is placed with respect to the terrain surface. See the table below for a list of possible values. + * + * Mode | Description + * ------|------------ + * on-the-ground | Graphics are draped on the terrain surface. This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [ObjectSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined by summing up the terrain elevation and the result of `featureExpressionInfo` (if defined). This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html). + * absolute-height | Graphics are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the result of `featureExpressionInfo` (if defined). This mode doesn't take the elevation of the terrain into account. + * relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + mode: string; + /** + * An elevation offset, which is added to the vertical position of the graphic. If `unit` is not defined, the offset is in `meters`. When `mode = "on-the-ground"`, this property has no effect. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + offset?: number; + /** + * This object contains information about setting a custom z-value on the feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + featureExpressionInfo?: GeoJSONLayerElevationInfoFeatureExpressionInfo; + /** + * The unit for `featureExpressionInfo` and `offset` values. **Possible Values:** feet | meters | kilometers | miles | us-feet | yards + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + unit?: string; + } + + export interface GeoJSONLayerElevationInfoFeatureExpressionInfo extends Object { + /** + * An [Arcade expression](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) evaluating to a number that determines the z-value of the feature. When `mode = "on-the-ground"`, this property has no effect. For line and polygon geometries the result of the expression is the same for all vertices of a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#elevationInfo) + */ + expression?: string; + } + + export interface GeoJSONLayerFeatureReduction extends Object { + /** + * Type of the decluttering method. The only supported type at the moment is `selection`. In this method, some of the overlapping features are hidden such that none of the remaining features intersect on screen. Label deconfliction also respects this option and hides labels that would overlap with the features of this layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#featureReduction) + */ + type: string; + } + + export interface GeoJSONLayerGetFieldDomainOptions extends Object { + /** + * The feature to which the [Domain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Domain.html) is assigned. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#getFieldDomain) + */ + feature: Graphic; + } + + export interface GeoJSONLayerLayerviewCreateEvent { + layerView: LayerView; + + view: View; + } + + export interface GeoJSONLayerLayerviewDestroyEvent { + layerView: LayerView; + + view: View; + } + interface GeoRSSLayer extends Layer, ScaleRangeLayer { /** * Symbol used to represent line features from the GeoRSS feed. @@ -9250,9 +10388,10 @@ declare namespace __esri { * Mode | Description * ------|------------ * on-the-ground | Graphics are placed on the terrain surface. - * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined by summing up - * the terrain elevation, and the geometry's z-value (if present). In case `featureExpressionInfo` is defined, the result of the expression is used - * instead of the geometry’s z-value. absolute-height | Graphics are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. It doesn't take the elevation of the terrain into account. relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. In this mode z-values are ignored. + * relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined by summing the terrain elevation and the geometry's z-value (if present). In case `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. + * absolute-height | Graphics are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry’s z-value. It doesn't take the elevation of the terrain into account. + * relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation. In this mode z-values are ignored. + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#elevationInfo) */ @@ -9377,7 +10516,7 @@ declare namespace __esri { */ pixelFilter: Function; /** - * Indicates whether to display popups when the layer is clicked. + * Indicates whether to display popups when the layer is clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#popupEnabled) * @@ -9390,12 +10529,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#portalItem) */ portalItem: PortalItem; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#token) - */ - readonly token: string; /** * Executes the [pixelFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#pixelFilter) function and redraws the layer. @@ -9437,7 +10570,7 @@ declare namespace __esri { */ pixelFilter?: Function; /** - * Indicates whether to display popups when the layer is clicked. + * Indicates whether to display popups when the layer is clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#popupEnabled) * @@ -9622,14 +10755,14 @@ declare namespace __esri { * ------|------------ * show | The layer is visible in the table of contents. * hide | The layer is hidden in the table of contents. - * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), hide the children layers from the table of contents. + * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html) or [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html), hide the children layers from the table of contents. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#listMode) * * @default show */ - listMode: string; + listMode: "show" | "hide" | "hide-children"; /** * Indicates whether the layer's resources have loaded. When `true`, all the properties of the object can be accessed. * @@ -9667,6 +10800,15 @@ declare namespace __esri { */ visible: boolean; + /** + * Called by the views, such as [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), when the layer is added to the [Map.layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers) collection and a layer view must be created for it. **This method is used internally and there is no use case for invoking it directly**. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#createLayerView) + * + * @param view The parent view. + * + */ + createLayerView(view: any): void; /** * Fetches custom attribution data for the layer when it becomes available. * @@ -9731,14 +10873,14 @@ declare namespace __esri { * ------|------------ * show | The layer is visible in the table of contents. * hide | The layer is hidden in the table of contents. - * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), hide the children layers from the table of contents. + * hide-children | If the layer is a [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html), [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html) or [WMSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMSLayer.html), hide the children layers from the table of contents. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#listMode) * * @default show */ - listMode?: string; + listMode?: "show" | "hide" | "hide-children"; /** * The opacity of the layer. This value can range between `1` and `0`, where `0` is 100 percent transparent and `1` is completely opaque. * @@ -9787,13 +10929,7 @@ declare namespace __esri { portalItem: PortalItem; } - interface MapImageLayer - extends Layer, - SublayersOwner, - ArcGISMapService, - DynamicLayer, - ScaleRangeLayer, - RefreshableLayer { + interface MapImageLayer extends Layer, SublayersOwner, ArcGISMapService, ScaleRangeLayer, RefreshableLayer { /** * A flat [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of all the [sublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#sublayers) in the MapImageLayer including the sublayers of its sublayers. All sublayers are referenced in the order in which they are drawn in the view (bottom to top). * @@ -9846,12 +10982,24 @@ declare namespace __esri { * @default true */ imageTransparency: boolean; + /** + * The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#portalItem) + */ + portalItem: PortalItem; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) objects that allow you to alter the properties of one or more sublayers of the MapImageLayer. If this property is not specified, all the sublayers from the service are displayed as defined in the service. If an empty array is passed to this property then none of the sublayers from the service are displayed in the layer. All sublayers are referenced in the order in which they are drawn in the view (bottom to top). They may be [added](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add), [removed](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#remove), or [reordered](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#reorder) using the [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) methods. Because [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) extends [Accessor](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html), its properties may be [watched](https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html#watchProperties). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#sublayers) */ sublayers: Collection; + /** + * The URL to the REST endpoint of the map service. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#url) + */ + url: string; /** * Gets the parameters of the exported image to use when calling the [export REST operation](https://developers.arcgis.com/rest/services-reference/export-map.htm). @@ -9872,6 +11020,44 @@ declare namespace __esri { height: number, options?: MapImageLayerCreateExportImageParametersOptions ): any; + /** + * This method fetches the image for the specified extent and size. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#fetchImage) + * + * @param extent The extent of the view. + * @param width The width of the view in pixels. + * @param height The height of the view in pixels. + * @param options The parameter options is an object with the following properties. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. + * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. + * + */ + fetchImage( + extent: Extent, + width: number, + height: number, + options?: MapImageLayerFetchImageOptions + ): IPromise; + /** + * This method returns a URL to an image for a given extent, width and height. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#getImageUrl) + * + * @param extent The extent of the exported image. + * @param width The width of the view in pixels. + * @param height The height of the view in pixels. + * @param options The parameter options is an object with the following properties. + * @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. + * @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. + * + */ + getImageUrl( + extent: Extent, + width: number, + height: number, + options?: MapImageLayerGetImageUrlOptions + ): IPromise | string; on(name: "layerview-create", eventHandler: MapImageLayerLayerviewCreateEventHandler): IHandle; @@ -9895,7 +11081,6 @@ declare namespace __esri { interface MapImageLayerProperties extends LayerProperties, ArcGISMapServiceProperties, - DynamicLayerProperties, ScaleRangeLayerProperties, RefreshableLayerProperties { /** @@ -9944,12 +11129,24 @@ declare namespace __esri { * @default true */ imageTransparency?: boolean; + /** + * The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#portalItem) + */ + portalItem?: PortalItemProperties; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) objects that allow you to alter the properties of one or more sublayers of the MapImageLayer. If this property is not specified, all the sublayers from the service are displayed as defined in the service. If an empty array is passed to this property then none of the sublayers from the service are displayed in the layer. All sublayers are referenced in the order in which they are drawn in the view (bottom to top). They may be [added](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add), [removed](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#remove), or [reordered](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#reorder) using the [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) methods. Because [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) extends [Accessor](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html), its properties may be [watched](https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html#watchProperties). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#sublayers) */ sublayers?: CollectionProperties; + /** + * The URL to the REST endpoint of the map service. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#url) + */ + url?: string; } export interface MapImageLayerLayerviewCreateEvent { @@ -9979,6 +11176,36 @@ declare namespace __esri { pixelRatio?: number; } + export interface MapImageLayerFetchImageOptions extends Object { + /** + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#fetchImage) + */ + rotation?: number; + /** + * The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#fetchImage) + */ + pixelRatio?: number; + } + + export interface MapImageLayerGetImageUrlOptions extends Object { + /** + * The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#getImageUrl) + */ + pixelRatio?: number; + /** + * The rotation in degrees of the exported image. Available since ArcGIS Server 10.3. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#getImageUrl) + */ + rotation?: number; + } + interface MapNotesLayer extends Layer, PortalLayer, ScaleRangeLayer { on(name: "layerview-create", eventHandler: MapNotesLayerLayerviewCreateEventHandler): IHandle; @@ -10157,7 +11384,7 @@ declare namespace __esri { */ pixelType: string; /** - * The popup template for the layer. When set on the layer, the popupTemplate allows users to access attributes and display their values using text and/or charts in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a pixel is clicked. See [this sample](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-popup/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). + * The popup template for the layer. When set on the layer, the popupTemplate allows users to access attributes and display their values using text and/or charts in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a pixel is clicked. See [this sample](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-popup/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#popupTemplate) */ @@ -10182,6 +11409,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#rasterFields) */ rasterFields: Field[]; + /** + * The renderer assigned to the layer. The renderer defines how to visualize pixels in the layer. Depending on the renderer type, the pixels may be stretched across the color ramp, classified or have different symbols based on values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#renderer) + */ + renderer: Renderer; /** * Specifies the rule for how the requested image should be rendered. * @@ -10207,6 +11440,17 @@ declare namespace __esri { */ readonly version: number; + /** + * Creates a default popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: ArcGISImageServiceCreatePopupTemplateOptions): PopupTemplate; /** * Returns an image using the [export REST operation](https://developers.arcgis.com/rest/services-reference/export-image.htm) that displays data from an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). * @@ -10328,7 +11572,7 @@ declare namespace __esri { */ pixelType?: string; /** - * The popup template for the layer. When set on the layer, the popupTemplate allows users to access attributes and display their values using text and/or charts in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a pixel is clicked. See [this sample](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-popup/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). + * The popup template for the layer. When set on the layer, the popupTemplate allows users to access attributes and display their values using text and/or charts in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a pixel is clicked. See [this sample](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-popup/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with an [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#popupTemplate) */ @@ -10353,6 +11597,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#rasterFields) */ rasterFields?: FieldProperties[]; + /** + * The renderer assigned to the layer. The renderer defines how to visualize pixels in the layer. Depending on the renderer type, the pixels may be stretched across the color ramp, classified or have different symbols based on values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#renderer) + */ + renderer?: RendererProperties; /** * Specifies the rule for how the requested image should be rendered. * @@ -10367,6 +11617,23 @@ declare namespace __esri { url?: string; } + export interface ArcGISImageServiceCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + interface ArcGISMapService { /** * Indicates the layer's supported capabilities. @@ -10400,12 +11667,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISMapService.html#spatialReference) */ readonly spatialReference: SpatialReference; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISMapService.html#token) - */ - readonly token: string; /** * The version of ArcGIS Server in which the map service is published. * @@ -10557,7 +11818,7 @@ declare namespace __esri { interface RefreshableLayer { /** - * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. + * Refresh interval of the layer in minutes. Value of `0` indicates no refresh. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refreshInterval) * @@ -10583,7 +11844,7 @@ declare namespace __esri { interface RefreshableLayerProperties { /** - * Refresh interval of the layer in minutes. Minimum refresh interval is 0.1 minute (6 seconds). Value of `0` indicates no refresh. + * Refresh interval of the layer in minutes. Value of `0` indicates no refresh. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-RefreshableLayer.html#refreshInterval) * @@ -10660,12 +11921,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#spatialReference) */ spatialReference: SpatialReference; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#token) - */ - readonly token: string; /** * The URL of the REST endpoint of the layer or scene service. The URL may either point to a resource on ArcGIS Enterprise or ArcGIS Online. The layer may be specified using the [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) property when the url points directly to a service and not a specific layer. If [layerId](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-SceneService.html#layerId) is not specified, then it will default to the first layer in the service. * @@ -10767,6 +12022,34 @@ declare namespace __esri { export const SublayersOwner: SublayersOwnerConstructor; + interface TemporalLayer { + /** + * The time info provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) time for each feature and the [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the layer. The `timeInfo` and its `startField` and `endField` properties must be set at the time of layer initialization if it is being set for [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) or [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) initialized from [client-side features](esri-layers-FeatureLayer.html#creating-a-featurelayer). The [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the timeInfo is automatically calculated based on `start` and `end` fields. The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-TemporalLayer.html#timeInfo) + * + * @default null + */ + timeInfo: TimeInfo; + } + + interface TemporalLayerConstructor { + new (): TemporalLayer; + } + + export const TemporalLayer: TemporalLayerConstructor; + + interface TemporalLayerProperties { + /** + * The time info provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) time for each feature and the [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the layer. The `timeInfo` and its `startField` and `endField` properties must be set at the time of layer initialization if it is being set for [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) or [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) initialized from [client-side features](esri-layers-FeatureLayer.html#creating-a-featurelayer). The [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the timeInfo is automatically calculated based on `start` and `end` fields. The timeInfo parameters cannot be changed after the layer is [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-TemporalLayer.html#timeInfo) + * + * @default null + */ + timeInfo?: TimeInfoProperties; + } + interface OpenStreetMapLayer extends WebTileLayer { on(name: "layerview-create", eventHandler: OpenStreetMapLayerLayerviewCreateEventHandler): IHandle; @@ -10805,7 +12088,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudFilter.html#type) */ - readonly type: string; + readonly type: "value" | "bitfield" | "return"; } interface PointCloudFilterConstructor { @@ -10841,7 +12124,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudReturnFilter.html#includedReturns) */ - includedReturns: string[]; + includedReturns: ("firstOfMany" | "last" | "lastOfMany" | "single")[]; + /** + * For PointCloudReturnFilter the type is always `return`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudReturnFilter.html#type) + */ + readonly type: "return"; } interface PointCloudReturnFilterConstructor { @@ -10868,7 +12157,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudReturnFilter.html#includedReturns) */ - includedReturns?: string[]; + includedReturns?: ("firstOfMany" | "last" | "lastOfMany" | "single")[]; } interface PointCloudValueFilter extends PointCloudFilter { @@ -10879,7 +12168,13 @@ declare namespace __esri { * * @default "exclude" */ - mode: string; + mode: "include" | "exclude"; + /** + * For PointCloudValueFilter the type is always `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-pointCloudFilters-PointCloudValueFilter.html#type) + */ + readonly type: "value"; /** * An array of numeric values representing the classification codes that the filter should apply. * @@ -10910,7 +12205,7 @@ declare namespace __esri { * * @default "exclude" */ - mode?: string; + mode?: "include" | "exclude"; /** * An array of numeric values representing the classification codes that the filter should apply. * @@ -10937,7 +12232,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html#filters) */ - filters: PointCloudFilter[]; + filters: (PointCloudValueFilter | PointCloudReturnFilter)[]; /** * Indicates whether the layer will be included in the legend. * @@ -10990,7 +12285,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html#filters) */ - filters?: PointCloudFilterProperties[]; + filters?: (PointCloudValueFilterProperties | PointCloudReturnFilterProperties)[]; /** * Indicates whether the layer will be included in the legend. * @@ -11082,7 +12377,7 @@ declare namespace __esri { */ geometryType: string; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#labelsVisible) property of this layer must be set to `true`. + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. * > **Known Limitations** This property is only relevant to SceneLayers with [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. This property has no effect on SceneLayers with other geometry types. Each point can have only one label. Multiple [Label classes](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) with different [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#where) clauses can be used to have different label styles on different features that belong to the same layer (for example blue labels for lakes and green labels for parks). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#labelingInfo) @@ -11111,7 +12406,7 @@ declare namespace __esri { */ objectIdField: string; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupEnabled) * @@ -11119,7 +12414,7 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupTemplate) */ @@ -11140,6 +12435,17 @@ declare namespace __esri { */ screenSizePerspectiveEnabled: boolean; + /** + * Creates a default popup template for the layer, populated with all the fields of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#createPopupTemplate) + * + * @param options Options for creating the popup template. + * @param options.maximumFields The maximum number of fields to include in the popup template. + * @param options.ignoreFieldTypes Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + */ + createPopupTemplate(options?: SceneLayerCreatePopupTemplateOptions): PopupTemplate; /** * Creates a query object that can be used to fetch features that satisfy the layer's current definition expression. The query should only be used on the layer and not on the layer view. * @@ -11254,7 +12560,7 @@ declare namespace __esri { */ geometryType?: string; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#labelsVisible) property of this layer must be set to `true`. + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer such as label expression, placement, and size. * > **Known Limitations** This property is only relevant to SceneLayers with [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. This property has no effect on SceneLayers with other geometry types. Each point can have only one label. Multiple [Label classes](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) with different [where](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#where) clauses can be used to have different label styles on different features that belong to the same layer (for example blue labels for lakes and green labels for parks). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#labelingInfo) @@ -11283,7 +12589,7 @@ declare namespace __esri { */ objectIdField?: string; /** - * Indicates whether to display popups when features in the layer are clicked. + * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupTemplate) to define what information should be displayed in the popup. Alternatively, a default popup template may be automatically used if [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupEnabled) * @@ -11291,7 +12597,7 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. + * The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer. A default popup template is automatically used if no `popupTemplate` has been defined when [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#popupTemplate) */ @@ -11325,6 +12631,23 @@ declare namespace __esri { view: View; } + export interface SceneLayerCreatePopupTemplateOptions extends Object { + /** + * The maximum number of fields to include in the popup template. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#createPopupTemplate) + * + * @default 75 + */ + maximumFields?: number; + /** + * Field types to ignore when creating the popup. By default the `geometry`, `blob`, `raster`, `guid` and `xml` field types are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#createPopupTemplate) + */ + ignoreFieldTypes?: string[]; + } + export interface SceneLayerElevationInfo extends Object { /** * Defines how the graphic is placed with respect to the terrain surface. See the table below for a list of possible values. @@ -11369,13 +12692,13 @@ declare namespace __esri { interface StreamLayer extends FeatureLayer { /** - * Contains the attribute and spatial filters used to filter messages sent to the client by a Stream Service. This property can be set in the constructor but is `read-only` after the layer is created. To change the filter after the layer is created, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. + * Contains the attribute and spatial filters used to filter messages sent to the client by a Stream Service. This property can be set in the constructor but is `read-only` after the layer is created. To change the filter after the layer is created, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. **Use definitionExpression or geometryDefinition instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) */ readonly filter: StreamLayerFilter; /** - * An extent object used to filter features. Only features intersecting the extent are displayed in the view. Instead of using this property, use [StreamLayer.filter.geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) when creating the service or [StreamLayer.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) when changing the spatial filter. + * An extent object used to filter features. Only features intersecting the extent are displayed in the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#geometryDefinition) */ @@ -11394,7 +12717,7 @@ declare namespace __esri { purgeOptions: StreamLayerPurgeOptions; /** - * Updates the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) on the layer. The filter is updated on all views that contain the layer. If the input `filterChanges` object is `undefined` or `null`, the spatial and attribute filters are removed. To update the filter on a single layer view associated with the layer, use the [StreamLayerView.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#updateFilter) method after getting the layer view object. Filter changes only apply to incoming features. Features already displayed in the view will be removed automatically. + * Updates the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) on the layer. The filter is updated on all views that contain the layer. If the input `filterChanges` object is `undefined` or `null`, the spatial and attribute filters are removed. To update the filter on a single layer view associated with the layer, use the [StreamLayerView.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#updateFilter) method after getting the layer view object. Filter changes only apply to incoming features. Features already displayed in the view will be removed automatically. **Use [definitionExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#definitionExpression) or [geometryDefinition](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#definitionExpression) instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) * @@ -11426,13 +12749,13 @@ declare namespace __esri { interface StreamLayerProperties extends FeatureLayerProperties { /** - * Contains the attribute and spatial filters used to filter messages sent to the client by a Stream Service. This property can be set in the constructor but is `read-only` after the layer is created. To change the filter after the layer is created, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. + * Contains the attribute and spatial filters used to filter messages sent to the client by a Stream Service. This property can be set in the constructor but is `read-only` after the layer is created. To change the filter after the layer is created, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. **Use definitionExpression or geometryDefinition instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) */ filter?: StreamLayerFilter; /** - * An extent object used to filter features. Only features intersecting the extent are displayed in the view. Instead of using this property, use [StreamLayer.filter.geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#filter) when creating the service or [StreamLayer.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) when changing the spatial filter. + * An extent object used to filter features. Only features intersecting the extent are displayed in the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#geometryDefinition) */ @@ -11515,6 +12838,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#contentType) */ contentType: string; + /** + * An array of [ExifInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) for the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#exifInfo) + */ + exifInfo: ExifInfo[]; /** * The identifier for the attachment. * @@ -11564,7 +12893,7 @@ declare namespace __esri { interface AttachmentInfoConstructor { /** - * The AttachmentInfo class returns information about attachments associated with a feature. The contents of the attachment are streamed to the client. Attachments are available if the [FeatureLayer's capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. + * The `AttachmentInfo` class returns information about attachments associated with a feature. The contents of the attachment are streamed to the client. Attachments are available if the [FeatureLayer.capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) */ @@ -11583,6 +12912,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#contentType) */ contentType?: string; + /** + * An array of [ExifInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) for the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#exifInfo) + */ + exifInfo?: ExifInfo[]; /** * The identifier for the attachment. * @@ -11621,6 +12956,47 @@ declare namespace __esri { url?: string; } + /** + * An array of [Exchangeable image file format](http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf) information for the attachment. You must set the attachment query's [returnMetadata](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#returnMetadata) to `true` to get the `exif` info associated with the attachment. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + export interface ExifInfo extends Object { + /** + * The file name. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + name?: string; + /** + * Array of tag objects containing the following properties: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + tags?: ExifInfoTags[]; + } + + export interface ExifInfoTags extends Object { + /** + * The tag name. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + name: string; + /** + * The tag description. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + description: string; + /** + * The value of the tag. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#ExifInfo) + */ + value: any; + } + interface CodedValueDomain extends Domain { /** * An array of the coded values in the domain. See the object specification table below for the properties each item in the array should contain. @@ -12016,7 +13392,7 @@ declare namespace __esri { */ defaultValue: number | string | any | any; /** - * The domain associated with the field. + * The domain associated with the field. Domains are used to constrain the values allowed in a field. There are two types of domains: [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html) and [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#domain) * @@ -12105,7 +13481,7 @@ declare namespace __esri { */ defaultValue?: number | string | any | any; /** - * The domain associated with the field. + * The domain associated with the field. Domains are used to constrain the values allowed in a field. There are two types of domains: [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html) and [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#domain) * @@ -12168,6 +13544,47 @@ declare namespace __esri { | "xml"; } + interface fieldUtils { + /** + * Returns an array of field names used in the Arcade expression for calculating the Z values of features in the given feature layer's [FeatureLayer.elevationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getElevationFields) + * + * @param layer The featureLayer to extract fields required for calculating feature Z values. + * + */ + getElevationFields(layer: FeatureLayer): IPromise; + /** + * Returns an array of editor tracking field names for a given feature layer. It includes the fields from the [FeatureLayer.editFieldsInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#editFieldsInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getFeatureEditFields) + * + * @param layer The Feature Layer from which to extract editor tracking fields. + * + */ + getFeatureEditFields(layer: FeatureLayer): string[]; + /** + * Returns an array of field names used in the Arcade expression for labeling features in the given feature layer's [FeatureLayer.labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getLabelingFields) + * + * @param layer The Feature Layer from which to extract label fields. + * + */ + getLabelingFields(layer: FeatureLayer): IPromise; + /** + * Returns an array of field names related to time. It includes the fields from the [FeatureLayer.timeInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#timeInfo), and the `trackIdField`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-fieldUtils.html#getTimeFields) + * + * @param layer The Feature Layer from which to extract time fields. + * + */ + getTimeFields(layer: FeatureLayer): IPromise; + } + + export const fieldUtils: fieldUtils; + interface ImageParameters extends Accessor { /** * Dots per inch setting for an module:esri/layersMapImageLayer. @@ -12443,12 +13860,16 @@ declare namespace __esri { * Defines the content of label text for [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html). If working with [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), use [labelExpressionInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo) instead. Attribute values may be included in labels using SQL syntax. To include an attribute value in a label, wrap the name of the field in square brackets `[]`. See the example snippet below. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression) + * + * @default null */ labelExpression: string; /** * Defines the content of label text for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). If working with [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), use [labelExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression) instead. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo) + * + * @default null */ labelExpressionInfo: LabelClassLabelExpressionInfo; /** @@ -12483,6 +13904,8 @@ declare namespace __esri { * Defines the symbol used for rendering the label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#symbol) + * + * @default null */ symbol: TextSymbol | LabelSymbol3D; /** @@ -12496,6 +13919,8 @@ declare namespace __esri { * > **Known Limitations** Only very basic SQL is currently supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#where) + * + * @default null */ where: string; @@ -12528,12 +13953,16 @@ declare namespace __esri { * Defines the content of label text for [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html). If working with [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), use [labelExpressionInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo) instead. Attribute values may be included in labels using SQL syntax. To include an attribute value in a label, wrap the name of the field in square brackets `[]`. See the example snippet below. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression) + * + * @default null */ labelExpression?: string; /** * Defines the content of label text for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). If working with [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html), use [labelExpression](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpression) instead. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo) + * + * @default null */ labelExpressionInfo?: LabelClassLabelExpressionInfo; /** @@ -12568,6 +13997,8 @@ declare namespace __esri { * Defines the symbol used for rendering the label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#symbol) + * + * @default null */ symbol?: TextSymbolProperties | LabelSymbol3DProperties; /** @@ -12581,6 +14012,8 @@ declare namespace __esri { * > **Known Limitations** Only very basic SQL is currently supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#where) + * + * @default null */ where?: string; } @@ -12777,6 +14210,12 @@ declare namespace __esri { * @default true */ ascending: boolean; + /** + * The rendering rule applied on items before mosaicking. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-MosaicRule.html#itemRenderingRule) + */ + itemRenderingRule: RasterFunction; /** * An array of raster Ids. All the rasters with the given list of raster Ids are selected to participate in the mosaic. The rasters will be visible at all pixel sizes regardless of the minimum and maximum pixel size range of the locked rasters. * @@ -12865,6 +14304,12 @@ declare namespace __esri { * @default true */ ascending?: boolean; + /** + * The rendering rule applied on items before mosaicking. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-MosaicRule.html#itemRenderingRule) + */ + itemRenderingRule?: RasterFunctionProperties; /** * An array of raster Ids. All the rasters with the given list of raster Ids are selected to participate in the mosaic. The rasters will be visible at all pixel sizes regardless of the minimum and maximum pixel size range of the locked rasters. * @@ -13096,7 +14541,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#variableName) */ - variableName: any; + variableName: string; } interface RasterFunctionConstructor { @@ -13139,7 +14584,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RasterFunction.html#variableName) */ - variableName?: any; + variableName?: string; } interface Relationship extends Accessor { @@ -13216,7 +14661,7 @@ declare namespace __esri { interface Sublayer extends Accessor { /** - * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. + * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. To see if you can use this property, check the `supportsSublayerDefinitionExpression` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#definitionExpression) */ @@ -13228,7 +14673,7 @@ declare namespace __esri { */ id: number; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) objects. Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#labelsVisible) property of the sublayer must be `true`. + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) objects. Use this property to specify labeling properties for the layer such as label expression, placement, and size. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#labelingInfo) */ @@ -13255,6 +14700,21 @@ declare namespace __esri { * @default true */ legendEnabled: boolean; + /** + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * hide-children | Hide the children layers from the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#listMode) + * + * @default show + */ + listMode: "show" | "hide" | "hide-children"; /** * The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#minScale) value, and greater than or equal to the service specification. * @@ -13290,7 +14750,7 @@ declare namespace __esri { */ popupTemplate: PopupTemplate; /** - * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. + * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. To see if you can use this property, check the `supportsDynamicLayers` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * > **Known Limitations** * * [3D symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html) are not currently supported in renderers set on sublayers. * * [Visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) and [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in renderers set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6 map services (or later) created from ArcGIS Pro. @@ -13323,7 +14783,7 @@ declare namespace __esri { */ readonly url: string; /** - * Indicates if the layer is visible in the view. + * Indicates if the layer is visible in the view. To see if you can use this property, check the `supportsSublayerVisibility` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#visible) */ @@ -13344,7 +14804,7 @@ declare namespace __esri { * * */ - createFeatureLayer(): FeatureLayer; + createFeatureLayer(): IPromise; /** * Creates a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) object with default values representing the layer's state, including filters (definition expression) on the layer's features. * @@ -13354,7 +14814,7 @@ declare namespace __esri { */ createQuery(): Query; /** - * Executes a [query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html) against features in the sublayer. + * Executes a [query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html) against features in the sublayer. To see if you can use this property, check the `supportsQuery` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#queryFeatures) * @@ -13378,7 +14838,7 @@ declare namespace __esri { interface SublayerProperties { /** - * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. + * A SQL where clause used to filter features in the image. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Definition expressions may be set when a sublayer is constructed prior to it loading in the view or after it has been added to the MapImageLayer. To see if you can use this property, check the `supportsSublayerDefinitionExpression` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#definitionExpression) */ @@ -13390,7 +14850,7 @@ declare namespace __esri { */ id?: number; /** - * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) objects. Use this property to specify labeling properties for the layer such as label expression, placement, and size. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#labelsVisible) property of the sublayer must be `true`. + * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) objects. Use this property to specify labeling properties for the layer such as label expression, placement, and size. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#labelingInfo) */ @@ -13417,6 +14877,21 @@ declare namespace __esri { * @default true */ legendEnabled?: boolean; + /** + * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget. The possible values are listed below. + * + * Value | Description + * ------|------------ + * show | The layer is visible in the table of contents. + * hide | The layer is hidden in the table of contents. + * hide-children | Hide the children layers from the table of contents. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#listMode) + * + * @default show + */ + listMode?: "show" | "hide" | "hide-children"; /** * The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#minScale) value, and greater than or equal to the service specification. * @@ -13452,7 +14927,7 @@ declare namespace __esri { */ popupTemplate?: PopupTemplateProperties; /** - * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. + * The renderer to apply to the sublayer. This value overrides the renderer read from the map service. To see if you can use this property, check the `supportsDynamicLayers` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * > **Known Limitations** * * [3D symbols](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html) are not currently supported in renderers set on sublayers. * * [Visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) and [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expressions are not supported in renderers set on MapImageLayer sublayers unless they reference ArcGIS Enterprise 10.6 map services (or later) created from ArcGIS Pro. @@ -13479,7 +14954,7 @@ declare namespace __esri { */ title?: string; /** - * Indicates if the layer is visible in the view. + * Indicates if the layer is visible in the view. To see if you can use this property, check the `supportsSublayerVisibility` property of [MapImageLayer.capabilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#capabilities). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#visible) */ @@ -13929,6 +15404,75 @@ declare namespace __esri { tileInfo?: TileInfoProperties; } + interface TimeInfo extends Accessor, JSONSupport { + /** + * The name of the field containing the end time information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) + */ + endField: string; + /** + * The name of the field containing the start time information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) + */ + startField: string; + /** + * The time extent defines the start time and end time for all data in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) + * + * @default null + */ + timeExtent: TimeExtent; + + /** + * Creates a deep clone of TimeInfo object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#clone) + * + * + */ + clone(): TimeInfo; + } + + interface TimeInfoConstructor { + /** + * Time info represents a temporal data of a time-aware layer. The time info provides information such as date fields that store [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) time for each feature and the [total time span](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) for the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html) + */ + + new (properties?: TimeInfoProperties): TimeInfo; + + fromJSON(json: any): TimeInfo; + } + + export const TimeInfo: TimeInfoConstructor; + + interface TimeInfoProperties { + /** + * The name of the field containing the end time information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#endField) + */ + endField?: string; + /** + * The name of the field containing the start time information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#startField) + */ + startField?: string; + /** + * The time extent defines the start time and end time for all data in the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#timeExtent) + * + * @default null + */ + timeExtent?: TimeExtentProperties; + } + interface WMSSublayer extends Accessor { /** * Description for the WMS sublayer. This defaults to the value of the Abstract property from the WMS GetCapabilities request. @@ -14382,6 +15926,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#hasAttributionData) */ readonly hasAttributionData: boolean; + /** + * Resampling is enabled by default in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). This means that tile images are resampled at a lower level of detail and displayed at levels where tiles may not be available. Setting this property to `true` disables this behavior. Instead, if a tile is not available, a transparent image is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#resampling) + * + * @default true + */ + resampling: boolean; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) objects. All sublayers are referenced in the order in which they are drawn in the view (bottom to top). Sublayer properties on TileLayer are read-only, with the following exceptions: * * [legendEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#legendEnabled) @@ -14462,6 +16014,14 @@ declare namespace __esri { RefreshableLayerProperties, ScaleRangeLayerProperties, PortalLayerProperties { + /** + * Resampling is enabled by default in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). This means that tile images are resampled at a lower level of detail and displayed at levels where tiles may not be available. Setting this property to `true` disables this behavior. Instead, if a tile is not available, a transparent image is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html#resampling) + * + * @default true + */ + resampling?: boolean; /** * An array of tile servers used for changing map tiles. * @@ -14598,12 +16158,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#tileInfo) */ tileInfo: TileInfo; - /** - * Token generated by the token service using the specified userId and password. The recommended approach to pass a token on a layer is to use [IdentityManager.registerToken()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html#token) - */ - readonly token: string; /** * The URL to the vector tile service, or the URL to the style resource of vector tiles that will be used to render the layer. If specifying a URL to a style, the tiles are fetched from the tile servers specified in the style object. * @@ -15402,25 +16956,25 @@ declare namespace __esri { /** * Specifies a basemap for the map. The basemap is a set of tile layers that give geographic context to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and the other [operational layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers) in the map. This value can be an instance of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) or one of the strings listed in the table below. * - * Value | Description - * ------|------------ - * streets | ![basemap-streets](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) - * satellite | ![basemap-satellite](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/satellite.jpg) - * hybrid | ![basemap-hybrid](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/hybrid.jpg) - * topo | ![basemap-topo](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) - * gray | ![basemap-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) - * dark-gray | ![basemap-dark-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) - * oceans | ![basemap-oceans](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/oceans.jpg) - * national-geographic | ![basemap-national-geographic](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/national-geographic.jpg) - * terrain | ![basemap-terrain](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/terrain.jpg) - * osm | ![basemap-osm](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/osm.jpg) - * dark-gray-vector | ![dark-gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) - * gray-vector | ![gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) - * streets-vector | ![streets-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) - * topo-vector | ![topo-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) - * streets-night-vector | ![streets-night-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-night.jpg) - * streets-relief-vector | ![streets-relief-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-relief.jpg) - * streets-navigation-vector | ![streets-navigation-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-navigation.jpg) + * Value | Source | Thumbnail + * ------|------- |---------- + * `topo` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer | ![basemap-topo](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) + * `streets` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer | ![basemap-streets](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) + * `satellite` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer | ![basemap-satellite](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/satellite.jpg) + * `hybrid` | https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer | ![basemap-hybrid](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/hybrid.jpg) + * `dark-gray` | https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer | ![basemap-dark-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) + * `gray` | https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer | ![basemap-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) + * `national-geographic` | https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer | ![basemap-national-geographic](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/national-geographic.jpg) + * `oceans` | https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer and https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer | ![basemap-oceans](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/oceans.jpg) + * `osm` | [OpenStreetMapLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html) | ![basemap-osm](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/osm.jpg) + * `terrain` | https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer | ![basemap-terrain](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/terrain.jpg) + * `dark-gray-vector` | [Dark Gray Canvas [v2]](https://www.arcgis.com/home/item.html?id=c11ce4f7801740b2905eb03ddc963ac8) | ![dark-gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) + * `gray-vector` | [Light Gray Canvas [v2]](https://www.arcgis.com/home/item.html?id=8a2cba3b0ebf4140b7c0dc5ee149549a) | ![gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) + * `streets-vector` | [World Street Map [v2]](https://www.arcgis.com/home/item.html?id=de26a3cf4cc9451298ea173c4b324736) | ![streets-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) + * `streets-night-vector` | [World Street Map (Night) [v2]](https://www.arcgis.com/home/item.html?id=86f556a2d1fd468181855a35e344567f) | ![streets-night-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-night.jpg) + * `streets-navigation-vector` | [World Navigation Map [v2]](https://www.arcgis.com/home/item.html?id=63c47b7177f946b49902c24129b87252) | ![streets-navigation-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-navigation.jpg) + * `topo-vector` | https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer and [World Topographic Map [v2]](https://www.arcgis.com/home/item.html?id=7dc6cea0b1764a1f9af2e679f642f0f5) | ![topo-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) + * `streets-relief-vector` | https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer and [World Street Map (with Relief) [v2]](https://www.arcgis.com/home/item.html?id=b266e6d17fc345b498345613930fbd76) | ![streets-relief-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-relief.jpg) * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) @@ -15455,25 +17009,25 @@ declare namespace __esri { /** * Specifies a basemap for the map. The basemap is a set of tile layers that give geographic context to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) and the other [operational layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers) in the map. This value can be an instance of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) or one of the strings listed in the table below. * - * Value | Description - * ------|------------ - * streets | ![basemap-streets](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) - * satellite | ![basemap-satellite](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/satellite.jpg) - * hybrid | ![basemap-hybrid](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/hybrid.jpg) - * topo | ![basemap-topo](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) - * gray | ![basemap-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) - * dark-gray | ![basemap-dark-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) - * oceans | ![basemap-oceans](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/oceans.jpg) - * national-geographic | ![basemap-national-geographic](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/national-geographic.jpg) - * terrain | ![basemap-terrain](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/terrain.jpg) - * osm | ![basemap-osm](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/osm.jpg) - * dark-gray-vector | ![dark-gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) - * gray-vector | ![gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) - * streets-vector | ![streets-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) - * topo-vector | ![topo-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) - * streets-night-vector | ![streets-night-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-night.jpg) - * streets-relief-vector | ![streets-relief-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-relief.jpg) - * streets-navigation-vector | ![streets-navigation-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-navigation.jpg) + * Value | Source | Thumbnail + * ------|------- |---------- + * `topo` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer | ![basemap-topo](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) + * `streets` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer | ![basemap-streets](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) + * `satellite` | https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer | ![basemap-satellite](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/satellite.jpg) + * `hybrid` | https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer | ![basemap-hybrid](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/hybrid.jpg) + * `dark-gray` | https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer | ![basemap-dark-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) + * `gray` | https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer | ![basemap-gray](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) + * `national-geographic` | https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer | ![basemap-national-geographic](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/national-geographic.jpg) + * `oceans` | https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer and https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer | ![basemap-oceans](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/oceans.jpg) + * `osm` | [OpenStreetMapLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html) | ![basemap-osm](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/osm.jpg) + * `terrain` | https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer and https://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer | ![basemap-terrain](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/terrain.jpg) + * `dark-gray-vector` | [Dark Gray Canvas [v2]](https://www.arcgis.com/home/item.html?id=c11ce4f7801740b2905eb03ddc963ac8) | ![dark-gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/dark-gray.jpg) + * `gray-vector` | [Light Gray Canvas [v2]](https://www.arcgis.com/home/item.html?id=8a2cba3b0ebf4140b7c0dc5ee149549a) | ![gray-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/gray.jpg) + * `streets-vector` | [World Street Map [v2]](https://www.arcgis.com/home/item.html?id=de26a3cf4cc9451298ea173c4b324736) | ![streets-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets.jpg) + * `streets-night-vector` | [World Street Map (Night) [v2]](https://www.arcgis.com/home/item.html?id=86f556a2d1fd468181855a35e344567f) | ![streets-night-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-night.jpg) + * `streets-navigation-vector` | [World Navigation Map [v2]](https://www.arcgis.com/home/item.html?id=63c47b7177f946b49902c24129b87252) | ![streets-navigation-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-navigation.jpg) + * `topo-vector` | https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer and [World Topographic Map [v2]](https://www.arcgis.com/home/item.html?id=7dc6cea0b1764a1f9af2e679f642f0f5) | ![topo-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/topo.jpg) + * `streets-relief-vector` | https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer and [World Street Map (with Relief) [v2]](https://www.arcgis.com/home/item.html?id=b266e6d17fc345b498345613930fbd76) | ![streets-relief-vector](https://developers.arcgis.com/javascript/assets/img/apiref/basemap/streets-relief.jpg) * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) @@ -15581,6 +17135,1128 @@ declare namespace __esri { */ export type pointCloudRenderersPointCloudUniqueValueRenderer = PointCloudUniqueValueRenderer; + /** + * A convenience module for importing [Content](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-Content.html) classes when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/guide/typescript-setup/index.html). For example, rather than importing content elements one at a time like this: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html) + */ + namespace content { + /** + * Popup content element types. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#Content) + */ + export type Content = __esri.TextContent | __esri.MediaContent | __esri.FieldsContent | __esri.AttachmentsContent; + + /** + * TextContent defines descriptive text as an element within the [PopupTemplate's](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#TextContent) + */ + export type TextContent = __esri.TextContent; + export const TextContent: typeof __esri.TextContent; + + /** + * MediaContent contains an individual or array of chart and/or image media elements to display within a popup's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#MediaContent) + */ + export type MediaContent = __esri.MediaContent; + export const MediaContent: typeof __esri.MediaContent; + + /** + * FieldsContent represents the [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) associated with a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#FieldsContent) + */ + export type FieldsContent = __esri.FieldsContent; + export const FieldsContent: typeof __esri.FieldsContent; + + /** + * AttachmentsContent represents an attachment element associated with a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content.html#AttachmentsContent) + */ + export type AttachmentsContent = __esri.AttachmentsContent; + export const AttachmentsContent: typeof __esri.AttachmentsContent; + } + + interface AttachmentsContent extends Content, JSONSupport { + /** + * An array of [AttachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) objects used to display within the popup's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#attachmentInfos) + */ + attachmentInfos: AttachmentInfo; + /** + * A string value indicating how to display the attachment. Possible values are: preview | list If `list` is specified, attachments show as links. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#displayType) + */ + displayType: string; + } + + interface AttachmentsContentConstructor { + /** + * An `AttachmentsContent` popup element represents an attachment element associated with a feature. This resource is available only if the [FeatureLayer.capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html) + */ + + new (properties?: AttachmentsContentProperties): AttachmentsContent; + + fromJSON(json: any): AttachmentsContent; + } + + export const AttachmentsContent: AttachmentsContentConstructor; + + interface AttachmentsContentProperties extends ContentProperties { + /** + * An array of [AttachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) objects used to display within the popup's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#attachmentInfos) + */ + attachmentInfos?: AttachmentInfoProperties; + /** + * A string value indicating how to display the attachment. Possible values are: preview | list If `list` is specified, attachments show as links. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html#displayType) + */ + displayType?: string; + } + + interface BarChartMediaInfo extends JSONSupport, MediaInfo, ChartMediaInfo { + /** + * Indicates the type of chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-BarChartMediaInfo.html#type) + * + * @default bar-chart + */ + readonly type: string; + + /** + * Creates a deep clone of the BarChartMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-BarChartMediaInfo.html#clone) + * + * + */ + clone(): BarChartMediaInfo; + } + + interface BarChartMediaInfoConstructor { + /** + * A `BarChartMediaInfo` is a type of chart media element that represents a bar chart displayed within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-BarChartMediaInfo.html) + */ + + new (properties?: BarChartMediaInfoProperties): BarChartMediaInfo; + + fromJSON(json: any): BarChartMediaInfo; + } + + export const BarChartMediaInfo: BarChartMediaInfoConstructor; + + interface BarChartMediaInfoProperties extends MediaInfoProperties, ChartMediaInfoProperties {} + + interface ColumnChartMediaInfo extends JSONSupport, MediaInfo, ChartMediaInfo { + /** + * Indicates the type of chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ColumnChartMediaInfo.html#type) + * + * @default column-chart + */ + readonly type: string; + + /** + * Creates a deep clone of the ColumnChartMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ColumnChartMediaInfo.html#clone) + * + * + */ + clone(): ColumnChartMediaInfo; + } + + interface ColumnChartMediaInfoConstructor { + /** + * A `ColumnChartMediaInfo` is a type of chart media element that represents a column chart displayed within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ColumnChartMediaInfo.html) + */ + + new (properties?: ColumnChartMediaInfoProperties): ColumnChartMediaInfo; + + fromJSON(json: any): ColumnChartMediaInfo; + } + + export const ColumnChartMediaInfo: ColumnChartMediaInfoConstructor; + + interface ColumnChartMediaInfoProperties extends MediaInfoProperties, ChartMediaInfoProperties {} + + interface Content extends Accessor, JSONSupport { + /** + * The type of popup element displayed. **Possible values**: text | fields | media | attachments + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-Content.html#type) + */ + readonly type: string; + } + + interface ContentConstructor { + /** + * Content elements define what should display within the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. There are four specific element types: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-Content.html) + */ + + new (properties?: ContentProperties): Content; + + fromJSON(json: any): Content; + } + + export const Content: ContentConstructor; + + interface ContentProperties {} + + interface FieldsContent extends Content, JSONSupport { + /** + * Array of [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). If the `fieldInfos` property is not provided directly within the content, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html#fieldInfos) + */ + fieldInfos: FieldInfo[]; + + /** + * Creates a deep clone of the FieldsContent class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html#clone) + * + * + */ + clone(): FieldsContent; + } + + interface FieldsContentConstructor { + /** + * A `FieldsContent` popup element represents the [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html) associated with a feature. If this is not set within the content, it will revert to whatever may be set within the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html) + */ + + new (properties?: FieldsContentProperties): FieldsContent; + + fromJSON(json: any): FieldsContent; + } + + export const FieldsContent: FieldsContentConstructor; + + interface FieldsContentProperties extends ContentProperties { + /** + * Array of [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). If the `fieldInfos` property is not provided directly within the content, the popup will display whatever is set in the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html#fieldInfos) + */ + fieldInfos?: FieldInfoProperties[]; + } + + interface ImageMediaInfo extends JSONSupport, MediaInfo { + /** + * Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of `0` indicates auto refresh is not enabled. If the property does not exist, it is equivalent to having a value of `0`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#refreshInterval) + */ + refreshInterval: number; + /** + * The type of popup element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#type) + * + * @default image + */ + readonly type: string; + /** + * Defines the value format of the image media element and how the images should be retrieved. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#value) + */ + value: ImageMediaInfoValue; + + /** + * Creates a deep clone of the ImageMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#clone) + * + * + */ + clone(): ImageMediaInfo; + } + + interface ImageMediaInfoConstructor { + /** + * An `ImageMediaInfo` is a type of media element that represents images to display within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html) + */ + + new (properties?: ImageMediaInfoProperties): ImageMediaInfo; + + fromJSON(json: any): ImageMediaInfo; + } + + export const ImageMediaInfo: ImageMediaInfoConstructor; + + interface ImageMediaInfoProperties extends MediaInfoProperties { + /** + * Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of `0` indicates auto refresh is not enabled. If the property does not exist, it is equivalent to having a value of `0`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#refreshInterval) + */ + refreshInterval?: number; + /** + * Defines the value format of the image media element and how the images should be retrieved. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-ImageMediaInfo.html#value) + */ + value?: ImageMediaInfoValueProperties; + } + + interface LineChartMediaInfo extends JSONSupport, MediaInfo, ChartMediaInfo { + /** + * Indicates the type of chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-LineChartMediaInfo.html#type) + * + * @default line-chart + */ + readonly type: string; + + /** + * Creates a deep clone of the LineChartMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-LineChartMediaInfo.html#clone) + * + * + */ + clone(): LineChartMediaInfo; + } + + interface LineChartMediaInfoConstructor { + /** + * A `LineChartMediaInfo` is a type of chart media element that represents a line chart displayed within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-LineChartMediaInfo.html) + */ + + new (properties?: LineChartMediaInfoProperties): LineChartMediaInfo; + + fromJSON(json: any): LineChartMediaInfo; + } + + export const LineChartMediaInfo: LineChartMediaInfoConstructor; + + interface LineChartMediaInfoProperties extends MediaInfoProperties, ChartMediaInfoProperties {} + + interface MediaContent extends Content, JSONSupport { + /** + * Contains the media elements representing images or charts to display within the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). This can be an individual chart or image element, or an array containing a combination of any of these types. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#mediaInfos) + */ + mediaInfos: + | BarChartMediaInfo + | ColumnChartMediaInfo + | ImageMediaInfo + | LineChartMediaInfo + | PieChartMediaInfo + | any[]; + + /** + * Creates a deep clone of the MediaContent class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#clone) + * + * + */ + clone(): MediaContent; + } + + interface MediaContentConstructor { + /** + * A `MediaContent` popup element contains an individual or array of chart and/or image media elements to display within a popup's content. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html) + */ + + new (properties?: MediaContentProperties): MediaContent; + + fromJSON(json: any): MediaContent; + } + + export const MediaContent: MediaContentConstructor; + + interface MediaContentProperties extends ContentProperties { + /** + * Contains the media elements representing images or charts to display within the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). This can be an individual chart or image element, or an array containing a combination of any of these types. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html#mediaInfos) + */ + mediaInfos?: + | BarChartMediaInfoProperties + | ColumnChartMediaInfoProperties + | ImageMediaInfoProperties + | LineChartMediaInfoProperties + | PieChartMediaInfoProperties + | any[]; + } + + interface ChartMediaInfo { + /** + * Defines the chart value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-ChartMediaInfo.html#value) + */ + value: ChartMediaInfoValue; + } + + interface ChartMediaInfoConstructor { + new (): ChartMediaInfo; + } + + export const ChartMediaInfo: ChartMediaInfoConstructor; + + interface ChartMediaInfoProperties { + /** + * Defines the chart value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-ChartMediaInfo.html#value) + */ + value?: ChartMediaInfoValueProperties; + } + + interface MediaInfo { + /** + * Defines a caption for the media. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-MediaInfo.html#caption) + */ + caption: string; + /** + * The title of the media element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-MediaInfo.html#title) + */ + title: string; + } + + interface MediaInfoConstructor { + new (): MediaInfo; + } + + export const MediaInfo: MediaInfoConstructor; + + interface MediaInfoProperties { + /** + * Defines a caption for the media. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-MediaInfo.html#caption) + */ + caption?: string; + /** + * The title of the media element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-mixins-MediaInfo.html#title) + */ + title?: string; + } + + interface PieChartMediaInfo extends JSONSupport, MediaInfo, ChartMediaInfo { + /** + * Indicates the type of chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-PieChartMediaInfo.html#type) + * + * @default pie-chart + */ + readonly type: string; + + /** + * Creates a deep clone of the PieChartMediaInfo class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-PieChartMediaInfo.html#clone) + * + * + */ + clone(): PieChartMediaInfo; + } + + interface PieChartMediaInfoConstructor { + /** + * A `PieChartMediaInfo` is a type of chart media element that represents a pie chart displayed within a popup. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-PieChartMediaInfo.html) + */ + + new (properties?: PieChartMediaInfoProperties): PieChartMediaInfo; + + fromJSON(json: any): PieChartMediaInfo; + } + + export const PieChartMediaInfo: PieChartMediaInfoConstructor; + + interface PieChartMediaInfoProperties extends MediaInfoProperties, ChartMediaInfoProperties {} + + interface ChartMediaInfoValue extends Accessor, JSONSupport { + /** + * An array of strings, with each string containing the name of a field to display in the chart. + * > In order to work with related fields within a chart, the fields must also be set in the [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#fields) + */ + fields: string[]; + /** + * A string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#normalizeField) + */ + normalizeField: string; + /** + * An array of [ChartMediaInfoValueSeries](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html) objects which provide information of x/y data data that is plotted in a chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#series) + */ + series: ChartMediaInfoValueSeries[]; + /** + * String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#tooltipField) + */ + tooltipField: string; + } + + interface ChartMediaInfoValueConstructor { + new (properties?: ChartMediaInfoValueProperties): ChartMediaInfoValue; + + fromJSON(json: any): ChartMediaInfoValue; + } + + export const ChartMediaInfoValue: ChartMediaInfoValueConstructor; + + interface ChartMediaInfoValueProperties { + /** + * An array of strings, with each string containing the name of a field to display in the chart. + * > In order to work with related fields within a chart, the fields must also be set in the [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-FieldInfo.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#fields) + */ + fields?: string[]; + /** + * A string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#normalizeField) + */ + normalizeField?: string; + /** + * An array of [ChartMediaInfoValueSeries](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html) objects which provide information of x/y data data that is plotted in a chart. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#series) + */ + series?: ChartMediaInfoValueSeriesProperties[]; + /** + * String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValue.html#tooltipField) + */ + tooltipField?: string; + } + + interface ChartMediaInfoValueSeries extends Accessor { + /** + * String value indicating the tooltip for a series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#tooltipField) + */ + tooltipField: string; + /** + * Numerical value indicating the x-value for the chart series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#x) + */ + x: number; + /** + * Numerical value indicating the y-value for the chart series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#y) + */ + y: number; + + /** + * Creates a deep clone of the ChartMediaInfoValueSeries class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#clone) + * + * + */ + clone(): ChartMediaInfoValueSeries; + } + + interface ChartMediaInfoValueSeriesConstructor { + new (properties?: ChartMediaInfoValueSeriesProperties): ChartMediaInfoValueSeries; + } + + export const ChartMediaInfoValueSeries: ChartMediaInfoValueSeriesConstructor; + + interface ChartMediaInfoValueSeriesProperties { + /** + * String value indicating the tooltip for a series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#tooltipField) + */ + tooltipField?: string; + /** + * Numerical value indicating the x-value for the chart series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#x) + */ + x?: number; + /** + * Numerical value indicating the y-value for the chart series. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ChartMediaInfoValueSeries.html#y) + */ + y?: number; + } + + interface ImageMediaInfoValue extends Accessor, JSONSupport { + /** + * A string containing a URL to be launched in a browser when a user clicks the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#linkURL) + */ + linkURL: string; + /** + * A string containing the URL to the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#sourceURL) + */ + sourceURL: string; + + /** + * Creates a deep clone of the ImageMediaInfoValue class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#clone) + * + * + */ + clone(): ImageMediaInfoValue; + } + + interface ImageMediaInfoValueConstructor { + new (properties?: ImageMediaInfoValueProperties): ImageMediaInfoValue; + + fromJSON(json: any): ImageMediaInfoValue; + } + + export const ImageMediaInfoValue: ImageMediaInfoValueConstructor; + + interface ImageMediaInfoValueProperties { + /** + * A string containing a URL to be launched in a browser when a user clicks the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#linkURL) + */ + linkURL?: string; + /** + * A string containing the URL to the image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-support-ImageMediaInfoValue.html#sourceURL) + */ + sourceURL?: string; + } + + interface TextContent extends Content, JSONSupport { + /** + * The formatted string content to display. This may contain a field name enclosed in `{}`, such as `{FIELDNAME}`, or an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression name, referenced as `{expression/EXPRESSIONNAME}`. Text content may also leverage HTML tags such as ``, `

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

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

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

`, and `
` for formatting the look and feel of the content. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement-Text.html#text) - */ - text?: string; - } - - /** - * AttachmentsContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Attachments) - */ - export type ContentElementAttachments = Attachments; - - /** - * Popup content element types. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#ContentElement) - */ - export type supportContentElementContentElement = Text | Media | Fields | Attachments; - - /** - * FieldsContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Fields) - */ - export type ContentElementFields = Fields; - - /** - * MediaContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Media) - */ - export type ContentElementMedia = Media; - - /** - * TextContentElement. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ContentElement.html#Text) - */ - export type ContentElementText = Text; - - interface ExpressionInfo extends Accessor, JSONSupport { - /** - * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression evaluating to either a string, number, dictionary, or array. This expression can reference field values using the `$feature` global variable and perform mathematical calculations and logical evaluations at runtime. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#expression) - */ - expression: string; - /** - * The name of the expression. This is used to reference the value of the given `expression` in the popupTemplate's [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) property by wrapping it in curly braces and prefacing it with `expression/` (e.g. `{expression/expressionName}`). See the code snippets below for more examples. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#name) - */ - name: string; - /** - * Indicates the return type of the Arcade expression. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#returnType) - */ - returnType: string | number; - /** - * The title used to describe the value returned by the expression in the popup. This will display if the value is referenced in a [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) table. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#title) - */ - title: string; - - /** - * Creates a deep clone of the ExpressionInfo class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#clone) - * - * - */ - clone(): ExpressionInfo; - } - - interface ExpressionInfoConstructor { - new (properties?: ExpressionInfoProperties): ExpressionInfo; - - fromJSON(json: any): ExpressionInfo; - } - - export const ExpressionInfo: ExpressionInfoConstructor; - - interface ExpressionInfoProperties { - /** - * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression evaluating to either a string, number, dictionary, or array. This expression can reference field values using the `$feature` global variable and perform mathematical calculations and logical evaluations at runtime. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#expression) - */ - expression?: string; - /** - * The name of the expression. This is used to reference the value of the given `expression` in the popupTemplate's [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) property by wrapping it in curly braces and prefacing it with `expression/` (e.g. `{expression/expressionName}`). See the code snippets below for more examples. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#name) - */ - name?: string; - /** - * Indicates the return type of the Arcade expression. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#returnType) - */ - returnType?: string | number; - /** - * The title used to describe the value returned by the expression in the popup. This will display if the value is referenced in a [FieldInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html) table. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-ExpressionInfo.html#title) - */ - title?: string; - } - - interface FieldInfo extends Accessor, JSONSupport { - /** - * The field name as defined by the service or the `name` of an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression. Arcade expression names are defined in the [expressionInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#expressionInfos) property. When referencing Arcade expressions, you must preface the name with `expression/`, such as `expression/percent-total`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#fieldName) - */ - fieldName: string; - /** - * Class which provides formatting options for numerical or date fields and how they should display within a popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#format) - */ - format: FieldInfoFormat; - /** - * A Boolean determining whether users can edit this field. This is not applicable to Arcade expressions. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#isEditable) - * - * @default false - */ - isEditable: boolean; - /** - * A string containing the field alias. Not applicable to Arcade expressions as the title is used instead. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#label) - */ - label: string; - /** - * Used in a `one:many` or `many:many` relationship to compute the statistics on the field to show in the popup. If the property is present, must be one of the following values: **Possible Values:** count | sum | min | max | avg | stddev | var - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#statisticType) - */ - statisticType: string; - /** - * A string determining what type of input box editors see when editing the field. Applies only to string fields. This is not applicable to Arcade expressions. If this property is present, it must be one of the following values: **Possible Values:** rich-text | text-area | text-box - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#stringFieldOption) - * - * @default text-box - */ - stringFieldOption: string; - /** - * A string providing an editing hint for editors of the field. This is not applicable to Arcade expressions. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#tooltip) - */ - tooltip: string; - /** - * Indicates whether the field is visible in the popup window. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#visible) - * - * @default true - */ - visible: boolean; - - /** - * Creates a deep clone of the FieldInfo class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#clone) - * - * - */ - clone(): FieldInfo; - } - - interface FieldInfoConstructor { - new (properties?: FieldInfoProperties): FieldInfo; - - fromJSON(json: any): FieldInfo; - } - - export const FieldInfo: FieldInfoConstructor; - - interface FieldInfoProperties { - /** - * The field name as defined by the service or the `name` of an [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression. Arcade expression names are defined in the [expressionInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#expressionInfos) property. When referencing Arcade expressions, you must preface the name with `expression/`, such as `expression/percent-total`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#fieldName) - */ - fieldName?: string; - /** - * Class which provides formatting options for numerical or date fields and how they should display within a popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#format) - */ - format?: FieldInfoFormatProperties; - /** - * A Boolean determining whether users can edit this field. This is not applicable to Arcade expressions. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#isEditable) - * - * @default false - */ - isEditable?: boolean; - /** - * A string containing the field alias. Not applicable to Arcade expressions as the title is used instead. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#label) - */ - label?: string; - /** - * Used in a `one:many` or `many:many` relationship to compute the statistics on the field to show in the popup. If the property is present, must be one of the following values: **Possible Values:** count | sum | min | max | avg | stddev | var - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#statisticType) - */ - statisticType?: string; - /** - * A string determining what type of input box editors see when editing the field. Applies only to string fields. This is not applicable to Arcade expressions. If this property is present, it must be one of the following values: **Possible Values:** rich-text | text-area | text-box - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#stringFieldOption) - * - * @default text-box - */ - stringFieldOption?: string; - /** - * A string providing an editing hint for editors of the field. This is not applicable to Arcade expressions. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#tooltip) - */ - tooltip?: string; - /** - * Indicates whether the field is visible in the popup window. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo.html#visible) - * - * @default true - */ - visible?: boolean; - } - - interface FieldInfoFormat extends Accessor, JSONSupport { - /** - * Used only with `Date` fields. Specifies how the date should appear in a popup. **Possible Values**: short-date | short-date-le | long-date | day-short-month-year | long-month-day-year | short-date-long-time | short-date-le-long-time | short-date-short-time | short-date-le-short-time | short-date-short-time-24 | short-date-le-short-time-24 | short-date-short-time-24 | short-date-le-short-time-24 | long-month-year | short-month-year | year - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#dateFormat) - */ - dateFormat: string; - /** - * Used only with `Number` fields. A value of `true` indicates the number should have a digit (or thousands) separator when the value appears in popups. A value of `false` means that no separator will be used. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#digitSeparator) - * - * @default false - */ - digitSeparator: boolean; - /** - * Used only with `Number` fields to specify the number of supported decimal places that should appear in popups. Any places beyond this value are rounded. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#places) - */ - places: number; - } - - interface FieldInfoFormatConstructor { - /** - * An object used with numerical or date fields to provide more detail about how the value should be displayed in a popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html) - */ - - new (properties?: FieldInfoFormatProperties): FieldInfoFormat; - - fromJSON(json: any): FieldInfoFormat; - } - - export const FieldInfoFormat: FieldInfoFormatConstructor; - - interface FieldInfoFormatProperties { - /** - * Used only with `Date` fields. Specifies how the date should appear in a popup. **Possible Values**: short-date | short-date-le | long-date | day-short-month-year | long-month-day-year | short-date-long-time | short-date-le-long-time | short-date-short-time | short-date-le-short-time | short-date-short-time-24 | short-date-le-short-time-24 | short-date-short-time-24 | short-date-le-short-time-24 | long-month-year | short-month-year | year - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#dateFormat) - */ - dateFormat?: string; - /** - * Used only with `Number` fields. A value of `true` indicates the number should have a digit (or thousands) separator when the value appears in popups. A value of `false` means that no separator will be used. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#digitSeparator) - * - * @default false - */ - digitSeparator?: boolean; - /** - * Used only with `Number` fields to specify the number of supported decimal places that should appear in popups. Any places beyond this value are rounded. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-FieldInfo-Format.html#places) - */ - places?: number; - } - - interface LayerOptions extends Accessor, JSONSupport { - /** - * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). Indicates whether records without data should display within the popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayerOptions.html#showNoDataRecords) - * - * @default true - */ - showNoDataRecords: boolean; - - /** - * Creates a deep clone of the LayerOptions class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayerOptions.html#clone) - * - * - */ - clone(): LayerOptions; - } - - interface LayerOptionsConstructor { - new (properties?: LayerOptionsProperties): LayerOptions; - - fromJSON(json: any): LayerOptions; - } - - export const LayerOptions: LayerOptionsConstructor; - - interface LayerOptionsProperties { - /** - * Applicable to [Imagery Layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html). Indicates whether records without data should display within the popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayerOptions.html#showNoDataRecords) - * - * @default true - */ - showNoDataRecords?: boolean; - } - interface LayersMixin { /** * A collection of operational [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html). This property only contains interactive operational layers, such as [FeatureLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [WebTileLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WebTileLayer.html) and {@link module:esri/layers/GraphicsLayer GraphicsLayers} that may be queried, assigned different renderers, analyzed, etc. It does not include [basemaps](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html). A [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) is a collection of one or more features, or {@link module:esri/Graphic graphics}, that represent real-world phenomena. Each feature contains a {@link module:esri/symbols/Symbol symbol} and [geographic data](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) that allows it to be rendered on the map as a graphic with spatial context. Features within the layer may also contain data attributes that provide additional information that may be viewed in [popup windows](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) and used for {@link module:esri/renderers/Renderer rendering the layer}. Layers may be added in the [constructor](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#constructors-summary), with the [add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#add) or [addMany()](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#addMany) methods, or directly to the layers collection using [add()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#add) or [addMany()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#addMany). @@ -28295,11 +31067,11 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#add) * - * @param layer Layer or a Promise<Layer> to be added to the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). + * @param layer Layer or a promise that resolves to a layer to add to the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). * @param index A layer can be added at a specified index in the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). If no index is specified or the index specified is greater than the current number of layers, the layer is automatically appended to the list of layers in the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers) and the index is normalized. * */ - add(layer: Layer | IPromise, index?: number): void; + add(layer: Layer | IPromise, index?: number): void; /** * Adds a layer or an array of layers to the [layers collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-LayersMixin.html#layers). * @@ -28381,100 +31153,6 @@ declare namespace __esri { layers?: CollectionProperties | LayerProperties[]; } - interface RelatedRecordsInfo extends Accessor, JSONSupport { - /** - * An array of [FieldOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html) objects indicating the field display order for the related records and whether they should be sorted in ascending `asc` or descending `desc` order. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#orderByFields) - */ - orderByFields: FieldOrder[]; - /** - * Indicates whether to display related records in the popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#showRelatedRecords) - */ - showRelatedRecords: boolean; - - /** - * Creates a deep clone of the RelatedRecordsInfo class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#clone) - * - * - */ - clone(): RelatedRecordsInfo; - } - - interface RelatedRecordsInfoConstructor { - new (properties?: RelatedRecordsInfoProperties): RelatedRecordsInfo; - - fromJSON(json: any): RelatedRecordsInfo; - } - - export const RelatedRecordsInfo: RelatedRecordsInfoConstructor; - - interface RelatedRecordsInfoProperties { - /** - * An array of [FieldOrder](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html) objects indicating the field display order for the related records and whether they should be sorted in ascending `asc` or descending `desc` order. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#orderByFields) - */ - orderByFields?: FieldOrderProperties[]; - /** - * Indicates whether to display related records in the popup. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo.html#showRelatedRecords) - */ - showRelatedRecords?: boolean; - } - - interface FieldOrder extends Accessor, JSONSupport { - /** - * The attribute value of the field selected that will drive the sorting of related records. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#field) - */ - field: string; - /** - * Set the ascending or descending sort order of the returned related records. **Possible Values**: asc | desc - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#order) - */ - order: string; - - /** - * Creates a deep clone of the FieldOrder class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#clone) - * - * - */ - clone(): FieldOrder; - } - - interface FieldOrderConstructor { - new (properties?: FieldOrderProperties): FieldOrder; - - fromJSON(json: any): FieldOrder; - } - - export const FieldOrder: FieldOrderConstructor; - - interface FieldOrderProperties { - /** - * The attribute value of the field selected that will drive the sorting of related records. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#field) - */ - field?: string; - /** - * Set the ascending or descending sort order of the returned related records. **Possible Values**: asc | desc - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-RelatedRecordsInfo-FieldOrder.html#order) - */ - order?: string; - } - /** * A convenience module for importing [Symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html) classes when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/guide/typescript-setup/index.html). For example, rather than importing symbols one at a time like this: * @@ -28756,7 +31434,7 @@ declare namespace __esri { */ border: LineCallout3DBorder; /** - * The color of the callout line. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the callout line. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html#color) * @@ -28810,7 +31488,7 @@ declare namespace __esri { */ border?: LineCallout3DBorderProperties; /** - * The color of the callout line. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the callout line. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html#color) * @@ -28835,18 +31513,18 @@ declare namespace __esri { export interface LineCallout3DBorderProperties extends Object { /** - * The color of the callout line border. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the callout line border. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html#border) * * @default white */ - color?: Color; + color?: Color | number[] | string; } export interface LineCallout3DBorder extends AnonymousAccessor { /** - * The color of the callout line border. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the callout line border. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-LineCallout3D.html#border) * @@ -28857,7 +31535,7 @@ declare namespace __esri { interface Edges3D extends Accessor, JSONSupport { /** - * The color of the edges. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the edges. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#color) * @@ -28907,7 +31585,7 @@ declare namespace __esri { interface Edges3DProperties { /** - * The color of the edges. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the edges. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-edges-Edges3D.html#color) * @@ -29015,6 +31693,14 @@ declare namespace __esri { } interface ExtrudeSymbol3DLayer extends Symbol3DLayer { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows: boolean; /** * Sets the contour edges on polygons symbolized with ExtrudeSymbol3DLayer. * @@ -29061,6 +31747,14 @@ declare namespace __esri { export const ExtrudeSymbol3DLayer: ExtrudeSymbol3DLayerConstructor; interface ExtrudeSymbol3DLayerProperties extends Symbol3DLayerProperties { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows?: boolean; /** * Sets the contour edges on polygons symbolized with ExtrudeSymbol3DLayer. * @@ -29110,6 +31804,14 @@ declare namespace __esri { } interface FillSymbol3DLayer extends Symbol3DLayer { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). This property applies only to [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) symbols. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows: boolean; /** * Sets the contour edges on 3D Objects. This is only applicable for [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html). ![symbol3D-edges-solid](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbol3d-edges-solid-2.png) * @@ -29154,6 +31856,14 @@ declare namespace __esri { export const FillSymbol3DLayer: FillSymbol3DLayerConstructor; interface FillSymbol3DLayerProperties extends Symbol3DLayerProperties { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). This property applies only to [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html) symbols. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows?: boolean; /** * Sets the contour edges on 3D Objects. This is only applicable for [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html). ![symbol3D-edges-solid](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbol3d-edges-solid-2.png) * @@ -29170,7 +31880,7 @@ declare namespace __esri { export interface FillSymbol3DLayerOutlineProperties extends Object { /** - * The color of the outline. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the outline. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#outline) */ @@ -29185,7 +31895,7 @@ declare namespace __esri { export interface FillSymbol3DLayerOutline extends AnonymousAccessor { /** - * The color of the outline. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the outline. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#outline) */ @@ -29318,6 +32028,12 @@ declare namespace __esri { * @default center */ anchor: string; + /** + * Defines the [anchor](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchor) relative to the center of the icon. It is specified as a ratio of the icon's dimensions. For example, a value of `{ x: 0, y: 0 }` designates the center of the icon, while a value of `{ x: -0.5, y: -0.5 }` causes the top-left corner of the icon to coincide with the feature geometry. This property only applies when [anchor](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchor) is set to `relative`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchorPosition) + */ + anchorPosition: IconSymbol3DLayerAnchorPosition; /** * The outline of the icon. * @@ -29326,6 +32042,7 @@ declare namespace __esri { outline: IconSymbol3DLayerOutline; /** * The shape (`primitive`) or image URL (`href`) used to visualize the features. If both properties are present, `href` takes precedence and `primitive` is ignored. + * > **Known Limitations** Using this property to render an SVG path is not supported in IE11. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#resource) * @@ -29380,6 +32097,12 @@ declare namespace __esri { * @default center */ anchor?: string; + /** + * Defines the [anchor](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchor) relative to the center of the icon. It is specified as a ratio of the icon's dimensions. For example, a value of `{ x: 0, y: 0 }` designates the center of the icon, while a value of `{ x: -0.5, y: -0.5 }` causes the top-left corner of the icon to coincide with the feature geometry. This property only applies when [anchor](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchor) is set to `relative`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchorPosition) + */ + anchorPosition?: IconSymbol3DLayerAnchorPosition; /** * The outline of the icon. * @@ -29388,6 +32111,7 @@ declare namespace __esri { outline?: IconSymbol3DLayerOutlineProperties; /** * The shape (`primitive`) or image URL (`href`) used to visualize the features. If both properties are present, `href` takes precedence and `primitive` is ignored. + * > **Known Limitations** Using this property to render an SVG path is not supported in IE11. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#resource) * @@ -29404,9 +32128,24 @@ declare namespace __esri { size?: number | string; } + export interface IconSymbol3DLayerAnchorPosition extends Object { + /** + * Value defining the position relative to the icon's width. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchorPosition) + */ + x: number; + /** + * Value defining the position relative to the icon's height. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#anchorPosition) + */ + y: number; + } + export interface IconSymbol3DLayerOutlineProperties extends Object { /** - * The color of the outline. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the outline. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#outline) * @@ -29425,7 +32164,7 @@ declare namespace __esri { export interface IconSymbol3DLayerOutline extends AnonymousAccessor { /** - * The color of the outline. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the outline. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#outline) * @@ -29453,6 +32192,7 @@ declare namespace __esri { * cross | ![s3d-icon-cross](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols3d-icon-cross.png) * x | ![s3d-icon-x](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols3d-icon-x.png) * kite | ![s3d-icon-kite](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols3d-icon-kite.png) + * triangle | ![s3d-icon-triangle](https://developers.arcgis.com/javascript/assets/img/apiref/symbols/symbols3d-icon-triangle.png) * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#resource) @@ -29690,7 +32430,7 @@ declare namespace __esri { interface MarkerSymbol extends Symbol { /** - * The angle of the marker in degrees. + * The angle of the marker relative to the screen in degrees. * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#angle) @@ -29700,7 +32440,6 @@ declare namespace __esri { angle: number; /** * The offset on the x-axis in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#xoffset) * @@ -29709,7 +32448,6 @@ declare namespace __esri { xoffset: number; /** * The offset on the y-axis in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#yoffset) * @@ -29734,7 +32472,7 @@ declare namespace __esri { interface MarkerSymbolProperties extends SymbolProperties { /** - * The angle of the marker in degrees. + * The angle of the marker relative to the screen in degrees. * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#angle) @@ -29744,7 +32482,6 @@ declare namespace __esri { angle?: number; /** * The offset on the x-axis in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#xoffset) * @@ -29753,7 +32490,6 @@ declare namespace __esri { xoffset?: number | string; /** * The offset on the y-axis in points. This value may be autocast with a string expressing size in points or pixels (e.g. `12px`). - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html#yoffset) * @@ -29817,6 +32553,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) */ anchorPosition: ObjectSymbol3DLayerAnchorPosition; + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows: boolean; /** * The depth, or diameter from north to south, of the object in meters. If `undefined`, the depth will be calculated to maintain the original proportions of the object. * @@ -29840,7 +32584,7 @@ declare namespace __esri { */ height: number; /** - * The primitive shape (`primitive`) or external 3D model (`href`) used to visualize the points. If both properties are present, `primitive` takes precedence and `href` is ignored. When using the `href` property, external 3D models must be present in a specific format, which can be generated using the ArcGIS Pro SDK. [See these instructions](https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/ExportWeb3DObjectResource#exportweb3dobjectresource) to learn how to generate a custom 3D model for use in this property. + * The primitive shape (`primitive`) or external 3D model (`href`) used to visualize the points. If both properties are present, `primitive` takes precedence and `href` is ignored. When using the `href` property, external 3D models must be present in glTF format. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#resource) * @@ -29919,6 +32663,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) */ anchorPosition?: ObjectSymbol3DLayerAnchorPosition; + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows?: boolean; /** * The depth, or diameter from north to south, of the object in meters. If `undefined`, the depth will be calculated to maintain the original proportions of the object. * @@ -29942,7 +32694,7 @@ declare namespace __esri { */ height?: number; /** - * The primitive shape (`primitive`) or external 3D model (`href`) used to visualize the points. If both properties are present, `primitive` takes precedence and `href` is ignored. When using the `href` property, external 3D models must be present in a specific format, which can be generated using the ArcGIS Pro SDK. [See these instructions](https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/ExportWeb3DObjectResource#exportweb3dobjectresource) to learn how to generate a custom 3D model for use in this property. + * The primitive shape (`primitive`) or external 3D model (`href`) used to visualize the points. If both properties are present, `primitive` takes precedence and `href` is ignored. When using the `href` property, external 3D models must be present in glTF format. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#resource) * @@ -29972,10 +32724,23 @@ declare namespace __esri { } export interface ObjectSymbol3DLayerAnchorPosition extends Object { + /** + * Value defining the position relative to the x axis of the bounding box. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) + */ x: number; - + /** + * Value defining the position relative to the y axis of the bounding box. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) + */ y: number; - + /** + * Value defining the position relative to the z axis of the bounding box. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#anchorPosition) + */ z: number; } @@ -29998,7 +32763,7 @@ declare namespace __esri { */ primitive?: string; /** - * The URL to the 3D model. [See these instructions](https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/ExportWeb3DObjectResource#exportweb3dobjectresource) to learn how to create a custom 3D model. + * The URL to the 3D model in glTF format. The URL should point to a glTF file (.gltf or .glb) which can reference additional binary (.bin) and image files (.jpg, .png). See the guide topic on [Visualizing points with 3D symbols](https://developers.arcgis.com/javascript/latest/guide/visualizing-points-3d/index.html) to learn how to use a custom 3D model. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#resource) */ @@ -30006,6 +32771,14 @@ declare namespace __esri { } interface PathSymbol3DLayer extends Symbol3DLayer { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows: boolean; /** * The diameter of the tube in meters. * @@ -30046,6 +32819,14 @@ declare namespace __esri { export const PathSymbol3DLayer: PathSymbol3DLayerConstructor; interface PathSymbol3DLayerProperties extends Symbol3DLayerProperties { + /** + * Indicates whether the symbol layer geometry casts shadows in the scene. Setting this property to `false` will disable shadows for the symbol layer even if direct shadows are enabled in [SceneView.environment](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html#castShadows) + * + * @default true + */ + castShadows?: boolean; /** * The diameter of the tube in meters. * @@ -30220,6 +33001,9 @@ declare namespace __esri { * * Use an [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#url) hosted on the same domain as the application. * * Install a proxy. * + * + * > **Known Limitations** Using this property to render SVG paths as images is not supported in IE11. + * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#url) */ url: string; @@ -30271,6 +33055,9 @@ declare namespace __esri { * * Use an [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#url) hosted on the same domain as the application. * * Install a proxy. * + * + * > **Known Limitations** Using this property to render SVG paths as images is not supported in IE11. + * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html#url) */ url?: string; @@ -30290,7 +33077,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PointSymbol3D.html#callout) */ - callout: Callout3D; + callout: LineCallout3D; /** * For PointSymbol3D the type is always `point-3d`. * @@ -30334,7 +33121,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PointSymbol3D.html#callout) */ - callout?: Callout3DProperties; + callout?: LineCallout3DProperties; /** * Shifts the symbol along the vertical world axis by a given height. The height is set in screen space units like points or pixels. For points displayed with a [callout](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PointSymbol3D.html#callout) `verticalOffset` should be set. * @@ -30676,7 +33463,7 @@ declare namespace __esri { outline: SimpleLineSymbol; /** * The SVG path of the icon. - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * > **Known Limitations** This property is not supported in IE11. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html#path) */ @@ -30691,7 +33478,6 @@ declare namespace __esri { size: number; /** * The marker style. Possible values are in the table below. - * > **Known Limitations** The `triangle` value is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * Value | Description * ------|------------ @@ -30748,7 +33534,7 @@ declare namespace __esri { outline?: SimpleLineSymbolProperties; /** * The SVG path of the icon. - * > **Known Limitations** This property is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * > **Known Limitations** This property is not supported in IE11. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html#path) */ @@ -30763,7 +33549,6 @@ declare namespace __esri { size?: number | string; /** * The marker style. Possible values are in the table below. - * > **Known Limitations** The `triangle` value is currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). * * Value | Description * ------|------------ @@ -30863,9 +33648,124 @@ declare namespace __esri { symbolConfig?: string; } + interface symbolUtils { + /** + * Returns a symbol representing the input [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). This method is useful when you need to know the exact visual properties of a [Graphic's symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol), particularly when the graphic comes from the result of a [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) and its symbol properties may be empty. A symbol's properties won't be populated when a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) defines the visualization of a layer rather than symbols set individually on each graphic of a layer. This is the case for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), and any other layer that has a `renderer` property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + * + * @param symbol The graphic from which to retrieve the displayed symbol. This commonly comes from a [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) operation. + * @param options Options for generating the display symbol of the input graphic. These must be specified if the input graphic comes from a layer with a renderer that has [visual variables](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html#visualVariables) applied. See the object specification below. + * @param options.scale The [view scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) at which the symbol is displayed. + * @param options.viewingMode The [viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode) of the view, if the symbol is displayed in a SceneView. + * @param options.spatialReference The spatial reference of the view in which the symbol is displayed. + * @param options.resolution The [resolution](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#resolution) of the view at which the symbol is displayed. + * + */ + getDisplayedSymbol(symbol: Graphic, options?: symbolUtilsGetDisplayedSymbolOptions): IPromise; + /** + * Generates a preview image of a given symbol that can be displayed in a custom widget or other DOM element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + * + * @param symbol The symbol for which to generate a preview image. + * @param options Formatting options for the symbol preview image. + * @param options.node The parent node to append to the symbol. + * @param options.size The size of the symbol preview in points. + * @param options.maxSize The maximum size of the symbol preview in points. + * @param options.opacity The opacity of the layer represented by the `symbol`. + * @param options.scale Indicates whether to scale the symbol preview. + * @param options.disableUpsampling Indicates whether to disable upsampling for raster images. + * @param options.symbolConfig For "tall" symbols in portrait view, then the `tall` value should be used here. + * @param options.rotation The rotation of the symbol. + * + */ + renderPreviewHTML(symbol: Symbol, options?: symbolUtilsRenderPreviewHTMLOptions): IPromise; + } + + export const symbolUtils: symbolUtils; + + export interface symbolUtilsGetDisplayedSymbolOptions extends Object { + /** + * The [view scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) at which the symbol is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + */ + scale?: number; + /** + * The [viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode) of the view, if the symbol is displayed in a SceneView. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + */ + viewingMode?: string; + /** + * The spatial reference of the view in which the symbol is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + */ + spatialReference?: SpatialReference; + /** + * The [resolution](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#resolution) of the view at which the symbol is displayed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol) + */ + resolution?: number; + } + + export interface symbolUtilsRenderPreviewHTMLOptions extends Object { + /** + * The parent node to append to the symbol. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + node?: HTMLElement; + /** + * The size of the symbol preview in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + size?: number; + /** + * The maximum size of the symbol preview in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + maxSize?: number; + /** + * The opacity of the layer represented by the `symbol`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + opacity?: number; + /** + * Indicates whether to scale the symbol preview. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + scale?: boolean; + /** + * Indicates whether to disable upsampling for raster images. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + disableUpsampling?: boolean; + /** + * For "tall" symbols in portrait view, then the `tall` value should be used here. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + symbolConfig?: string; + /** + * The rotation of the symbol. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#renderPreviewHTML) + */ + rotation?: string; + } + interface Symbol extends Accessor, JSONSupport { /** - * The color of the symbol. This can be autocast with a named string; hex string; array of rgb or rgba values; an object with `r`, `g`, `b`, and `a` properties; or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the symbol. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html#color) * @@ -30896,7 +33796,7 @@ declare namespace __esri { interface SymbolProperties { /** - * The color of the symbol. This can be autocast with a named string; hex string; array of rgb or rgba values; an object with `r`, `g`, `b`, and `a` properties; or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the symbol. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html#color) * @@ -31098,7 +33998,8 @@ declare namespace __esri { */ rotated: boolean; /** - * The text string to display in the view. + * The text string to display in the view. Long text strings will be split into multiple lines. The maximum length of each line is equal to this formula: (512 * [font.size](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#size)) / 24. + * > **Known Limitations** This property only applies when TextSymbol is used to define the symbol property of a [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html), and not for labelling purposes. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#text) */ @@ -31240,7 +34141,8 @@ declare namespace __esri { */ rotated?: boolean; /** - * The text string to display in the view. + * The text string to display in the view. Long text strings will be split into multiple lines. The maximum length of each line is equal to this formula: (512 * [font.size](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#size)) / 24. + * > **Known Limitations** This property only applies when TextSymbol is used to define the symbol property of a [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html), and not for labelling purposes. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html#text) */ @@ -31363,7 +34265,7 @@ declare namespace __esri { export interface TextSymbol3DLayerHaloProperties extends Object { /** - * The color of the halo. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the halo. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html#halo) * @@ -31382,7 +34284,7 @@ declare namespace __esri { export interface TextSymbol3DLayerHalo extends AnonymousAccessor { /** - * The color of the halo. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the halo. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html#halo) * @@ -32141,7 +35043,7 @@ declare namespace __esri { * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - checkJobStatus(jobId: string, requestOptions?: any): IPromise; + checkJobStatus(jobId: string, requestOptions?: any): IPromise; /** * Sends a request to the server to execute a synchronous GP task. * @@ -32222,7 +35124,7 @@ declare namespace __esri { * @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request (will override requestOptions defined during construction). * */ - submitJob(params: any, requestOptions?: any): IPromise; + submitJob(params: any, requestOptions?: any): IPromise; } interface GeoprocessorConstructor { @@ -32784,50 +35686,6 @@ declare namespace __esri { gdbVersion?: string; } - /** - * The AttachmentInfo returns information about attachments associated with a feature. This resource is available only if the [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) has attachments. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - export interface QueryTaskAttachmentInfo extends Object { - /** - * The content type of the attachment. For example, `image/jpeg`. See the [ArcGIS REST API documentation](https://developers.arcgis.com/rest/services-reference/query-attachments-feature-service-layer-.htm) for more information on supported attachment types. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - contentType: string; - /** - * The identifier for the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - id: number; - /** - * The name of the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - name: string; - /** - * The parent or the feature object id of the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - parentObjectId: number; - /** - * The size of the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - size: number; - /** - * The URL of the attachment. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo) - */ - url: string; - } - interface RouteTask extends Task { /** * Solves the route against the route layer with the route parameters. @@ -32956,6 +35814,93 @@ declare namespace __esri { score?: number; } + interface AlgorithmicColorRamp extends ColorRamp { + /** + * The algorithm used to generate the colors between the `fromColor` and `toColor`. Each algorithm uses different methods for generating the intervening colors. + * + * Possible Value | Description + * ---------------|------------ + * cie-lab | Blends the from and to colors without traversing the intervening hue space. + * lab-lch | The hue, saturation, value (hsv) algorithm is a linear traverse of colors between pairs: Color 1 H to Color 2 H, Color 1 S to Color 2 S, and Color 1 V to Color 2 V. + * hsv | The lab-lch algorithm is very similar to the cie-lab but does not seek the shortest path between colors. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#algorithm) + */ + algorithm: "cie-lab" | "lab-lch" | "hsv"; + /** + * The first color in the color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#fromColor) + */ + fromColor: Color; + /** + * The last color in the color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#toColor) + */ + toColor: Color; + /** + * A string value representing the color ramp type. This value is always `algorithmic`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#type) + * + * @default algorithmic + */ + readonly type: "algorithmic"; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#clone) + * + * + */ + clone(): AlgorithmicColorRamp; + } + + interface AlgorithmicColorRampConstructor { + /** + * Create an algorithmic color ramp to define the range of colors used in the renderer generated by the GenerateRendererTask. The algorithmic color ramp is defined by specifying two colors and the algorithm used to traverse the intervening color spaces. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html) + */ + + new (properties?: AlgorithmicColorRampProperties): AlgorithmicColorRamp; + + fromJSON(json: any): AlgorithmicColorRamp; + } + + export const AlgorithmicColorRamp: AlgorithmicColorRampConstructor; + + interface AlgorithmicColorRampProperties extends ColorRampProperties { + /** + * The algorithm used to generate the colors between the `fromColor` and `toColor`. Each algorithm uses different methods for generating the intervening colors. + * + * Possible Value | Description + * ---------------|------------ + * cie-lab | Blends the from and to colors without traversing the intervening hue space. + * lab-lch | The hue, saturation, value (hsv) algorithm is a linear traverse of colors between pairs: Color 1 H to Color 2 H, Color 1 S to Color 2 S, and Color 1 V to Color 2 V. + * hsv | The lab-lch algorithm is very similar to the cie-lab but does not seek the shortest path between colors. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#algorithm) + */ + algorithm?: "cie-lab" | "lab-lch" | "hsv"; + /** + * The first color in the color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#fromColor) + */ + fromColor?: Color; + /** + * The last color in the color ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AlgorithmicColorRamp.html#toColor) + */ + toColor?: Color; + } + interface AreasAndLengthsParameters extends Accessor { /** * The area unit in which areas of polygons will be calculated. Use the strings listed below or [any other valid area unit](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.AreaUnit.Code.ACRE). **Possible Values:** acres | hectares | square-miles | square-kilometers | square-meters | square-feet | square-yards @@ -33046,12 +35991,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#attachmentTypes) */ attachmentTypes: string[]; - /** - * The definition expression to be applied to the layer. Only features that satisfy the definition expression and are in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) will be returned. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#definitionExpression) - */ - definitionExpression: string; /** * An array of globalIds for the features in the layer being queried. The query results will return attachments only for specified global ids. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. * @@ -33070,6 +36009,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) */ objectIds: number[]; + /** + * If `true`, the [exif information](http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf) for the attachment will be included in [attachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#exifInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#returnMetadata) + * + * @default false + */ + returnMetadata: boolean; /** * The file size of the attachment is specified in bytes. You can enter a file size range [1000,15000] to query for attachments. The query result will return all attachments within the specified file size range (1000 - 15000). Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. * @@ -33082,6 +36029,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#start) */ start: number; + /** + * The `where` clause to be applied to the layer. Only features that satisfy the `where` clause and are in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) will be returned. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#where) + */ + where: string; /** * Creates a deep clone of AttachmentQuery object. @@ -33095,7 +36048,7 @@ declare namespace __esri { interface AttachmentQueryConstructor { /** - * This class defines parameters for executing queries for feature attachments from a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Once an AttachmentQuery object's properties are defined, it can then be passed into the [QueryTask.executeAttachmentQuery()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeAttachmentQuery) or [FeatureLayer.queryAttachments()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryAttachments) methods, which will return attachmentInfos grouped by the source feature objectIds. + * This class defines parameters for executing queries for feature attachments from a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Once an AttachmentQuery object's properties are defined, it can then be passed into the [QueryTask.executeAttachmentQuery()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#executeAttachmentQuery) or [FeatureLayer.queryAttachments()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryAttachments) methods, which will return [attachmentInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html) grouped by the source feature objectIds. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html) */ @@ -33114,12 +36067,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#attachmentTypes) */ attachmentTypes?: string[]; - /** - * The definition expression to be applied to the layer. Only features that satisfy the definition expression and are in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) will be returned. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#definitionExpression) - */ - definitionExpression?: string; /** * An array of globalIds for the features in the layer being queried. The query results will return attachments only for specified global ids. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. * @@ -33138,6 +36085,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) */ objectIds?: number[]; + /** + * If `true`, the [exif information](http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf) for the attachment will be included in [attachmentInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AttachmentInfo.html#exifInfo). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#returnMetadata) + * + * @default false + */ + returnMetadata?: boolean; /** * The file size of the attachment is specified in bytes. You can enter a file size range [1000,15000] to query for attachments. The query result will return all attachments within the specified file size range (1000 - 15000). Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. * @@ -33150,6 +36105,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#start) */ start?: number; + /** + * The `where` clause to be applied to the layer. Only features that satisfy the `where` clause and are in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#objectIds) will be returned. Requires an ArcGIS Server service 10.5 or greater and feature layer's [capabilities.query.supportsAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) to be `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-AttachmentQuery.html#where) + */ + where?: string; } interface BufferParameters extends Accessor { @@ -33257,7 +36218,7 @@ declare namespace __esri { unit?: string; } - interface ClosestFacilityParameters extends Accessor { + interface ClosestFacilityParameters extends Accessor, JSONSupport { /** * The list of network attribute names to be accumulated with the analysis, i.e., which attributes should be returned as part of the response. * @@ -33293,13 +36254,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#directionsLengthUnits) */ - directionsLengthUnits: string; + directionsLengthUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * Defines the amount of direction information returned. The default value is standard. **Possible Values:** complete | complete-no-events | instructions-only | standard | summary-only * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#directionsOutputType) */ - directionsOutputType: string; + directionsOutputType: "complete" | "complete-no-events" | "instructions-only" | "standard" | "summary-only"; /** * The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles. * @@ -33316,8 +36289,6 @@ declare namespace __esri { * When `true`, restricted network elements should be considered when finding network locations. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements: boolean; /** @@ -33349,7 +36320,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits: string; + outputGeometryPrecisionUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * The type of output lines to be generated in the result. The default is defined in the specific routing network layer used in your RouteTask. * @@ -33363,7 +36346,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#outputLines) */ - outputLines: string; + outputLines: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The well-known id of the spatial reference or the spatial reference object for the geometries returned with the analysis results. If `outSpatialReference` is not specified, the geometries are returned in the spatial reference of the map. * @@ -33399,7 +36382,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#restrictUTurns) */ - restrictUTurns: string; + restrictUTurns: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * Indicates whether the service should generate driving directions for each route. * @@ -33452,8 +36435,6 @@ declare namespace __esri { * When `true`, closest facility routes will be generated and returned in the route property of each [ClosestFacilitySolveResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilitySolveResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#returnRoutes) - * - * @default true */ returnRoutes: boolean; /** @@ -33467,7 +36448,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#timeOfDayUsage) */ - timeOfDayUsage: string; + timeOfDayUsage: "start" | "end"; /** * Options for traveling to or from the facility. Default values are defined by the network layer. * @@ -33479,13 +36460,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelDirection) */ - travelDirection: string; + travelDirection: "from-facility" | "to-facility"; /** * Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelMode) */ - travelMode: any; + travelMode: string; /** * If `true`, the hierarchy attribute for the network will be used in analysis. The default is defined in the routing network layer used by the [ClosestFacilityTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ClosestFacilityTask.html). * @@ -33494,15 +36475,6 @@ declare namespace __esri { * @default false */ useHierarchy: boolean; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface ClosestFacilityParametersConstructor { @@ -33513,6 +36485,8 @@ declare namespace __esri { */ new (properties?: ClosestFacilityParametersProperties): ClosestFacilityParameters; + + fromJSON(json: any): ClosestFacilityParameters; } export const ClosestFacilityParameters: ClosestFacilityParametersConstructor; @@ -33553,13 +36527,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#directionsLengthUnits) */ - directionsLengthUnits?: string; + directionsLengthUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * Defines the amount of direction information returned. The default value is standard. **Possible Values:** complete | complete-no-events | instructions-only | standard | summary-only * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#directionsOutputType) */ - directionsOutputType?: string; + directionsOutputType?: "complete" | "complete-no-events" | "instructions-only" | "standard" | "summary-only"; /** * The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles. * @@ -33576,8 +36562,6 @@ declare namespace __esri { * When `true`, restricted network elements should be considered when finding network locations. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements?: boolean; /** @@ -33609,7 +36593,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits?: string; + outputGeometryPrecisionUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * The type of output lines to be generated in the result. The default is defined in the specific routing network layer used in your RouteTask. * @@ -33623,7 +36619,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#outputLines) */ - outputLines?: string; + outputLines?: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The well-known id of the spatial reference or the spatial reference object for the geometries returned with the analysis results. If `outSpatialReference` is not specified, the geometries are returned in the spatial reference of the map. * @@ -33659,7 +36655,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#restrictUTurns) */ - restrictUTurns?: string; + restrictUTurns?: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * Indicates whether the service should generate driving directions for each route. * @@ -33712,8 +36708,6 @@ declare namespace __esri { * When `true`, closest facility routes will be generated and returned in the route property of each [ClosestFacilitySolveResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilitySolveResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#returnRoutes) - * - * @default true */ returnRoutes?: boolean; /** @@ -33727,7 +36721,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#timeOfDayUsage) */ - timeOfDayUsage?: string; + timeOfDayUsage?: "start" | "end"; /** * Options for traveling to or from the facility. Default values are defined by the network layer. * @@ -33739,13 +36733,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelDirection) */ - travelDirection?: string; + travelDirection?: "from-facility" | "to-facility"; /** * Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ClosestFacilityParameters.html#travelMode) */ - travelMode?: any; + travelMode?: string; /** * If `true`, the hierarchy attribute for the network will be used in analysis. The default is defined in the routing network layer used by the [ClosestFacilityTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ClosestFacilityTask.html). * @@ -33893,9 +36887,34 @@ declare namespace __esri { routes?: GraphicProperties[]; } + interface ColorRamp extends Accessor, JSONSupport { + /** + * A string value representing the color ramp type. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ColorRamp.html#type) + */ + readonly type: "algorithmic" | "multipart"; + } + + interface ColorRampConstructor { + /** + * A ColorRamp object is used to specify a range of colors that are applied to a group of symbols or pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ColorRamp.html) + */ + + new (properties?: ColorRampProperties): ColorRamp; + + fromJSON(json: any): ColorRamp; + } + + export const ColorRamp: ColorRampConstructor; + + interface ColorRampProperties {} + interface DataFile extends Accessor, JSONSupport { /** - * The ID of the uploaded file returned as a result of the upload operation. For ArcGIS Server 10.1 and greater services that support uploads, this class can be used to specify an uploaded item as input by specifying the ItemID. + * The ID of the uploaded file returned as a result of the upload operation. For ArcGIS Server 10.1 and greater services that support uploads, this class can be used to specify an uploaded item as input by specifying the itemID. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html#itemId) */ @@ -33918,7 +36937,7 @@ declare namespace __esri { interface DataFileProperties { /** - * The ID of the uploaded file returned as a result of the upload operation. For ArcGIS Server 10.1 and greater services that support uploads, this class can be used to specify an uploaded item as input by specifying the ItemID. + * The ID of the uploaded file returned as a result of the upload operation. For ArcGIS Server 10.1 and greater services that support uploads, this class can be used to specify an uploaded item as input by specifying the itemID. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html#itemId) */ @@ -33931,7 +36950,7 @@ declare namespace __esri { url?: string; } - interface DataLayer extends Accessor { + interface DataLayer extends Accessor, JSONSupport { /** * The geometry to apply to the spatial filter. The spatial relationship as specified by [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#spatialRelationship) is applied to this geometry while performing the query. * @@ -33963,31 +36982,26 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#spatialRelationship) */ spatialRelationship: string; + + type: void; /** * A where clause for the query. Any legal SQL where clause operating on the fields in the layer is allowed. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#where) */ where: string; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#toJSON) - * - * - */ - toJSON(): any; } interface DataLayerConstructor { /** - * Input for properties of ClosestFacilityParameters,RouteParameters or ServiceAreaParameters. The DataLayer can be used to define the following for each paramater type: + * Input for properties of ClosestFacilityParameters, RouteParameters or ServiceAreaParameters. The DataLayer can be used to define the following for each parameter type: * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html) */ new (properties?: DataLayerProperties): DataLayer; + + fromJSON(json: any): DataLayer; } export const DataLayer: DataLayerConstructor; @@ -34024,6 +37038,8 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataLayer.html#spatialRelationship) */ spatialRelationship?: string; + + type?: void; /** * A where clause for the query. Any legal SQL where clause operating on the fields in the layer is allowed. * @@ -34354,11 +37370,17 @@ declare namespace __esri { */ fields: Field[]; /** - * The geometry type of the FeatureSet. + * The geometry type of features in the FeatureSet. All features's geometry must be of the same type. **Possible Values:** point | multipoint | polyline | polygon | multipatch | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#geometryType) */ geometryType: string; + /** + * The [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) used to query the features. It is useful for getting the buffer geometry generated when querying features by [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) or getting the query geometry projected in the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) of the query. The query geometry is returned only for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) and [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). The query's [returnQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnQueryGeometry) must be set to `true` and the layer's [capabilities.query.supportsQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) has to be `true` for the query to return query geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry) + */ + queryGeometry: Geometry; /** * When a FeatureSet is used as input to Geoprocessor, the spatial reference is set to the map's spatial reference by default. This value can be changed. When a FeatureSet is returned from a task, the value is the result as returned from the server. * @@ -34401,11 +37423,17 @@ declare namespace __esri { */ fields?: FieldProperties[]; /** - * The geometry type of the FeatureSet. + * The geometry type of features in the FeatureSet. All features's geometry must be of the same type. **Possible Values:** point | multipoint | polyline | polygon | multipatch | mesh * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#geometryType) */ geometryType?: string; + /** + * The [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) used to query the features. It is useful for getting the buffer geometry generated when querying features by [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) or getting the query geometry projected in the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) of the query. The query geometry is returned only for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) and [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm). The query's [returnQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnQueryGeometry) must be set to `true` and the layer's [capabilities.query.supportsQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) has to be `true` for the query to return query geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry) + */ + queryGeometry?: GeometryProperties; /** * When a FeatureSet is used as input to Geoprocessor, the spatial reference is set to the map's spatial reference by default. This value can be changed. When a FeatureSet is returned from a task, the value is the result as returned from the server. * @@ -35503,6 +38531,49 @@ declare namespace __esri { units?: string; } + interface MultipartColorRamp extends ColorRamp { + /** + * Define an array of algorithmic color ramps used to generate the multi part ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-MultipartColorRamp.html#colorRamps) + */ + colorRamps: AlgorithmicColorRamp[]; + /** + * A string value representing the color ramp type. This value is always `multipart`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-MultipartColorRamp.html#type) + * + * @default multipart + */ + readonly type: "multipart"; + + /** + * Creates a deep clone of this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-MultipartColorRamp.html#clone) + * + * + */ + clone(): MultipartColorRamp; + } + + interface MultipartColorRampConstructor { + new (properties?: MultipartColorRampProperties): MultipartColorRamp; + + fromJSON(json: any): MultipartColorRamp; + } + + export const MultipartColorRamp: MultipartColorRampConstructor; + + interface MultipartColorRampProperties extends ColorRampProperties { + /** + * Define an array of algorithmic color ramps used to generate the multi part ramp. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-MultipartColorRamp.html#colorRamps) + */ + colorRamps?: AlgorithmicColorRampProperties[]; + } + interface NAMessage extends Accessor, JSONSupport { /** * A description of the network analyst message. @@ -35511,11 +38582,11 @@ declare namespace __esri { */ description: string; /** - * The network analyst message type. + * The network analyst message type. **Possible Values:** informative | process-definition | process-start | process-stop | warning | error | empty | abort * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-NAMessage.html#type) */ - type: any; + type: string; } interface NAMessageConstructor { @@ -35534,11 +38605,11 @@ declare namespace __esri { */ description?: string; /** - * The network analyst message type. + * The network analyst message type. **Possible Values:** informative | process-definition | process-start | process-stop | warning | error | empty | abort * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-NAMessage.html#type) */ - type?: any; + type?: string; } interface OffsetParameters extends Accessor { @@ -35989,7 +39060,7 @@ declare namespace __esri { */ scalebarUnit?: string; /** - * An array of [LegendLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-LegendLayer.html) containing the id's of the layers that will be included in the legend. If `legendLayers` is not specified, all operational layers (non-tiled layers) will be present in the legend. To specify that no layers will be included in the legend set `legendLayer = []`. + * An array of [LegendLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-LegendLayer.html) containing the id's of the layers that will be included in the legend. If `legendLayers` is not specified, all operational layers (non-tiled layers) except [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) will be present in the legend. To specify that no layers will be included in the legend set `legendLayer = []`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintTemplate.html#layoutOptions) */ @@ -36288,6 +39359,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnM) */ returnM: boolean; + /** + * If `true`, the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry) will be returned with the query results. It is useful for getting the buffer geometry generated when querying features by [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) or getting the query geometry projected in the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) of the query. The query geometry is returned only for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) and [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) and if the layer's [capabilities.query.supportsQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnQueryGeometry) + * + * @default false + */ + returnQueryGeometry: boolean; /** * If `true`, and [returnGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnGeometry) is `true`, then z-values are included in the geometry. * @@ -36295,20 +39374,12 @@ declare namespace __esri { */ returnZ: boolean; /** - * For spatial queries, this parameter defines the spatial relationship to query features in the layer or layer view against the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). See the [Types of spatial relationships that can be validated](https://desktop.arcgis.com/en/arcmap/latest/extensions/data-reviewer/types-of-spatial-relationships-that-can-be-validated.htm) document for more details about each spatial relationship. The possible values are listed in the table below: + * For spatial queries, this parameter defines the spatial relationship to query features in the layer or layer view against the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). The spatial relationships discover how features are spatially related to each other. For example, you may want to know if a polygon representing a county completely contains points representing settlements. The spatial relationship is determined by whether the boundaries or interiors of a geometry intersect. + * * Boundary — The endpoints of all linear parts for line features, or the linear outline of a polygon. Only lines and polygons have boundaries. + * * Interior — Points are entirely interior and have no boundary. For lines and polygons, the interior is any part of the geometry that is not part of the boundary. * - * Value | Description - * ------|------------- - * intersects | Returns features from the layer or layer view that intersect the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * contains | Returns features from the layer or layer view that are completely contained by the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * crosses | Returns features from the layer or layer view that cross the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * envelope-intersects | Returns features from the layer or layer view that intersect the envelope (or extent) of the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * index-intersects | The envelope of the query feature class intersects the index entry for the target feature class. - * overlaps | Returns features from the layer or layer view that overlap the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * touches | Returns features from the layer or layer view that touch the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * within | Returns features from the layer or layer view that are completely within the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * relation | Allows specification of any relationship defined using the [Shape Comparison Language](http://resources.esri.com/help/9.3/arcgisengine/dotnet/concepts_start.htm#40de6491-9b2d-440d-848b-2609efcd46b1.htm). If this value is specified, then the [relationParameter](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#relationParameter) must also be specified. * + * The possible values for this parameter are described below and the images highlight the geometries returned for the specified spatial relationship for given geometries. The `intersects` spatial relationship returns features in the layer view that intersect the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/intersects.png) The `contains` spatial relationship returns features in the layer view that are completely contained by the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![contains](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/contains.png) The `crosses` spatial relationship returns features in the layer view when the interior of a query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) comes into contact with the interior or boundary of features in the layer view. In other words, the geometries share some interior area, but not all interior area. ![crosses](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/crosses.png) The `envelope-intersects` spatial relationship returns features in the layer view that intersect the envelope (or extent) of the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![envelope-intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/envelope-intersects.png) The `overlaps` spatial relationship returns features in the layer view that overlap the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). Only features of the same geometry can be compared. ![overlaps](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/overlap.png) The `touches` spatial relationship returns features in the layer view that touch the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). The boundaries of the geometries intersect, but not their interiors. ![touches](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/touches.png) The `within` spatial relationship returns features in the layer view that completely contain the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). In other words, the filter geometry is completely `within` the features in the layer view. It is opposite of `contains`. ![within](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/within.png) The `disjoint` spatial relationship returns features in the layer view that do not intersect the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) in anyway. Opposite of `intersects`. ![disjoint](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/disjoint.png) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) * @@ -36340,11 +39411,17 @@ declare namespace __esri { */ text: string; /** - * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) is specified in spatial queries. if `unit` is not specified, the unit is derived from the layer or layer view's [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html). - * > **Known Limitations** For service-based queries, this parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. - * **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * A time extent for a temporal query against [time-aware layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#timeInfo). For example, it can be used to discover all crimes that occurred during the night shift from 10 PM to 6 AM on a particular date. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#timeExtent) + */ + timeExtent: TimeExtent; + /** + * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) is specified in spatial queries. If `units` is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service data spatial reference. For service-based queries, this parameter only applies if the layer's [capabilities.query.supportsDistance](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units) + * + * @default null */ units: string; /** @@ -36568,6 +39645,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnM) */ returnM?: boolean; + /** + * If `true`, the [query geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html#queryGeometry) will be returned with the query results. It is useful for getting the buffer geometry generated when querying features by [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) or getting the query geometry projected in the [outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outSpatialReference) of the query. The query geometry is returned only for [client-side queries](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) and [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) and if the layer's [capabilities.query.supportsQueryGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnQueryGeometry) + * + * @default false + */ + returnQueryGeometry?: boolean; /** * If `true`, and [returnGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#returnGeometry) is `true`, then z-values are included in the geometry. * @@ -36575,20 +39660,12 @@ declare namespace __esri { */ returnZ?: boolean; /** - * For spatial queries, this parameter defines the spatial relationship to query features in the layer or layer view against the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). See the [Types of spatial relationships that can be validated](https://desktop.arcgis.com/en/arcmap/latest/extensions/data-reviewer/types-of-spatial-relationships-that-can-be-validated.htm) document for more details about each spatial relationship. The possible values are listed in the table below: + * For spatial queries, this parameter defines the spatial relationship to query features in the layer or layer view against the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). The spatial relationships discover how features are spatially related to each other. For example, you may want to know if a polygon representing a county completely contains points representing settlements. The spatial relationship is determined by whether the boundaries or interiors of a geometry intersect. + * * Boundary — The endpoints of all linear parts for line features, or the linear outline of a polygon. Only lines and polygons have boundaries. + * * Interior — Points are entirely interior and have no boundary. For lines and polygons, the interior is any part of the geometry that is not part of the boundary. * - * Value | Description - * ------|------------- - * intersects | Returns features from the layer or layer view that intersect the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * contains | Returns features from the layer or layer view that are completely contained by the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * crosses | Returns features from the layer or layer view that cross the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * envelope-intersects | Returns features from the layer or layer view that intersect the envelope (or extent) of the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * index-intersects | The envelope of the query feature class intersects the index entry for the target feature class. - * overlaps | Returns features from the layer or layer view that overlap the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * touches | Returns features from the layer or layer view that touch the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * within | Returns features from the layer or layer view that are completely within the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). - * relation | Allows specification of any relationship defined using the [Shape Comparison Language](http://resources.esri.com/help/9.3/arcgisengine/dotnet/concepts_start.htm#40de6491-9b2d-440d-848b-2609efcd46b1.htm). If this value is specified, then the [relationParameter](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#relationParameter) must also be specified. * + * The possible values for this parameter are described below and the images highlight the geometries returned for the specified spatial relationship for given geometries. The `intersects` spatial relationship returns features in the layer view that intersect the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/intersects.png) The `contains` spatial relationship returns features in the layer view that are completely contained by the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![contains](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/contains.png) The `crosses` spatial relationship returns features in the layer view when the interior of a query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) comes into contact with the interior or boundary of features in the layer view. In other words, the geometries share some interior area, but not all interior area. ![crosses](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/crosses.png) The `envelope-intersects` spatial relationship returns features in the layer view that intersect the envelope (or extent) of the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). ![envelope-intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/envelope-intersects.png) The `overlaps` spatial relationship returns features in the layer view that overlap the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). Only features of the same geometry can be compared. ![overlaps](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/overlap.png) The `touches` spatial relationship returns features in the layer view that touch the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). The boundaries of the geometries intersect, but not their interiors. ![touches](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/touches.png) The `within` spatial relationship returns features in the layer view that completely contain the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry). In other words, the filter geometry is completely `within` the features in the layer view. It is opposite of `contains`. ![within](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/within.png) The `disjoint` spatial relationship returns features in the layer view that do not intersect the query [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) in anyway. Opposite of `intersects`. ![disjoint](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/disjoint.png) * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) * @@ -36620,11 +39697,17 @@ declare namespace __esri { */ text?: string; /** - * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) is specified in spatial queries. if `unit` is not specified, the unit is derived from the layer or layer view's [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html). - * > **Known Limitations** For service-based queries, this parameter only applies if [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) is `true`. - * **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * A time extent for a temporal query against [time-aware layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#timeInfo). For example, it can be used to discover all crimes that occurred during the night shift from 10 PM to 6 AM on a particular date. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#timeExtent) + */ + timeExtent?: TimeExtentProperties; + /** + * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#distance) is specified in spatial queries. If `units` is not specified, the unit is derived from the geometry spatial reference. If the geometry spatial reference is not specified, the unit is derived from the feature service data spatial reference. For service-based queries, this parameter only applies if the layer's [capabilities.query.supportsDistance](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#capabilities) is `true`. **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#units) + * + * @default null */ units?: string; /** @@ -36760,7 +39843,7 @@ declare namespace __esri { */ geometries2: Geometry[]; /** - * The spatial relationship to be tested between the two input geometry arrays. See table below for a list of possible values. If the relation is specified as `relation`, the `relationParamater` parameter describes the spatial relationship and must be specified. + * The spatial relationship to be tested between the two input geometry arrays. See table below for a list of possible values. If the relation is specified as `relation`, the `relationParameter` parameter describes the spatial relationship and must be specified. * * Value | Description * ------|------------ @@ -36818,7 +39901,7 @@ declare namespace __esri { */ geometries2?: GeometryProperties[]; /** - * The spatial relationship to be tested between the two input geometry arrays. See table below for a list of possible values. If the relation is specified as `relation`, the `relationParamater` parameter describes the spatial relationship and must be specified. + * The spatial relationship to be tested between the two input geometry arrays. See table below for a list of possible values. If the relation is specified as `relation`, the `relationParameter` parameter describes the spatial relationship and must be specified. * * Value | Description * ------|------------ @@ -36848,12 +39931,6 @@ declare namespace __esri { } interface RelationshipQuery extends Accessor, JSONSupport { - /** - * The definition expression to be applied to the related table or layer. Only records in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) that satisfy the definition expression are queried for related records. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#definitionExpression) - */ - definitionExpression: string; /** * Specify the geodatabase version to query. * @@ -36910,6 +39987,12 @@ declare namespace __esri { * @default false */ returnGeometry: boolean; + /** + * The definition expression to be applied to the related table or layer. Only records in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) that satisfy the definition expression are queried for related records. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#where) + */ + where: string; /** * Creates a deep clone of RelationshipQuery object. @@ -36930,12 +40013,6 @@ declare namespace __esri { export const RelationshipQuery: RelationshipQueryConstructor; interface RelationshipQueryProperties { - /** - * The definition expression to be applied to the related table or layer. Only records in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) that satisfy the definition expression are queried for related records. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#definitionExpression) - */ - definitionExpression?: string; /** * Specify the geodatabase version to query. * @@ -36992,9 +40069,15 @@ declare namespace __esri { * @default false */ returnGeometry?: boolean; + /** + * The definition expression to be applied to the related table or layer. Only records in the list of [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#objectIds) that satisfy the definition expression are queried for related records. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RelationshipQuery.html#where) + */ + where?: string; } - interface RouteParameters extends Accessor { + interface RouteParameters extends Accessor, JSONSupport { /** * The list of network attribute names to be accumulated with the analysis. For example, which attributes should be returned as part of the response. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). You can specify any attribute names listed in the Service Directory under `Network Dataset -> Network Attributes` as `Usage Type: esriNAUTCost`. See also [Understanding the network attribute](http://resources.arcgis.com/en/help/main/10.2/index.html#//00470000000m000000). * @@ -37006,7 +40089,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#attributeParameterValues) */ - attributeParameterValues: AttributeParamValue; + attributeParameterValues: AttributeParamValue[]; /** * The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the features or url property should be specified. * @@ -37024,15 +40107,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#directionsLengthUnits) */ - directionsLengthUnits: string; + directionsLengthUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * Defines the amount of direction information returned. **Possible Values:** complete | complete-no-events | instructions-only | standard | summary-only * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#directionsOutputType) - * - * @default standard */ - directionsOutputType: string; + directionsOutputType: "complete" | "complete-no-events" | "instructions-only" | "standard" | "summary-only"; /** * The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles. * @@ -37049,8 +40142,6 @@ declare namespace __esri { * If `true`, avoids network elements restricted by barriers or restrictions specified in [restrictionAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#restrictionAttributes). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements: boolean; /** @@ -37090,21 +40181,45 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits: string; + outputGeometryPrecisionUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** - * The type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). **Possible Values:** none | straight | true-shape | true-shape-with-measure + * The type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). + * + * Possible Value | Description + * ---------------|------------ + * none | No lines are returned + * straight | Only returns straight lines + * true-shape | Return the true shape of the lines + * true-shape-with-measure | Return the true shape of the lines with their measurements + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outputLines) - * - * @default true-shape */ - outputLines: string; + outputLines: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The well-known ID of the spatial reference for the geometries returned with the analysis results. If not specified, the geometries are returned in the spatial reference of the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outSpatialReference) */ - outSpatialReference: SpatialReference; + outSpatialReference: SpatialReference | string; + /** + * The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the features or url property should be specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#pointBarriers) + */ + pointBarriers: DataLayer | FeatureSet; /** * The set of polygon barriers loaded as network locations during analysis. At ArcGIS Server 10.1, an optional `url` property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the `features` or `url` property should be specified. * @@ -37140,7 +40255,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#restrictUTurns) */ - restrictUTurns: string; + restrictUTurns: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * If `true`, barriers are returned with the [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * @@ -37150,7 +40265,7 @@ declare namespace __esri { */ returnBarriers: boolean; /** - * If `true`, barriers are returned in the [directions property of each RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html#directions). + * Indicates whether the service should generate driving directions for each route. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnDirections) * @@ -37177,24 +40292,18 @@ declare namespace __esri { * If `true`, routes are generated and returned in the route property of each [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnRoutes) - * - * @default true */ returnRoutes: boolean; /** * If `true`, stops are returned in the stops property of each [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnStops) - * - * @default false */ returnStops: boolean; /** * If `true`, `z` values are returned in the [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnZ) - * - * @default true */ returnZ: boolean; /** @@ -37220,32 +40329,29 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#travelMode) */ - travelMode: any; + travelMode: string; /** * If `true`, the hierarchy attribute for the network should be used in analysis. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#useHierarchy) + * + * @default false */ useHierarchy: boolean; /** * A useful feature of the [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html) is the ability to constrain stop visits to certain times of day, or "time windows". If you were required to deliver orders to four homes and each customer was available during a limited time period during the day, the route task could help you find the most efficient path for making all the deliveries. Time windows are treated as a "soft" constraint. This means that although the solver attempts to honor time windows, if necessary, it will violate the time windows of some stops in order to reach them. Remember, the stops will be visited in the order they were added unless you set `RouteParameters.findBestSequence = true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#useTimeWindows) + * + * @default false */ useTimeWindows: boolean; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface RouteParametersConstructor { new (properties?: RouteParametersProperties): RouteParameters; + + fromJSON(json: any): RouteParameters; } export const RouteParameters: RouteParametersConstructor; @@ -37262,7 +40368,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#attributeParameterValues) */ - attributeParameterValues?: AttributeParamValue; + attributeParameterValues?: AttributeParamValue[]; /** * The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the features or url property should be specified. * @@ -37280,15 +40386,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#directionsLengthUnits) */ - directionsLengthUnits?: string; + directionsLengthUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * Defines the amount of direction information returned. **Possible Values:** complete | complete-no-events | instructions-only | standard | summary-only * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#directionsOutputType) - * - * @default standard */ - directionsOutputType?: string; + directionsOutputType?: "complete" | "complete-no-events" | "instructions-only" | "standard" | "summary-only"; /** * The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles. * @@ -37305,8 +40421,6 @@ declare namespace __esri { * If `true`, avoids network elements restricted by barriers or restrictions specified in [restrictionAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#restrictionAttributes). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements?: boolean; /** @@ -37346,21 +40460,45 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits?: string; + outputGeometryPrecisionUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** - * The type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). **Possible Values:** none | straight | true-shape | true-shape-with-measure + * The type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). + * + * Possible Value | Description + * ---------------|------------ + * none | No lines are returned + * straight | Only returns straight lines + * true-shape | Return the true shape of the lines + * true-shape-with-measure | Return the true shape of the lines with their measurements + * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outputLines) - * - * @default true-shape */ - outputLines?: string; + outputLines?: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The well-known ID of the spatial reference for the geometries returned with the analysis results. If not specified, the geometries are returned in the spatial reference of the map. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#outSpatialReference) */ - outSpatialReference?: SpatialReferenceProperties; + outSpatialReference?: SpatialReferenceProperties | string; + /** + * The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1 an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the features or url property should be specified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#pointBarriers) + */ + pointBarriers?: DataLayerProperties | FeatureSetProperties; /** * The set of polygon barriers loaded as network locations during analysis. At ArcGIS Server 10.1, an optional `url` property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using [DataFile](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-DataFile.html). Note that either the `features` or `url` property should be specified. * @@ -37396,7 +40534,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#restrictUTurns) */ - restrictUTurns?: string; + restrictUTurns?: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * If `true`, barriers are returned with the [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * @@ -37406,7 +40544,7 @@ declare namespace __esri { */ returnBarriers?: boolean; /** - * If `true`, barriers are returned in the [directions property of each RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html#directions). + * Indicates whether the service should generate driving directions for each route. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnDirections) * @@ -37433,24 +40571,18 @@ declare namespace __esri { * If `true`, routes are generated and returned in the route property of each [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnRoutes) - * - * @default true */ returnRoutes?: boolean; /** * If `true`, stops are returned in the stops property of each [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnStops) - * - * @default false */ returnStops?: boolean; /** * If `true`, `z` values are returned in the [RouteResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteResult.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#returnZ) - * - * @default true */ returnZ?: boolean; /** @@ -37476,17 +40608,21 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#travelMode) */ - travelMode?: any; + travelMode?: string; /** * If `true`, the hierarchy attribute for the network should be used in analysis. The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#useHierarchy) + * + * @default false */ useHierarchy?: boolean; /** * A useful feature of the [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html) is the ability to constrain stop visits to certain times of day, or "time windows". If you were required to deliver orders to four homes and each customer was available during a limited time period during the day, the route task could help you find the most efficient path for making all the deliveries. Time windows are treated as a "soft" constraint. This means that although the solver attempts to honor time windows, if necessary, it will violate the time windows of some stops in order to reach them. Remember, the stops will be visited in the order they were added unless you set `RouteParameters.findBestSequence = true`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html#useTimeWindows) + * + * @default false */ useTimeWindows?: boolean; } @@ -37579,7 +40715,7 @@ declare namespace __esri { stops?: GraphicProperties[]; } - interface ServiceAreaParameters extends Accessor { + interface ServiceAreaParameters extends Accessor, JSONSupport { /** * The list of network attribute names to be accumulated with the analysis (i.e. which attributes should be returned as part of the response). The default is as defined in the specific routing network layer used in your [RouteTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-RouteTask.html). You can specify any attributes names listed in the Service Directory under `Network Dataset > Network Attributes` as `Usage Type: esriNAUTCost`. * @@ -37602,8 +40738,6 @@ declare namespace __esri { * When `true`, restricted network elements should be considered when finding network locations. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements: boolean; /** @@ -37643,7 +40777,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits: string; + outputGeometryPrecisionUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * The type of output lines to be generated in the result. The default is defined in the specific routing network layer used in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). * @@ -37657,13 +40803,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines) */ - outputLines: string; + outputLines: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The type of output polygons to be generated in the result. The default is as defined in the specific routing network layer used in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). **Possible Values:** none | simplified | detailed * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputPolygons) */ - outputPolygons: string; + outputPolygons: "none" | "simplified" | "detailed"; /** * The well-known ID of the spatial reference for the geometries returned with the analysis results. If `outSpatialReference` is not specified, the geometries are returned in the spatial reference of the view. * @@ -37723,7 +40869,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#restrictUTurns) */ - restrictUTurns: string; + restrictUTurns: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * If `true`, facilities will be returned with the analysis results. * @@ -37789,13 +40935,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#travelDirection) */ - travelDirection: string; + travelDirection: "from-facility" | "to-facility"; /** * Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#travelMode) */ - travelMode: any; + travelMode: string; /** * If `true`, the outermost polygon (at the maximum break value) will be trimmed. The default is defined in the network analysis layer in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). * @@ -37815,22 +40961,25 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#trimPolygonDistanceUnits) */ - trimPolygonDistanceUnits: string; + trimPolygonDistanceUnits: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * When `true`, the hierarchy attributes for the network will be used in the analysis. The default value is defined in the network layer. `useHierarchy` cannot be used in conjunction with [outputLines](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines). Requires an ArcGIS Server service version 10.1 or greater. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#useHierarchy) */ useHierarchy: boolean; - - /** - * Converts an instance of [this class]() to its ArcGIS portal JSON representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#toJSON) - * - * - */ - toJSON(): any; } interface ServiceAreaParametersConstructor { @@ -37841,6 +40990,8 @@ declare namespace __esri { */ new (properties?: ServiceAreaParametersProperties): ServiceAreaParameters; + + fromJSON(json: any): ServiceAreaParameters; } export const ServiceAreaParameters: ServiceAreaParametersConstructor; @@ -37868,8 +41019,6 @@ declare namespace __esri { * When `true`, restricted network elements should be considered when finding network locations. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#doNotLocateOnRestrictedElements) - * - * @default true */ doNotLocateOnRestrictedElements?: boolean; /** @@ -37909,7 +41058,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputGeometryPrecisionUnits) */ - outputGeometryPrecisionUnits?: string; + outputGeometryPrecisionUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * The type of output lines to be generated in the result. The default is defined in the specific routing network layer used in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). * @@ -37923,13 +41084,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines) */ - outputLines?: string; + outputLines?: "none" | "straight" | "true-shape" | "true-shape-with-measure"; /** * The type of output polygons to be generated in the result. The default is as defined in the specific routing network layer used in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). **Possible Values:** none | simplified | detailed * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputPolygons) */ - outputPolygons?: string; + outputPolygons?: "none" | "simplified" | "detailed"; /** * The well-known ID of the spatial reference for the geometries returned with the analysis results. If `outSpatialReference` is not specified, the geometries are returned in the spatial reference of the view. * @@ -37989,7 +41150,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#restrictUTurns) */ - restrictUTurns?: string; + restrictUTurns?: "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections"; /** * If `true`, facilities will be returned with the analysis results. * @@ -38055,13 +41216,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#travelDirection) */ - travelDirection?: string; + travelDirection?: "from-facility" | "to-facility"; /** * Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#travelMode) */ - travelMode?: any; + travelMode?: string; /** * If `true`, the outermost polygon (at the maximum break value) will be trimmed. The default is defined in the network analysis layer in your [ServiceAreaTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-ServiceAreaTask.html). * @@ -38081,7 +41242,19 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#trimPolygonDistanceUnits) */ - trimPolygonDistanceUnits?: string; + trimPolygonDistanceUnits?: + | "centimeters" + | "decimal-degrees" + | "decimeters" + | "feet" + | "inches" + | "kilometers" + | "meters" + | "miles" + | "millimeters" + | "nautical-miles" + | "points" + | "yards"; /** * When `true`, the hierarchy attributes for the network will be used in the analysis. The default value is defined in the network layer. `useHierarchy` cannot be used in conjunction with [outputLines](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-ServiceAreaParameters.html#outputLines). Requires an ArcGIS Server service version 10.1 or greater. * @@ -43129,6 +46302,67 @@ declare namespace __esri { user: string; } + interface TimeExtent extends JSONSupport { + /** + * The end time of the time extent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#end) + * + * @default null + */ + end: Date; + /** + * The start time of the time extent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#start) + * + * @default null + */ + start: Date; + + /** + * Creates a deep clone of TimeExtent object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#clone) + * + * + */ + clone(): TimeExtent; + } + + interface TimeExtentConstructor { + /** + * A period of time with definitive [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#start) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#end) dates. The time extent is used to [display](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) or [query](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) features that fall within the specified time period. To represent a single point in time set the [start](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#start) and [end](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#end) times to the same time value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html) + */ + + new (properties?: TimeExtentProperties): TimeExtent; + + fromJSON(json: any): TimeExtent; + } + + export const TimeExtent: TimeExtentConstructor; + + interface TimeExtentProperties { + /** + * The end time of the time extent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#end) + * + * @default null + */ + end?: DateProperties; + /** + * The start time of the time extent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html#start) + * + * @default null + */ + start?: DateProperties; + } + interface Viewpoint extends Accessor, JSONSupport { /** * The viewpoint camera (3D only). @@ -43208,404 +46442,7 @@ declare namespace __esri { targetGeometry?: GeometryProperties; } - interface Draw extends Accessor { - /** - * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#activeAction) - */ - activeAction: DrawAction; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#view) - */ - view: MapView; - - /** - * Complete the current active drawing. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#complete) - * - * - */ - complete(): void; - /** - * Creates an instance of the requested draw action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) - * - * @param drawAction - * Name of the [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html) to create. See the table below for a list of possible values and type of draw action it creates. **Possible Values:** point | multipoint | polyline | polygon | rectangle | circle | ellipse - * - * Geometry type | Draw action instance - * ------------- | -------------------- - * point | [PointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html) - * multipoint | [MultipointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html) - * polyline | [PolylineDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html) - * polygon | [PolygonDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html) - * rectangle, circle, ellipse | [SegmentDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html) - * @param drawOptions Object of the drawing options for the geometry to be created. - * @param drawOptions.mode - * The drawing mode. The drawing mode applies only when creating `polygon`, `polyline`, `segment` draw actions. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline` draw actions. - * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` and `segment` draw actions. Default for `segment` draw actions. - * click | Vertices are added when the pointer is clicked. - * - */ - create(drawAction: string, drawOptions?: DrawCreateDrawOptions): DrawAction; - /** - * Resets the drawing by clearing the active action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#reset) - * - * - */ - reset(): void; - } - - interface DrawConstructor { - /** - * The Draw class provides advanced drawing capabilities for developers who need complete control over creating temporary graphics with different geometries. For example, if you want to prevent users from drawing graphics with self-intersecting lines or overlapping polygons, then you can use this class to implement these rules. The draw experience is built upon draw actions, which use the view events to generate a set of coordinates for creating new geometries. Each geometry type has a corresponding draw action class. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html) - */ - - new (properties?: DrawProperties): Draw; - } - - export const Draw: DrawConstructor; - - interface DrawProperties { - /** - * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) method is called. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#activeAction) - */ - activeAction?: DrawActionProperties; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#view) - */ - view?: MapViewProperties; - } - - export interface DrawCreateDrawOptions extends Object { - /** - * The drawing mode. The drawing mode applies only when creating `polygon`, `polyline`, `segment` draw actions. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline` draw actions. - * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` and `segment` draw actions. Default for `segment` draw actions. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-Draw.html#create) - */ - mode?: string; - } - - interface DrawAction extends Accessor, Evented { - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#view) - */ - view: MapView; - - /** - * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#redo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canRedo) - * - * - */ - canRedo(): boolean; - /** - * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#undo) method can be called on the action instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canUndo) - * - * - */ - canUndo(): boolean; - /** - * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-remove) events depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#redo) - * - * - */ - redo(): void; - /** - * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#event:vertex-remove) events depending on the last action. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#undo) - * - * - */ - undo(): void; - } - - interface DrawActionConstructor { - /** - * DrawAction is the base class for all draw actions. DrawActions use the view events to generate a set of coordinates to create new geometries. Each serves a different purpose, allowing you to create a different type geometry such as [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), and [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html) - */ - - new (properties?: DrawActionProperties): DrawAction; - } - - export const DrawAction: DrawActionConstructor; - - interface DrawActionProperties { - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-DrawAction.html#view) - */ - view?: MapViewProperties; - } - - interface MultipointDrawAction extends DrawAction { - /** - * Two-dimensional array of numbers representing the coordinates of each vertex that comprises the drawn geometry. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#vertices) - */ - readonly vertices: number[][]; - - /** - * Completes drawing the [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-MultipointDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface MultipointDrawActionConstructor { - new (properties?: MultipointDrawActionProperties): MultipointDrawAction; - } - - export const MultipointDrawAction: MultipointDrawActionConstructor; - - interface MultipointDrawActionProperties extends DrawActionProperties {} - - interface PointDrawAction extends DrawAction { - /** - * An array of x,y coordinates for the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#coordinates) - */ - readonly coordinates: number[]; - - /** - * Completes drawing the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface PointDrawActionConstructor { - new (properties?: PointDrawActionProperties): PointDrawAction; - } - - export const PointDrawAction: PointDrawActionConstructor; - - interface PointDrawActionProperties extends DrawActionProperties {} - - interface PolygonDrawAction extends DrawAction { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#mode) - * - * @default hybrid - */ - mode: string; - /** - * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#vertices) - */ - readonly vertices: number[][]; - - /** - * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface PolygonDrawActionConstructor { - new (properties?: PolygonDrawActionProperties): PolygonDrawAction; - } - - export const PolygonDrawAction: PolygonDrawActionConstructor; - - interface PolygonDrawActionProperties extends DrawActionProperties { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html#mode) - * - * @default hybrid - */ - mode?: string; - } - - interface PolylineDrawAction extends DrawAction { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#mode) - * - * @default hybrid - */ - mode: string; - /** - * Two-dimensional array of numbers representing the coordinates of each vertex that comprising the drawn geometry. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#vertices) - */ - readonly vertices: number[][]; - - /** - * Completes drawing the polyline geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface PolylineDrawActionConstructor { - new (properties?: PolylineDrawActionProperties): PolylineDrawAction; - } - - export const PolylineDrawAction: PolylineDrawActionConstructor; - - interface PolylineDrawActionProperties extends DrawActionProperties { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * hybrid | Vertices are added while the pointer is clicked or dragged. - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html#mode) - * - * @default hybrid - */ - mode?: string; - } - - interface SegmentDrawAction extends DrawAction { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. SegmentDrawActions are created from 2 vertices. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#mode) - * - * @default freehand - */ - mode: string; - /** - * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#vertices) - */ - readonly vertices: number[][]; - - /** - * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#event:draw-complete) event. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#complete) - * - * - */ - complete(): void; - } - - interface SegmentDrawActionConstructor { - new (properties?: SegmentDrawActionProperties): SegmentDrawAction; - } - - export const SegmentDrawAction: SegmentDrawActionConstructor; - - interface SegmentDrawActionProperties extends DrawActionProperties { - /** - * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** - * - * Value | Description | - * ----- | ----------- | - * freehand | Vertices are added while the pointer is dragged. - * click | Vertices are added when the pointer is clicked. SegmentDrawActions are created from 2 vertices. - * - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-SegmentDrawAction.html#mode) - * - * @default freehand - */ - mode?: string; - } - - /** - * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html) - */ - interface BaseLayerView2D { - /** - * References the layer this [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) represents. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#layer) - */ - layer: Layer; + interface BaseLayerView2D extends LayerView { /** * The array of [Tile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#Tile) objects computed to cover the MapView's visible area. This array is updated when the view is animating or the user is interacting with it. Then if tiles have been added or removed, [tilesChanged()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#tilesChanged) is called. * @@ -43677,7 +46514,32 @@ declare namespace __esri { tilesChanged(added: Tile[], removed: Tile[]): void; } - export const BaseLayerView2D: BaseLayerView2D; + interface BaseLayerView2DConstructor { + /** + * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html) + */ + + new (properties?: BaseLayerView2DProperties): BaseLayerView2D; + } + + export const BaseLayerView2D: BaseLayerView2DConstructor; + + interface BaseLayerView2DProperties extends LayerViewProperties { + /** + * The array of [Tile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#Tile) objects computed to cover the MapView's visible area. This array is updated when the view is animating or the user is interacting with it. Then if tiles have been added or removed, [tilesChanged()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#tilesChanged) is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#tiles) + */ + tiles?: Tile[]; + /** + * References the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) this [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) belongs to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html#view) + */ + view?: MapViewProperties; + } export interface BaseLayerView2DRenderRenderParameters extends Object { /** @@ -43762,6 +46624,200 @@ declare namespace __esri { bounds: number[]; } + interface BaseLayerViewGL2D extends LayerView { + /** + * The WebGL rendering context associated to this layer view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#context) + */ + context: WebGLRenderingContext | any; + /** + * The array of [Tile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) objects computed to cover the MapView's visible area. This array is updated when the view is animating or the user is interacting with it. Then if tiles have been added or removed, [tilesChanged()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tilesChanged) is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tiles) + */ + tiles: BaseLayerViewGL2DTile[]; + /** + * References the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) this [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) belongs to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#view) + */ + view: MapView; + + /** + * Method called after the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) is created and right before it starts drawing the layer's content. Typically this method is implemented to start watching property changes on the layer and to initialize WebGL objects such as shaders. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#attach) + * + * + */ + attach(): void; + /** + * Method called after the layer is removed and the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) is about to be removed. Typically, this method is implemented to free resources like watchers and destroy WebGL objects such as shader programs. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#detach) + * + * + */ + detach(): void; + /** + * Method to implement that is responsible for providing objects hit at the specified screen coordinates. This method is called internally by the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) each time its [hitTest()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) method is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#hitTest) + * + * @param x The x-coordinate in screen space of the desired hit. + * @param y The y-coordinate in screen space of the desired hit. + * + */ + hitTest(x: number, y: number): IPromise; + /** + * The method to implement that is responsible of drawing the content of the layer. This method is called every time the MapView's state changes, or if [requestRender()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#requestRender) has been called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) + * + * @param renderParameters + * @param renderParameters.context The WebGL or WebGL 2 context. Its concrete type depends on system configuration. The initial state is guaranteed to be the default one. + * @param renderParameters.stationary The stationary state of the `MapView`. + * @param renderParameters.state The object that describes view state. + * + */ + render(renderParameters: BaseLayerViewGL2DRenderRenderParameters): void; + /** + * The [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) can call this method to ask the MapView to schedule a new rendering frame. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#requestRender) + * + * + */ + requestRender(): void; + /** + * Method to implement, which notifies of tiles being added or removed for the current view state. This function can be implemented to start and stop fetching new data, or allocate and dispose resources. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tilesChanged) + * + * @param added The tile objects added for the current view viewport. + * @param removed The tile objects removed from the view viewport. + * + */ + tilesChanged(added: BaseLayerViewGL2DTile[], removed: BaseLayerViewGL2DTile[]): void; + } + + interface BaseLayerViewGL2DConstructor { + /** + * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). In contrast to the related class [BaseLayerView2D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerView2D.html), this one exposes [WebGL](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext) rendering capabilities. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html) + */ + + new (properties?: BaseLayerViewGL2DProperties): BaseLayerViewGL2D; + } + + export const BaseLayerViewGL2D: BaseLayerViewGL2DConstructor; + + interface BaseLayerViewGL2DProperties extends LayerViewProperties { + /** + * The WebGL rendering context associated to this layer view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#context) + */ + context?: WebGLRenderingContext | any; + /** + * The array of [Tile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) objects computed to cover the MapView's visible area. This array is updated when the view is animating or the user is interacting with it. Then if tiles have been added or removed, [tilesChanged()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tilesChanged) is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tiles) + */ + tiles?: BaseLayerViewGL2DTile[]; + /** + * References the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) this [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) belongs to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#view) + */ + view?: MapViewProperties; + } + + export interface BaseLayerViewGL2DRenderRenderParameters extends Object { + /** + * The WebGL or WebGL 2 context. Its concrete type depends on system configuration. The initial state is guaranteed to be the default one. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) + */ + context: WebGLRenderingContext | any; + /** + * The stationary state of the `MapView`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) + */ + stationary: boolean; + /** + * The object that describes view state. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#render) + */ + state: ViewState; + } + + /** + * Represents a tile reference. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + export interface BaseLayerViewGL2DTile extends Object { + /** + * The tile string identifier in the format `level/row/col/world` + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + id: string; + /** + * The level identifier of the [LOD](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LOD.html) to which the tile belongs + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + level: number; + /** + * The row identifier. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + row: number; + /** + * The column identifier. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + col: number; + /** + * When the projection allows world wrapping (e.g. Web Mercator), identifies the instance of the world this tile's `level`/`row`/`col`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + world: number; + /** + * The number of map units per pixel in the tile. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + resolution: number; + /** + * The map scale at the tile's level. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + scale: number; + /** + * The coordinates of the top-left corner of the tile as an array of two numbers. The coordinates are in un-normalized map units. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + coords: number[]; + /** + * The bounds of the tile as an array of four numbers that be readily converted to an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile) + */ + bounds: number[]; + } + interface ViewState { /** * Represents the view's center point as an array of two numbers `[x, y]`. @@ -44138,7 +47194,7 @@ declare namespace __esri { bindRenderTarget(): void; } - export type RenderContextCallback = (context: RenderContext) => void; + export type RenderContextCallback = (context?: RenderContext) => void; /** * Describes the lighting used by [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), derived from its sun lighting model. It consists of a directional Lambertian (`diffuse`) and a constant (`ambient`) term, which should be treated in the sense of the [Phong Reflection Model](https://en.wikipedia.org/wiki/Phong_reflection_model). @@ -44402,6 +47458,398 @@ declare namespace __esri { ui?: DefaultUIProperties; } + interface Draw extends Accessor { + /** + * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) method is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#activeAction) + */ + activeAction: DrawAction; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#view) + */ + view: MapView; + + /** + * Complete the current active drawing. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#complete) + * + * + */ + complete(): void; + /** + * Creates an instance of the requested draw action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) + * + * @param drawAction + * Name of the [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html) to create. See the table below for a list of possible values and type of draw action it creates. **Possible Values:** point | multipoint | polyline | polygon | rectangle | circle | ellipse + * + * Geometry type | Draw action instance + * ------------- | -------------------- + * point | [PointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PointDrawAction.html) + * multipoint | [MultipointDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html) (only supported in [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html)) + * polyline | [PolylineDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html) + * polygon | [PolygonDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html) + * rectangle, circle, ellipse | [SegmentDrawAction](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html) + * @param drawOptions Object of the drawing options for the geometry to be created. + * @param drawOptions.mode + * The drawing mode. The drawing mode applies only when creating `polygon`, `polyline`, `segment` draw actions. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline` draw actions. + * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` and `segment` draw actions. Default for `segment` draw actions. + * click | Vertices are added when the pointer is clicked. + * + */ + create(drawAction: string, drawOptions?: DrawCreateDrawOptions): DrawAction; + /** + * Resets the drawing by clearing the active action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#reset) + * + * + */ + reset(): void; + } + + interface DrawConstructor { + /** + * The Draw class provides advanced drawing capabilities for developers who need complete control over creating temporary graphics with different geometries. For example, if you want to prevent users from drawing graphics with self-intersecting lines or overlapping polygons, then you can use this class to implement these rules. The draw experience is built upon draw actions, which use the view events to generate a set of coordinates for creating new geometries. Each geometry type has a corresponding draw action class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html) + */ + + new (properties?: DrawProperties): Draw; + } + + export const Draw: DrawConstructor; + + interface DrawProperties { + /** + * A reference to the active [draw action](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html). An instance of the draw action is created when [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) method is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#activeAction) + */ + activeAction?: DrawActionProperties; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the draw to a specific view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#view) + */ + view?: MapViewProperties; + } + + export interface DrawCreateDrawOptions extends Object { + /** + * The drawing mode. The drawing mode applies only when creating `polygon`, `polyline`, `segment` draw actions. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. Applies to and is the default for `polygon` and `polyline` draw actions. + * freehand | Vertices are added while the pointer is dragged. Applies to `polygon`, `polyline` and `segment` draw actions. Default for `segment` draw actions. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) + */ + mode?: string; + } + + interface DrawAction extends Accessor, Evented { + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#view) + */ + view: MapView; + + /** + * Indicates if the [redo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#redo) method can be called on the action instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#canRedo) + * + * + */ + canRedo(): boolean; + /** + * Indicates if the [undo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#undo) method can be called on the action instance. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#canUndo) + * + * + */ + canUndo(): boolean; + /** + * Incrementally redo actions recorded in the stack. Call [canRedo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#canRedo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#event:vertex-remove) events depending on the last action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#redo) + * + * + */ + redo(): void; + /** + * Incrementally undo actions recorded in the stack. Call [canUndo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#canUndo) prior to calling this method to check if this method can be called on the action instance. Calling this method will fire the [vertex-add](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#event:vertex-add) or [vertex-remove](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#event:vertex-remove) events depending on the last action. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#undo) + * + * + */ + undo(): void; + } + + interface DrawActionConstructor { + /** + * DrawAction is the base class for all draw actions. DrawActions use the view events to generate a set of coordinates to create new geometries. Each serves a different purpose, allowing you to create a different type geometry such as [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html), [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), and [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html) + */ + + new (properties?: DrawActionProperties): DrawAction; + } + + export const DrawAction: DrawActionConstructor; + + interface DrawActionProperties { + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#view) + */ + view?: MapViewProperties; + } + + interface MultipointDrawAction extends DrawAction { + /** + * Two-dimensional array of numbers representing the coordinates of each vertex that comprises the drawn geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface MultipointDrawActionConstructor { + /** + * This class uses the view events to generate a set of coordinates to create a new [Multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometry using [Draw](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html). When the [draw.create("multipoint")](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-Draw.html#create) method is called, a reference to MultipointDrawAction is returned. You can listen to [events](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html#events-summary) on the MultipointDrawAction instance, which allows users to create a multipoint that meets criteria specified by the application. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-MultipointDrawAction.html) + */ + + new (properties?: MultipointDrawActionProperties): MultipointDrawAction; + } + + export const MultipointDrawAction: MultipointDrawActionConstructor; + + interface MultipointDrawActionProperties extends DrawActionProperties {} + + interface PointDrawAction extends DrawAction { + /** + * An array of x,y coordinates for the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PointDrawAction.html#coordinates) + */ + readonly coordinates: number[]; + + /** + * Completes drawing the [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PointDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PointDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface PointDrawActionConstructor { + new (properties?: PointDrawActionProperties): PointDrawAction; + } + + export const PointDrawAction: PointDrawActionConstructor; + + interface PointDrawActionProperties extends DrawActionProperties {} + + interface PolygonDrawAction extends DrawAction { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#mode) + * + * @default hybrid + */ + mode: string; + /** + * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface PolygonDrawActionConstructor { + new (properties?: PolygonDrawActionProperties): PolygonDrawAction; + } + + export const PolygonDrawAction: PolygonDrawActionConstructor; + + interface PolygonDrawActionProperties extends DrawActionProperties { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolygonDrawAction.html#mode) + * + * @default hybrid + */ + mode?: string; + } + + interface PolylineDrawAction extends DrawAction { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#mode) + * + * @default hybrid + */ + mode: string; + /** + * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the polyline geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#event:draw-complete) event. Call this method if the drawing logic needs to be completed other than by double-clicking or pressing the "C" key. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface PolylineDrawActionConstructor { + new (properties?: PolylineDrawActionProperties): PolylineDrawAction; + } + + export const PolylineDrawAction: PolylineDrawActionConstructor; + + interface PolylineDrawActionProperties extends DrawActionProperties { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * hybrid | Vertices are added while the pointer is clicked or dragged. + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-PolylineDrawAction.html#mode) + * + * @default hybrid + */ + mode?: string; + } + + interface SegmentDrawAction extends DrawAction { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. SegmentDrawActions are created from 2 vertices. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#mode) + * + * @default freehand + */ + mode: string; + /** + * Two-dimensional array of numbers representing the coordinates of each vertex comprising the geometry being drawn. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#vertices) + */ + readonly vertices: number[][]; + + /** + * Completes drawing the polygon geometry and fires the [draw-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#event:draw-complete) event. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#complete) + * + * + */ + complete(): void; + } + + interface SegmentDrawActionConstructor { + new (properties?: SegmentDrawActionProperties): SegmentDrawAction; + } + + export const SegmentDrawAction: SegmentDrawActionConstructor; + + interface SegmentDrawActionProperties extends DrawActionProperties { + /** + * The drawing mode. It is only relevant when the action is first created. Its value cannot be changed during the action lifecycle. **Possible Values:** + * + * Value | Description | + * ----- | ----------- | + * freehand | Vertices are added while the pointer is dragged. + * click | Vertices are added when the pointer is clicked. SegmentDrawActions are created from 2 vertices. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-SegmentDrawAction.html#mode) + * + * @default freehand + */ + mode?: string; + } + interface GroundView extends Accessor { /** * An elevation sampler that may be used to sample and query elevation values from the ground surface that is currently being displayed. The elevation sampler is not supported for [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and may be `null` while the ground surface display is being initialized. The resolution of the sampled values depends on the ground elevation display resolution (high resolution close to the camera, low resolution far away from the camera). Because of the dynamic nature of the display resolution, the [demResolution](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#demResolution) property of the returned sampler will always return `{ min: -1, max: -1 }. If higher or more consistent sample resolution is required, then consider creating a sampler at the desired resolution using ElevationLayer.createSampler or Ground.createSampler. @@ -44522,6 +47970,18 @@ declare namespace __esri { interface InputProperties {} interface CSVLayerView extends LayerView { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#effect) + */ + effect: FeatureEffect; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#filter) + */ + filter: FeatureFilter; /** * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. * @@ -44543,7 +48003,7 @@ declare namespace __esri { * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[] | number | number[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. * > **Known Limitations** @@ -44614,13 +48074,19 @@ declare namespace __esri { queryObjectIds(params?: Query | QueryProperties): IPromise; } - interface CSVLayerViewConstructor { - new (properties?: CSVLayerViewProperties): CSVLayerView; - } - - export const CSVLayerView: CSVLayerViewConstructor; - interface CSVLayerViewProperties extends LayerViewProperties { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#effect) + */ + effect?: FeatureEffectProperties; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-CSVLayerView.html#filter) + */ + filter?: FeatureFilterProperties; /** * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. * @@ -44636,6 +48102,25 @@ declare namespace __esri { } interface FeatureLayerView extends LayerView { + /** + * A list of attribute fields fetched for each feature including fields required for layer [rendering](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#renderer), [labeling](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#labelingInfo), [elevation info](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo), and additional fields defined on the [FeatureLayer.outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields). The availableFields is populated when the layer view is finished [updating](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#updating). Use this list when setting [client-side filtering](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) or querying features on the [client-side](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields) + */ + readonly availableFields: string[]; + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * > **Known Limitations** FeatureEffect is not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#effect) + */ + effect: FeatureEffect; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) + */ + filter: FeatureFilter; /** * The layer being viewed. * @@ -44663,11 +48148,11 @@ declare namespace __esri { * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[] | number | number[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. Valid only for [hosted feature services](http://doc.arcgis.com/en/arcgis-online/share-maps/hosted-web-layers.htm) on [arcgis.com](http://arcgis.com) and for ArcGIS Server 10.3.1 and later. If query parameters are not provided, the extent and count of all features available for drawing are returned. To query for the extent of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryExtent) method. * > **Known Limitations** - * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) with an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) is `intersects` are supported. * * Spatial queries are executed against quantized geometries in the layer view. The resolution of layer view geometries, is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different when executed at different scales. This also means that geometries returned from any layer view query will likewise be at the same scale resolution of the view. * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. * * Spatial queries are not currently supported if the FeatureLayerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): @@ -44685,7 +48170,7 @@ declare namespace __esri { /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. To query for the count of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatureCount) method. * > **Known Limitations** - * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) with an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) is `intersects` are supported. * * Spatial queries are executed against quantized geometries in the layer view. The resolution of layer view geometries, is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different when executed at different scales. This also means that geometries returned from any layer view query will likewise be at the same scale resolution of the view. * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. * * Spatial queries are not currently supported if the FeatureLayerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): @@ -44701,9 +48186,9 @@ declare namespace __esri { */ queryFeatureCount(params?: Query | QueryProperties): IPromise; /** - * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all features available for drawing are returned. To execute a query against all the features in a Feature Service rather than only those in the client, you must use the [FeatureLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) method. + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all features available for drawing are returned along with their attributes specified in [availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields). For client-side attribute queries, relevant fields must exist in [availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields) list for the query to be successful. To execute a query against all the features in a Feature Service rather than only those in the client, you must use the [FeatureLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFeatures) method. * > **Known Limitations** - * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) with an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) is `intersects` are supported. * * Spatial queries are executed against quantized geometries in the layer view. The resolution of layer view geometries, is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different when executed at different scales. This also means that geometries returned from any layer view query will likewise be at the same scale resolution of the view. * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. * * Spatial queries are not currently supported if the FeatureLayerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): @@ -44714,14 +48199,14 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures) * - * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned along with their attributes specified in [availableFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#availableFields). To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. * */ queryFeatures(params?: Query | QueryProperties): IPromise; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. To query for ObjectIDs of features directly from a Feature Service rather than those visible in the view, you must use the [FeatureLayer.queryObjectIds()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryObjectIds) method. * > **Known Limitations** - * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#geometry) with an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) and [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#spatialRelationship) is `intersects` are supported. * * Spatial queries are executed against quantized geometries in the layer view. The resolution of layer view geometries, is only as precise as the scale resolution of the view. Therefore, the results of the same query could be different when executed at different scales. This also means that geometries returned from any layer view query will likewise be at the same scale resolution of the view. * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. * * Spatial queries are not currently supported if the FeatureLayerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): @@ -44751,6 +48236,19 @@ declare namespace __esri { export const FeatureLayerView: FeatureLayerViewConstructor; interface FeatureLayerViewProperties extends LayerViewProperties { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * > **Known Limitations** FeatureEffect is not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#effect) + */ + effect?: FeatureEffectProperties; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) + */ + filter?: FeatureFilterProperties; /** * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. * @@ -44765,6 +48263,153 @@ declare namespace __esri { maximumNumberOfFeaturesExceeded?: boolean; } + interface GeoJSONLayerView extends LayerView { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#effect) + */ + effect: FeatureEffect; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#filter) + */ + filter: FeatureFilter; + /** + * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#maximumNumberOfFeatures) + */ + maximumNumberOfFeatures: number; + /** + * Signifies whether the maximum number of features has been exceeded. Not all features could be displayed when this value is `true`. This setting currently only applies to SceneView. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#maximumNumberOfFeaturesExceeded) + */ + maximumNumberOfFeaturesExceeded: boolean; + + /** + * Highlights the given feature(s). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#highlight) + * + * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. + * + */ + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. + * > **Known Limitations** + * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. + * * Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): + * * GDM 2000 (4742) – Malaysia + * * Gusterberg (Ferro) (8042) – Austria/Czech Republic + * * ISN2016 (8086) - Iceland + * * SVY21 (4757) - Singapore + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryExtent) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryExtent(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all features available for drawing is returned. + * > **Known Limitations** + * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. + * * Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): + * * GDM 2000 (4742) – Malaysia + * * Gusterberg (Ferro) (8042) – Austria/Czech Republic + * * ISN2016 (8086) - Iceland + * * SVY21 (4757) - Singapore + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryFeatureCount) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryFeatureCount(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all features available for drawing are returned. + * > **Known Limitations** + * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. + * * Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): + * * GDM 2000 (4742) – Malaysia + * * Gusterberg (Ferro) (8042) – Austria/Czech Republic + * * ISN2016 (8086) - Iceland + * * SVY21 (4757) - Singapore + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryFeatures) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryFeatures(params?: Query | QueryProperties): IPromise; + /** + * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features available for drawing in the layer view and returns array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all features available for drawing are returned. + * > **Known Limitations** + * * Queries with `outStatistics` and any other parameter involving statistics are currently not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation. + * * Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html): + * * GDM 2000 (4742) – Malaysia + * * Gusterberg (Ferro) (8042) – Austria/Czech Republic + * * ISN2016 (8086) - Iceland + * * SVY21 (4757) - Singapore + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#queryObjectIds) + * + * @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent. + * + */ + queryObjectIds(params?: Query | QueryProperties): IPromise; + } + + interface GeoJSONLayerViewProperties extends LayerViewProperties { + /** + * The effect applied to the layer view. The effect allows for the selection of features via a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter), and an [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) are applied to those features that respectively pass or fail the filter requirements. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#effect) + */ + effect?: FeatureEffectProperties; + /** + * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where), [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry), and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) filter. Only the features that satisfy the filter are displayed on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#filter) + */ + filter?: FeatureFilterProperties; + /** + * The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#maximumNumberOfFeatures) + */ + maximumNumberOfFeatures?: number; + /** + * Signifies whether the maximum number of features has been exceeded. Not all features could be displayed when this value is `true`. This setting currently only applies to SceneView. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoJSONLayerView.html#maximumNumberOfFeaturesExceeded) + */ + maximumNumberOfFeaturesExceeded?: boolean; + } + + interface GeoRSSLayerView extends LayerView { + /** + * Highlights the given feature(s). + * > **Known Limitations** Currently the highlight method is only supported in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GeoRSSLayerView.html#highlight) + * + * @param target The feature(s) to highlight. + * + */ + highlight(target?: Graphic | Graphic[]): Handle; + } + + interface GeoRSSLayerViewProperties extends LayerViewProperties {} + interface GraphicsLayerView extends LayerView { /** * Highlights the given feature(s). @@ -44775,7 +48420,7 @@ declare namespace __esri { * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[] | number | number[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; /** * Returns all graphics available for drawing in the layer view as a [collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). * @@ -44786,18 +48431,6 @@ declare namespace __esri { queryGraphics(): Collection; } - interface GraphicsLayerViewConstructor { - /** - * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) in either a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-GraphicsLayerView.html) - */ - - new (properties?: GraphicsLayerViewProperties): GraphicsLayerView; - } - - export const GraphicsLayerView: GraphicsLayerViewConstructor; - interface GraphicsLayerViewProperties extends LayerViewProperties {} interface ImageryLayerView extends LayerView { @@ -44872,12 +48505,6 @@ declare namespace __esri { readonly allVisiblePolylines: Collection; } - interface KMLLayerViewConstructor { - new (properties?: KMLLayerViewProperties): KMLLayerView; - } - - export const KMLLayerView: KMLLayerViewConstructor; - interface KMLLayerViewProperties extends LayerViewProperties {} /** @@ -44961,6 +48588,25 @@ declare namespace __esri { } interface SceneLayerView extends LayerView { + /** + * Applies a client-side [FeatureFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html) to the displayed data. For 3D object scene layers, only spatial filters are supported, that is, a filter where the geometry is set and spatialRelationship is one of `contains`, `intersects`, `disjoint`. For point scene layers, the full FeatureFilter functionality is supported. Only the features that satisfy the filter are displayed. Filters with unsupported fields are rejected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#filter) + */ + filter: FeatureFilter; + /** + * The maximum number of features that can be displayed at a time. This setting currently only applies to point scene layers. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#maximumNumberOfFeatures) + */ + maximumNumberOfFeatures: number; + /** + * Signifies whether the maximum number of features has been exceeded. Not all features could be displayed when this value is `true`. This setting currently only applies to point scene layers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#maximumNumberOfFeaturesExceeded) + */ + maximumNumberOfFeaturesExceeded: boolean; + /** * Highlights the given feature(s). * @@ -44969,10 +48615,11 @@ declare namespace __esri { * @param target The feature(s) to highlight. When passing a graphic or array of graphics, each feature must have a valid `objectID`. You may alternatively pass one or more objectIDs as a single number or an array. * */ - highlight(target?: Graphic | Graphic[] | number | number[]): any; + highlight(target?: Graphic | Graphic[] | number | number[]): Handle; /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns the 3D [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If query parameters are not provided, the extent and count of all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. * > To query for the extent of features directly from a Scene Service rather than those loaded for the current view, you must use the [SceneLayer.queryExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryExtent) method. + * > **Known Limitations** For [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only empty queries and queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num)/[start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) are supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryExtent) * @@ -44983,6 +48630,7 @@ declare namespace __esri { /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns the number of features that satisfy the query. If query parameters are not provided, the count of all loaded features is returned. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. * > To query for the count of features directly from a Scene Service rather than those loaded for the current view, you must use the [SceneLayer.queryFeatureCount()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryFeatureCount) method. + * > **Known Limitations** For [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only empty queries and queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num)/[start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) are supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryFeatureCount) * @@ -44993,6 +48641,7 @@ declare namespace __esri { /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html). If query parameters are not provided, all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. Querying more than 10.000 features returns an error, unless num is specified in the Query. * > To execute a query against all the features in a Scene Service rather than only those loaded for the current view, you must use the [SceneLayer.queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryFeatures) method. + * > **Known Limitations** For [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only empty queries and queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num)/[start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) are supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryFeatures) * @@ -45003,6 +48652,7 @@ declare namespace __esri { /** * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against features in the layer view and returns an array of the ObjectIDs of features that satisfy the input query. If query parameters are not provided, the ObjectIDs of all loaded features are returned. This method is not yet supported when the associated scene layer has a [geometryType](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#geometryType) of `point`. Read more about queries in the Query section of the [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) class description. * > To query for ObjectIDs of features directly from a Scene Service rather than those loaded for the current view, you must use the [SceneLayer.queryObjectIds()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#queryObjectIds) method. + * > **Known Limitations** For [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only empty queries and queries with [objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#objectIds) or [num](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#num)/[start](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#start) are supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryObjectIds) * @@ -45012,20 +48662,27 @@ declare namespace __esri { queryObjectIds(params?: Query): IPromise; } - interface SceneLayerViewConstructor { + interface SceneLayerViewProperties extends LayerViewProperties { /** - * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). + * Applies a client-side [FeatureFilter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html) to the displayed data. For 3D object scene layers, only spatial filters are supported, that is, a filter where the geometry is set and spatialRelationship is one of `contains`, `intersects`, `disjoint`. For point scene layers, the full FeatureFilter functionality is supported. Only the features that satisfy the filter are displayed. Filters with unsupported fields are rejected. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#filter) */ - - new (properties?: SceneLayerViewProperties): SceneLayerView; + filter?: FeatureFilterProperties; + /** + * The maximum number of features that can be displayed at a time. This setting currently only applies to point scene layers. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile. Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#maximumNumberOfFeatures) + */ + maximumNumberOfFeatures?: number; + /** + * Signifies whether the maximum number of features has been exceeded. Not all features could be displayed when this value is `true`. This setting currently only applies to point scene layers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#maximumNumberOfFeaturesExceeded) + */ + maximumNumberOfFeaturesExceeded?: boolean; } - export const SceneLayerView: SceneLayerViewConstructor; - - interface SceneLayerViewProperties extends LayerViewProperties {} - interface StreamLayerView extends LayerView, Evented { /** * The error that explains an unsuccessful attempt to connect to the stream service or an unexpected disconnection from the stream service. @@ -45040,20 +48697,20 @@ declare namespace __esri { */ readonly connectionStatus: string; /** - * Contains the attribute and spatial filters used to filter messages sent to the given layer view by a stream service. To change the filter for only a single layer view, use the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#updateFilter) method. The layer view's filter is always updated when the [updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method of the associated stream layer instance is called. + * The geometry and attribute filter. Only the features that satisfy the filter are displayed. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) */ - readonly filter: StreamLayerViewFilter; + readonly filter: FeatureFilter; /** - * Contains the collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) visible in the layer view for the live stream. Graphics may be removed from the layer view by calling the [removeAll()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#removeAll) method from [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). + * Contains the collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) visible in the layer view for the live stream. Graphics may be removed from the layer view by calling the [removeAll()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#removeAll) method from [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). **This property is deprecated. Use [queryFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryFeatures) method instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#graphics) */ graphics: Collection; /** - * Opens a web socket connection with the stream service to start receiving messages. This is called internally when the StreamLayer is added to a view. + * Opens a web socket connection with the stream service to start receiving messages. This is called internally when the StreamLayer is added to a view. **The layer will now automatically connect when it is added to a view.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connect) * @@ -45061,7 +48718,7 @@ declare namespace __esri { */ connect(): IPromise; /** - * Closes the web socket connection with the stream service. This is called internally when the StreamLayer is removed from a view. To verify when the connection is closed, watch the [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connectionStatus) property. + * Closes the web socket connection with the stream service. This is called internally when the StreamLayer is removed from a view. To verify when the connection is closed, watch the [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connectionStatus) property. **The layer will now automatically disconnect when it is removed a view.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#disconnect) * @@ -45069,7 +48726,7 @@ declare namespace __esri { */ disconnect(): void; /** - * Updates the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) on the StreamLayerView. The filter is updated only on the layer view from which it is called. To update the filter on all layer views generated from a common layer, use the [StreamLayer.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. If the input `filter` object is `undefined` or `null`, the spatial and attribute filters are removed. Filter changes only apply to incoming features. Features already displayed in the view will be removed automatically. + * **This method is deprecated. Update [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) directly instead.** Updates the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) on the StreamLayerView. The filter is updated only on the layer view from which it is called. To update the filter on all layer views generated from a common layer, use the [StreamLayer.updateFilter()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#updateFilter) method. If the input `filter` object is `undefined` or `null`, the spatial and attribute filters are removed. Filter changes only apply to incoming features. Features already displayed in the view will be removed automatically. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#updateFilter) * @@ -45097,7 +48754,7 @@ declare namespace __esri { interface StreamLayerViewProperties extends LayerViewProperties { /** - * Contains the collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) visible in the layer view for the live stream. Graphics may be removed from the layer view by calling the [removeAll()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#removeAll) method from [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). + * Contains the collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) visible in the layer view for the live stream. Graphics may be removed from the layer view by calling the [removeAll()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html#removeAll) method from [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html). **This property is deprecated. Use [queryFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryFeatures) method instead.** * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#graphics) */ @@ -45106,21 +48763,6 @@ declare namespace __esri { export interface StreamLayerViewDataReceivedEvent {} - export interface StreamLayerViewFilter extends Object { - /** - * A spatial filter for filtering features. Only features that intersect the given geometry are displayed in the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) - */ - geometry?: Extent; - /** - * A SQL where clause used to filter features by attributes. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) - */ - where?: string; - } - export interface StreamLayerViewUpdateFilterFilter extends Object { /** * A spatial filter for filtering features. Only features that intersect the given geometry are displayed in the view. If `null`, the spatial filter is cleared. @@ -45136,7 +48778,243 @@ declare namespace __esri { where?: string; } - interface MapView extends View, BreakpointsOwner { + interface FeatureEffect extends Accessor, JSONSupport { + /** + * The graphical [css filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) operation applied to the features that do not meet the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) requirements. Currently, [grayscale](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/grayscale), [sepia](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/sepia), [hue-rotate](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate), [invert](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert), [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/opacity), [brightness](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness) and [contrast](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/contrast) css filter functions are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) + */ + excludedEffect: string; + /** + * Indicates if labels for features that are [excluded](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) from the effect are visible. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedLabelsVisible) + * + * @default false + */ + excludedLabelsVisible: boolean; + /** + * The filter that drives the effect. Features that meet the requirements specified in the filter will have the [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) applied while features that do not meet meet the filter requirements will have the [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) applied. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) + */ + filter: FeatureFilter; + /** + * The graphical [css filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) operation applied to the features that meet the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) requirements. Currently, [grayscale](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/grayscale), [sepia](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/sepia), [hue-rotate](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate), [invert](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert), [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/opacity), [brightness](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness) and [contrast](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/contrast) css filter functions are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) + */ + includedEffect: string; + + /** + * Creates a deep clone of FeatureEffect object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#clone) + * + * + */ + clone(): FeatureEffect; + } + + interface FeatureEffectConstructor { + /** + * FeatureEffect allows you to emphasize or deemphasize features that satisfy a [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) in 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). The [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) and [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) properties allow you to apply [CSS filters](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) to features that are either included or excluded from the filter. Typically, you use `includedEffect` to emphasize features that are included in the filter and `excludedEffect` to deemphasize features excluded from the filter. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html) + */ + + new (properties?: FeatureEffectProperties): FeatureEffect; + + fromJSON(json: any): FeatureEffect; + } + + export const FeatureEffect: FeatureEffectConstructor; + + interface FeatureEffectProperties { + /** + * The graphical [css filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) operation applied to the features that do not meet the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) requirements. Currently, [grayscale](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/grayscale), [sepia](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/sepia), [hue-rotate](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate), [invert](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert), [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/opacity), [brightness](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness) and [contrast](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/contrast) css filter functions are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) + */ + excludedEffect?: string; + /** + * Indicates if labels for features that are [excluded](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) from the effect are visible. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedLabelsVisible) + * + * @default false + */ + excludedLabelsVisible?: boolean; + /** + * The filter that drives the effect. Features that meet the requirements specified in the filter will have the [includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) applied while features that do not meet meet the filter requirements will have the [excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#excludedEffect) applied. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) + */ + filter?: FeatureFilterProperties; + /** + * The graphical [css filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) operation applied to the features that meet the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#filter) requirements. Currently, [grayscale](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/grayscale), [sepia](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/sepia), [hue-rotate](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate), [invert](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert), [opacity](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/opacity), [brightness](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness) and [contrast](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/contrast) css filter functions are supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureEffect.html#includedEffect) + */ + includedEffect?: string; + } + + interface FeatureFilter extends Accessor, JSONSupport { + /** + * Specifies a search distance from a given [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) in a spatial filter. The [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#units) indicates the unit of measurement. In essence, setting this property creates a buffer at the specified size around the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The filter will use that buffer to display features in the layer or layer view that adhere to the to the indicated [spatial relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship). + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `distance` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#distance) + */ + distance: number; + /** + * The geometry to apply to the spatial filter. The spatial relationship as specified by [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship) will indicate how the geometry should be used to filter features. + * > **Known Limitations** [Mesh](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html) geometry types are currently not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) + */ + geometry: Geometry; + /** + * An array of objectIds of the features to be filtered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#objectIds) + */ + objectIds: number[]; + /** + * For spatial filters, this parameter defines the spatial relationship to filter features in the layer view against the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The spatial relationships discover how features are spatially related to each other. For example, you may want to know if a polygon representing a county completely contains points representing settlements. The spatial relationship is determined by whether the boundaries or interiors of a geometry intersect. + * * Boundary — The endpoints of all linear parts for line features, or the linear outline of a polygon. Only lines and polygons have boundaries. + * * Interior — Points are entirely interior and have no boundary. For lines and polygons, the interior is any part of the geometry that is not part of the boundary. + * + * + * The possible values for this parameter are described below and the images highlight the geometries returned for the specified spatial relationship for given geometries. The `intersects` spatial relationship returns features in the layer view that intersect the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). + * > **Known Limitations** The filter of [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) with 3D object scene layers only supports the spatialRelationsship `contains`, `intersects` and `disjoint`. + * ![intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/intersects.png) The `contains` spatial relationship returns features in the layer view that are completely contained by the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). ![contains](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/contains.png) The `crosses` spatial relationship returns features in the layer view when the interior of a filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) comes into contact with the interior or boundary of features in the layer view. In other words, the geometries share some interior area, but not all interior area. ![crosses](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/crosses.png) The `envelope-intersects` spatial relationship returns features in the layer view that intersect the envelope (or extent) of the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). ![envelope-intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/envelope-intersects.png) The `overlaps` spatial relationship returns features in the layer view that overlap the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). Only features of the same geometry can be compared. ![overlaps](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/overlap.png) The `touches` spatial relationship returns features in the layer view that touch the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The boundaries of the geometries intersect, but not their interiors. ![touches](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/touches.png) The `within` spatial relationship returns features in the layer view that completely contain the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). In other words, the filter geometry is completely `within` the features in the layer view. It is opposite of `contains`. ![within](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/within.png) The `disjoint` spatial relationship returns features in the layer view that do not intersect the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) in anyway. Opposite of `intersects`. ![disjoint](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/disjoint.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship) + * + * @default intersects + */ + spatialRelationship: string; + /** + * A range of time with start and end date. Only the features that fall within this time extent will be displayed. + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `timeExtent` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) + * + * @default null + */ + timeExtent: TimeExtent; + /** + * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#distance) is specified in a spatial filter. If `units` is not specified, the unit is derived from the filter [geometry's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) spatial reference. **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#units) + * + * @default null + */ + units: string; + /** + * A where clause for the feature filter. Any legal SQL92 where clause operating on the fields in the layer is allowed. Be sure to have the correct sequence of single and double quotes when writing the where clause in JavaScript. The field to be used for `where` clause must be added to [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) list when the layer is initialized. + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `where` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where) + */ + where: string; + + /** + * Creates a deep clone of FeatureFilter object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#clone) + * + * + */ + clone(): FeatureFilter; + /** + * Internal method. Enables a filter for rendering. A filter that is not enabled will be ignored in 2D rendering. This property is used to defer applying the result of a filter when it is set for the first time until after MT features have had their filterFlags updated + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#enable) + * + * + */ + enable(): void; + } + + interface FeatureFilterConstructor { + /** + * This class defines parameters for setting a client-side filter on a [layer view](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html). Once a FeatureFilter object's properties are defined, it can be used to set the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#filter) property of the layer view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html) + */ + + new (properties?: FeatureFilterProperties): FeatureFilter; + + fromJSON(json: any): FeatureFilter; + } + + export const FeatureFilter: FeatureFilterConstructor; + + interface FeatureFilterProperties { + /** + * Specifies a search distance from a given [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) in a spatial filter. The [units property](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#units) indicates the unit of measurement. In essence, setting this property creates a buffer at the specified size around the input [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The filter will use that buffer to display features in the layer or layer view that adhere to the to the indicated [spatial relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship). + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `distance` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#distance) + */ + distance?: number; + /** + * The geometry to apply to the spatial filter. The spatial relationship as specified by [spatialRelationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship) will indicate how the geometry should be used to filter features. + * > **Known Limitations** [Mesh](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html) geometry types are currently not supported. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) + */ + geometry?: GeometryProperties; + /** + * An array of objectIds of the features to be filtered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#objectIds) + */ + objectIds?: number[]; + /** + * For spatial filters, this parameter defines the spatial relationship to filter features in the layer view against the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The spatial relationships discover how features are spatially related to each other. For example, you may want to know if a polygon representing a county completely contains points representing settlements. The spatial relationship is determined by whether the boundaries or interiors of a geometry intersect. + * * Boundary — The endpoints of all linear parts for line features, or the linear outline of a polygon. Only lines and polygons have boundaries. + * * Interior — Points are entirely interior and have no boundary. For lines and polygons, the interior is any part of the geometry that is not part of the boundary. + * + * + * The possible values for this parameter are described below and the images highlight the geometries returned for the specified spatial relationship for given geometries. The `intersects` spatial relationship returns features in the layer view that intersect the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). + * > **Known Limitations** The filter of [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) with 3D object scene layers only supports the spatialRelationsship `contains`, `intersects` and `disjoint`. + * ![intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/intersects.png) The `contains` spatial relationship returns features in the layer view that are completely contained by the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). ![contains](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/contains.png) The `crosses` spatial relationship returns features in the layer view when the interior of a filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) comes into contact with the interior or boundary of features in the layer view. In other words, the geometries share some interior area, but not all interior area. ![crosses](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/crosses.png) The `envelope-intersects` spatial relationship returns features in the layer view that intersect the envelope (or extent) of the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). ![envelope-intersects](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/envelope-intersects.png) The `overlaps` spatial relationship returns features in the layer view that overlap the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). Only features of the same geometry can be compared. ![overlaps](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/overlap.png) The `touches` spatial relationship returns features in the layer view that touch the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). The boundaries of the geometries intersect, but not their interiors. ![touches](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/touches.png) The `within` spatial relationship returns features in the layer view that completely contain the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry). In other words, the filter geometry is completely `within` the features in the layer view. It is opposite of `contains`. ![within](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/within.png) The `disjoint` spatial relationship returns features in the layer view that do not intersect the filter [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) in anyway. Opposite of `intersects`. ![disjoint](https://developers.arcgis.com/javascript/assets/img/apiref/layers/spatialRelationships/disjoint.png) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#spatialRelationship) + * + * @default intersects + */ + spatialRelationship?: string; + /** + * A range of time with start and end date. Only the features that fall within this time extent will be displayed. + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `timeExtent` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#timeExtent) + * + * @default null + */ + timeExtent?: TimeExtentProperties; + /** + * The unit for calculating the buffer distance when [distance](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#distance) is specified in a spatial filter. If `units` is not specified, the unit is derived from the filter [geometry's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#geometry) spatial reference. **Possible Values:** feet | miles | nautical-miles | us-nautical-miles | meters | kilometers + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#units) + * + * @default null + */ + units?: string; + /** + * A where clause for the feature filter. Any legal SQL92 where clause operating on the fields in the layer is allowed. Be sure to have the correct sequence of single and double quotes when writing the where clause in JavaScript. The field to be used for `where` clause must be added to [outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) list when the layer is initialized. + * > **Known Limitations** On 3D object scene layers in [SceneLayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html) `where` is not supported . + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-support-FeatureFilter.html#where) + */ + where?: string; + } + + interface MapView extends View, MapViewBase, BreakpointsOwner { /** * Represents the view's center point; when setting the center, you may pass a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) instance or an array of numbers representing a longitude/latitude pair (`[-100.4593, 36.9014]`). Setting the center immediately changes the current view. For animating the view, see [goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo). If set in the constructor, this property will be ignored if the [viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#viewpoint) or [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#extent) properties are also set in the constructor. The returned [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) object is always in the spatial reference of the [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#map) and may be modified internally. To persist the returned object, create a clone using [Point.clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#clone). * @@ -45206,53 +49084,15 @@ declare namespace __esri { * */ focus(): void; - /** - * Sets the view to a given target. The target parameter can be one of the following: - * * `[longitude, latitude]` pair of coordinates - * * [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) (or array of [Geometry[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html)) - * * [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) (or array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)) - * * [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) - * * Object with a combination of `target`, `center` and `scale` properties (with `target` being any of the types listed above). The `center` property is provided as a convenience to animate the [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#center) and is equivalent to specifying the `target` with the center [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). - * - * - * This function returns a promise which resolves as soon as the new view has been set to the target. If the transition is animated, then the ongoing animation can be obtained using [MapView.animation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#animation). If a tiled map service is used as the basemap and `snapToZoom` property is set to `true` in [constraints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints), the `goTo` method will zoom in to fit the defined `target`. If `snapToZoom` property is set to `false`, the `goTo` method will zoom to the exact `target`. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - * - * @param target The target location/viewpoint to animate to. When using an object for `target`, use the properties in the table below. - * @param target.target The target of the animation. - * @param target.center The [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#center) to go to. - * @param target.scale The [MapView.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) to go to. - * @param target.zoom The [MapView.zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#zoom) to go to. - * @param options Animation options. See properties below for object specifications. - * @param options.animate Indicates if the transition to the new view should be animated. If set to false, `duration` and `easing` properties are ignored. - * @param options.duration The duration of the animation in milliseconds. - * @param options.easing The easing function used for the animation. See [easing functions](https://easings.net/) for graphical representations of these functions. **Possible Values:** linear | ease | ease-in | ease-out | ease-in-out - * - */ - goTo( - target: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint | MapViewGoToTarget, - options?: MapViewGoToOptions - ): IPromise; - /** - * Indicates whether there is an event listener on the instance that matches the provided event name. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hasEventListener) - * - * - */ - hasEventListener(): void; /** * Returns the topmost feature from each layer that intersects the specified screen coordinates. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), and [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html). At 4.6 and later, a hit test will always return a result from [VectorTileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VectorTileLayer.html). However, the result will only indicate the ID and the name of the layer within the [vector tile style](https://doc.arcgis.com/en/arcgis-online/reference/tile-layers.htm#ESRI_SECTION1_8F68399EB47B48FF9EF46719FCC96978) that intersects the screen point. Detailed attribute and spatial information about the actual feature represented in the layer is not returned. HitTest results returned from VectorTileLayers are primarily used for [Vector tile style editor applications](https://maps.esri.com/jg/VectorBasemapStyleEditor/index.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) * - * @param screenPoint The screen coordinates of the click on the view. - * @param screenPoint.x The horizontal screen coordinate of the click on the view. - * @param screenPoint.y The vertical screen coordinate of the click on the view. + * @param screenPoint The screen coordinates (or native mouse event) of the click on the view. * */ - hitTest(screenPoint: MapViewHitTestScreenPoint): IPromise; + hitTest(screenPoint: ScreenPoint | MouseEvent): IPromise; /** * Registers an event handler on the instance. Call this method to hook an event with a listener. See the [Events summary table](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#events-summary) for a list of listened events. * @@ -45280,26 +49120,23 @@ declare namespace __esri { */ takeScreenshot(options?: MapViewTakeScreenshotOptions): IPromise; /** - * Converts the given screen point to a [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). The [screen point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html) represents a point in terms of pixels relative to the top-left corner of the view. + * Converts the given screen point to a [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). The screen point represents a point in terms of pixels relative to the top-left corner of the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toMap) * - * @param screenPoint The screen coordinates to convert. - * @param screenPoint.x The horizontal screen coordinate to convert. - * @param screenPoint.y The vertical screen coordinate to convert. + * @param screenPoint The location on the screen (or native mouse event) to convert. * */ - toMap(screenPoint: MapViewToMapScreenPoint): Point; + toMap(screenPoint: ScreenPoint | MouseEvent): Point; /** - * Converts the given [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) to a [screen point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html). The [screen point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html) represents a point in terms of pixels relative to the top-left corner of the view. + * Converts the given [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) to a screen point. The screen point represents a point in terms of pixels relative to the top-left corner of the view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toScreen) * * @param point A point geometry. - * @param screenPoint ScreenPoint object that will reference the result. * */ - toScreen(point: Point, screenPoint?: ScreenPoint): ScreenPoint; + toScreen(point: Point): ScreenPoint; on(name: "resize", eventHandler: MapViewResizeEventHandler): IHandle; @@ -45596,6 +49433,8 @@ declare namespace __esri { } export interface MapViewKeyUpEvent { + key: string; + native: any; stopPropagation: Function; @@ -45696,60 +49535,6 @@ declare namespace __esri { effectiveMaxScale?: number; } - export interface MapViewGoToOptions extends Object { - /** - * Indicates if the transition to the new view should be animated. If set to false, `duration` and `easing` properties are ignored. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - * - * @default true - */ - animate?: boolean; - /** - * The duration of the animation in milliseconds. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - * - * @default 200 - */ - duration?: number; - /** - * The easing function used for the animation. See [easing functions](https://easings.net/) for graphical representations of these functions. **Possible Values:** linear | ease | ease-in | ease-out | ease-in-out - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - * - * @default ease - */ - easing?: string | Function; - } - - export interface MapViewGoToTarget extends Object { - /** - * The target of the animation. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - */ - target?: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint; - /** - * The [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#center) to go to. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - */ - center?: number[]; - /** - * The [MapView.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#scale) to go to. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - */ - scale?: number; - /** - * The [MapView.zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#zoom) to go to. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) - */ - zoom?: number; - } - export interface MapViewHighlightOptionsProperties extends Object { /** * The color of the highlight. @@ -45804,21 +49589,6 @@ declare namespace __esri { fillOpacity?: number; } - export interface MapViewHitTestScreenPoint extends Object { - /** - * The horizontal screen coordinate of the click on the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) - */ - x: number; - /** - * The vertical screen coordinate of the click on the view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) - */ - y: number; - } - export interface MapViewTakeScreenshotOptions extends Object { /** * The format of the resulting encoded data url. **Possible values**: jpg | png. @@ -45889,21 +49659,6 @@ declare namespace __esri { height?: number; } - export interface MapViewToMapScreenPoint extends Object { - /** - * The horizontal screen coordinate to convert. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toMap) - */ - x: number; - /** - * The vertical screen coordinate to convert. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toMap) - */ - y: number; - } - export interface MapViewMouseWheelEvent { deltaY: number; @@ -46040,6 +49795,26 @@ declare namespace __esri { width: number; } + /** + * An object representing a point on the screen. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#ScreenPoint) + */ + export interface ScreenPoint extends Object { + /** + * The x coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#ScreenPoint) + */ + x: number; + /** + * The y coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#ScreenPoint) + */ + y: number; + } + /** * Object returned when [takeScreenshot()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#takeScreenshot) promise resolves: * @@ -46060,6 +49835,97 @@ declare namespace __esri { data: ImageData; } + interface MapViewBase { + /** + * Sets the view to a given target. The target parameter can be one of the following: + * * `[longitude, latitude]` pair of coordinates + * * [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) (or array of [Geometry[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html)) + * * [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) (or array of [Graphic[]](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)) + * * [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) + * * Object with a combination of `target`, `center` and `scale` properties (with `target` being any of the types listed above). The `center` property is provided as a convenience to animate the [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#center) and is equivalent to specifying the `target` with the center [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). + * + * + * This function returns a promise which resolves as soon as the new view has been set to the target. If the transition is animated, then the ongoing animation can be obtained using [MapView.animation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#animation). If a tiled map service is used as the basemap and `snapToZoom` property is set to `true` in [constraints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#constraints), the `goTo` method will zoom in to fit the defined `target`. If `snapToZoom` property is set to `false`, the `goTo` method will zoom to the exact `target`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + * + * @param target The target location/viewpoint to animate to. When using an object for `target`, use the properties in the table below. + * @param target.target The target of the animation. + * @param target.center The [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#center) to go to. + * @param target.scale The [MapView.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#scale) to go to. + * @param target.zoom The [MapView.zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#zoom) to go to. + * @param options Animation options. See properties below for object specifications. + * @param options.animate Indicates if the transition to the new view should be animated. If set to false, `duration` and `easing` properties are ignored. + * @param options.duration The duration of the animation in milliseconds. + * @param options.easing The easing function used for the animation. See [easing functions](https://easings.net/) for graphical representations of these functions. **Possible Values:** linear | ease | ease-in | ease-out | ease-in-out + * + */ + goTo( + target: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint | MapViewBaseGoToTarget, + options?: MapViewBaseGoToOptions + ): IPromise; + } + + interface MapViewBaseConstructor { + new (): MapViewBase; + } + + export const MapViewBase: MapViewBaseConstructor; + + export interface MapViewBaseGoToOptions extends Object { + /** + * Indicates if the transition to the new view should be animated. If set to false, `duration` and `easing` properties are ignored. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + * + * @default true + */ + animate?: boolean; + /** + * The duration of the animation in milliseconds. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + * + * @default 200 + */ + duration?: number; + /** + * The easing function used for the animation. See [easing functions](https://easings.net/) for graphical representations of these functions. **Possible Values:** linear | ease | ease-in | ease-out | ease-in-out + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + * + * @default ease + */ + easing?: string | Function; + } + + export interface MapViewBaseGoToTarget extends Object { + /** + * The target of the animation. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + */ + target?: number[] | Geometry | Geometry[] | Graphic | Graphic[] | Viewpoint; + /** + * The [MapView.center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#center) to go to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + */ + center?: number[]; + /** + * The [MapView.scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#scale) to go to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + */ + scale?: number; + /** + * The [MapView.zoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#zoom) to go to. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapViewBase.html#goTo) + */ + zoom?: number; + } + export interface MapViewDragEventOrigin extends Object { x: number; @@ -46223,6 +50089,9 @@ declare namespace __esri { * // Disable automatic lighting updates by camera tracking * view.environment.lighting.cameraTrackingEnabled = true; * + * // Enable displaying shadows cast by the sun + * view.environment.lighting.directShadowsEnabled = true; + * * // Set a background color * var view = new SceneView({ * container: "view", @@ -46250,6 +50119,12 @@ declare namespace __esri { * @default null */ extent: Extent; + /** + * The view for the ground of the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#groundView) + */ + readonly groundView: GroundView; /** * Options for configuring the highlight. Use the highlight method on the appropriate [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) to highlight a feature. * @@ -46350,24 +50225,20 @@ declare namespace __esri { options?: SceneViewGoToOptions ): IPromise; /** - * Indicates whether there is an event listener on the instance that matches the provided event name. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hasEventListener) - * - * - */ - hasEventListener(): void; - /** - * Returns the topmost feature from each layer that intersects the specified screen coordinates. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html), [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html), and [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html). Draped graphics (i.e. graphics in layers where the [elevation mode](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevationInfo) is `on-the-ground`) are currently **not** returned from this method, even when they intersect the input screen point. When the ground surface is hit, but no graphic is found, then the result of hitTest will be a single object with its mapPoint set to the point on the surface that was hit, but its graphic will be set to `null`. + * Returns graphics that intersect the specified screen coordinate. The following layer types will return a result if a hit is made on an intersecting feature: [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), [PointCloudLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) and [SceneView.graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#graphics). If no options are specified, graphics that are behind the ground surface will not be returned unless the ground surface is semi-transparent. Otherwise, using the [map.ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#ground) in the include and exclude options determines whether the ground surface prevents hit testing graphics that are under it. Starting with version 4.11, if a label intersects the specified screen coordinates then the result of the hitTest will contain the graphic associated with that label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) * - * @param screenPoint The screen coordinates of the click on the view. - * @param screenPoint.x The horizontal screen coordinate of the click on the view. - * @param screenPoint.y The vertical screen coordinate of the click on the view. + * @param screenPoint The screen coordinates (or native mouse event) of the click on the view. + * @param options Intersection test options. By default the [map.ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#ground) is excluded if its opacity is smaller than one. + * @param options.include A list of layers and graphics to include for intersection testing. All layers and graphics will be included if include is not specified. + * @param options.exclude A list of layers and graphics to include for intersection testing. No layers or graphics will be excluded if exclude is not specified. * */ - hitTest(screenPoint: SceneViewHitTestScreenPoint): IPromise; + hitTest( + screenPoint: SceneViewScreenPoint | MouseEvent, + options?: SceneViewHitTestOptions + ): IPromise; /** * Registers an event handler on the instance. Call this method to hook an event with a listener. See the [Events summary table](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#events-summary) for a list of listened events. * @@ -46380,7 +50251,7 @@ declare namespace __esri { */ on(type: string | string[], modifiersOrHandler: string[] | EventHandler, handler?: EventHandler): IHandle; /** - * Create a screenshot of the current view. Screenshots include only elements that are rendered on the canvas (all geographical elements), but excludes overlayed DOM elements (UI, popups, measurement labels, etc.). By default, a screenshot of the whole view is created. Different options allow for creating different types of screenshots, including taking screenshots at different aspect ratios, different resolutions and creating thumbnails. Screenshots are always taken inside the padded area of the view (see [padding](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#padding)). + * Create a screenshot of the current view. Screenshots include only elements that are rendered on the canvas (all geographical elements), but excludes overlayed DOM elements (UI, popups, etc.). By default, a screenshot of the whole view is created. Different options allow for creating different types of screenshots, including taking screenshots at different aspect ratios, different resolutions and creating thumbnails. Screenshots are always taken inside the padded area of the view (see [padding](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#padding)). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#takeScreenshot) * @@ -46398,23 +50269,22 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toMap) * - * @param screenPoint The screen coordinates to convert. - * @param screenPoint.x The horizontal screen coordinate to convert. - * @param screenPoint.y The vertical screen coordinate to convert. - * @param mapPoint The point object that will reference the result. + * @param screenPoint The location on the screen (or native mouse event) to convert. + * @param options Intersection test options. By default only the [map.ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#ground) and any [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) are included. + * @param options.include A list of layers and graphics to include for intersection testing. All layers and graphics will be included if include is not specified. + * @param options.exclude A list of layers and graphics to include for intersection testing. No layers or graphics will be excluded if exclude is not specified. * */ - toMap(screenPoint: SceneViewToMapScreenPoint, mapPoint?: Point): Point; + toMap(screenPoint: SceneViewScreenPoint | MouseEvent, options?: SceneViewToMapOptions): Point; /** - * Converts the given [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) to a [screen point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html). + * Converts the given [map point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) to a screen point. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toScreen) * * @param point A point geometry. - * @param screenPoint ScreenPoint object that will reference the result. * */ - toScreen(point: Point, screenPoint?: ScreenPoint): ScreenPoint; + toScreen(point: Point): SceneViewScreenPoint; on(name: "resize", eventHandler: SceneViewResizeEventHandler): IHandle; @@ -46550,6 +50420,9 @@ declare namespace __esri { * // Disable automatic lighting updates by camera tracking * view.environment.lighting.cameraTrackingEnabled = true; * + * // Enable displaying shadows cast by the sun + * view.environment.lighting.directShadowsEnabled = true; + * * // Set a background color * var view = new SceneView({ * container: "view", @@ -46727,6 +50600,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) */ results: SceneViewHitTestResultResults[]; + /** + * Ground intersection result. The ground hit result will always be returned, even if the ground was excluded from the [hitTest](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + ground: HitTestResultGround; + /** + * The screen coordinates (or native mouse event) of the click on the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + screenPoint: SceneViewScreenPoint | MouseEvent; } export interface SceneViewHoldEvent { @@ -46769,6 +50654,13 @@ declare namespace __esri { y: number; } + /** + * A layer or graphic to be used in [toMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toMap) and [hitTest](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) filter options. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#IntersectItem) + */ + export type IntersectItem = Graphic | Layer | BuildingSublayer; + export interface SceneViewKeyDownEvent { key: string; @@ -46784,6 +50676,8 @@ declare namespace __esri { } export interface SceneViewKeyUpEvent { + key: string; + native: any; stopPropagation: Function; @@ -47238,7 +51132,7 @@ declare namespace __esri { */ date?: DateProperties; /** - * Indicates whether to show shadows cast by the sun. Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom levels, shadows are not displayed. + * Indicates whether to show shadows cast by the sun. Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom levels, shadows are not displayed. For more control on which 3D objects cast shadows use the `castShadows` property available on [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#castShadows), [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#castShadows), [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#castShadows), and [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html#castShadows). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment) * @@ -47273,7 +51167,7 @@ declare namespace __esri { */ date?: Date; /** - * Indicates whether to show shadows cast by the sun. Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom levels, shadows are not displayed. + * Indicates whether to show shadows cast by the sun. Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom levels, shadows are not displayed. For more control on which 3D objects cast shadows use the `castShadows` property available on [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html#castShadows), [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol3DLayer.html#castShadows), [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html#castShadows), and [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html#castShadows). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment) * @@ -47436,19 +51330,25 @@ declare namespace __esri { fillOpacity?: number; } - export interface SceneViewHitTestScreenPoint extends Object { + export interface SceneViewHitTestOptions extends Object { /** - * The horizontal screen coordinate of the click on the view. + * A list of layers and graphics to include for intersection testing. All layers and graphics will be included if include is not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) */ - x: number; + include?: + | (IntersectItem | Collection | IntersectItem[] | Ground)[] + | Collection + | IntersectItem; /** - * The vertical screen coordinate of the click on the view. + * A list of layers and graphics to include for intersection testing. No layers or graphics will be excluded if exclude is not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) */ - y: number; + exclude?: + | (IntersectItem | Collection | IntersectItem[] | Ground)[] + | Collection + | IntersectItem; } export interface SceneViewTakeScreenshotOptions extends Object { @@ -47515,18 +51415,44 @@ declare namespace __esri { height?: number; } - export interface SceneViewToMapScreenPoint extends Object { + export interface SceneViewToMapOptions extends Object { /** - * The horizontal screen coordinate to convert. + * A list of layers and graphics to include for intersection testing. All layers and graphics will be included if include is not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toMap) */ - x: number; + include?: + | (IntersectItem | Collection | IntersectItem[] | Ground)[] + | Collection + | IntersectItem; /** - * The vertical screen coordinate to convert. + * A list of layers and graphics to include for intersection testing. No layers or graphics will be excluded if exclude is not specified. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#toMap) */ + exclude?: + | (IntersectItem | Collection | IntersectItem[] | Ground)[] + | Collection + | IntersectItem; + } + + /** + * An object representing a point on the screen. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ScreenPoint) + */ + export interface SceneViewScreenPoint extends Object { + /** + * The x coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ScreenPoint) + */ + x: number; + /** + * The y coordinate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#ScreenPoint) + */ y: number; } @@ -47556,9 +51482,24 @@ declare namespace __esri { y: number; } + export interface HitTestResultGround extends Object { + /** + * The point at which the ground was hit while performing the hitTest. This may be `null` when the ground was not hit at all (for example by clicking on the sky). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + mapPoint: Point; + /** + * The distance from camera position to the ground hit. The distance will be `0` if the ground was not hit at all. In global scenes the distance will be in meters while in local scenes the distance will be in the unit of the spatial reference of the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + distance: number; + } + export interface SceneViewHitTestResultResults extends Object { /** - * A graphic present in the view that intersects the input screen coordinates. If the graphic comes from a layer with an applied [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html), then the [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) property will be empty. Other properties will be empty based on the context in which the graphic is fetched. + * A graphic present in the view that intersects the input screen coordinates. Starting with version 4.11, if a label intersects the input screen coordinates the corresponding graphic is returned. If the graphic comes from a layer with an applied [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html), then the [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) property will be empty. Other properties will be empty based on the context in which the graphic is fetched. Some layers do not have a [graphic.geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#geometry) (for example: [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) and [PointCloudLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html) `PointCloudLayer`) The [graphic.attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) only includes attributes which are loaded by the client, for this reason it can be a subset of all attributes. [FeatureLayer.outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields) with `["*"]` can be used to force all attributes to be present. The [graphic.symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol) exists only for graphics coming from [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) or [view.graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics) but it is possible to compute the displayed symbology with [getDisplayedSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html#getDisplayedSymbol). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) */ @@ -47569,6 +51510,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) */ mapPoint: Point; + /** + * The distance from the camera position to the point geometry hit on this graphic. In global scenes the distance will be in meters while in local scenes the distance will be in the unit of the spatial reference of the view. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult) + */ + distance: number; } interface DefaultUI extends UI { @@ -47644,10 +51591,10 @@ declare namespace __esri { * * @param component The component(s) to add to the UI. This can be a widget instance, HTML element, a string value representing a DOM node ID, or an array containing a combination of any of those types. See the example snippets below for code examples. Alternatively, you can pass an array of objects with the following specification. * @param component.component The component to add to the UI. This can be a widget instance, HTML element, a string value representing a DOM node ID. - * @param component.position The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * @param component.position The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * @param component.index The placement index of the component. This index shows where to place the component relative to other components. For example a value of `0` would place it topmost when position is top-*, leftmost for bottom-left and right most for bottom-right. - * @param position The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual - * @param position.position The position in the view at which to add the component(s). If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * @param position The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual + * @param position.position The position in the view at which to add the component(s). If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * @param position.index The placement index of the component(s). This index shows where to place the component relative to other components. For example a value of `0` would place it topmost when position is top-*, leftmost for bottom-left and right most for bottom-right. * */ @@ -47657,7 +51604,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#empty) * - * @param position The position from which to remove all components. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * @param position The position from which to remove all components. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * */ empty(position?: string): void; @@ -47668,8 +51615,8 @@ declare namespace __esri { * * @param component The component(s) to move. This value can be a widget instance, HTML element, a string value representing a DOM node ID, or an array containing a combination of any of those types. See the example snippets below for code examples. Alternatively, you can pass an array of objects with the following specification. * @param component.component The component to move. This can be a widget instance, HTML element, a string value representing a DOM node ID. - * @param component.position The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual - * @param position The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * @param component.position The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual + * @param position The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * */ move(component: Widget | HTMLElement | string | any[] | UIMoveComponent, position?: string): void; @@ -47727,7 +51674,7 @@ declare namespace __esri { */ component: Widget | HTMLElement | string; /** - * The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * The position in the view at which to add the component. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#add) */ @@ -47742,7 +51689,7 @@ declare namespace __esri { export interface UIAddPosition extends Object { /** - * The position in the view at which to add the component(s). If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * The position in the view at which to add the component(s). If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#add) */ @@ -47763,14 +51710,14 @@ declare namespace __esri { */ component: Widget | HTMLElement | string; /** - * The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. If not specified, `manual` is used by default. **Possible Values:** top-left | top-right | bottom-left | bottom-right | manual + * The destination position. The component will be placed in the UI [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#container) when not provided. If not specified, `manual` is used by default. **Possible Values:** bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#move) */ position?: string; } - interface View extends Accessor, corePromise, DOMContainer { + interface View extends Accessor, corePromise, Evented, DOMContainer { /** * Collection containing a flat list of all the created [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) related to the basemap, operational layers, and group layers in this view. * @@ -47789,12 +51736,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics) */ graphics: Collection; - /** - * The view for the ground of the map. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#groundView) - */ - readonly groundView: GroundView; /** * Options to configure input handling of the View. * @@ -47839,7 +51780,7 @@ declare namespace __esri { * When `true`, this property indicates whether the view successfully satisfied all dependencies, signaling that the following conditions are met. * * The view has a [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#map). If [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#map) is a [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html) or a [WebScene](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html), then the map or scene must be [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#loaded). * * The view has a [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#container) with a size greater than `0`. - * * The view has a [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#spatialReference). + * * The view has a [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#spatialReference), a [center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#center), and a [scale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#scale). These also can be inferred by setting an [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#extent). * * * When a view becomes ready it will resolve itself and invoke the callback defined in [when()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#when) where code can execute on a working view. Subsequent changes to a view's readiness would typically be handled by watching `view.ready` and providing logic for cases where the [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#map) or [container](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#container) change. @@ -47875,8 +51816,6 @@ declare namespace __esri { * Indication whether the view is animating, being interacted with or resizing. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#stationary) - * - * @default true */ readonly stationary: boolean; /** @@ -47913,6 +51852,13 @@ declare namespace __esri { */ new (properties?: ViewProperties): View; + + /** + * Contains the collection of active views on the page. Only views that are [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#ready) appear in the collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#views) + */ + readonly views: Collection; } export const View: ViewConstructor; @@ -48158,7 +52104,7 @@ declare namespace __esri { interface WebMapConstructor { /** - * Loads a [WebMap](https://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm) from [ArcGIS Online](https://www.arcgis.com/home/) or [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/latest/administer/windows/what-is-portal-for-arcgis-.htm) into a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). + * Loads a [WebMap](https://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm) from [ArcGIS Online](https://www.arcgis.com/home/) or [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/latest/administer/windows/what-is-portal-for-arcgis-.htm) into a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). It defines the content, style, and bookmarks of your webmap, and it can be shared across multiple ArcGIS web and desktop applications. The webmap is saved as a JSON document that can be consumed by the ArcGIS API for JavaScript via the WebMap class to easily create compelling 2D applications. The JSON document is written according to the [webmap specification](https://developers.arcgis.com/web-map-specification/). Although you can easily create your own webmaps, there are many sample [webmaps in ArcGIS Online](https://webmaps.maps.arcgis.com/home/group.html?id=bf19f0a0871649c49f6743dbe8138ecb) that you can use to get started with the API. You may modify or add new content to these webmaps. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html) */ @@ -48213,6 +52159,51 @@ declare namespace __esri { widgets?: any; } + interface ColorBackground extends JSONSupport { + /** + * The color of the background. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-background-ColorBackground.html#color) + * + * @default black + */ + color: Color; + /** + * For ColorBackground the type is always `color`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-background-ColorBackground.html#type) + */ + readonly type: string; + + /** + * Creates a deep clone of the object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-background-ColorBackground.html#clone) + * + * + */ + clone(): ColorBackground; + } + + interface ColorBackgroundConstructor { + new (properties?: ColorBackgroundProperties): ColorBackground; + + fromJSON(json: any): ColorBackground; + } + + export const ColorBackground: ColorBackgroundConstructor; + + interface ColorBackgroundProperties { + /** + * The color of the background. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-background-ColorBackground.html#color) + * + * @default black + */ + color?: Color | number[] | string; + } + interface Bookmark extends Accessor { /** * The extent of the specified bookmark item. @@ -48271,6 +52262,14 @@ declare namespace __esri { } interface InitialViewProperties extends Accessor, corePromise { + /** + * The background color of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-InitialViewProperties.html#background) + * + * @default null + */ + background: ColorBackground; /** * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. * @@ -48301,6 +52300,14 @@ declare namespace __esri { export const InitialViewProperties: InitialViewPropertiesConstructor; interface InitialViewPropertiesProperties { + /** + * The background color of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-InitialViewProperties.html#background) + * + * @default null + */ + background?: ColorBackgroundProperties; /** * The spatial reference of the [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html). This indicates the [Projected Coordinate System](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) or the [Geographic Coordinate System](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) used to locate geographic features in the map. * @@ -48821,9 +52828,9 @@ declare namespace __esri { interface BackgroundProperties {} - interface ColorBackground extends Background, JSONSupport { + interface backgroundColorBackground extends Background, JSONSupport { /** - * The color of the background. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the background. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-background-ColorBackground.html#color) * @@ -48838,26 +52845,26 @@ declare namespace __esri { * * */ - clone(): ColorBackground; + clone(): backgroundColorBackground; } - interface ColorBackgroundConstructor { + interface backgroundColorBackgroundConstructor { /** * This type of [Background](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-background-Background.html) allows to set a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) as the background of a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). The view environment stars and atmosphere will show on top of the background when enabled. To have a clear background color only, make sure to set both the [view.environment.starsEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment) and [view.environment.atmosphereEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#environment) properties to `false`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-background-ColorBackground.html) */ - new (properties?: ColorBackgroundProperties): ColorBackground; + new (properties?: backgroundColorBackgroundProperties): backgroundColorBackground; - fromJSON(json: any): ColorBackground; + fromJSON(json: any): backgroundColorBackground; } - export const ColorBackground: ColorBackgroundConstructor; + export const backgroundColorBackground: backgroundColorBackgroundConstructor; - interface ColorBackgroundProperties extends BackgroundProperties { + interface backgroundColorBackgroundProperties extends BackgroundProperties { /** - * The color of the background. This can be autocast with a named string, hex string, array of rgb or rgba values, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. + * The color of the background. This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-webscene-background-ColorBackground.html#color) * @@ -49649,13 +53656,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#label) - */ - readonly label: string; + iconClass: string; /** * Unit system (imperial, metric) or specific unit used for displaying the area values. **Possible Values:** metric | imperial | square-inches | square-feet | square-us-feet | square-yards | square-miles | square-meters | square-kilometers | acres | ares | hectares * @@ -49716,6 +53717,12 @@ declare namespace __esri { export const AreaMeasurement2D: AreaMeasurement2DConstructor; interface AreaMeasurement2DProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D.html#iconClass) + */ + iconClass?: string; /** * Unit system (imperial, metric) or specific unit used for displaying the area values. **Possible Values:** metric | imperial | square-inches | square-feet | square-us-feet | square-yards | square-miles | square-meters | square-kilometers | acres | ares | hectares * @@ -49790,13 +53797,14 @@ declare namespace __esri { */ readonly modes: string[]; /** - * The ViewModel's state. **Possible Values:** disabled | ready | measuring + * The ViewModel's state. **Possible Values:** disabled | ready | measuring | measured * * Value | Description * ------------|------------- * disabled | not ready yet * ready | ready for measuring * measuring | measuring has started + * measured | measuring has finished * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement2D-AreaMeasurement2DViewModel.html#state) @@ -49985,6 +53993,7 @@ declare namespace __esri { * disabled | not ready yet * ready | ready for measuring * measuring | currently measuring + * measured | measuring has finished * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-AreaMeasurement3D-AreaMeasurement3DViewModel.html#state) @@ -50116,7 +54125,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#iconClass) */ - readonly iconClass: string; + iconClass: string; /** * Text used to split attribution by [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) * @@ -50125,12 +54134,6 @@ declare namespace __esri { * @default | */ itemDelimiter: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#label) - */ - readonly label: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -50167,6 +54170,12 @@ declare namespace __esri { export const Attribution: AttributionConstructor; interface AttributionProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution.html#iconClass) + */ + iconClass?: string; /** * Text used to split attribution by [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) * @@ -50266,12 +54275,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#iconClass) */ iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery.html#label) - */ - readonly label: string; /** * The source for basemaps that the widget will display. This property can be autocast with an array or [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [Basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)s, a [Portal](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html) instance, or a URL to a portal instance. The default source is a [PortalBasemapsSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html) that points to the default portal instance set in [esriConfig.portalUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl). * @@ -50750,19 +54753,13 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#bookmarks) */ - readonly bookmarks: Collection; + bookmarks: Collection; /** * The widget's default CSS icon class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#label) - */ - readonly label: string; + iconClass: string; /** * The view from which the widget will operate. * @@ -50808,6 +54805,18 @@ declare namespace __esri { export const Bookmarks: BookmarksConstructor; interface BookmarksProperties extends WidgetProperties, GoToProperties { + /** + * A collection of [Bookmark](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html)s. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#bookmarks) + */ + bookmarks?: CollectionProperties; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks.html#iconClass) + */ + iconClass?: string; /** * The view from which the widget will operate. * @@ -50834,7 +54843,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html#bookmarks) */ - readonly bookmarks: Collection; + bookmarks: Collection; /** * The view model's state. **Possible Values:** loading | disabled * @@ -50868,6 +54877,12 @@ declare namespace __esri { export const BookmarksViewModel: BookmarksViewModelConstructor; interface BookmarksViewModelProperties extends GoToProperties { + /** + * A collection of [Bookmark](https://developers.arcgis.com/javascript/latest/api-reference/esri-webmap-Bookmark.html)s. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html#bookmarks) + */ + bookmarks?: CollectionProperties; /** * The view from which the widget will operate. * @@ -51142,13 +55157,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#label) - */ - readonly label: string; + iconClass: string; /** * The view in which the Compass obtains and indicates camera [heading](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading), using a (SceneView) or rotation (MapView). * @@ -51193,6 +55202,12 @@ declare namespace __esri { export const Compass: CompassConstructor; interface CompassProperties extends WidgetProperties, GoToProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html#iconClass) + */ + iconClass?: string; /** * The view in which the Compass obtains and indicates camera [heading](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading), using a (SceneView) or rotation (MapView). * @@ -51779,13 +55794,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#label) - */ - readonly label: string; + iconClass: string; /** * The maximum number of stops allowed for routing. * @@ -51874,6 +55883,12 @@ declare namespace __esri { export const Directions: DirectionsConstructor; interface DirectionsProperties extends WidgetProperties, GoToProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#iconClass) + */ + iconClass?: string; /** * The maximum number of stops allowed for routing. * @@ -51974,7 +55989,7 @@ declare namespace __esri { * * @default null | 'Driving Time' */ - readonly selectedTravelMode: DirectionsViewModelSelectedTravelMode; + selectedTravelMode: DirectionsViewModelSelectedTravelMode; /** * The Service Description object returned by the Route REST Endpoint. This object contains service specific details like available Cost attributes, supported Restrictions, default Attribute Parameter Values, Service Limits (like maximum input stop count), default Impedance Attribute, etc. This information is useful when implementing complex logistics scenarios operating with limitations or preferences on vehicle or stop properties, for example avoiding toll roads, dealing with hazardous materials, working with stop service times, etc. * @@ -52073,6 +56088,15 @@ declare namespace __esri { * */ highlightSegment(maneuver: Graphic): void; + /** + * This method should be called to load the view model's routing resources. + * > You must first call this before using `DirectionsViewModel`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#load) + * + * + */ + load(): IPromise; /** * Resets the state of the ViewModel, clearing off all the input stops, and results in the widget. The results persist in the map. * @@ -52092,12 +56116,6 @@ declare namespace __esri { } interface DirectionsViewModelConstructor { - /** - * Provides the communication and data manipulation logic for the [Directions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html) widget. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html) - */ - new (properties?: DirectionsViewModelProperties): DirectionsViewModel; } @@ -52138,6 +56156,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#routeSymbol) */ routeSymbol?: SimpleLineSymbolProperties; + /** + * The selected travel mode. More information can be found in the [ArcGIS Online documentation](https://doc.arcgis.com/en/arcgis-online/reference/travel-modes.htm#GUID-96DF7F50-E0B2-4BF3-8271-EB515D3F0107). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions-DirectionsViewModel.html#selectedTravelMode) + * + * @default null | 'Driving Time' + */ + selectedTravelMode?: DirectionsViewModelSelectedTravelMode; /** * An array of graphics that define the stop locations along the route. * @@ -52465,7 +56491,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html#SearchProperties) */ - sources?: Collection; + sources?: Collection; /** * Indicates whether to display suggestions as the user enters input text in the widget. * @@ -52576,6 +56602,7 @@ declare namespace __esri { * disabled | not ready yet * ready | ready for measuring * measuring | currently measuring + * measured | measuring has finished * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectLineMeasurement3D-DirectLineMeasurement3DViewModel.html#state) @@ -52706,13 +56733,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html#label) - */ - readonly label: string; + iconClass: string; /** * Unit system (imperial, metric) or specific unit used for displaying the distance values. **Possible Values:** metric | imperial | inches | feet | us-feet | yards | miles | nautical-miles | meters | kilometers * @@ -52771,6 +56792,12 @@ declare namespace __esri { export const DistanceMeasurement2D: DistanceMeasurement2DConstructor; interface DistanceMeasurement2DProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D.html#iconClass) + */ + iconClass?: string; /** * Unit system (imperial, metric) or specific unit used for displaying the distance values. **Possible Values:** metric | imperial | inches | feet | us-feet | yards | miles | nautical-miles | meters | kilometers * @@ -52843,13 +56870,14 @@ declare namespace __esri { */ readonly modes: string[]; /** - * The view model's state. **Possible Values:** disabled | ready | measuring + * The view model's state. **Possible Values:** disabled | ready | measuring | measured * * Value | Description * ------------|------------- * disabled | not ready yet * ready | ready for measuring * measuring | measuring has started + * measured | measuring has finished * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DistanceMeasurement2D-DistanceMeasurement2DViewModel.html#state) @@ -52925,6 +56953,787 @@ declare namespace __esri { geometry: any; } + interface Editor extends Widget { + /** + * A property indicating the current active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#activeWorkflow) + */ + readonly activeWorkflow: Workflow; + /** + * An array of string values which specifies what end users are allowed to edit. For example, a feature layer with full editing privileges may be available. But you may only want the end user to have the ability to update existing features. Set the `allowedWorkflows` to only `update`. + * + * Possible Value | Description | Example + * ---------------|------------|---------- + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. | ![combinedcreate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_create.png) + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. | ![combinedupdate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_update.png) + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, `Add features` is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#allowedWorkflows) + */ + allowedWorkflows: string[]; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#iconClass) + */ + readonly iconClass: string; + /** + * An array of editing configurations for individual layers. If you have an editable feature layer but do not want the end user to do any type of editing, you can limit this by setting the `enabled` property to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#layerInfos) + */ + layerInfos: LayerInfo[]; + /** + * This property allows customization of supporting Editor widgets and their default behavior. These widgets include [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html), [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html), and [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html). + * > This property is useful for basic overrides of the default widgets. There may be some limitations to what the Editor can do with these overridden properties. For example, the Editor will always disable the `multipleSelectionEnabled` property in [Sketch.defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) no matter what is set within this property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults) + */ + supportingWidgetDefaults: SupportingWidgetDefaults; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This view provides the editable layers for the Editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#view) + */ + view: MapView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the module:esri/widgets/Editor/EditorToggleViewModel class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#viewModel) + */ + viewModel: EditorViewModel; + + /** + * Cancels any active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#cancelWorkflow) + * + * + */ + cancelWorkflow(): void; + /** + * This is applicable if there is an active update workflow. If so, this method deletes the workflow feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#deleteFeatureFromWorkflow) + * + * + */ + deleteFeatureFromWorkflow(): void; + /** + * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#render) + * + * + */ + render(): any; + /** + * Initiates the `create` workflow by displaying the panel where feature creation begins. This method takes a [CreationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) object containing the layer(s) and template(s) to use. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startCreateWorkflowAtFeatureCreation) + * + * @param creationInfo An object containing information needed to create a new feature using the Editor widget. + * + */ + startCreateWorkflowAtFeatureCreation(creationInfo: CreationInfo): void; + /** + * This method starts the Editor workflow where it waits for the feature to be selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startCreateWorkflowAtFeatureEdit) + * + * @param feature The feature to be edited. + * + */ + startCreateWorkflowAtFeatureEdit(feature: Graphic): void; + /** + * Initiates the `create` workflow by displaying the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) panel. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startCreateWorkflowAtFeatureTypeSelection) + * + * + */ + startCreateWorkflowAtFeatureTypeSelection(): void; + /** + * Starts the `update` workflow at the feature geometry and attribute editing panel. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startUpdateWorkflowAtFeatureEdit) + * + * @param feature The feature to be updated. + * + */ + startUpdateWorkflowAtFeatureEdit(feature: Graphic): void; + /** + * Starts the `update` workflow using the current selected feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startUpdateWorkflowAtFeatureSelection) + * + * + */ + startUpdateWorkflowAtFeatureSelection(): void; + /** + * This method starts the Editor workflow where it waits for multiple features to be selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#startUpdateWorkflowAtMultipleFeatureSelection) + * + * @param candidates An array of features to be updated. + * + */ + startUpdateWorkflowAtMultipleFeatureSelection(candidates: Graphic[]): void; + } + + interface EditorConstructor { + /** + * This widget provides an out-of-the-box editing experience to help streamline the editing experience within a web application. The widget has two different [Workflows](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html), `create` and `update`. These workflows allow you to either add features or edit and/or delete existing features within an editable feature layer. The widget automatically recognizes if there are editable feature layers within the map. If it recognizes that they are editable, the layers can be used by the widget. In addition, it is also possible to configure how the `Editor` behaves by setting its [layerInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#layerInfos) property. This property takes an array of configuration objects which allow you to configure the editing experience for these layers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) + */ + + new (properties?: EditorProperties): Editor; + } + + export const Editor: EditorConstructor; + + interface EditorProperties extends WidgetProperties { + /** + * An array of string values which specifies what end users are allowed to edit. For example, a feature layer with full editing privileges may be available. But you may only want the end user to have the ability to update existing features. Set the `allowedWorkflows` to only `update`. + * + * Possible Value | Description | Example + * ---------------|------------|---------- + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. | ![combinedcreate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_create.png) + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. | ![combinedupdate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_update.png) + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, `Add features` is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#allowedWorkflows) + */ + allowedWorkflows?: string[]; + /** + * An array of editing configurations for individual layers. If you have an editable feature layer but do not want the end user to do any type of editing, you can limit this by setting the `enabled` property to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#layerInfos) + */ + layerInfos?: LayerInfo[]; + /** + * This property allows customization of supporting Editor widgets and their default behavior. These widgets include [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html), [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html), and [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html). + * > This property is useful for basic overrides of the default widgets. There may be some limitations to what the Editor can do with these overridden properties. For example, the Editor will always disable the `multipleSelectionEnabled` property in [Sketch.defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) no matter what is set within this property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults) + */ + supportingWidgetDefaults?: SupportingWidgetDefaults; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This view provides the editable layers for the Editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#view) + */ + view?: MapViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the module:esri/widgets/Editor/EditorToggleViewModel class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#viewModel) + */ + viewModel?: EditorViewModelProperties; + } + + interface EditorViewModel extends Accessor { + /** + * A property indicating the current active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#activeWorkflow) + */ + readonly activeWorkflow: Workflow; + /** + * An array of string values which specifies what end users are allowed edit. For example, a feature layer with full editing privileges may be available. But you may only want the end user to have the ability to update existing features. Set the `allowedWorkflows` to only `update`. + * + * Possible Value | Description + * ---------------|------------ + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, 'Add features' is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#allowedWorkflows) + */ + allowedWorkflows: string[]; + /** + * Convenience property that reads whether there are any editable layers that support the `create` workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#canCreate) + */ + readonly canCreate: boolean; + /** + * Convenience property that reads whether there are any editable layers that support the `update` workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#canUpdate) + */ + readonly canUpdate: boolean; + /** + * A collection of editable items based on configuration and available layers on the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#editableItems) + */ + readonly editableItems: Collection; + /** + * An array of objects containing information specific to any failed editing operations. In addition to the error(s), options to `retry()` or `cancel()` are provided. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#failures) + */ + readonly failures: EditorViewModelFailures[]; + /** + * The [FeatureFormViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#featureFormViewModel) + */ + featureFormViewModel: FeatureFormViewModel; + /** + * The [FeatureTemplatesViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-FeatureTemplatesViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#featureTemplatesViewModel) + */ + featureTemplatesViewModel: FeatureTemplatesViewModel; + /** + * An array of editing configurations for individual layers. If you have an editable feature layer but do not want the end user to do any type of editing, you can limit this by setting the `enabled` property to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#layerInfos) + */ + layerInfos: LayerInfo[]; + /** + * The [SketchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#sketchViewModel) + */ + sketchViewModel: SketchViewModel; + /** + * The widget's state. Possible values are in the table below. + * + * Value | Description + * ------|------------ + * ready | Dependencies are met and has valid property values. + * disabled | Dependencies are missing and cannot provide valid inputs. + * editing-new-feature | The Editor is currently editing (creating) a new feature. + * editing-existing-feature | The Editor is currently editing an existing feature. + * awaiting-update-feature-candidate | The period when the application is awaiting the user's input after clicking update and multiple features are returned. Specify the feature to update. + * awaiting-feature-creation-info | This is the first step in the `create` workflow. A [CreationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) is required. + * awaiting-feature-to-update | This is the first step in the `update` workflow. A [feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) is required. + * awaiting-feature-to-create | The waiting period for when a feature is created beforte attribute/geometry edits can be performed. + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * When `true`, there is at least one edit request being processed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#syncing) + */ + readonly syncing: boolean; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This view provides the editable layers for the Editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#view) + */ + view: MapView; + + /** + * Cancels any active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#cancelWorkflow) + * + * + */ + cancelWorkflow(): void; + /** + * This is applicable if there is an active update workflow. If so, this method deletes the workflow feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#deleteFeatureFromWorkflow) + * + * + */ + deleteFeatureFromWorkflow(): void; + /** + * Initiates the `create` workflow by displaying the panel where feature creation begins. This method takes a [CreationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) object containing the layer(s) and template(s) to use. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startCreateWorkflowAtFeatureCreation) + * + * @param creationInfo An object containing information needed to create a new feature using the Editor widget. + * + */ + startCreateWorkflowAtFeatureCreation(creationInfo: CreationInfo): void; + /** + * This method starts the Editor workflow where it waits for the feature to be selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startCreateWorkflowAtFeatureEdit) + * + * @param feature The feature to be updated. + * + */ + startCreateWorkflowAtFeatureEdit(feature: Graphic): void; + /** + * Initiates the `create` workflow by displaying the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) panel. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startCreateWorkflowAtFeatureTypeSelection) + * + * + */ + startCreateWorkflowAtFeatureTypeSelection(): void; + /** + * Starts the update workflow at the feature geometry and attribute editing panel. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startUpdateWorkflowAtFeatureEdit) + * + * @param feature The feature to be updated. + * + */ + startUpdateWorkflowAtFeatureEdit(feature: Graphic): void; + /** + * Starts the `update` workflow using the current selected feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startUpdateWorkflowAtFeatureSelection) + * + * + */ + startUpdateWorkflowAtFeatureSelection(): void; + /** + * Starts the Editor workflow where it waits for multiple features to be selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#startUpdateWorkflowAtMultipleFeatureSelection) + * + * + */ + startUpdateWorkflowAtMultipleFeatureSelection(): void; + } + + interface EditorViewModelConstructor { + new (properties?: EditorViewModelProperties): EditorViewModel; + } + + export const EditorViewModel: EditorViewModelConstructor; + + interface EditorViewModelProperties { + /** + * An array of string values which specifies what end users are allowed edit. For example, a feature layer with full editing privileges may be available. But you may only want the end user to have the ability to update existing features. Set the `allowedWorkflows` to only `update`. + * + * Possible Value | Description + * ---------------|------------ + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, 'Add features' is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#allowedWorkflows) + */ + allowedWorkflows?: string[]; + /** + * The [FeatureFormViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#featureFormViewModel) + */ + featureFormViewModel?: FeatureFormViewModelProperties; + /** + * The [FeatureTemplatesViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-FeatureTemplatesViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#featureTemplatesViewModel) + */ + featureTemplatesViewModel?: FeatureTemplatesViewModelProperties; + /** + * An array of editing configurations for individual layers. If you have an editable feature layer but do not want the end user to do any type of editing, you can limit this by setting the `enabled` property to `false`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#layerInfos) + */ + layerInfos?: LayerInfo[]; + /** + * The [SketchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html) for supporting the editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#sketchViewModel) + */ + sketchViewModel?: SketchViewModelProperties; + /** + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This view provides the editable layers for the Editor widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#view) + */ + view?: MapViewProperties; + } + + /** + * The editable item available within the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#EditableItem) + */ + export interface EditableItem extends Object { + /** + * *Read-only* The feature layer associated with the editable item. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#EditableItem) + */ + layer: FeatureLayer; + /** + * *Read-only* The workflow type that this item supports. Can be either, `update` or `create`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#EditableItem) + */ + supports: string; + } + + export interface EditorViewModelFailures extends Object { + /** + * The readonly error message. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#failures) + */ + error: Error; + } + + interface Workflow extends Accessor { + /** + * Shared workflow data. Can be either a [CreateWorkflowData](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) or a [UpdateWorkflowData](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#data) + */ + readonly data: CreateWorkflowData | UpdateWorkflowData; + /** + * This property indicates whether there is a next step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#hasNextStep) + */ + readonly hasNextStep: boolean; + /** + * This property indicates if there is a previous step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#hasPreviousStep) + */ + readonly hasPreviousStep: boolean; + /** + * Indicates whether the workflow is considered active. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#started) + * + * @default false + */ + started: boolean; + /** + * The name of the current step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#stepId) + */ + readonly stepId: string; + /** + * Value indicating the workflow type. + * + * Possible Value | Description | Example + * ---------------|------------|---------- + * create | Indicated in the widget via the `Add feature` option. This allows the end user to create new features in the feature service. | ![combinedcreate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_create.png) + * update | Indicated in the widget via the `Edit feature` option. This allows the end user to update and/or delete features in the feature service. | ![combinedupdate](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/editor_combined_update.png) + * + * > These workflows are only enabled if the feature service allows these operations. For example, if a feature service is only enabled to allow updates, `Add features` is not enabled. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#type) + */ + readonly type: string; + + /** + * Cancels the active workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#cancel) + * + * + */ + cancel(): void; + /** + * Call this method when the workflow is considered finished. This method is used to help process the editing results. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#commit) + * + * + */ + commit(): void; + /** + * Moves to the next step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#next) + * + * + */ + next(): void; + /** + * Moves to the previous step in the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#previous) + * + * + */ + previous(): void; + /** + * Resets the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#reset) + * + * + */ + reset(): void; + /** + * Starts the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#start) + * + * + */ + start(): void; + } + + interface WorkflowConstructor { + /** + * This class helps manage different stages of an editing workflow. A workflow can be thought of as one of two options: `create` and/or `update`. If adding a new feature, the `create` option is used whereas if editing an existing feature, the `update` option is used. Updating includes both editing geometry and attribute data and deleting features. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html) + */ + + new (properties?: WorkflowProperties): Workflow; + } + + export const Workflow: WorkflowConstructor; + + interface WorkflowProperties { + /** + * Indicates whether the workflow is considered active. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#started) + * + * @default false + */ + started?: boolean; + } + + /** + * This object contains data for the `create` workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) + */ + export interface CreateWorkflowData extends Object { + /** + * The [creationInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) associated with the workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) + */ + creationInfo: CreationInfo; + /** + * The edits used to keep track of a feature being modified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) + */ + edits: Edits; + /** + * The associated [EditorViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html) for this workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#CreateWorkflowData) + */ + viewModel: EditorViewModel; + } + + /** + * Object used to keep track of a feature being modified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#Edits) + */ + export interface Edits extends Object { + /** + * The feature to be edited. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#Edits) + */ + feature: Graphic; + /** + * *Read-only* When true, the edited feature has been modified from its original state. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#Edits) + */ + modified: boolean; + } + + /** + * This object contains data for the `update` workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + export interface UpdateWorkflowData extends Object { + /** + * An array of features to be updated. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + candidates: Graphic[]; + /** + * The [editable item](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html#EditableItem) available within the map. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + editableItem: EditableItem; + /** + * The edits used to keep track of a feature being modified. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + edits: Edits; + /** + * The associated [EditorViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-EditorViewModel.html) for this workflow. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html#UpdateWorkflowData) + */ + viewModel: EditorViewModel; + } + + /** + * The information needed for creating a new feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) + */ + export interface CreationInfo extends Object { + /** + * The associated feature layer where the new feature is created. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) + */ + layer: FeatureLayer; + /** + * The associated feature template used to create the new feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#CreationInfo) + */ + template: FeatureTemplate; + } + + /** + * Editor configurations used for an array of fields. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + export interface LayerInfo extends Object { + /** + * The associated feature layer containing the editable fields. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + layer: FeatureLayer; + /** + * The configuration options for displaying an array of fields within the widget. Take note that all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. + * > If this is set, in addition to overrides in the [supportingWidgetDefaults](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults), the overrides specified in the [supportingWidgetDefaults](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults) property take precedence. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + fieldConfig?: FieldConfig[]; + /** + * Indicates whether to enable editing on the layer. Defaults to `true` if service supports it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + enabled?: boolean; + /** + * Indicates whether to enable `Add feature` functionality. Defaults to `true` if service supports it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + addEnabled?: boolean; + /** + * Indicates whether to enable `Update feature` functionality. Defaults to `true` if service supports it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + updateEnabled?: boolean; + /** + * Indicates whether to enable the ability to delete features. Defaults to `true` if service supports it. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#LayerInfo) + */ + deleteEnabled?: boolean; + } + + /** + * Set this to customize any supporting Editor widgets default behavior. These widgets include [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html), [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html), and [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + export interface SupportingWidgetDefaults extends Object { + /** + * An object containing properties specific for customizing the [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + featureForm?: SupportingWidgetDefaultsFeatureForm; + /** + * An object containing properties specific for customizing the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + featureTemplates?: SupportingWidgetDefaultsFeatureTemplates; + /** + * An object containing properties specific for customizng the [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + sketch?: SupportingWidgetDefaultsSketch; + } + + export interface SupportingWidgetDefaultsFeatureForm extends Object { + /** + * An array of [FieldConfig](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldConfig.html) objects to use within the [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html). + * > Any [field configurations](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldConfig.html) set within the [layerInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#layerInfos) property will be overridden if it is set here in the [supportingWidgetDefaults](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults) property. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + fieldConfig?: FieldConfig[]; + /** + * String indicating the [[groupDisplay]](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#groupDisplay) and how they will be displayed to the end user. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + groupDisplay?: string; + } + + export interface SupportingWidgetDefaultsFeatureTemplates extends Object { + /** + * Aids in managing various template items and how they display within the widget. Please refer to [groupBy API reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#groupBy) for additional information. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + groupBy?: string | GroupByFunction; + /** + * Indicates whether the [templates filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterEnabled) displays. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + filterEnabled?: boolean; + } + + export interface SupportingWidgetDefaultsSketch extends Object { + /** + * An object containing the [updateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) for the [Sketch](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html) widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + updateOptions?: any; + /** + * The marker symbol used to symbolize any point feature updates. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + markerSymbol?: SimpleMarkerSymbol; + /** + * The polygon symbol used to symbolize any polygon feature updates. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + polygonSymbol?: SimpleFillSymbol; + /** + * The line symbol used to symbolize any line feature updates. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#SupportingWidgetDefaults) + */ + polylineSymbol?: SimpleLineSymbol; + } + interface Expand extends Widget { /** * Automatically collapses the expand widget instance when the view's viewpoint updates. @@ -53217,6 +58026,14 @@ declare namespace __esri { } interface Feature extends Widget { + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled: boolean; /** * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. * @@ -53226,53 +58043,67 @@ declare namespace __esri { */ graphic: Graphic; /** - * The title for the feature. + * A reference to the [view's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). Use this property when needing to get access to the underlying layers within the map. This can then be used within [Arcade](https://developers.arcgis.com/arcade) expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#map) + * + * @default null + */ + map: Map; + /** + * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#spatialReference) + * + * @default null + */ + spatialReference: SpatialReference; + /** + * The title for the feature. You can disable this via the [visibleElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#visibleElements) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#title) * * @default null */ readonly title: string; - /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#view) - * - * @default null - */ - view: MapView | SceneView; /** * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [FeatureViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html) class to access all properties and methods on the widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#viewModel) */ viewModel: FeatureViewModel; + /** + * The visible elements that are displayed within the widget's [graphic.popupTemplate.content](esri-PopupTemplate.html#content). This property provides the ability to turn individual elements of the widget's display on/off. See the [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) documentation for additional information on how these elements work. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#visibleElements) + */ + visibleElements: VisibleElements; /** - * Paginates to a specified [media](esri-PopupTemplate.html#media) info object. For example, you may have [media](esri-PopupTemplate.html#media) content which contains multiple `mediaInfos`. This method allows you to specify the index of the `mediaInfos` you wish to display. + * Paginates to a specified [media](esri-popup-content-MediaContent.html) info object. For example, you may have [media](esri-popup-content-MediaContent.html) content which contains multiple `mediaInfos`. This method allows you to specify the index of the `mediaInfos` you wish to display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#goToMedia) * - * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element to be updated. - * @param mediaInfoIndex The index position of the [media](esri-PopupTemplate.html#media) info object you wish to display. + * @param contentElementIndex The index position of the [media](esri-popup-content-MediaContent.html) content element to be updated. + * @param mediaInfoIndex The index position of the [media](esri-popup-content-MediaContent.html) info object you wish to display. * */ goToMedia(contentElementIndex: number, mediaInfoIndex: number): void; /** - * Paginates to the next [media](esri-PopupTemplate.html#media) info. + * Paginates to the next [media](esri-popup-content-MediaContent.html) info. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#nextMedia) * - * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element. + * @param contentElementIndex The index position of the [media](esri-popup-content-MediaContent.html) content element. * */ nextMedia(contentElementIndex: number): void; /** - * Paginates to the previous [media](esri-PopupTemplate.html#media) info in the specified [media](esri-PopupTemplate.html#media) content element. + * Paginates to the previous [media](esri-popup-content-MediaContent.html) info in the specified [media](esri-popup-content-MediaContent.html) content element. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#previousMedia) * - * @param contentElementIndex The index position of the [media](esri-PopupTemplate.html#media) content element. + * @param contentElementIndex The index position of the [media](esri-popup-content-MediaContent.html) content element. * */ previousMedia(contentElementIndex: number): void; @@ -53293,6 +58124,14 @@ declare namespace __esri { export const Feature: FeatureConstructor; interface FeatureProperties extends WidgetProperties { + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled?: boolean; /** * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. * @@ -53302,34 +58141,56 @@ declare namespace __esri { */ graphic?: GraphicProperties; /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. + * A reference to the [view's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). Use this property when needing to get access to the underlying layers within the map. This can then be used within [Arcade](https://developers.arcgis.com/arcade) expressions. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#view) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#map) * * @default null */ - view?: MapViewProperties | SceneViewProperties; + map?: MapProperties; + /** + * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#spatialReference) + * + * @default null + */ + spatialReference?: SpatialReferenceProperties; /** * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [FeatureViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html) class to access all properties and methods on the widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#viewModel) */ viewModel?: FeatureViewModelProperties; + /** + * The visible elements that are displayed within the widget's [graphic.popupTemplate.content](esri-PopupTemplate.html#content). This property provides the ability to turn individual elements of the widget's display on/off. See the [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) documentation for additional information on how these elements work. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#visibleElements) + */ + visibleElements?: VisibleElements; } interface FeatureViewModel extends Accessor { /** - * The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) of the feature. + * The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content) of the feature. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#content) * * @default null */ - readonly content: string | any[] | HTMLElement | Widget; + readonly content: Content[] | Widget | HTMLElement | string; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled: boolean; /** * The formatted attributes calculated from `fieldInfo` [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) content. They are obtained from the feature's [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#graphic) attribute values and can be read: * * globally using the [fieldInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#fieldInfos) property directly at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html), or - * * per an individual content element. This element is defined with a type of fields on the PopupTemplate's content property. + * * per an individual content element. This element is defined with a [fieldsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html) popup element set on the PopupTemplate content property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#formattedAttributes) * @@ -53344,28 +58205,38 @@ declare namespace __esri { * @default null */ graphic: Graphic; + /** + * A read-only property containing metadata regarding the last edit performed on a feature. This object has the following properties: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) + */ + readonly lastEditInfo: FeatureViewModelLastEditInfo; + /** + * A reference to the [view's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). Use this property when needing to get access to the underlying layers within the map. This can then be used within [Arcade](https://developers.arcgis.com/arcade) expressions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#map) + * + * @default null + */ + map: Map; + /** + * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#spatialReference) + * + * @default null + */ + spatialReference: SpatialReference; /** * The title for the feature. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#title) - * - * @default null */ readonly title: string; - /** - * The view associated with the Feature instance. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#view) - * - * @default null - */ - view: MapView | SceneView; /** * Indicates whether the feature is currently waiting for all of its content to finish loading. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#waitingForContent) - * - * @default true */ readonly waitingForContent: boolean; } @@ -53377,6 +58248,14 @@ declare namespace __esri { export const FeatureViewModel: FeatureViewModelConstructor; interface FeatureViewModelProperties { + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html), and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled?: boolean; /** * The [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) used to represent the feature. * @@ -53386,13 +58265,21 @@ declare namespace __esri { */ graphic?: GraphicProperties; /** - * The view associated with the Feature instance. + * A reference to the [view's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html). Use this property when needing to get access to the underlying layers within the map. This can then be used within [Arcade](https://developers.arcgis.com/arcade) expressions. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#view) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#map) * * @default null */ - view?: MapViewProperties | SceneViewProperties; + map?: MapProperties; + /** + * The spatial reference used for [Arcade](https://developers.arcgis.com/arcade) operations. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#spatialReference) + * + * @default null + */ + spatialReference?: SpatialReferenceProperties; } export interface FeatureViewModelFormattedAttributes extends Object { @@ -53403,13 +58290,82 @@ declare namespace __esri { */ global?: any; /** - * The formatted attributes for an individual content element. This is derived from the module:esri/PopupTemplate#fields content property of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) defined as type `fields`. + * The formatted attributes for an individual content element. This is derived from the module:esri/PopupTemplate PopupTemplate, or per an individual content element. This element is defined with a [fieldsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html) popup element set on the PopupTemplate's [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#formattedAttributes) */ content?: any; } + export interface FeatureViewModelLastEditInfo extends Object { + /** + * User who performed the last edit on a feature. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) + */ + user: string; + /** + * Date that the edit was performed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) + */ + date: string; + /** + * The type of edit that was performed on the feature. **Possible values:** edit | create + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) + */ + type: string; + } + + export interface VisibleContentElements extends Object { + /** + * Indicates whether to display any [AttachmentsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-AttachmentsContent.html) elements. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements) + */ + attachments?: boolean; + /** + * Indicates whether to display any [FieldsContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-FieldsContent.html) elements. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements) + */ + fields?: boolean; + /** + * Indicates whether to display any [MediaContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-MediaContent.html) elements. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements) + */ + media?: boolean; + /** + * Indicates whether to display any [TextContent](https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-TextContent.html) elements. Default is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements) + */ + text?: boolean; + } + + export interface VisibleElements extends Object { + /** + * Indicates whether the title associated with the feature displays. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleElements) + */ + title?: boolean; + /** + * Indicates whether content for the Feature displays, can also indicate the specific types of content elements by setting it via [VisibleContentElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleContentElements). The default value is `true`, everything displays. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleElements) + */ + content?: boolean | VisibleContentElements; + /** + * Indicates whether [lastEditInfo](esri-widgets-Feature-FeatureViewModel.html#lastEditInfo) is displayed within the feature. Default value is `true`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html#VisibleElements) + */ + lastEditInfo?: boolean; + } + interface FeatureForm extends Widget { /** * The associated feature containing the editable attributes. A common way to access this is via the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#hitTest) or [SceneView's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hitTest) `hitTest()` method. @@ -53419,7 +58375,7 @@ declare namespace __esri { feature: Graphic; /** * Array of individual or grouped field configuration objects. This is where you specify what fields to display and how you wish to display them. It is possible to configure individual or [grouped fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html). For an example of individual field configurations, please refer to the [Update FeatureLayer using ApplyEdits](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/index.html) sample. For an example of grouped field configurations, please refer to the [Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/index.html) sample. - * > When not set, all fields except for `editor`, `globalID`, and `objectID` fields will be included, otherwise it is up to the developer to set the right field(s) to override and display. + * > When not set, all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#fieldConfig) */ @@ -53498,7 +58454,7 @@ declare namespace __esri { feature?: GraphicProperties; /** * Array of individual or grouped field configuration objects. This is where you specify what fields to display and how you wish to display them. It is possible to configure individual or [grouped fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html). For an example of individual field configurations, please refer to the [Update FeatureLayer using ApplyEdits](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/index.html) sample. For an example of grouped field configurations, please refer to the [Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/index.html) sample. - * > When not set, all fields except for `editor`, `globalID`, and `objectID` fields will be included, otherwise it is up to the developer to set the right field(s) to override and display. + * > When not set, all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#fieldConfig) */ @@ -53540,7 +58496,7 @@ declare namespace __esri { feature: Graphic; /** * Array of individual or grouped field configuration objects. This is where you specify what fields to display and how you wish to display them. It is possible to configure individual or [grouped fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html). For an example of individual field configurations, please refer to the [Update FeatureLayer using ApplyEdits](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/index.html) sample. For an example of grouped field configurations, please refer to the [Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/index.html) sample. - * > When not set, all fields except for `editor`, `globalID`, and `objectID` fields will be included, otherwise it is up to the developer to set the right field(s) to override and display. + * > When not set, all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#fieldConfig) */ @@ -53571,6 +58527,12 @@ declare namespace __esri { * @default disabled */ readonly state: string; + /** + * Indicates whether all input fields are valid. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#valid) + */ + valid: boolean; /** * Convenience method to find input fields. @@ -53620,7 +58582,7 @@ declare namespace __esri { feature?: GraphicProperties; /** * Array of individual or grouped field configuration objects. This is where you specify what fields to display and how you wish to display them. It is possible to configure individual or [grouped fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html). For an example of individual field configurations, please refer to the [Update FeatureLayer using ApplyEdits](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/index.html) sample. For an example of grouped field configurations, please refer to the [Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/index.html) sample. - * > When not set, all fields except for `editor`, `globalID`, and `objectID` fields will be included, otherwise it is up to the developer to set the right field(s) to override and display. + * > When not set, all fields except for `editor`, `globalID`, `objectID`, and system maintained area and length fields will be included. Otherwise, it is up to the developer to set the right field(s) to override and display. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#fieldConfig) */ @@ -53631,6 +58593,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#layer) */ layer?: FeatureLayerProperties; + /** + * Indicates whether all input fields are valid. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html#valid) + */ + valid?: boolean; } interface FieldConfig extends Accessor { @@ -53706,6 +58674,15 @@ declare namespace __esri { * @default false */ required: boolean; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that controls this field's visibility. The field will only display if this expression is `true`. [![featureFormFieldVisibility](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featureform-fieldvisilbility.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=editing-featureform-fieldvisibility) + * > This only affects how the field is rendered. It does not have any impact on the attribute's values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldConfig.html#visibilityExpression) + * + * @default null + */ + visibilityExpression: string; } interface FieldConfigConstructor { @@ -53787,6 +58764,15 @@ declare namespace __esri { * @default false */ required?: boolean; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that controls this field's visibility. The field will only display if this expression is `true`. [![featureFormFieldVisibility](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featureform-fieldvisilbility.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=editing-featureform-fieldvisibility) + * > This only affects how the field is rendered. It does not have any impact on the attribute's values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldConfig.html#visibilityExpression) + * + * @default null + */ + visibilityExpression?: string; } interface FieldGroupConfig extends Accessor { @@ -53808,6 +58794,15 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html#label) */ label: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that controls this field's visibility. The field will only display if this expression is `true`. [![featureFormFieldVisibility](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featureform-fieldvisilbility.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=editing-featureform-fieldvisibility) + * > This only affects how the field is rendered. It does not have any impact on the attribute's values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html#visibilityExpression) + * + * @default null + */ + visibilityExpression: string; } interface FieldGroupConfigConstructor { @@ -53835,6 +58830,15 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html#label) */ label?: string; + /** + * An [Arcade](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) expression that controls this field's visibility. The field will only display if this expression is `true`. [![featureFormFieldVisibility](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/featureform-fieldvisilbility.png)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=editing-featureform-fieldvisibility) + * > This only affects how the field is rendered. It does not have any impact on the attribute's values. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FieldGroupConfig.html#visibilityExpression) + * + * @default null + */ + visibilityExpression?: string; } interface InputField extends Accessor { @@ -53967,6 +58971,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#description) */ description: string; + /** + * The result of `visibilityExpression`. Note, if `visibilityExpression` is not defined, the value of this property will be `undefined`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#evaluatedVisibility) + */ + readonly evaluatedVisibility: boolean; /** * The input fields belonging to this group. * @@ -53979,6 +58989,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#label) */ readonly label: string; + /** + * Arcade expression to determine whether this group is visible or not + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#visibilityExpression) + * + * @default null + */ + visibilityExpression: string; /** * The group's visibility. * @@ -54000,6 +59018,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#description) */ description?: string; + /** + * Arcade expression to determine whether this group is visible or not + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-InputFieldGroup.html#visibilityExpression) + * + * @default null + */ + visibilityExpression?: string; } interface FeatureTemplates extends Widget { @@ -54017,6 +59043,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterFunction) */ filterFunction: FilterFunction; + /** + * Text used to filter items. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterText) + */ + filterText: string; /** * It is possible to group [template items](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html). This can aid in managing various template items and how they display within the widget. The values are discussed below. * @@ -54084,6 +59116,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterFunction) */ filterFunction?: FilterFunction; + /** + * Text used to filter items. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#filterText) + */ + filterText?: string; /** * It is possible to group [template items](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html). This can aid in managing various template items and how they display within the widget. The values are discussed below. * @@ -54168,13 +59206,21 @@ declare namespace __esri { readonly state: string; /** - * Use this method to apply a filter on the items. + * This method updates the [template items](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html) with the provided filter. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-FeatureTemplatesViewModel.html#refresh) * * */ refresh(): void; + /** + * Fires when a [template item](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html) is selected. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-FeatureTemplatesViewModel.html#select) + * + * + */ + select(): void; } interface FeatureTemplatesViewModelConstructor { @@ -54247,6 +59293,14 @@ declare namespace __esri { */ readonly thumbnail: HTMLElement; + /** + * Creates a deep clone of the template item object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html#clone) + * + * + */ + clone(): TemplateItem; /** * Fetches the thumbnail used to display the template item. * @@ -54298,7 +59352,7 @@ declare namespace __esri { */ readonly items: TemplateItem[]; /** - * The name displayed in the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) widget indicating the grouped [TemplateItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html). + * The label displayed in the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) widget indicating the grouped [TemplateItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItem.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItemGroup.html#label) */ @@ -54455,13 +59509,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#label) - */ - readonly label: string; + iconClass: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -54523,6 +59571,12 @@ declare namespace __esri { export const Home: HomeConstructor; interface HomeProperties extends WidgetProperties, GoToProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#iconClass) + */ + iconClass?: string; /** * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. * @@ -54623,13 +59677,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#label) - */ - readonly label: string; + iconClass: string; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable properties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * @@ -54690,6 +59738,12 @@ declare namespace __esri { export const LayerList: LayerListConstructor; interface LayerListProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#iconClass) + */ + iconClass?: string; /** * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html). Each list item can be modified according to its modifiable properties. Actions can be added to list items using the [actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections) property of the ListItem. * @@ -54967,18 +60021,18 @@ declare namespace __esri { export type ListItemCreatedHandler = (event: any) => void; interface Legend extends Widget { + /** + * Collection of [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) objects used by the legend view to display data in the legend. The legend widget watches this property to hide or display the layer's legend when an [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) is removed from or added to this collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#activeLayerInfos) + */ + activeLayerInfos: Collection; /** * The widget's default CSS icon class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#label) - */ - readonly label: string; + iconClass: string; /** * Specifies a subset of the layers to display in the legend. If this property is not set, all layers in the map will display in the legend. Objects in this array are defined with the properties listed below. * @@ -54999,6 +60053,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#view) */ view: MapView | SceneView; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [LegendViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#viewModel) + */ + viewModel: LegendViewModel; /** * *This method is primarily used by developers when implementing custom widgets.* It must be implemented by subclasses for rendering. @@ -55023,6 +60083,18 @@ declare namespace __esri { export const Legend: LegendConstructor; interface LegendProperties extends WidgetProperties { + /** + * Collection of [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) objects used by the legend view to display data in the legend. The legend widget watches this property to hide or display the layer's legend when an [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) is removed from or added to this collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#activeLayerInfos) + */ + activeLayerInfos?: CollectionProperties; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#iconClass) + */ + iconClass?: string; /** * Specifies a subset of the layers to display in the legend. If this property is not set, all layers in the map will display in the legend. Objects in this array are defined with the properties listed below. * @@ -55043,8 +60115,771 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#view) */ view?: MapViewProperties | SceneViewProperties; + /** + * The view model for this widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [LegendViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html) class to access all properties and methods on the widget. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#viewModel) + */ + viewModel?: LegendViewModelProperties; } + interface LegendViewModel extends Accessor { + /** + * Collection of [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) objects used by the legend view to display data in the legend. Use this property to hide or display the layer's symbols in the legend when an [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) is removed from or added to this collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#activeLayerInfos) + */ + activeLayerInfos: Collection; + /** + * Specifies a subset of the layers in the map to display in the legend. If this property is not set, all operational layers in the map will display in the legend. This property can be used to control layer display order in the legend. Objects in this array are defined with the properties listed below. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#layerInfos) + */ + layerInfos: LegendViewModelLayerInfos[]; + /** + * The view model's state. **Possible Values:** ready | disabled + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#state) + * + * @default disabled + */ + readonly state: string; + /** + * The view from which the widget will operate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#view) + */ + view: MapView | SceneView; + } + + interface LegendViewModelConstructor { + new (properties?: LegendViewModelProperties): LegendViewModel; + } + + export const LegendViewModel: LegendViewModelConstructor; + + interface LegendViewModelProperties { + /** + * Collection of [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) objects used by the legend view to display data in the legend. Use this property to hide or display the layer's symbols in the legend when an [ActiveLayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html) is removed from or added to this collection. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#activeLayerInfos) + */ + activeLayerInfos?: CollectionProperties; + /** + * Specifies a subset of the layers in the map to display in the legend. If this property is not set, all operational layers in the map will display in the legend. This property can be used to control layer display order in the legend. Objects in this array are defined with the properties listed below. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#layerInfos) + */ + layerInfos?: LegendViewModelLayerInfos[]; + /** + * The view from which the widget will operate. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#view) + */ + view?: MapViewProperties | SceneViewProperties; + } + + export interface LegendViewModelLayerInfos extends Object { + /** + * Specify a title for the layer. If no title is specified the service name is used. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#layerInfos) + */ + title?: string; + /** + * A layer to add to the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-LegendViewModel.html#layerInfos) + */ + layer?: Layer; + } + + interface ActiveLayerInfo extends Accessor { + /** + * A collection of child activeLayerInfos. This only applies to renderers of [Sublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) or the children of [GroupLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#children) + */ + children: Collection; + /** + * Indicates if the legend's display of the layer's renderer is driven by the scale of the view. This is true of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) renderers, any renderer that uses a `valueExpression` (Arcade expression), or another renderer such as [DotDensityRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#isScaleDriven) + */ + isScaleDriven: boolean; + /** + * The layer represented by the ActiveLayerInfo object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#layer) + */ + layer: Layer; + /** + * The legendElements is constructed using the layer [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html). It reflects the actual structure of the legend. Each `legendElement` has the following specification: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements) + */ + legendElements: LegendElement[]; + /** + * The ActiveLayerInfo of the parent [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) or [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#parent) + */ + parent: ActiveLayerInfo; + /** + * Indicates if the activeLayerInfo is ready. It is set to `true` when all its [legendElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements) are computed. It is set to `false` when the layer renderer changes so that the legendElements can recomputed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ready) + */ + ready: boolean; + /** + * The scale of the view instance in which the Legend is rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#scale) + */ + scale: number; + /** + * The text string that represents the legend's title. This value is read from the `layerInfo` of the corresponding layer in the legend. If not provided, this value comes from the [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#title) of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#title) + */ + title: string; + /** + * The version of the ActiveLayerInfo. It increases by `1` whenever [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ready) property of ActiveLayerInfo changes. This property should watched in the view for ActiveLayerInfo changes and update the DOM accordingly. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#version) + */ + version: number; + /** + * The view in which the Legend is rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#view) + */ + view: View; + } + + interface ActiveLayerInfoConstructor { + new (properties?: ActiveLayerInfoProperties): ActiveLayerInfo; + } + + export const ActiveLayerInfo: ActiveLayerInfoConstructor; + + interface ActiveLayerInfoProperties { + /** + * A collection of child activeLayerInfos. This only applies to renderers of [Sublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) or the children of [GroupLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#children) + */ + children?: CollectionProperties; + /** + * Indicates if the legend's display of the layer's renderer is driven by the scale of the view. This is true of [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) renderers, any renderer that uses a `valueExpression` (Arcade expression), or another renderer such as [DotDensityRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-DotDensityRenderer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#isScaleDriven) + */ + isScaleDriven?: boolean; + /** + * The layer represented by the ActiveLayerInfo object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#layer) + */ + layer?: LayerProperties; + /** + * The legendElements is constructed using the layer [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html). It reflects the actual structure of the legend. Each `legendElement` has the following specification: + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements) + */ + legendElements?: LegendElement[]; + /** + * The ActiveLayerInfo of the parent [Sublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html) or [GroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#parent) + */ + parent?: ActiveLayerInfoProperties; + /** + * Indicates if the activeLayerInfo is ready. It is set to `true` when all its [legendElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements) are computed. It is set to `false` when the layer renderer changes so that the legendElements can recomputed. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ready) + */ + ready?: boolean; + /** + * The scale of the view instance in which the Legend is rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#scale) + */ + scale?: number; + /** + * The text string that represents the legend's title. This value is read from the `layerInfo` of the corresponding layer in the legend. If not provided, this value comes from the [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#title) of the layer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#title) + */ + title?: string; + /** + * The version of the ActiveLayerInfo. It increases by `1` whenever [ready](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ready) property of ActiveLayerInfo changes. This property should watched in the view for ActiveLayerInfo changes and update the DOM accordingly. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#version) + */ + version?: number; + /** + * The view in which the Legend is rendered. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#view) + */ + view?: ViewProperties; + } + + /** + * Describes the schema of the ColorRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + export interface ColorRampElement extends Object { + /** + * The type of this element is always `color-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + type: string; + /** + * The title of the color ramp as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + title: string | RampTitle; + /** + * The color of the border surrounding the ramp. This corresponds with the outline color defined in the default symbol of the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + borderColor: Color; + /** + * The overlay color of the color ramp. This is typically transparent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + overlayColor: Color; + /** + * The individual color stops rendered in the legend that correspond to the color visual variable in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampElement) + */ + infos: ColorRampStop[]; + } + + /** + * Describes the schema of the ColorRampStop element. Each ColorRampStop represents a single stop of the [ColorVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html) referenced in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + export interface ColorRampStop extends Object { + /** + * The label in the legend describing features with the given `color` and `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + label: string; + /** + * The value of the color visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html#stops). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + value: number; + /** + * The color of the visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html#stops). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + color: Color; + /** + * A number between `0` and `1` describing the position of the label on the color ramp. For example, in a color ramp with three stops, the first stop would have an offset of `0`, the second `0.5`, and the third `1`. These offsets are equally spaced for any given number of labels in the color ramp. The interval of each offset value is equal to 1 divided by the number of stops minus 1. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ColorRampStop) + */ + offset: number; + } + + /** + * Describes the schema of the HeatmapRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampElement) + */ + export interface HeatmapRampElement extends Object { + /** + * The type of this element is always `heatmap-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampElement) + */ + type: string; + /** + * The title of the heatmap ramp as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampElement) + */ + title?: string | RampTitle; + /** + * The individual color stops rendered in the legend that correspond to the heatmap colorStops in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampElement) + */ + infos: HeatmapRampStop[]; + } + + /** + * Describes the schema of the HeatmapRampStop element. Each HeatmapRampStop represents a single `colorStop` of the [Heatmap color stops](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-HeatmapRenderer.html#colorStops) referenced in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + export interface HeatmapRampStop extends Object { + /** + * The label of the color stop displayed in the legend. Typically only the first and last stops have labels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + label: string; + /** + * The ratio of a pixel's intensity value to the minPixelIntensity of the renderer. The ratio of each pixel is matched to the corresponding color. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + ratio: number; + /** + * The color of the pixel corresponding to the appropriate pixel `ratio`. This value is typically between `0` and `1`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + color: Color; + /** + * A number between `0` and `1` describing the position of the label on the ramp. For example, in a ramp with three stops, the first stop would have an offset of `0`, the second `0.5`, and the third `1`. These offset values are equally spaced for any given number of labels in the ramp. The interval of each offset value is equal to 1 divided by the number of stops minus 1. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#HeatmapRampStop) + */ + offset: number; + } + + /** + * Properties defining the scheme of each of the ImageSymbolTableElementInfo. This applies only to ImageryLayer renderers. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + export interface ImageSymbolTableElementInfo extends Object { + /** + * The label of the category corresponding to the given image. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + label?: string; + /** + * The data URI of the image representing a colored pixel in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + src: string; + /** + * The opacity of the image (`0` to `1`). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + opacity: number; + /** + * The width of the image in pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + width?: number; + /** + * The height of the image in pixels. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#ImageSymbolTableElementInfo) + */ + height?: number; + } + + /** + * Properties defining the scheme of each of the supported [legendElements](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElements). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#LegendElement) + */ + export type LegendElement = + | SymbolTableElement + | ColorRampElement + | OpacityRampElement + | SizeRampElement + | HeatmapRampElement + | RelationshipRampElement; + + /** + * Describes the schema of the OpacityRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + export interface OpacityRampElement extends Object { + /** + * The type of this element is always `opacity-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + type: string; + /** + * The title of the opacity ramp as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + title?: string | RampTitle; + /** + * The color of the border surrounding the ramp. This corresponds with the outline color defined in the default symbol of the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + borderColor: Color; + /** + * The overlay color of the color ramp. This is typically transparent. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + overlayColor: Color; + /** + * The individual opacity stops rendered in the legend that correspond to the opacity visual variable in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampElement) + */ + infos: OpacityRampStop[]; + } + + /** + * Describes the schema of the OpacityRampStop element. Each OpacityRampStop represents a single stop of the [OpacityVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-OpacityVariable.html) referenced in the renderer. The opacity value of each stop is indicated in the [alpha](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#a) property of the `color` object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + export interface OpacityRampStop extends Object { + /** + * The label in the legend describing features with the given `color` and `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + label: string; + /** + * The value of the opacity visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-OpacityVariable.html#stops). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + value: number; + /** + * The color of the visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-OpacityVariable.html#stops). The opacity corresponding to the given `value` is indicated in the [alpha](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#a) property of the color object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + color: Color; + /** + * A number between `0` and `1` describing the position of the label on the ramp. For example, in a ramp with three stops, the first stop would have an offset of `0`, the second `0.5`, and the third `1`. These offsets are equally spaced for any given number of labels in the ramp. The interval of each offset value is equal to 1 divided by the number of stops minus 1. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#OpacityRampStop) + */ + offset: number; + } + + /** + * Describes the schema of the RampTitle element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + export interface RampTitle extends Object { + /** + * The field name used in a visual variable of a renderer. This is used in the generated title of the corresponding ramp in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + field: string; + /** + * If provided, the normalization field name used in a visual variable of a renderer. This is used in the generated title of the corresponding ramp in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + normField: string; + /** + * If `true`, the legend formats to display the field and normalization field as a ratio. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + ratio: boolean; + /** + * If `true`, the legend formats to display the field and normalization field as a percentage. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + ratioPercent: boolean; + /** + * If `true`, the legend formats to display the field and normalization field as a percentage of total. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RampTitle) + */ + ratioPercentTotal: boolean; + } + + /** + * Describes the schema of the RelationshipLabels element. These labels are rendered in the corners of the square that represent the relationship renderer in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + export interface RelationshipLabels extends Object { + /** + * The label corresponding with the top corner of the legend if the focus is set to `HH`. This describes values that are considered high in both field 1 and field 2 (HH). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + top: string; + /** + * The label corresponding with the bottom corner of the legend if the focus is set to `HH`. This describes values that are considered low in both field 1 and field 2 (LL). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + bottom: string; + /** + * The label corresponding with the left corner of the legend (if the focus is set to `HH`). This describes features where the value of field 1 is high and the value of field 2 is low (HL). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + left: string; + /** + * The label corresponding with the right corner of the legend (if the focus is set to `HH`). This describes features where the value of field 2 is high and the value of field 1 is low (LH). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipLabels) + */ + right: string; + } + + /** + * Describes the schema of the RelationshipRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + export interface RelationshipRampElement extends Object { + /** + * The type of this element is always `relationship-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + type: string; + /** + * The number of classes for each field comprising the renderer. Can either be 2, 3, or 4. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + numClasses: number; + /** + * Determines the orientation of the Legend. Values can be `HH`, `HL`, `LH`, `LL`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + focus: string; + /** + * A 2-dimensional array of colors as displayed in the legend grid. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + colors: Color[][]; + /** + * The labels for each corner of the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + labels: RelationshipLabels; + /** + * The rotation of the legend in degrees (0-360). `0` degrees displays the legend as a square with the `LL` cell in the bottom left corner of the legend and the `HH` cell in the top right corner. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + rotation: number; + /** + * The title of the renderer as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + title?: string; + /** + * Info objects associated with the relationship renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RelationshipRampElement) + */ + infos?: any[]; + } + + /** + * Describes the schema of the RendererTitle element. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + export interface RendererTitle extends Object { + /** + * The title of the renderer as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + title?: string; + /** + * The field name used in the renderer. This is used in the generated title of the renderer in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + field: string; + /** + * If a normalization field is provided to the renderer, this field is also used in the generated title for the renderer in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + normField: string; + /** + * Indicates if a percentage is used in the normalization of the renderer. This is used to create a more readable legend for that scenario. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#RendererTitle) + */ + normByPct: boolean; + } + + /** + * Describes the schema of the SizeRampElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampElement) + */ + export interface SizeRampElement extends Object { + /** + * The type of this element is always `size-ramp`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampElement) + */ + type: string; + /** + * The title of the size ramp as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampElement) + */ + title?: string | RampTitle; + /** + * The individual size stops rendered in the legend that correspond to the size visual variable in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampElement) + */ + infos: SizeRampStop[]; + } + + /** + * Describes the schema of the SizeRampStop element. Each SizeRampStop represents a single stop of the [SizeVariable](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html) referenced in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + export interface SizeRampStop extends Object { + /** + * The label in the legend describing features with the given `symbol` and `value`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + label: string; + /** + * The value of the size visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-SizeVariable.html#stops). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + value?: any; + /** + * The symbol corresponding to the value of the stop in the renderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + symbol: Symbol; + /** + * The size of the visual variable [stop](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-visualVariables-ColorVariable.html#stops) in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + size?: number; + /** + * The width of the outline in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + outlineSize?: number; + /** + * The HTML element rendered in the legend representing features with the given value. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SizeRampStop) + */ + preview?: HTMLElement; + } + + /** + * Describes the schema of the SymbolTableElement used as a [legendElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#legendElement). This legend element is used for [UniqueValueRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html) and [ClassBreaksRenderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-ClassBreaksRenderer.html). See the table below for more details of the properties in this object. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + export interface SymbolTableElement extends Object { + /** + * The type of this element is always `symbol-table`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + type: string; + /** + * The title of the renderer as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + title?: string | RendererTitle; + /** + * Only used for renderers set to ImageryLayers. Indicates the type of renderer set on the layer (e.g. `stretched` or `Unique Values`). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + legendType?: string; + /** + * An array of each symbol/category/break rendered for the symbol table. For example, this may be individual breaks for a ClassBreaksRenderer, or unique values for a UniqueValueRenderer. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElement) + */ + infos: SymbolTableElementType[]; + } + + /** + * Properties defining the scheme of the SymbolTableElementInfo. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + export interface SymbolTableElementInfo extends Object { + /** + * The title of the renderer as displayed in the Legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + label: string | RampTitle; + /** + * The value corresponding with the given `symbol` in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + value?: any; + /** + * The symbol for the corresponding `value` in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + symbol: Symbol; + /** + * The size of the symbol in points. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + size?: number; + /** + * A preview of the symbol element as displayed in the legend. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementInfo) + */ + preview?: HTMLElement; + } + + /** + * Properties defining the scheme of each SymbolTableElementType. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend-support-ActiveLayerInfo.html#SymbolTableElementType) + */ + export type SymbolTableElementType = ImageSymbolTableElementInfo | SymbolTableElementInfo; + export interface LegendLayerInfos extends Object { /** * Specifies a title for the layer to display above its symbols and descriptions. If no title is specified the service name is used. @@ -55119,12 +60954,6 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#iconClass) */ iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#label) - */ - readonly label: string; /** * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). * @@ -55299,13 +61128,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#label) - */ - readonly label: string; + iconClass: string; /** * Sets the layout of the widget to either `horizontal` or `vertical`. See the table below for a list of possible values. * @@ -55364,6 +61187,12 @@ declare namespace __esri { export const NavigationToggle: NavigationToggleConstructor; interface NavigationToggleProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-NavigationToggle.html#iconClass) + */ + iconClass?: string; /** * Sets the layout of the widget to either `horizontal` or `vertical`. See the table below for a list of possible values. * @@ -55474,6 +61303,19 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions) */ actions: Collection; + /** + * Indicates whether [actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions) within the popup should display in a menu item. + * + * | actionsMenuEnabled = false | actionsMenuEnabled = true | + * | -------------------------- | ------------------------- | + * | ![actions49](https://developers.arcgis.com/javascript/assets/img/guide/whats-new/410/popup-actions-49.png) | ![actions410](https://developers.arcgis.com/javascript/assets/img/guide/whats-new/410/popup-actions-410.png) | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actionsMenuEnabled) + * + * @default true + */ + actionsMenuEnabled: boolean; /** * Position of the popup in relation to the selected feature. **Possible Values:** auto | top-center | top-right | bottom-left | bottom-center | bottom-right | Function * @@ -55526,6 +61368,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#currentDockPosition) */ readonly currentDockPosition: string; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled: boolean; /** * Indicates whether the placement of the popup is docked to the side of the view. Docking the popup allows for a better user experience, particularly when opening popups in apps on mobile devices. When a popup is "dockEnabled" it means the popup no longer points to the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature) or the [location](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#location) assigned to it. Rather it is attached to a side, the top, or the bottom of the view. See [dockOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#dockOptions) to override default options related to docking the popup. * @@ -55734,6 +61584,19 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions) */ actions?: CollectionProperties; + /** + * Indicates whether [actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions) within the popup should display in a menu item. + * + * | actionsMenuEnabled = false | actionsMenuEnabled = true | + * | -------------------------- | ------------------------- | + * | ![actions49](https://developers.arcgis.com/javascript/assets/img/guide/whats-new/410/popup-actions-49.png) | ![actions410](https://developers.arcgis.com/javascript/assets/img/guide/whats-new/410/popup-actions-410.png) | + * + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actionsMenuEnabled) + * + * @default true + */ + actionsMenuEnabled?: boolean; /** * Position of the popup in relation to the selected feature. **Possible Values:** auto | top-center | top-right | bottom-left | bottom-center | bottom-right | Function * @@ -55780,6 +61643,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#content) */ content?: string | HTMLElement | WidgetProperties; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled?: boolean; /** * Indicates whether the placement of the popup is docked to the side of the view. Docking the popup allows for a better user experience, particularly when opening popups in apps on mobile devices. When a popup is "dockEnabled" it means the popup no longer points to the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature) or the [location](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#location) assigned to it. Rather it is attached to a side, the top, or the bottom of the view. See [dockOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#dockOptions) to override default options related to docking the popup. * @@ -55899,6 +61770,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#content) */ content: string | HTMLElement | Widget; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled: boolean; /** * The number of selected [features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#features) available to the popup. * @@ -56082,6 +61961,14 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#content) */ content?: string | HTMLElement | WidgetProperties; + /** + * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. (Supported for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html) and [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#defaultPopupTemplateEnabled) + * + * @default false + */ + defaultPopupTemplateEnabled?: boolean; /** * An array of features associated with the popup. Each graphic in this array must have a valid [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) set. They may share the same [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) or have unique [PopupTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) depending on their attributes. The [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#content) and [title](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#title) of the poup is set based on the `content` and `title` properties of each graphic's respective [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html). When more than one graphic exists in this array, the current content of the Popup is set based on the value of the [selected feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup-PopupViewModel.html#selectedFeature). This value is `null` if no features are associated with the popup. * @@ -56305,13 +62192,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#label) - */ - readonly label: string; + iconClass: string; /** * The URL of the REST endpoint of the Export Web Map Task. * @@ -56360,6 +62241,12 @@ declare namespace __esri { export const Print: PrintConstructor; interface PrintProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#iconClass) + */ + iconClass?: string; /** * The URL of the REST endpoint of the Export Web Map Task. * @@ -56763,13 +62650,21 @@ declare namespace __esri { interface widgetsSearch extends Widget, GoTo { /** - * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) object currently selected. Can be either a [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) or a module:esri/widget/Search/LocatorSearchSource. + * The current active menu of the Search widget. **Possible Values:** none | suggestion | source | warning + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#activeMenu) + * + * @default none + */ + activeMenu: string; + /** + * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) object currently selected. Can be either a [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) or a module:esri/widget/Search/LocatorSearchSource. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#activeSource) * * @default null */ - readonly activeSource: FeatureLayerSearchSource | LocatorSearchSource; + readonly activeSource: LayerSearchSource | LocatorSearchSource; /** * The selected source's index. This value is `-1` when all sources are selected. * @@ -56786,6 +62681,12 @@ declare namespace __esri { * @default "Find address or place" */ allPlaceholder: string; + /** + * The combined collection of [defaultSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) and [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources). The [defaultSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) displays first in the Search UI. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#allSources) + */ + readonly allSources: Collection; /** * Indicates whether to automatically select and zoom to the first geocoded result. If `false`, the [findAddressCandidates](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm) operation will still geocode the input string, but the top result will not be selected. To work with the geocoded results, you can set up a [search-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#event:search-complete) event handler and get the results through the event object. * @@ -56794,12 +62695,18 @@ declare namespace __esri { * @default true */ autoSelect: boolean; + /** + * A read-only property that is a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) and/or [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html). This property may contain [ArcGIS Portal](https://enterprise.arcgis.com/en/portal/) [locators](http://enterprise.arcgis.com/en/server/latest/publish-services/windows/geocode-services.htm) and any web map or web scene [configurable search sources](http://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm). This property is used to populate the Search UI if the [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) property is not set. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#defaultSources) + */ + readonly defaultSources: Collection; /** * The widget's default CSS icon class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#iconClass) */ - readonly iconClass: string; + iconClass: string; /** * Indicates whether or not to include [defaultSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) in the Search UI. This can be a boolean value or a function that returns an array of Search [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources). * @@ -56808,12 +62715,6 @@ declare namespace __esri { * @default true */ includeDefaultSources: boolean | Function; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#label) - */ - readonly label: string; /** * Enables location services within the widget. ![locationEnabled](https://developers.arcgis.com/javascript/assets/img/apiref/widgets/search-locationEnabled.png) * > The use of this property is only supported on secure origins. To use it, switch your application to a secure origin, such as HTTPS. Note that localhost is considered "potentially secure" and can be used for easy testing in browsers that supports [Window.isSecureContext](https://developer.mozilla.org/en-US/docs/Web/API/Window/isSecureContext#Browser_compatibility) (currently Chrome and Firefox). @@ -56856,11 +62757,9 @@ declare namespace __esri { */ popupEnabled: boolean; /** - * A customized PopupTemplate for the selected feature. Note that specifying a wildcard {*} for the popupTemplate will return all fields in addition to search-specific fields. + * A customized [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) for the selected feature. Note that any templates defined on [allSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#allSources) take precedence over those defined directly on the template. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#popupTemplate) - * - * @default null */ popupTemplate: PopupTemplate; /** @@ -56912,7 +62811,7 @@ declare namespace __esri { readonly selectedResult: SearchResult; /** * The Search widget may be used to search features in a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#view) specified by the Search widget instance. There are two types of sources: - * * [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * * [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) * * [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) * * @@ -56921,7 +62820,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) */ - sources: Collection; + sources: Collection; /** * An array of results from the [suggest method](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#suggest). This is available if working with a 10.3 or greater geocoding service that has [suggest capability loaded](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-suggest.htm) or a 10.3 or greater feature layer that supports pagination, i.e. `supportsPagination = true`. * @@ -57014,6 +62913,14 @@ declare namespace __esri { export const widgetsSearch: widgetsSearchConstructor; interface widgetsSearchProperties extends WidgetProperties, GoToProperties { + /** + * The current active menu of the Search widget. **Possible Values:** none | suggestion | source | warning + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#activeMenu) + * + * @default none + */ + activeMenu?: string; /** * The selected source's index. This value is `-1` when all sources are selected. * @@ -57038,6 +62945,12 @@ declare namespace __esri { * @default true */ autoSelect?: boolean; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#iconClass) + */ + iconClass?: string; /** * Indicates whether or not to include [defaultSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) in the Search UI. This can be a boolean value or a function that returns an array of Search [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources). * @@ -57088,11 +63001,9 @@ declare namespace __esri { */ popupEnabled?: boolean; /** - * A customized PopupTemplate for the selected feature. Note that specifying a wildcard {*} for the popupTemplate will return all fields in addition to search-specific fields. + * A customized [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) for the selected feature. Note that any templates defined on [allSources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#allSources) take precedence over those defined directly on the template. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#popupTemplate) - * - * @default null */ popupTemplate?: PopupTemplateProperties; /** @@ -57125,7 +63036,7 @@ declare namespace __esri { searchTerm?: string; /** * The Search widget may be used to search features in a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#view) specified by the Search widget instance. There are two types of sources: - * * [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * * [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) * * [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) * * @@ -57134,7 +63045,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) */ - sources?: CollectionProperties; + sources?: CollectionProperties; /** * Enable suggestions for the widget. This is only available if working with a 10.3 or greater geocoding service that has [suggest capability loaded](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-suggest.htm) or a 10.3 or greater feature layer that supports pagination, i.e. `supportsPagination = true`. * @@ -57157,121 +63068,121 @@ declare namespace __esri { viewModel?: SearchViewModelProperties; } - interface FeatureLayerSearchSource extends SearchSource, JSONSupport { + interface LayerSearchSource extends SearchSource, JSONSupport { /** * The results are displayed using this field. Defaults to the layer's `displayField` or the first string field. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#displayField) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#displayField) */ displayField: string; /** * Indicates to only return results that match the search value exactly. This property only applies to `string` field searches. `exactMatch` is always `true` when searching fields of type `number`. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#exactMatch) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#exactMatch) * * @default false */ exactMatch: boolean; /** - * The feature layer queried in the search. This is **required**. - * > Feature layers created from client-side graphics are not supported. + * The layer queried in the search. This is **required**. + * > Layers created from client-side graphics are not supported. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#featureLayer) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#layer) */ - featureLayer: FeatureLayer; + layer: Layer; /** * The name of the source for display. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#name) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#name) */ name: string; /** * An array of string values representing the names of fields in the feature layer to search. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#searchFields) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#searchFields) */ searchFields: string[]; /** * A template string used to display multiple fields in a defined order when results are displayed. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#searchTemplate) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#searchTemplate) */ searchTemplate: string; /** * A template string used to display multiple fields in a defined order when suggestions are displayed. This takes precedence over `displayField`. Field names in the template must have the following format: `{FieldName}`. An example suggestionTemplate could look something like: `Name: {OWNER}, Parcel: {PARCEL_ID}`. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#suggestionTemplate) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#suggestionTemplate) */ suggestionTemplate: string; /** * Creates a deep clone of this object. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#clone) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#clone) * * */ - clone(): FeatureLayerSearchSource; + clone(): LayerSearchSource; } - interface FeatureLayerSearchSourceConstructor { + interface LayerSearchSourceConstructor { /** - * The following properties define a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html)-based [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) whose features may be searched by a [Search](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html) widget instance. + * The following properties define a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html)-based [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#sources) whose features may be searched by a [Search](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html) widget instance. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) */ - new (properties?: FeatureLayerSearchSourceProperties): FeatureLayerSearchSource; + new (properties?: LayerSearchSourceProperties): LayerSearchSource; - fromJSON(json: any): FeatureLayerSearchSource; + fromJSON(json: any): LayerSearchSource; } - export const FeatureLayerSearchSource: FeatureLayerSearchSourceConstructor; + export const LayerSearchSource: LayerSearchSourceConstructor; - interface FeatureLayerSearchSourceProperties extends SearchSourceProperties { + interface LayerSearchSourceProperties extends SearchSourceProperties { /** * The results are displayed using this field. Defaults to the layer's `displayField` or the first string field. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#displayField) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#displayField) */ displayField?: string; /** * Indicates to only return results that match the search value exactly. This property only applies to `string` field searches. `exactMatch` is always `true` when searching fields of type `number`. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#exactMatch) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#exactMatch) * * @default false */ exactMatch?: boolean; /** - * The feature layer queried in the search. This is **required**. - * > Feature layers created from client-side graphics are not supported. + * The layer queried in the search. This is **required**. + * > Layers created from client-side graphics are not supported. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#featureLayer) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#layer) */ - featureLayer?: FeatureLayerProperties; + layer?: LayerProperties; /** * The name of the source for display. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#name) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#name) */ name?: string; /** * An array of string values representing the names of fields in the feature layer to search. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#searchFields) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#searchFields) */ searchFields?: string[]; /** * A template string used to display multiple fields in a defined order when results are displayed. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#searchTemplate) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#searchTemplate) */ searchTemplate?: string; /** * A template string used to display multiple fields in a defined order when suggestions are displayed. This takes precedence over `displayField`. Field names in the template must have the following format: `{FieldName}`. An example suggestionTemplate could look something like: `Name: {OWNER}, Parcel: {PARCEL_ID}`. * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html#suggestionTemplate) + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#suggestionTemplate) */ suggestionTemplate?: string; } @@ -57522,7 +63433,7 @@ declare namespace __esri { popupEnabled: boolean; /** * The popup template used to display search results. If no popup is needed, set the source's popupTemplate to `null`. - * > This property should be set in instances where there is no existing [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) configured. For example, [feature sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) will default to any existing [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) configured on the layer. + * > This property should be set in instances where there is no existing [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) configured. For example, [feature sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) will default to any existing [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) configured on the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#popupTemplate) */ @@ -57573,6 +63484,25 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#zoomScale) */ zoomScale: number; + + /** + * Method to provide parameters for a given search source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#getResults) + * + * @param resultsParams An object that is passed as a parameter to get search results. + * + */ + getResults(resultsParams: GetResultsParameters): IPromise; + /** + * Method to provide parameters for search suggestions. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#getSuggestions) + * + * @param suggestionsParams An object that is passed as a parameter for search suggestions. + * + */ + getSuggestions(suggestionsParams: GetSuggestionsParameters): IPromise; } interface SearchSourceConstructor { @@ -57642,7 +63572,7 @@ declare namespace __esri { popupEnabled?: boolean; /** * The popup template used to display search results. If no popup is needed, set the source's popupTemplate to `null`. - * > This property should be set in instances where there is no existing [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) configured. For example, [feature sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) will default to any existing [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) configured on the layer. + * > This property should be set in instances where there is no existing [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) configured. For example, [feature sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) will default to any existing [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupTemplate) configured on the layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#popupTemplate) */ @@ -57695,6 +63625,94 @@ declare namespace __esri { zoomScale?: number; } + /** + * Specifies the object that is passed as a parameter to [getResults()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#getResults). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + export interface GetResultsParameters extends Object { + /** + * The key field used to find the result. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + exactMatch?: boolean; + /** + * The location value used by the Search. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + location?: Point; + /** + * Indicates the maximum number of search results to return. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + maxResults?: number; + /** + * Indicates the index of the search source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + sourceIndex?: number; + /** + * Indicates the Spatial Refeference defined by the source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + spatialReference?: SpatialReference; + /** + * Indicates the Suggest Result that triggered the search for a result. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetResultsParameters) + */ + suggestResult?: SuggestResult; + /** + * Indicates the view provided to the Search Widget using the source. + * + * [Read more...](global.html) + */ + view?: MapView | SceneView; + } + + /** + * Specifies the object that is passed as a parameter to [getSuggestions()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#getSuggestions). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + export interface GetSuggestionsParameters extends Object { + /** + * Indicates the maximum number of suggestions to return for the widget's input. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + maxSuggestions?: number; + /** + * Indicates the index of the search source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + sourceIndex?: number; + /** + * Indicates the Spatial Refeference defined by the source. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + spatialReference?: SpatialReference; + /** + * Indicates search term used to find a suggestion. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#GetSuggestionsParameters) + */ + suggestTerm?: string; + /** + * Indicates the view provided to the Search Widget using the source. + * + * [Read more...](global.html) + */ + view?: MapView | SceneView; + } + export interface SearchSourceFilter extends Object { /** * The where clause specified for filtering suggests or search results. @@ -57703,7 +63721,7 @@ declare namespace __esri { */ where?: string; /** - * The filter geometry for suggests or search results. + * The filter geometry for suggests or search results. [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) is the only supported geometry when working with [locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) sources. See [Find Address Candidates](https://developers.arcgis.com/rest/services-reference/find-address-candidates.htm) for additional information. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchSource.html#filter) */ @@ -57712,11 +63730,11 @@ declare namespace __esri { interface SearchViewModel extends Accessor, Evented, GoTo { /** - * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) object currently selected. Can be either a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or a [locator task](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). + * The [source](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) object currently selected. Can be either a [feature layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) or a [locator task](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#activeSource) */ - readonly activeSource: FeatureLayerSearchSource | LocatorSearchSource; + readonly activeSource: LayerSearchSource | LocatorSearchSource; /** * The selected source's index. This value is `-1` when all sources are selected. * @@ -57738,7 +63756,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#allSources) */ - readonly allSources: Collection; + readonly allSources: Collection; /** * Indicates whether to automatically select and zoom to the first geocoded result. If `false`, the [findAddressCandidates](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm) operation will still geocode the input string, but the top result will not be selected. To work with the geocoded results, you can set up a [search-complete](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#event:search-complete) event handler and get the results through the event object. * @@ -57748,11 +63766,11 @@ declare namespace __esri { */ autoSelect: boolean; /** - * A read-only property that is a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of module:esri/widgets/Search/FeaturelayerSource and/or [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html). This property may contain [ArcGIS Portal](https://enterprise.arcgis.com/en/portal/) [locators](http://enterprise.arcgis.com/en/server/latest/publish-services/windows/geocode-services.htm) and any web map or web scene [configurable search sources](http://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm). This property is used to populate the Search UI if the [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) property is not set. + * A read-only property that is a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) and/or [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html). This property may contain [ArcGIS Portal](https://enterprise.arcgis.com/en/portal/) [locators](http://enterprise.arcgis.com/en/server/latest/publish-services/windows/geocode-services.htm) and any web map or web scene [configurable search sources](http://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm). This property is used to populate the Search UI if the [sources](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) property is not set. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#defaultSources) */ - readonly defaultSources: Collection; + readonly defaultSources: Collection; /** * The default [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html) for the search result. * @@ -57892,8 +63910,8 @@ declare namespace __esri { */ readonly selectedSuggestion: Geometry | SearchViewModelSuggestResult; /** - * The Search widget may be used to search features in a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#view) specified by the Search widget instance. There are two types of sources: - * * [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * The Search widget may be used to search features in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#view) specified by the Search widget instance. There are two types of sources: + * * [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) * * [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) * * @@ -57901,7 +63919,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) */ - sources: Collection; + sources: Collection; /** * The current state of the widget. This property was removed from [Search](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html) and should now be accessed within the [SearchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html). **Possible Values:** ready | disabled | searching | loading * @@ -58125,8 +64143,8 @@ declare namespace __esri { */ searchTerm?: string; /** - * The Search widget may be used to search features in a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#view) specified by the Search widget instance. There are two types of sources: - * * [FeatureLayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-FeatureLayerSearchSource.html) + * The Search widget may be used to search features in a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html) or geocode locations with a [Locator](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-Locator.html). The `sources` property defines the sources from which to search for the [view](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#view) specified by the Search widget instance. There are two types of sources: + * * [LayerSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html) * * [LocatorSearchSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LocatorSearchSource.html) * * @@ -58134,7 +64152,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#sources) */ - sources?: CollectionProperties; + sources?: CollectionProperties; /** * The millisecond delay after keyup and before making a [suggest](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-SearchViewModel.html#suggest) network request. * @@ -58801,12 +64819,18 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#createGraphic) */ readonly createGraphic: Graphic; + /** + * Default update options set for the Sketch widget. Update options set on this property will be overwritten if the update options are changed when [update()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) method is called. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + */ + readonly defaultUpdateOptions: SketchDefaultUpdateOptions; /** * The Sketch widget's default CSS icon class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#iconClass) */ - readonly iconClass: string; + iconClass: string; /** * The [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) associated with the Sketch widget. The Sketch widget adds new [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) to this layer or can only update graphics stored in this layer. * @@ -58834,11 +64858,11 @@ declare namespace __esri { */ readonly updateGraphics: Collection; /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the Sketch widget to a specific view. + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the Sketch widget to a specific view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#view) */ - view: MapView; + view: MapView | SceneView; /** * The view model for the Sketch widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [SketchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html) class to access all properties and methods on the Sketch widget. * @@ -58869,7 +64893,7 @@ declare namespace __esri { */ complete(): void; /** - * Create a graphic with a geometry specified in `tool`. When first vertex of the graphic is added, [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event:create) event will start firing. **Note:** Creating a circle geometry does not work in all spatial references. + * Create a graphic with a geometry specified in `tool`. When first vertex of the graphic is added, [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#event:create) event will start firing. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#create) * @@ -58923,28 +64947,28 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) * - * @param graphics An array of graphics to be updated. Only graphics added to the Sketch widget's [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#layer) property can be updated. + * @param graphics A graphic or an array of graphics to be updated. Only graphics added to SketchViewModel's [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#layer) property can be updated. * @param updateOptions Update options for the graphics to be updated. * @param updateOptions.tool * Name of the update tool. Specifies the update operation for the selected graphics. **Possible Values:** * * Value | Description | * ----- | ----------- | - * transform | The *default* tool for graphics with [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometries. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting `enableRotation`, `enableScaling` or `preserveAspectRatio` properties when calling `update` method or setting them on [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) property when the Sketch widget initializes. This tool does not apply if selected graphics have only [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. - * reshape | It allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with one graphic and the graphic's geometry has to be [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html). - * move | The *default* tool for graphics with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since `move` operation is already built into both `transform` and `reshape` tools by default. + * transform | This is the *default* tool for graphics with a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry, [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry or graphics that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html) with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting the `enableRotation`, `enableScaling` or `preserveAspectRatio` arguments when calling the `update` method or setting them on the [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) property when the Sketch widget initializes. + * reshape | This tool allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with a single graphic that has a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry. + * move | This is the *default* tool for graphics with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry that do not use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since the `move` operation is built into both the `transform` and `reshape` tools by default. * @param updateOptions.enableRotation Indicates if the `rotation` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. * @param updateOptions.enableScaling Indicates if the `scale` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. - * @param updateOptions.preserveAspectRatio Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform`. + * @param updateOptions.preserveAspectRatio Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * @param updateOptions.toggleToolOnClick Indicates if the graphic being updated can be toggled between `transform` and `reshape` update options. * */ - update(graphics: Graphic[], updateOptions?: SketchUpdateUpdateOptions): void; + update(graphics: Graphic | Graphic[], updateOptions?: SketchUpdateUpdateOptions): IPromise; } interface SketchConstructor { /** - * Sketch widget provides a simple UI for creating and updating graphics on the 2D [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). This significantly minimizes the code required for working with graphics in the view. It is intended to be used with [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) stored in its [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#layer) property. + * Sketch widget provides a simple UI for creating and updating graphics on a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). This significantly minimizes the code required for working with graphics in the view. It is intended to be used with [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) stored in its [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#layer) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html) */ @@ -58955,6 +64979,12 @@ declare namespace __esri { export const Sketch: SketchConstructor; interface SketchProperties extends WidgetProperties { + /** + * The Sketch widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#iconClass) + */ + iconClass?: string; /** * The [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) associated with the Sketch widget. The Sketch widget adds new [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) to this layer or can only update graphics stored in this layer. * @@ -58970,11 +65000,11 @@ declare namespace __esri { */ layout?: string; /** - * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). Set this to link the Sketch widget to a specific view. + * A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the Sketch widget to a specific view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#view) */ - view?: MapViewProperties; + view?: MapViewProperties | SceneViewProperties; /** * The view model for the Sketch widget. This is a class that contains all the logic (properties and methods) that controls this widget's behavior. See the [SketchViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html) class to access all properties and methods on the Sketch widget. * @@ -58997,11 +65027,11 @@ declare namespace __esri { */ readonly createGraphic: Graphic; /** - * Default update options set for the SketchViewModel. Update options set on this property will be overwritten if the update options are changed when [update()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) method is called. + * Default update options set for the SketchViewModel. Update options set on this property will be overridden by options passed to the [update()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) method. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) */ - readonly defaultUpdateOptions: SketchViewModelDefaultUpdateOptions; + defaultUpdateOptions: SketchViewModelDefaultUpdateOptions; /** * The [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) associated with the SketchViewModel. The SketchViewModel adds new [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) to this layer or can only update graphics stored in this layer. * @@ -59078,7 +65108,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#view) */ - view: MapView; + view: MapView | SceneView; /** * Cancels the active operation and fires the [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:create) or [update](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:update) event and changes the event's state to `cancel`. @@ -59097,7 +65127,7 @@ declare namespace __esri { */ complete(): void; /** - * Create a graphic with a geometry specified in `tool` parameter. When first vertex of the graphic is added, [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:create) event will start firing. **Note:** Creating a circle geometry does not work in all spatial references. + * Create a graphic with a geometry specified in `tool` parameter. When first vertex of the graphic is added, [create](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#event:create) event will start firing. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#create) * @@ -59143,23 +65173,23 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) * - * @param graphics An array of graphics to be updated. Only graphics added to SketchViewModel's [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#layer) property can be updated. + * @param graphics A graphic or an array of graphics to be updated. Only graphics added to SketchViewModel's [layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#layer) property can be updated. * @param updateOptions Update options for the graphics to be updated. * @param updateOptions.tool * Name of the update tool. Specifies the update operation for the selected graphics. **Possible Values:** * * Value | Description | * ----- | ----------- | - * transform | The *default* tool for graphics with [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometries. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting `enableRotation`, `enableScaling` or `preserveAspectRatio` properties when calling `update` method or setting them on [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) property when the widget initializes. This tool does not apply if selected graphics have only [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) or [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometries. - * reshape | It allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with one graphic and the graphic's geometry has to be [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html). - * move | The *default* tool for graphics with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) and [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometries. It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since `move` operation is already built into both `transform` and `reshape` tools by default. + * transform | This is the *default* tool for graphics with a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry, [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry or graphics that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html) with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting the `enableRotation`, `enableScaling` or `preserveAspectRatio` arguments when calling the `update` method or setting them on the [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) property when the Sketch widget initializes. + * reshape | This tool allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with a single graphic that has a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry. + * move | This is the *default* tool for graphics with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry that do not use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since the `move` operation is built into both the `transform` and `reshape` tools by default. * @param updateOptions.enableRotation Indicates if the `rotation` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. * @param updateOptions.enableScaling Indicates if the `scale` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. - * @param updateOptions.preserveAspectRatio Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform`. + * @param updateOptions.preserveAspectRatio Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * @param updateOptions.toggleToolOnClick Indicates if the graphic being updated can be toggled between `transform` and `reshape` update options. * */ - update(graphics: Graphic[], updateOptions?: SketchViewModelUpdateUpdateOptions): void; + update(graphics: Graphic | Graphic[], updateOptions?: SketchViewModelUpdateUpdateOptions): IPromise; } interface SketchViewModelConstructor { @@ -59175,6 +65205,12 @@ declare namespace __esri { export const SketchViewModel: SketchViewModelConstructor; interface SketchViewModelProperties { + /** + * Default update options set for the SketchViewModel. Update options set on this property will be overridden by options passed to the [update()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) method. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) + */ + defaultUpdateOptions?: SketchViewModelDefaultUpdateOptions; /** * The [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) associated with the SketchViewModel. The SketchViewModel adds new [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) to this layer or can only update graphics stored in this layer. * @@ -59239,7 +65275,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#view) */ - view?: MapViewProperties; + view?: MapViewProperties | SceneViewProperties; } export interface SketchViewModelCreateCreateOptions extends Object { @@ -59260,13 +65296,13 @@ declare namespace __esri { export interface SketchViewModelDefaultUpdateOptions extends Object { /** - * Name of the update tool. The default tool is `move` for graphics with `point` and `multipoint` geometries and `transform` for graphics with `polygon` and `polyline` geometries. + * Name of the update tool. The default tool is `transform` for graphics with polygon and polyline geometries and `move` for graphics with point and multipoint geometries. However, if a graphic with point geometry uses a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html), the default tool is `transform`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) */ tool?: string; /** - * Indicates if the `rotation` operation will be enabled when updating graphics. + * Indicates if the `rotation` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) * @@ -59274,7 +65310,7 @@ declare namespace __esri { */ enableRotation?: boolean; /** - * Indicates if the `scale` operation will be enabled when updating graphics. + * Indicates if the `scale` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) * @@ -59282,7 +65318,15 @@ declare namespace __esri { */ enableScaling?: boolean; /** - * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. + * Indicates whether more than one selection can be made at once. This pertains to shift+click interaction with the `transform` tool. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) + * + * @default true + */ + multipleSelectionEnabled?: boolean; + /** + * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) * @@ -59305,9 +65349,9 @@ declare namespace __esri { * * Value | Description | * ----- | ----------- | - * transform | The *default* tool for graphics with [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometries. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting `enableRotation`, `enableScaling` or `preserveAspectRatio` properties when calling `update` method or setting them on [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) property when the widget initializes. This tool does not apply if selected graphics have only [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) or [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometries. - * reshape | It allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with one graphic and the graphic's geometry has to be [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html). - * move | The *default* tool for graphics with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) and [multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html) geometries. It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since `move` operation is already built into both `transform` and `reshape` tools by default. + * transform | This is the *default* tool for graphics with a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry, [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry or graphics that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html) with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting the `enableRotation`, `enableScaling` or `preserveAspectRatio` arguments when calling the `update` method or setting them on the [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#defaultUpdateOptions) property when the Sketch widget initializes. + * reshape | This tool allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with a single graphic that has a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry. + * move | This is the *default* tool for graphics with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry that do not use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since the `move` operation is built into both the `transform` and `reshape` tools by default. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) @@ -59330,7 +65374,7 @@ declare namespace __esri { */ enableScaling?: boolean; /** - * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform`. + * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#update) * @@ -59510,15 +65554,64 @@ declare namespace __esri { mode?: string; } + export interface SketchDefaultUpdateOptions extends Object { + /** + * Name of the update tool. The default tool is `transform` for graphics with polygon and polyline geometries and `move` for graphics with point and multipoint geometries. However, if a graphic with point geometry uses a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html), the default tool is `transform`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + */ + tool?: string; + /** + * Indicates if the `rotation` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default true + */ + enableRotation?: boolean; + /** + * Indicates if the `scale` operation will be enabled when updating graphics. Only applies if `tool` is `transform`. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default true + */ + enableScaling?: boolean; + /** + * Indicates whether more than one selection can be made at once. This pertains to shift+click interaction with the `transform` tool. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default true + */ + multipleSelectionEnabled?: boolean; + /** + * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default false + */ + preserveAspectRatio?: boolean; + /** + * Indicates if the graphic being updated can be toggled between `transform` and `reshape` update options. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) + * + * @default true + */ + toggleToolOnClick?: boolean; + } + export interface SketchUpdateUpdateOptions extends Object { /** * Name of the update tool. Specifies the update operation for the selected graphics. **Possible Values:** * * Value | Description | * ----- | ----------- | - * transform | The *default* tool for graphics with [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) and [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometries. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting `enableRotation`, `enableScaling` or `preserveAspectRatio` properties when calling `update` method or setting them on [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) property when the Sketch widget initializes. This tool does not apply if selected graphics have only [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. - * reshape | It allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with one graphic and the graphic's geometry has to be [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html). - * move | The *default* tool for graphics with [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries. It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since `move` operation is already built into both `transform` and `reshape` tools by default. + * transform | This is the *default* tool for graphics with a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) geometry, [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry or graphics that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html) with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry. It allows one or multiple graphics to be scaled, rotated and moved by default. Its default behavior can be changed by setting the `enableRotation`, `enableScaling` or `preserveAspectRatio` arguments when calling the `update` method or setting them on the [defaultUpdateOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#defaultUpdateOptions) property when the Sketch widget initializes. + * reshape | This tool allows the entire graphic or individual vertices of the graphic to be moved. Vertices can be added or removed. This tool can only be used with a single graphic that has a [polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry. + * move | This is the *default* tool for graphics with a [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometry that do not use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). It should be used for specific cases where you just want to move selected `polygon` and `polyline` graphics without additional options. Additionally, the `move` tool does not support toggling to different modes, since the `move` operation is built into both the `transform` and `reshape` tools by default. * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) @@ -59541,7 +65634,7 @@ declare namespace __esri { */ enableScaling?: boolean; /** - * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform`. + * Indicates if the uniform scale operation will be enabled when updating graphics. `enableScaling` must be set `true` when setting this property to `true`. Only applies if `tool` is `transform` and is always `true` when transforming points that use a [3D object symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#update) * @@ -59683,6 +65776,7 @@ declare namespace __esri { * disabled | not ready yet * ready | ready for slicing * slicing | currently slicing + * sliced | finished slicing * * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slice-SliceViewModel.html#state) @@ -59966,13 +66060,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#label) - */ - readonly label: string; + iconClass: string; /** * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). * @@ -60071,6 +66159,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#graphic) */ graphic?: GraphicProperties; + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#iconClass) + */ + iconClass?: string; /** * Indicates the scale to set on the view when navigating to the position of the geolocated result once a location is returned from the [track](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track.html#event:track) event. If a scale value is not explicitly set, then the view will navigate to a default scale of `2500`. For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints). * @@ -60389,16 +66483,15 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#id) */ id: string; + /** + * The widget's label. This property is useful whenever the widget is controlled by another one (e.g. [Expand](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html)) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#label) + */ + label: string; /** * A utility method used for building the value for a widget's `class` property. This aids in simplifying CSS class setup. - * > Prior to version 4.7, there were various approaches towards setting CSS classes. These were dependent upon variables, such as whether the classes were: - * * a single static class, - * * multiple static classes, or - * * dynamic classes. - * - * - * This helper method takes all of these approaches into account and simplifies it to use one single pattern to accommodate these multiple approaches. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#classes) * @@ -60480,6 +66573,12 @@ declare namespace __esri { * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#id) */ id?: string; + /** + * The widget's label. This property is useful whenever the widget is controlled by another one (e.g. [Expand](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html)) + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#label) + */ + label?: string; } interface Widgette { @@ -60547,13 +66646,7 @@ declare namespace __esri { * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#iconClass) */ - readonly iconClass: string; - /** - * The widget's default label. - * - * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#label) - */ - readonly label: string; + iconClass: string; /** * Determines the layout/orientation of the Zoom widget. **Possible Values:** vertical | horizontal * @@ -60614,6 +66707,12 @@ declare namespace __esri { export const Zoom: ZoomConstructor; interface ZoomProperties extends WidgetProperties { + /** + * The widget's default CSS icon class. + * + * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Zoom.html#iconClass) + */ + iconClass?: string; /** * Determines the layout/orientation of the Zoom widget. **Possible Values:** vertical | horizontal * @@ -60841,6 +66940,11 @@ declare module "esri/PopupTemplate" { export = PopupTemplate; } +declare module "esri/TimeExtent" { + import TimeExtent = __esri.TimeExtent; + export = TimeExtent; +} + declare module "esri/Viewpoint" { import Viewpoint = __esri.Viewpoint; export = Viewpoint; @@ -60926,11 +67030,6 @@ declare module "esri/geometry/Polyline" { export = Polyline; } -declare module "esri/geometry/ScreenPoint" { - import ScreenPoint = __esri.ScreenPoint; - export = ScreenPoint; -} - declare module "esri/geometry/SpatialReference" { import SpatialReference = __esri.SpatialReference; export = SpatialReference; @@ -60951,6 +67050,16 @@ declare module "esri/geometry/support/MeshComponent" { export = MeshComponent; } +declare module "esri/geometry/support/MeshMaterial" { + import MeshMaterial = __esri.MeshMaterial; + export = MeshMaterial; +} + +declare module "esri/geometry/support/MeshTexture" { + import MeshTexture = __esri.MeshTexture; + export = MeshTexture; +} + declare module "esri/geometry/support/ValueMeshColor" { import ValueMeshColor = __esri.ValueMeshColor; export = ValueMeshColor; @@ -61011,6 +67120,11 @@ declare module "esri/layers/FeatureLayer" { export = FeatureLayer; } +declare module "esri/layers/GeoJSONLayer" { + import GeoJSONLayer = __esri.GeoJSONLayer; + export = GeoJSONLayer; +} + declare module "esri/layers/GeoRSSLayer" { import GeoRSSLayer = __esri.GeoRSSLayer; export = GeoRSSLayer; @@ -61261,6 +67375,11 @@ declare module "esri/layers/support/TileMatrixSet" { export = TileMatrixSet; } +declare module "esri/layers/support/TimeInfo" { + import TimeInfo = __esri.TimeInfo; + export = TimeInfo; +} + declare module "esri/layers/support/WMSSublayer" { import WMSSublayer = __esri.WMSSublayer; export = WMSSublayer; @@ -61321,6 +67440,11 @@ declare module "esri/renderers/ClassBreaksRenderer" { export = ClassBreaksRenderer; } +declare module "esri/renderers/DotDensityRenderer" { + import DotDensityRenderer = __esri.DotDensityRenderer; + export = DotDensityRenderer; +} + declare module "esri/renderers/HeatmapRenderer" { import HeatmapRenderer = __esri.HeatmapRenderer; export = HeatmapRenderer; @@ -61341,6 +67465,11 @@ declare module "esri/renderers/UniqueValueRenderer" { export = UniqueValueRenderer; } +declare module "esri/renderers/StretchRenderer" { + import StretchRenderer = __esri.StretchRenderer; + export = StretchRenderer; +} + declare module "esri/renderers/PointCloudRenderer" { import PointCloudRenderer = __esri.PointCloudRenderer; export = PointCloudRenderer; @@ -61366,6 +67495,11 @@ declare module "esri/renderers/PointCloudUniqueValueRenderer" { export = PointCloudUniqueValueRenderer; } +declare module "esri/renderers/support/AttributeColorInfo" { + import AttributeColorInfo = __esri.AttributeColorInfo; + export = AttributeColorInfo; +} + declare module "esri/renderers/support/AuthoringInfo" { import AuthoringInfo = __esri.AuthoringInfo; export = AuthoringInfo; @@ -61431,109 +67565,99 @@ declare module "esri/support/actions/ActionToggle" { export = ActionToggle; } -declare module "esri/support/ExpressionInfo" { +declare module "esri/popup/ExpressionInfo" { import ExpressionInfo = __esri.ExpressionInfo; export = ExpressionInfo; } -declare module "esri/support/FieldInfo" { +declare module "esri/popup/FieldInfo" { import FieldInfo = __esri.FieldInfo; export = FieldInfo; } -declare module "esri/support/LayerOptions" { +declare module "esri/popup/LayerOptions" { import LayerOptions = __esri.LayerOptions; export = LayerOptions; } -declare module "esri/support/RelatedRecordsInfo" { +declare module "esri/popup/RelatedRecordsInfo" { import RelatedRecordsInfo = __esri.RelatedRecordsInfo; export = RelatedRecordsInfo; } -declare module "esri/support/ContentElement/Attachments" { - import Attachments = __esri.Attachments; - export = Attachments; +declare module "esri/popup/content/AttachmentsContent" { + import AttachmentsContent = __esri.AttachmentsContent; + export = AttachmentsContent; } -declare module "esri/support/ContentElement/ContentElement" { - import ContentElementContentElement = __esri.ContentElementContentElement; - export = ContentElementContentElement; +declare module "esri/popup/content/BarChartMediaInfo" { + import BarChartMediaInfo = __esri.BarChartMediaInfo; + export = BarChartMediaInfo; } -declare module "esri/support/ContentElement/Fields" { - import Fields = __esri.Fields; - export = Fields; +declare module "esri/popup/content/ColumnChartMediaInfo" { + import ColumnChartMediaInfo = __esri.ColumnChartMediaInfo; + export = ColumnChartMediaInfo; } -declare module "esri/support/ContentElement/Media" { - import Media = __esri.Media; - export = Media; +declare module "esri/popup/content/Content" { + import Content = __esri.Content; + export = Content; } -declare module "esri/support/ContentElement/Text" { - import Text = __esri.Text; - export = Text; +declare module "esri/popup/content/FieldsContent" { + import FieldsContent = __esri.FieldsContent; + export = FieldsContent; } -declare module "esri/support/ContentElement/Media/BarChart" { - import BarChart = __esri.BarChart; - export = BarChart; +declare module "esri/popup/content/ImageMediaInfo" { + import ImageMediaInfo = __esri.ImageMediaInfo; + export = ImageMediaInfo; } -declare module "esri/support/ContentElement/Media/Chart" { - import Chart = __esri.Chart; - export = Chart; +declare module "esri/popup/content/MediaContent" { + import MediaContent = __esri.MediaContent; + export = MediaContent; } -declare module "esri/support/ContentElement/Media/ColumnChart" { - import ColumnChart = __esri.ColumnChart; - export = ColumnChart; +declare module "esri/popup/content/LineChartMediaInfo" { + import LineChartMediaInfo = __esri.LineChartMediaInfo; + export = LineChartMediaInfo; } -declare module "esri/support/ContentElement/Media/LineChart" { - import LineChart = __esri.LineChart; - export = LineChart; +declare module "esri/popup/content/PieChartMediaInfo" { + import PieChartMediaInfo = __esri.PieChartMediaInfo; + export = PieChartMediaInfo; } -declare module "esri/support/ContentElement/Media/Media" { - import MediaMedia = __esri.MediaMedia; - export = MediaMedia; +declare module "esri/popup/content/TextContent" { + import TextContent = __esri.TextContent; + export = TextContent; } -declare module "esri/support/ContentElement/Media/PieChart" { - import PieChart = __esri.PieChart; - export = PieChart; +declare module "esri/popup/content/support/ChartMediaInfoValue" { + import ChartMediaInfoValue = __esri.ChartMediaInfoValue; + export = ChartMediaInfoValue; } -declare module "esri/support/ContentElement/Media/Chart/Series" { - import Series = __esri.Series; - export = Series; +declare module "esri/popup/content/support/ChartMediaInfoValueSeries" { + import ChartMediaInfoValueSeries = __esri.ChartMediaInfoValueSeries; + export = ChartMediaInfoValueSeries; } -declare module "esri/support/ContentElement/Media/Chart/Value" { - import Value = __esri.Value; - export = Value; +declare module "esri/popup/content/support/ImageMediaInfoValue" { + import ImageMediaInfoValue = __esri.ImageMediaInfoValue; + export = ImageMediaInfoValue; } -declare module "esri/support/ContentElement/Media/Image" { - import Image = __esri.Image; - export = Image; -} - -declare module "esri/support/ContentElement/Media/Image/Value" { - import ImageValue = __esri.ImageValue; - export = ImageValue; -} - -declare module "esri/support/FieldInfo/Format" { +declare module "esri/popup/support/FieldInfoFormat" { import FieldInfoFormat = __esri.FieldInfoFormat; export = FieldInfoFormat; } -declare module "esri/support/RelatedRecordsInfo/FieldOrder" { - import FieldOrder = __esri.FieldOrder; - export = FieldOrder; +declare module "esri/popup/support/RelatedRecordsInfoFieldOrder" { + import RelatedRecordsInfoFieldOrder = __esri.RelatedRecordsInfoFieldOrder; + export = RelatedRecordsInfoFieldOrder; } declare module "esri/symbols/ExtrudeSymbol3DLayer" { @@ -61756,6 +67880,11 @@ declare module "esri/tasks/support/AddressCandidate" { export = AddressCandidate; } +declare module "esri/tasks/support/AlgorithmicColorRamp" { + import AlgorithmicColorRamp = __esri.AlgorithmicColorRamp; + export = AlgorithmicColorRamp; +} + declare module "esri/tasks/support/AreasAndLengthsParameters" { import AreasAndLengthsParameters = __esri.AreasAndLengthsParameters; export = AreasAndLengthsParameters; @@ -61781,6 +67910,11 @@ declare module "esri/tasks/support/ClosestFacilitySolveResult" { export = ClosestFacilitySolveResult; } +declare module "esri/tasks/support/ColorRamp" { + import ColorRamp = __esri.ColorRamp; + export = ColorRamp; +} + declare module "esri/tasks/support/DataFile" { import DataFile = __esri.DataFile; export = DataFile; @@ -61876,6 +68010,11 @@ declare module "esri/tasks/support/LinearUnit" { export = LinearUnit; } +declare module "esri/tasks/support/MultipartColorRamp" { + import MultipartColorRamp = __esri.MultipartColorRamp; + export = MultipartColorRamp; +} + declare module "esri/tasks/support/NAMessage" { import NAMessage = __esri.NAMessage; export = NAMessage; @@ -62042,7 +68181,7 @@ declare module "esri/views/layers/LayerView" { } declare module "esri/views/layers/CSVLayerView" { - import CSVLayerView = __esri.CSVLayerView; + type CSVLayerView = __esri.CSVLayerView; export = CSVLayerView; } @@ -62051,8 +68190,18 @@ declare module "esri/views/layers/FeatureLayerView" { export = FeatureLayerView; } +declare module "esri/views/layers/GeoJSONLayerView" { + type GeoJSONLayerView = __esri.GeoJSONLayerView; + export = GeoJSONLayerView; +} + +declare module "esri/views/layers/GeoRSSLayerView" { + type GeoRSSLayerView = __esri.GeoRSSLayerView; + export = GeoRSSLayerView; +} + declare module "esri/views/layers/GraphicsLayerView" { - import GraphicsLayerView = __esri.GraphicsLayerView; + type GraphicsLayerView = __esri.GraphicsLayerView; export = GraphicsLayerView; } @@ -62062,12 +68211,12 @@ declare module "esri/views/layers/ImageryLayerView" { } declare module "esri/views/layers/KMLLayerView" { - import KMLLayerView = __esri.KMLLayerView; + type KMLLayerView = __esri.KMLLayerView; export = KMLLayerView; } declare module "esri/views/layers/SceneLayerView" { - import SceneLayerView = __esri.SceneLayerView; + type SceneLayerView = __esri.SceneLayerView; export = SceneLayerView; } @@ -62076,6 +68225,16 @@ declare module "esri/views/layers/StreamLayerView" { export = StreamLayerView; } +declare module "esri/views/layers/support/FeatureFilter" { + import FeatureFilter = __esri.FeatureFilter; + export = FeatureFilter; +} + +declare module "esri/views/layers/support/FeatureEffect" { + import FeatureEffect = __esri.FeatureEffect; + export = FeatureEffect; +} + declare module "esri/views/ui/UI" { import UI = __esri.UI; export = UI; @@ -62091,41 +68250,51 @@ declare module "esri/views/2d/ViewState" { export = ViewState; } -declare module "esri/views/2d/draw/Draw" { +declare module "esri/views/draw/Draw" { import Draw = __esri.Draw; export = Draw; } -declare module "esri/views/2d/draw/DrawAction" { +declare module "esri/views/draw/DrawAction" { import DrawAction = __esri.DrawAction; export = DrawAction; } -declare module "esri/views/2d/draw/PointDrawAction" { +declare module "esri/views/draw/PointDrawAction" { import PointDrawAction = __esri.PointDrawAction; export = PointDrawAction; } -declare module "esri/views/2d/draw/PolylineDrawAction" { +declare module "esri/views/draw/PolylineDrawAction" { import PolylineDrawAction = __esri.PolylineDrawAction; export = PolylineDrawAction; } -declare module "esri/views/2d/draw/PolygonDrawAction" { +declare module "esri/views/draw/PolygonDrawAction" { import PolygonDrawAction = __esri.PolygonDrawAction; export = PolygonDrawAction; } -declare module "esri/views/2d/draw/MultipointDrawAction" { +declare module "esri/views/draw/MultipointDrawAction" { import MultipointDrawAction = __esri.MultipointDrawAction; export = MultipointDrawAction; } -declare module "esri/views/2d/draw/SegmentDrawAction" { +declare module "esri/views/draw/SegmentDrawAction" { import SegmentDrawAction = __esri.SegmentDrawAction; export = SegmentDrawAction; } +declare module "esri/views/2d/layers/BaseLayerView2D" { + import BaseLayerView2D = __esri.BaseLayerView2D; + export = BaseLayerView2D; +} + +declare module "esri/views/2d/layers/BaseLayerViewGL2D" { + import BaseLayerViewGL2D = __esri.BaseLayerViewGL2D; + export = BaseLayerViewGL2D; +} + declare module "esri/webmap/Bookmark" { import Bookmark = __esri.Bookmark; export = Bookmark; @@ -62136,6 +68305,11 @@ declare module "esri/webmap/InitialViewProperties" { export = InitialViewProperties; } +declare module "esri/webmap/background/ColorBackground" { + import ColorBackground = __esri.ColorBackground; + export = ColorBackground; +} + declare module "esri/webscene/ApplicationProperties" { import ApplicationProperties = __esri.ApplicationProperties; export = ApplicationProperties; @@ -62192,8 +68366,8 @@ declare module "esri/webscene/background/Background" { } declare module "esri/webscene/background/ColorBackground" { - import ColorBackground = __esri.ColorBackground; - export = ColorBackground; + import backgroundColorBackground = __esri.backgroundColorBackground; + export = backgroundColorBackground; } declare module "esri/widgets/AreaMeasurement2D" { @@ -62256,6 +68430,11 @@ declare module "esri/widgets/DistanceMeasurement2D" { export = DistanceMeasurement2D; } +declare module "esri/widgets/Editor" { + import Editor = __esri.Editor; + export = Editor; +} + declare module "esri/widgets/Expand" { import Expand = __esri.Expand; export = Expand; @@ -62431,6 +68610,16 @@ declare module "esri/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewMode export = DistanceMeasurement2DViewModel; } +declare module "esri/widgets/Editor/EditorViewModel" { + import EditorViewModel = __esri.EditorViewModel; + export = EditorViewModel; +} + +declare module "esri/widgets/Editor/Workflow" { + import Workflow = __esri.Workflow; + export = Workflow; +} + declare module "esri/widgets/Expand/ExpandViewModel" { import ExpandViewModel = __esri.ExpandViewModel; export = ExpandViewModel; @@ -62506,6 +68695,16 @@ declare module "esri/widgets/LayerList/ListItemPanel" { export = ListItemPanel; } +declare module "esri/widgets/Legend/LegendViewModel" { + import LegendViewModel = __esri.LegendViewModel; + export = LegendViewModel; +} + +declare module "esri/widgets/Legend/support/ActiveLayerInfo" { + import ActiveLayerInfo = __esri.ActiveLayerInfo; + export = ActiveLayerInfo; +} + declare module "esri/widgets/Locate/LocateViewModel" { import LocateViewModel = __esri.LocateViewModel; export = LocateViewModel; @@ -62536,9 +68735,9 @@ declare module "esri/widgets/ScaleBar/ScaleBarViewModel" { export = ScaleBarViewModel; } -declare module "esri/widgets/Search/FeatureLayerSearchSource" { - import FeatureLayerSearchSource = __esri.FeatureLayerSearchSource; - export = FeatureLayerSearchSource; +declare module "esri/widgets/Search/LayerSearchSource" { + import LayerSearchSource = __esri.LayerSearchSource; + export = LayerSearchSource; } declare module "esri/widgets/Search/LocatorSearchSource" { @@ -62561,6 +68760,11 @@ declare module "esri/widgets/Search/SearchViewModel" { export = SearchViewModel; } +declare module "esri/widgets/Sketch/SketchViewModel" { + import SketchViewModel = __esri.SketchViewModel; + export = SketchViewModel; +} + declare module "esri/widgets/Slice/SliceViewModel" { import SliceViewModel = __esri.SliceViewModel; export = SliceViewModel; @@ -62576,11 +68780,6 @@ declare module "esri/widgets/Zoom/ZoomViewModel" { export = ZoomViewModel; } -declare module "esri/widgets/Sketch/SketchViewModel" { - import SketchViewModel = __esri.SketchViewModel; - export = SketchViewModel; -} - declare module "esri/core/Evented" { import Evented = __esri.Evented; export = Evented; @@ -62601,11 +68800,6 @@ declare module "esri/core/Promise" { export = corePromise; } -declare module "esri/layers/DynamicLayer" { - import DynamicLayer = __esri.DynamicLayer; - export = DynamicLayer; -} - declare module "esri/layers/mixins/ArcGISCachedService" { import ArcGISCachedService = __esri.ArcGISCachedService; export = ArcGISCachedService; @@ -62646,6 +68840,11 @@ declare module "esri/layers/mixins/SublayersOwner" { export = SublayersOwner; } +declare module "esri/layers/mixins/TemporalLayer" { + import TemporalLayer = __esri.TemporalLayer; + export = TemporalLayer; +} + declare module "esri/renderers/mixins/VisualVariablesRenderer" { import VisualVariablesRenderer = __esri.VisualVariablesRenderer; export = VisualVariablesRenderer; @@ -62656,6 +68855,16 @@ declare module "esri/support/actions/ActionBase" { export = ActionBase; } +declare module "esri/popup/content/mixins/ChartMediaInfo" { + import ChartMediaInfo = __esri.ChartMediaInfo; + export = ChartMediaInfo; +} + +declare module "esri/popup/content/mixins/MediaInfo" { + import MediaInfo = __esri.MediaInfo; + export = MediaInfo; +} + declare module "esri/support/LayersMixin" { import LayersMixin = __esri.LayersMixin; export = LayersMixin; @@ -62671,6 +68880,11 @@ declare module "esri/views/DOMContainer" { export = DOMContainer; } +declare module "esri/views/MapViewBase" { + import MapViewBase = __esri.MapViewBase; + export = MapViewBase; +} + declare module "esri/widgets/Widgette" { import Widgette = __esri.Widgette; export = Widgette; @@ -62806,11 +69020,21 @@ declare module "esri/geometry/support/webMercatorUtils" { export = webMercatorUtils; } +declare module "esri/layers/support/fieldUtils" { + import fieldUtils = __esri.fieldUtils; + export = fieldUtils; +} + declare module "esri/renderers/smartMapping/creators/color" { import color = __esri.color; export = color; } +declare module "esri/renderers/smartMapping/creators/heatmap" { + import heatmap = __esri.heatmap; + export = heatmap; +} + declare module "esri/renderers/smartMapping/creators/location" { import location = __esri.location; export = location; @@ -62851,6 +69075,11 @@ declare module "esri/renderers/smartMapping/statistics/classBreaks" { export = classBreaks; } +declare module "esri/renderers/smartMapping/statistics/heatmapStatistics" { + import heatmapStatistics = __esri.heatmapStatistics; + export = heatmapStatistics; +} + declare module "esri/renderers/smartMapping/statistics/histogram" { import histogram = __esri.histogram; export = histogram; @@ -62871,6 +69100,11 @@ declare module "esri/renderers/smartMapping/symbology/color" { export = symbologyColor; } +declare module "esri/renderers/smartMapping/symbology/heatmap" { + import symbologyHeatmap = __esri.symbologyHeatmap; + export = symbologyHeatmap; +} + declare module "esri/renderers/smartMapping/symbology/location" { import symbologyLocation = __esri.symbologyLocation; export = symbologyLocation; @@ -62901,9 +69135,9 @@ declare module "esri/renderers/support/jsonUtils" { export = supportJsonUtils; } -declare module "esri/support/ContentElement" { - import ContentElement = __esri.ContentElement; - export = ContentElement; +declare module "esri/popup/content" { + import content = __esri.content; + export = content; } declare module "esri/symbols/support/jsonUtils" { @@ -62916,9 +69150,9 @@ declare module "esri/symbols/support/symbolPreview" { export = symbolPreview; } -declare module "esri/views/2d/layers/BaseLayerView2D" { - import BaseLayerView2D = __esri.BaseLayerView2D; - export = BaseLayerView2D; +declare module "esri/symbols/support/symbolUtils" { + import symbolUtils = __esri.symbolUtils; + export = symbolUtils; } declare module "esri/views/3d/externalRenderers" { diff --git a/types/array-move/array-move-tests.ts b/types/array-move/array-move-tests.ts deleted file mode 100644 index 0bf720b751..0000000000 --- a/types/array-move/array-move-tests.ts +++ /dev/null @@ -1,8 +0,0 @@ -import arrayMove = require('array-move'); - -const input = ['a', 'b', 'c']; -const input2 = [1, 2, 3]; - -arrayMove(input, 1, 2); // $ExpectType string[] -arrayMove(input2, 1, 2); // $ExpectType number[] -arrayMove.mut(input, 1, 2); // $ExpectType void diff --git a/types/array-move/index.d.ts b/types/array-move/index.d.ts deleted file mode 100644 index 9b9aae938a..0000000000 --- a/types/array-move/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Type definitions for array-move 1.0 -// Project: https://github.com/sindresorhus/array-move -// Definitions by: BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = arrayMove; - -/** - * Move an array item to a different position. - * - * @param from Index of item to move. If negative, it will begin that many elements from the end. - * @param to Index of where to move the item. If negative, it will begin that many elements from the end. - * @returns A new array with the item moved to the new position. - */ -declare function arrayMove(input: T, from: number, to: number): T; - -declare namespace arrayMove { - /** - * Moves the item to the new position in the input array. - * - * Useful for huge arrays where absolute performance is needed. - * - * @param from Index of item to move. If negative, it will begin that many elements from the end. - * @param to Index of where to move the item. If negative, it will begin that many elements from the end. - */ - function mut(input: any[], from: number, to: number): void; -} diff --git a/types/array-uniq/array-uniq-tests.ts b/types/array-uniq/array-uniq-tests.ts deleted file mode 100644 index b6c90c620a..0000000000 --- a/types/array-uniq/array-uniq-tests.ts +++ /dev/null @@ -1,5 +0,0 @@ -import arrayUniq = require("array-uniq"); - -arrayUniq([1, 1, 2, 3, 3]); - -arrayUniq(["foo", "foo", "bar", "foo"]); diff --git a/types/array-uniq/index.d.ts b/types/array-uniq/index.d.ts deleted file mode 100644 index d05ad76072..0000000000 --- a/types/array-uniq/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Type definitions for array-uniq 1.0 -// Project: https://github.com/sindresorhus/array-uniq -// Definitions by: Daniel Rosenwasser -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare function arrayUniq(arr: T[]): T[]; - -export = arrayUniq; diff --git a/types/arrify/arrify-tests.ts b/types/arrify/arrify-tests.ts deleted file mode 100644 index 3fee89133d..0000000000 --- a/types/arrify/arrify-tests.ts +++ /dev/null @@ -1,86 +0,0 @@ -import * as arrify from 'arrify'; - -/***************** arrify *****************/ -arrify(null); -arrify(null); - -arrify(undefined); -arrify(undefined); - -arrify(1); -arrify([2, 3]); - -function test(val?: string | string[]) { - arrify(val); -} -/***************** arrify *****************/ - -/***************** arrify *****************/ -arrify(undefined); // returns [] - -arrify(null); // returns [] - -{ - const value: number | string[] = 2018; - arrify(value); // returns [2018] -} - -{ - const value: number[] | string | string[] = ['a', 'b']; - arrify(value); // returns ['a', 'b'] -} -/***************** arrify *****************/ - -/***************** arrify *****************/ -arrify(undefined); - -arrify(null); - -{ - const value: boolean | number[] | string[] = true; - // returns [true] - arrify(value); -} - -{ - const value: boolean[] | number | string[] = ['a', 'b']; - // returns ['a', 'b'] - arrify(value); -} -/***************** arrify *****************/ - -/***************** arrify *****************/ -arrify(undefined); - -arrify(null); - -{ - const value: boolean | Date | number[] | string[] = new Date(2018); - // returns [ new Date(2018) ] - arrify(value); -} - -{ - const value: boolean[] | Date[] | number | string = [true, false]; - // returns [true, false] - arrify(value); -} -/***************** arrify *****************/ - -/***************** arrify *****************/ -arrify(undefined); - -arrify(null); - -{ - const value: boolean | Date | number[] | RegExp | string[] = /test/; - // returns [ /test/ ] - arrify(value); -} - -{ - const value: boolean[] | Date[] | number | RegExp[] | string = [/test1/, /test2/]; - // returns [/test1/, /test2/] - arrify(value); -} -/***************** arrify *****************/ diff --git a/types/arrify/index.d.ts b/types/arrify/index.d.ts deleted file mode 100644 index 7c3c588ea6..0000000000 --- a/types/arrify/index.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -// Type definitions for arrify 1.0 -// Project: https://github.com/sindresorhus/arrify -// Definitions by: AnJun Wang -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/** - * @example - * arrify(undefined) // returns [] - * @example - * arrify(null) // returns [] - * @example - * arrify(1) // returns [1] - * @example - * arrify([2, 3]) // returns [2, 3] - */ -declare function arrify(val: undefined | null | T | T[]): T[]; - -/** - * @example - * // returns [] - * arrify(undefined); - * @example - * // returns [] - * arrify(null); - * @example - * let value: number | string[] = 2018; - * // returns [2018] - * arrify(value); - * @example - * let value: number[] | string | string[] = ['a', 'b']; - * // returns ['a', 'b'] - * arrify(value); - */ -declare function arrify(val: undefined | null | T1 | T2 | T1[] | T2[]): T1[] | T2[]; - -/** - * @example - * // returns [] - * arrify(undefined); - * @example - * // returns [] - * arrify(null); - * @example - * let value: boolean | number[] | string[] = true; - * // returns [true] - * arrify(value); - * @example - * let value: boolean[] | number | string[] = ['a', 'b']; - * // returns ['a', 'b'] - * arrify(value); - */ -declare function arrify(val: undefined | null | T1 | T2 | T3 | T1[] | T2[] | T3[]): T1[] | T2[] | T3[]; - -/** - * @example - * // returns [] - * arrify(undefined); - * @example - * // returns [] - * arrify(null); - * @example - * let value: boolean | Date | number[] | string[] = new Date(2018); - * // returns [ new Date(2018) ] - * arrify(value); - * @example - * let value: boolean[] | Date[] | number | string = [true, false]; - * // returns [true, false] - * arrify(value); - */ -declare function arrify(val: undefined | null | T1 | T2 | T3 | T4 | T1[] | T2[] | T3[] | T4[]): T1[] | T2[] | T3[] | T4[]; - -/** - * @example - * // returns [] - * arrify(undefined); - * @example - * // returns [] - * arrify(null); - * @example - * let value: boolean | Date | number[] | RegExp | string[] = /test/; - * // returns [ /test/ ] - * arrify(value); - * @example - * let value: boolean[] | Date[] | number | RegExp[] | string = [/test1/, /test2/]; - * // returns [/test1/, /test2/] - * arrify(value); - */ -declare function arrify(val: undefined | null | T1 | T2 | T3 | T4 | T5 | T1[] | T2[] | T3[] | T4[] | T5[]): T1[] | T2[] | T3[] | T4[] | T5[]; - -declare namespace arrify {} -export = arrify; diff --git a/types/async-retry/async-retry-tests.ts b/types/async-retry/async-retry-tests.ts index 20dfc62c4b..83b5ac84cf 100644 --- a/types/async-retry/async-retry-tests.ts +++ b/types/async-retry/async-retry-tests.ts @@ -7,6 +7,7 @@ const o: Options = { minTimeout: 3, maxTimeout: 4, randomize: true, + forever: false, onRetry: (e: Error) => 42 }; diff --git a/types/async-retry/index.d.ts b/types/async-retry/index.d.ts index 6b50c71b63..1ef5fe8be9 100644 --- a/types/async-retry/index.d.ts +++ b/types/async-retry/index.d.ts @@ -1,8 +1,12 @@ -// Type definitions for async-retry 1.2 +// Type definitions for async-retry 1.4 // Project: https://github.com/zeit/async-retry#readme // Definitions by: Albert Wu // Pablo RodrĂ­guez +// RafaƂ Sawicki // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { OperationOptions } from 'retry'; declare function AsyncRetry( fn: AsyncRetry.RetryFunction, @@ -10,13 +14,8 @@ declare function AsyncRetry( ): Promise; declare namespace AsyncRetry { - interface Options { - retries?: number; - factor?: number; - minTimeout?: number; - maxTimeout?: number; - randomize?: boolean; - onRetry?: (e: Error) => any; + interface Options extends OperationOptions { + onRetry?: (e: Error, attempt: number) => any; } type RetryFunction = (bail: (e: Error) => void, attempt: number) => A|Promise; diff --git a/types/auth0-js/auth0-js-tests.ts b/types/auth0-js/auth0-js-tests.ts index 6353cc1e40..61ab9bd524 100644 --- a/types/auth0-js/auth0-js-tests.ts +++ b/types/auth0-js/auth0-js-tests.ts @@ -179,7 +179,7 @@ webAuth.popup.signupAndLogin({ email: "", password: "", connection: "" }, (err, // do something with data }); -webAuth.login({username: 'bar', password: 'foo'}, (err, data) => {}); +webAuth.login({username: 'bar', password: 'foo', state: '1234'}, (err, data) => {}); webAuth.crossOriginAuthenticationCallback(); diff --git a/types/auth0-js/index.d.ts b/types/auth0-js/index.d.ts index 7e43da1c89..68744e9ff0 100644 --- a/types/auth0-js/index.d.ts +++ b/types/auth0-js/index.d.ts @@ -1,8 +1,10 @@ -// Type definitions for Auth0.js 8.11 +// Type definitions for Auth0.js 9.10 // Project: https://github.com/auth0/auth0.js // Definitions by: Adrian Chia // Matt Durrant // Peter Blazejewicz +// Bartosz Kotrys +// Mark Nelissen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -521,6 +523,7 @@ export interface AuthOptions { _disableDeprecationWarnings?: boolean; _sendTelemetry?: boolean; _telemetryInfo?: any; + __tryLocalStorageFirst?: boolean; } export interface PasswordlessAuthOptions { @@ -568,7 +571,9 @@ export type SpecErrorCodes = export interface Auth0Error { error: LibErrorCodes | SpecErrorCodes | string; - errorDescription: string; + errorDescription?: string; + // Auth0 is not consistent in the naming of the error description field + error_description?: string; // Need to include non-intuitive error fields that Auth0 uses code?: string; description?: string; @@ -703,6 +708,15 @@ export interface CrossOriginLoginOptions { email?: string; password: string; realm?: string; + domain?: string; + clientID?: string; + redirectUri?: string; + responseType?: string; + responseMode?: string; + state?: string; + nonce?: string; + scope?: string; + audience?: string; } export interface LogoutOptions { diff --git a/types/awesomplete/index.d.ts b/types/awesomplete/index.d.ts index 9f5060de03..a710b4b584 100644 --- a/types/awesomplete/index.d.ts +++ b/types/awesomplete/index.d.ts @@ -9,10 +9,10 @@ declare class Awesomplete { constructor(input: Element | HTMLElement | string, o?: Awesomplete.Options); static all: any[]; - static $$(expr: string | NodeSelector, con?: any): NodeList; + static $$(expr: string | ParentNode, con?: any): NodeList; static ITEM: (text: string, input: string) => HTMLElement; static $: { - (expr: string|Element, con?: NodeSelector): string | Element; + (expr: string|Element, con?: ParentNode): string | Element; regExpEscape(s: { replace(arg0: RegExp, arg1: string): void }): any; create(tag: string, o: any): HTMLElement; fire(target: EventTarget, type: string, properties: any): any; diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts index 72a0edabf9..fc9b0e4532 100644 --- a/types/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -27,7 +27,6 @@ // Erik DalĂ©n // LoĂŻk Gaonac'h // Roberto Zen -// Richard Cornelissen // Grzegorz Redlicki // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -565,10 +564,10 @@ export type StatementResource = MaybeStatementPrincipal & ({ Resource: string | export type StatementPrincipal = MaybeStatementResource & ({ Principal: PrincipalValue } | { NotPrincipal: PrincipalValue }); /** * API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Statement. - * https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html + * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output */ export interface AuthResponseContext { - [name: string]: boolean | number | string; + [name: string]: any; } /** diff --git a/types/axe-webdriverjs/axe-webdriverjs-tests.ts b/types/axe-webdriverjs/axe-webdriverjs-tests.ts index 47eeadc8c5..963e430c62 100644 --- a/types/axe-webdriverjs/axe-webdriverjs-tests.ts +++ b/types/axe-webdriverjs/axe-webdriverjs-tests.ts @@ -20,7 +20,11 @@ const inTest = async (webDriver: WebDriver) => { .disableRules("rule") .disableRules(["rule", "rule"]) .configure(spec) - .analyze((internalResults: AxeAnalysis) => {}); + .analyze((err: Error | null, internalResults: AxeAnalysis) => {}); + + const deprecatedAnalysis: AxeAnalysis = await AxeBuilder(webDriver).analyze( + (internalResults: AxeAnalysis) => {} + ); const inapplicable: Result[] = analysis.inapplicable; const incomplete: Result[] = analysis.incomplete; diff --git a/types/axe-webdriverjs/index.d.ts b/types/axe-webdriverjs/index.d.ts index c3bf23f788..4c08cdb5c7 100644 --- a/types/axe-webdriverjs/index.d.ts +++ b/types/axe-webdriverjs/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for axe-webdriverjs 2.0 +// Type definitions for axe-webdriverjs 2.1 // Project: https://github.com/dequelabs/axe-webdriverjs#readme // Definitions by: Joshua Goldberg +// Tyler Krupicka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.4 import { Result, RunOptions, Spec } from "axe-core"; import { WebDriver } from "selenium-webdriver"; @@ -16,6 +17,9 @@ export interface AxeAnalysis { violations: Result[]; } +export type DeprecatedAnalyzeCallback = (results: AxeAnalysis) => void; +export type AnalyzeCallback = (err: Error | null, results: AxeAnalysis) => void; + export interface AxeBuilder { /** * Includes a selector in analysis. @@ -74,7 +78,9 @@ export interface AxeBuilder { * Perform analysis and retrieve results. * @param callback Function to execute when analysis completes. */ - analyze(callback: (results: AxeAnalysis) => void): Promise; + analyze( + callback?: AnalyzeCallback | DeprecatedAnalyzeCallback + ): Promise; } export const AxeBuilder: { diff --git a/types/axios-cancel/axios-cancel-tests.ts b/types/axios-cancel/axios-cancel-tests.ts new file mode 100644 index 0000000000..801bb2579c --- /dev/null +++ b/types/axios-cancel/axios-cancel-tests.ts @@ -0,0 +1,14 @@ +import axios, { AxiosPromise } from "axios"; +import axiosCancel from "axios-cancel"; + +axiosCancel(axios); // $ExpectType void + +axios.get( + 'https://jsonplaceholder.typicode.com/users', { + requestId: "test id" + } +); + +axios.cancel("test id"); // $ExpectType void + +axios.cancelAll(); // $ExpectType void diff --git a/types/axios-cancel/index.d.ts b/types/axios-cancel/index.d.ts new file mode 100644 index 0000000000..9110f4d26e --- /dev/null +++ b/types/axios-cancel/index.d.ts @@ -0,0 +1,29 @@ +// Type definitions for axios-cancel 0.2 +// Project: https://github.com/thaerlabs/axios-cancel, https://www.npmjs.com/package/axios-cancel +// Definitions by: TheDSCPL +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +import { AxiosStatic } from "axios"; + +declare module 'axios' { + interface AxiosRequestConfig { + requestId?: string; + } + interface AxiosStatic { + cancel: (requestId: string) => void; + cancelAll: () => void; + } +} + +interface AxiosCancelOptions { + /** + * Enables logging + * default: false + */ + debug: boolean; +} + +declare function axiosCancel(axiosStatic: AxiosStatic, options?: AxiosCancelOptions): void; + +export default axiosCancel; diff --git a/types/axios-cancel/package.json b/types/axios-cancel/package.json new file mode 100644 index 0000000000..3f66771e25 --- /dev/null +++ b/types/axios-cancel/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "axios": "0.15.2" + } +} diff --git a/types/axios-cancel/tsconfig.json b/types/axios-cancel/tsconfig.json new file mode 100644 index 0000000000..6d5f377fb1 --- /dev/null +++ b/types/axios-cancel/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", + "axios-cancel-tests.ts" + ] +} diff --git a/types/all-keys/tslint.json b/types/axios-cancel/tslint.json similarity index 100% rename from types/all-keys/tslint.json rename to types/axios-cancel/tslint.json diff --git a/types/babel__core/index.d.ts b/types/babel__core/index.d.ts index 3875d40d71..3ae5f81f26 100644 --- a/types/babel__core/index.d.ts +++ b/types/babel__core/index.d.ts @@ -19,6 +19,7 @@ export { t as types, template, traverse, + NodePath, Visitor }; diff --git a/types/bn.js/bn.js-tests.ts b/types/bn.js/bn.js-tests.ts index 738d5220d4..68d3754aab 100644 --- a/types/bn.js/bn.js-tests.ts +++ b/types/bn.js/bn.js-tests.ts @@ -16,3 +16,8 @@ const red = bn.toRed(ctx); const newRed = red.redAdd(new BN(1)); newRed.cmp(bn); newRed.fromRed(); + +const expected = new BN(0x4020); +const actualArray = new BN([0x40, 0x20]); +const actualUint8Array = new BN(new Uint8Array([0x40, 0x20])); +const actualString = new BN('0x4020'); diff --git a/types/bn.js/index.d.ts b/types/bn.js/index.d.ts index be04dbcc5f..4126f6f017 100644 --- a/types/bn.js/index.d.ts +++ b/types/bn.js/index.d.ts @@ -25,12 +25,12 @@ interface ReductionContext { declare class BN { constructor( - number: number | string | number[] | Buffer | BN, + number: number | string | number[] | Uint8Array | Buffer | BN, base?: number | 'hex', endian?: Endianness ); constructor( - number: number | string | number[] | Buffer | BN, + number: number | string | number[] | Uint8Array | Buffer | BN, endian?: Endianness ) diff --git a/types/burns/burns-tests.ts b/types/burns/burns-tests.ts new file mode 100644 index 0000000000..e1fd41ad09 --- /dev/null +++ b/types/burns/burns-tests.ts @@ -0,0 +1,29 @@ +import burns from 'burns'; + +interface OrderData { + userName: string; + orderId: string; +} + +function handleEverything() { + console.log('Do absolutely nothing! 😄'); +} + +function sendEmail(message: string) { + console.log(message); +} + +function sendOrderShippedEmail(data: OrderData) { + sendEmail(`Hi ${data.userName}, Your order ${data.orderId} has been shipped`); +} + +burns.configure({ + defaultHandler: handleEverything +}); +burns.registerEvents({ + newPurchase: sendOrderShippedEmail +}); +burns.dispatch('newPurchase', { + userName: 'Johnny', + orderId: 'rand' +}); diff --git a/types/burns/index.d.ts b/types/burns/index.d.ts new file mode 100644 index 0000000000..d4633624be --- /dev/null +++ b/types/burns/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for burns 2.0 +// Project: https://github.com/shalvah/burns#readme +// Definitions by: Timothy Onyiuke +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +declare const _Burns: Burns; + +export interface Config { + defaultHandler?: any; + broadcaster?: any; + pusher?: any; +} + +declare class Burns { + configure(config?: Config): this; + + registerEvents(newEvents: Record): this; + + dispatch(eventName: string, eventData?: Record, exclude?: { exclude?: any }): this; +} + +export default _Burns; diff --git a/types/w3c-permissions/tsconfig.json b/types/burns/tsconfig.json similarity index 93% rename from types/w3c-permissions/tsconfig.json rename to types/burns/tsconfig.json index 1443bb27e1..703007ff15 100644 --- a/types/w3c-permissions/tsconfig.json +++ b/types/burns/tsconfig.json @@ -19,6 +19,6 @@ }, "files": [ "index.d.ts", - "w3c-permissions-tests.ts" + "burns-tests.ts" ] } diff --git a/types/all-property-names/tslint.json b/types/burns/tslint.json similarity index 100% rename from types/all-property-names/tslint.json rename to types/burns/tslint.json diff --git a/types/c3/tsconfig.json b/types/c3/tsconfig.json index aa923e91c0..60849b491f 100644 --- a/types/c3/tsconfig.json +++ b/types/c3/tsconfig.json @@ -11,7 +11,8 @@ "types": [], "paths": { "d3-scale": ["d3-scale/v1"], - "d3": ["d3/v4"] + "d3": ["d3/v4"], + "d3-array": ["d3-array/v1"] }, "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/chance/chance-tests.ts b/types/chance/chance-tests.ts index 238fd97cf3..81bc5c95d8 100644 --- a/types/chance/chance-tests.ts +++ b/types/chance/chance-tests.ts @@ -86,3 +86,9 @@ max.setFullYear(new Date().getFullYear() + 15); date = chance.date({min, max}); date = chance.date({min}); date = chance.date({max}); + +const language: string = chance.locale(); +const region: string = chance.locale({region: true}); + +const languages: string = chance.locales(); +const regions: string = chance.locales({region: true}); diff --git a/types/chance/index.d.ts b/types/chance/index.d.ts index 17708acc5a..1ffdba8d89 100644 --- a/types/chance/index.d.ts +++ b/types/chance/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for Chance 1.0.16 +// Type definitions for Chance 1.0 // Project: http://chancejs.com // Definitions by: Chris Bowdon // Brice BERNARD // Carlos Sanchez +// Colby M. White // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Chance { @@ -91,6 +92,8 @@ declare namespace Chance { depth(opts?: Options): number; geohash(opts?: Options): string; latitude(opts?: Options): number; + locale(opts?: LocaleOptions): string; + locales(opts?: LocaleOptions): string; longitude(opts?: Options): number; phone(opts?: Options): string; postal(): string; @@ -193,6 +196,10 @@ declare namespace Chance { max?: Date; } + interface LocaleOptions { + region: boolean; + } + interface Month { name: string; short_name: string; diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 111c8da57f..6becfaba40 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -14,6 +14,7 @@ // Alexandros Dorodoulis // Manuel Heidrich // Conrad Holtzhausen +// AdriĂĄn Caballero // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -146,8 +147,8 @@ declare namespace Chart { } interface ChartTooltipItem { - xLabel?: string; - yLabel?: string; + xLabel?: string | number; + yLabel?: string | number; datasetIndex?: number; index?: number; } diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 211b6a59d8..83ce2c8a1d 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -5242,6 +5242,9 @@ declare namespace chrome.runtime { version: string; } + /** Result of the update check. */ + export type RequestUpdateCheckStatus = 'throttled' | 'no_update' | 'update_available'; + export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> { } export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> { } @@ -5518,7 +5521,7 @@ declare namespace chrome.runtime { * Parameter status: Result of the update check. One of: "throttled", "no_update", or "update_available" * Optional parameter details: If an update is available, this contains more information about the available update. */ - export function requestUpdateCheck(callback: (status: string, details?: UpdateCheckDetails) => void): void; + export function requestUpdateCheck(callback: (status: RequestUpdateCheckStatus, details?: UpdateCheckDetails) => void): void; /** * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's no-op. * @since Chrome 32. diff --git a/types/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts index 1321d5b83d..13f6268d9d 100644 --- a/types/ckeditor/ckeditor-tests.ts +++ b/types/ckeditor/ckeditor-tests.ts @@ -620,6 +620,7 @@ function test_filter() { allowed = filter.allow('rule', 'name', false); var apply: boolean = filter.applyTo(CKEDITOR.htmlParser.fragment.fromHtml('string'), true, false, 1); + apply = filter.applyTo(new CKEDITOR.htmlParser.element('name', null)); apply = filter.applyTo(new CKEDITOR.htmlParser.element('name', null), true, false, 1); var checked: boolean = filter.check(style); diff --git a/types/ckeditor/index.d.ts b/types/ckeditor/index.d.ts index 3d35877b9d..bf2d51b3db 100644 --- a/types/ckeditor/index.d.ts +++ b/types/ckeditor/index.d.ts @@ -1436,7 +1436,7 @@ declare namespace CKEDITOR { addFeature(feature: feature): boolean; addTransformations(transformations: Array>): void; allow(newRules: filter.allowedContentRules, featureName?: string, overrideCustom?: boolean): boolean; - applyTo(fragment: htmlParser.fragment | htmlParser.element, toHrml: boolean, transformOnly: boolean, enterMode: number): boolean; + applyTo(fragment: htmlParser.fragment | htmlParser.element, toHtml?: boolean, transformOnly?: boolean, enterMode?: number): boolean; check(test: filter.contentRule, applyTransformations?: boolean, strictCheck?: boolean): boolean; checkFeature(feature: feature): boolean; clone(): filter; diff --git a/types/codemirror/addon/edit/closebrackets.d.ts b/types/codemirror/addon/edit/closebrackets.d.ts new file mode 100644 index 0000000000..be75ddceff --- /dev/null +++ b/types/codemirror/addon/edit/closebrackets.d.ts @@ -0,0 +1,47 @@ +// Type definitions for CodeMirror +// Project: https://github.com/codemirror/CodeMirror +// Definitions by: ficristo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// See docs https://codemirror.net/doc/manual.html#addon_closebrackets + +import * as CodeMirror from "codemirror"; + +declare module "codemirror" { + interface AutoCloseBrackets { + /** + * String containing pairs of matching characters. + */ + pairs?: string; + + /** + * If the next character is in the string, opening a bracket should be auto-closed. + */ + closeBefore?: string; + + /** + * String containing chars that could do a triple quote. + */ + triples?: string; + + /** + * explode should be a similar string that gives the pairs of characters that, when enter is pressed between them, should have the second character also moved to its own line. + */ + explode?: string; + + /** + * By default, if the active mode has a closeBrackets property, that overrides the configuration given in the option. + * But you can add an override property with a truthy value to override mode-specific configuration. + */ + override?: boolean; + } + + interface EditorConfiguration { + /** + * Will auto-close brackets and quotes when typed. + * By default, it'll auto-close ()[]{}''"", but you can pass it a string similar to that (containing pairs of matching characters), + * or an object with pairs and optionally explode properties to customize it. + */ + autoCloseBrackets?: AutoCloseBrackets | string; + } +} diff --git a/types/codemirror/addon/edit/closetag.d.ts b/types/codemirror/addon/edit/closetag.d.ts new file mode 100644 index 0000000000..b9531b4b08 --- /dev/null +++ b/types/codemirror/addon/edit/closetag.d.ts @@ -0,0 +1,51 @@ +// Type definitions for CodeMirror +// Project: https://github.com/codemirror/CodeMirror +// Definitions by: ficristo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// See docs https://codemirror.net/doc/manual.html#addon_closetag + +import * as CodeMirror from "codemirror"; + +declare module "codemirror" { + interface CommandActions { + closeTag(cm: CodeMirror.Editor): void; + } + + interface AutoCloseTags { + /** + * Whether to autoclose when the '/' of a closing tag is typed. (default true) + */ + whenClosing?: boolean; + + /** + * Whether to autoclose the tag when the final '>' of an opening tag is typed. (default true) + */ + whenOpening?: boolean; + + /** + * An array of tag names that should not be autoclosed. (default is empty tags for HTML, none for XML) + */ + dontCloseTags?: Array; + + /** + * An array of tag names that should, when opened, cause a + * blank line to be added inside the tag, and the blank line and + * closing line to be indented. (default is block tags for HTML, none for XML) + */ + indentTags?: Array; + + /** + * An array of XML tag names that should be autoclosed with '/>'. (default is none) + */ + emptyTags: Array; + } + + interface EditorConfiguration { + /** + * Will auto-close XML tags when '>' or '/' is typed. + * Depends on the fold/xml-fold.js addon. + */ + autoCloseTags?: AutoCloseTags | boolean; + } +} diff --git a/types/codemirror/addon/edit/matchbrackets.d.ts b/types/codemirror/addon/edit/matchbrackets.d.ts new file mode 100644 index 0000000000..b663371160 --- /dev/null +++ b/types/codemirror/addon/edit/matchbrackets.d.ts @@ -0,0 +1,42 @@ +// Type definitions for CodeMirror +// Project: https://github.com/marijnh/CodeMirror +// Definitions by: Sixin Li +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// See docs https://codemirror.net/doc/manual.html#addon_matchbrackets + +import * as CodeMirror from "codemirror"; + +declare module "codemirror" { + interface MatchBrackets { + /** + * Only use the character after the start position, never the one before it. + */ + afterCursor?: boolean; + + /** + * Causes only matches where both brackets are at the same side of the start position to be considered. + */ + strict?: boolean; + + /** + * Stop after scanning this amount of lines without a successful match. Defaults to 1000. + */ + maxScanLines?: number; + + /** + * Ignore lines longer than this. Defaults to 10000. + */ + maxScanLineLength?: number; + + /** + * Don't highlight a bracket in a line longer than this. Defaults to 1000. + */ + maxHighlightLineLength?: number; + } + + interface EditorConfiguration { + // When set to true or an options object, causes matching brackets to be highlighted whenever the cursor is next to them. + matchBrackets?: MatchBrackets | boolean; + } +} diff --git a/types/codemirror/addon/edit/matchtags.d.ts b/types/codemirror/addon/edit/matchtags.d.ts new file mode 100644 index 0000000000..302e12d2d8 --- /dev/null +++ b/types/codemirror/addon/edit/matchtags.d.ts @@ -0,0 +1,32 @@ +// Type definitions for CodeMirror +// Project: https://github.com/codemirror/CodeMirror +// Definitions by: ficristo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// See docs https://codemirror.net/doc/manual.html#addon_matchtags + +import * as CodeMirror from "codemirror"; + +declare module "codemirror" { + interface CommandActions { + /** + * You can bind a key to in order to jump to the tag matching the one under the cursor. + */ + toMatchingTag(cm: CodeMirror.Editor): void; + } + + interface MatchTags { + /** + * Highlight both matching tags. + */ + bothTags?: boolean; + } + + interface EditorConfiguration { + /** + * When enabled will cause the tags around the cursor to be highlighted (using the CodeMirror-matchingtag class). + * Depends on the addon/fold/xml-fold.js addon. + */ + matchTags?: MatchTags | boolean; + } +} diff --git a/types/codemirror/addon/scroll/scrollpastend.d.ts b/types/codemirror/addon/scroll/scrollpastend.d.ts new file mode 100644 index 0000000000..4b83f011eb --- /dev/null +++ b/types/codemirror/addon/scroll/scrollpastend.d.ts @@ -0,0 +1,17 @@ +// Type definitions for CodeMirror +// Project: https://github.com/codemirror/CodeMirror +// Definitions by: ficristo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// See docs https://github.com/codemirror/CodeMirror/blob/master/addon/scroll/scrollpastend.js + +import * as CodeMirror from "codemirror"; + +declare module "codemirror" { + interface EditorConfiguration { + /** + * When the end of the file is reached it allows you to keep scrolling so that your last few lines of code are not stuck at the bottom of the editor. + */ + scrollPastEnd?: boolean; + } +} diff --git a/types/codemirror/addon/search/match-highlighter.d.ts b/types/codemirror/addon/search/match-highlighter.d.ts new file mode 100644 index 0000000000..7705f071d8 --- /dev/null +++ b/types/codemirror/addon/search/match-highlighter.d.ts @@ -0,0 +1,55 @@ +// Type definitions for CodeMirror +// Project: https://github.com/codemirror/CodeMirror +// Definitions by: ficristo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// See docs https://codemirror.net/doc/manual.html#addon_match-highlighter + +import * as CodeMirror from "codemirror"; + +declare module "codemirror" { + interface HighlightSelectionMatches { + /** + * Minimum amount of selected characters that triggers a highlight (default 2). + */ + minChars?: number; + + /** + * The style to be used to highlight the matches (default "matchhighlight", which will correspond to CSS class cm-matchhighlight). + */ + style?: string; + + /** + * Controls whether whitespace is trimmed from the selection. + */ + trim?: boolean; + + /** + * Can be set to true or to a regexp matching the characters that make up a word. + */ + showToken?: boolean | RegExp; + + /** + * Used to specify how much time to wait, in milliseconds, before highlighting the matches. + */ + delay: 100, + + /** + * If wordsOnly is enabled, the matches will be highlighted only if the selected text is a word. + */ + wordsOnly?: boolean; + + /** + * If annotateScrollbar is enabled, the occurences will be highlighted on the scrollbar via the matchesonscrollbar addon. + */ + annotateScrollbar?: boolean; + } + + interface EditorConfiguration { + /** + * Adds a highlightSelectionMatches option that can be enabled to highlight all instances of a currently selected word. + * When enabled, it causes the current word to be highlighted when nothing is selected (defaults to off). + */ + highlightSelectionMatches?: HighlightSelectionMatches | boolean; + } +} diff --git a/types/codemirror/addon/selection/active-line.d.ts b/types/codemirror/addon/selection/active-line.d.ts new file mode 100644 index 0000000000..1902ff0e24 --- /dev/null +++ b/types/codemirror/addon/selection/active-line.d.ts @@ -0,0 +1,25 @@ +// Type definitions for CodeMirror +// Project: https://github.com/codemirror/CodeMirror +// Definitions by: ficristo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// See docs https://codemirror.net/doc/manual.html#active-line + +import * as CodeMirror from "codemirror"; + +declare module "codemirror" { + interface StyleActiveLine { + /** + * Controls whether single-line selections, or just cursor selections, are styled. Defaults to false (only cursor selections). + */ + nonEmpty: boolean; + } + + interface EditorConfiguration { + /** + * When enabled gives the wrapper of the line that contains the cursor the class CodeMirror-activeline, + * adds a background with the class CodeMirror-activeline-background, and adds the class CodeMirror-activeline-gutter to the line's gutter space is enabled. + */ + styleActiveLine?: StyleActiveLine | boolean; + } +} diff --git a/types/codemirror/codemirror-matchbrackets.d.ts b/types/codemirror/codemirror-matchbrackets.d.ts deleted file mode 100644 index 0de44246df..0000000000 --- a/types/codemirror/codemirror-matchbrackets.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Type definitions for CodeMirror -// Project: https://github.com/marijnh/CodeMirror -// Definitions by: Sixin Li -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// See docs https://codemirror.net/doc/manual.html#addon_matchbrackets - -import * as CodeMirror from "codemirror"; - -declare module "codemirror" { - interface EditorConfiguration { - // when set to true, causes matching brackets to be highlighted whenever the cursor is next to them - matchBrackets?: boolean; - } -} diff --git a/types/codemirror/codemirror-showhint.d.ts b/types/codemirror/codemirror-showhint.d.ts index dfbbcdc4e1..524d427914 100644 --- a/types/codemirror/codemirror-showhint.d.ts +++ b/types/codemirror/codemirror-showhint.d.ts @@ -10,8 +10,6 @@ import * as CodeMirror from "codemirror"; declare module "codemirror" { - var commands: any; - /** Provides a framework for showing autocompletion hints. Defines editor.showHint, which takes an optional options object, and pops up a widget that allows the user to select a completion. Finding hints is done with a hinting functions (the hint option), which is a function that take an editor instance and options object, diff --git a/types/codemirror/index.d.ts b/types/codemirror/index.d.ts index 730e35b3f0..13a67ddfbe 100644 --- a/types/codemirror/index.d.ts +++ b/types/codemirror/index.d.ts @@ -17,12 +17,22 @@ declare function CodeMirror(callback: (host: HTMLElement) => void , options?: Co declare namespace CodeMirror { export var Doc : CodeMirror.DocConstructor; export var Pos: CodeMirror.PositionConstructor; + export var StringStream: CodeMirror.StringStreamConstructor; export var Pass: {toString(): "CodeMirror.PASS"}; /** Find the column position at a given string index using a given tabsize. */ function countColumn(line: string, index: number | null, tabSize: number): number; function fromTextArea(host: HTMLTextAreaElement, options?: EditorConfiguration): CodeMirror.EditorFromTextArea; + /** Split a string by new line. */ + function splitLines(text: string): Array; + + /** Check if a char is part of an alphabet. */ + function isWordChar(ch: string): boolean; + + /** Call startState of the mode if available, otherwise return true */ + function startState(mode: CodeMirror.Mode, a1?: any, a2?: any): any | boolean; + /** Compare two positions, return 0 if they are the same, a negative number when a is less, and a positive number otherwise. */ function cmpPos(a: Position, b: Position): number; @@ -283,7 +293,7 @@ declare namespace CodeMirror { /** Scrolls the given element into view. pos is a { left , top , right , bottom } object, in editor-local coordinates. The margin parameter is optional. When given, it indicates the amount of pixels around the given area that should be made visible as well. */ - scrollIntoView(pos: { left: number; top: number; right: number; bottom: number; }, margin: number): void; + scrollIntoView(pos: { left: number; top: number; right: number; bottom: number; }, margin?: number): void; /** Scrolls the given element into view. pos is a { line, ch } object, in editor-local coordinates. The margin parameter is optional. When given, it indicates the amount of pixels around the given area that should be made visible as well. */ @@ -291,19 +301,19 @@ declare namespace CodeMirror { /** Scrolls the given element into view. pos is a { from, to } object, in editor-local coordinates. The margin parameter is optional. When given, it indicates the amount of pixels around the given area that should be made visible as well. */ - scrollIntoView(pos: { from: CodeMirror.Position, to: CodeMirror.Position }, margin: number): void; + scrollIntoView(pos: { from: CodeMirror.Position, to: CodeMirror.Position }, margin?: number): void; /** Returns an { left , top , bottom } object containing the coordinates of the cursor position. If mode is "local", they will be relative to the top-left corner of the editable document. If it is "page" or not given, they are relative to the top-left corner of the page. where is a boolean indicating whether you want the start(true) or the end(false) of the selection. */ - cursorCoords(where: boolean, mode?: CoordsMode): { left: number; top: number; bottom: number; }; + cursorCoords(where?: boolean, mode?: CoordsMode): { left: number; top: number; bottom: number; }; /** Returns an { left , top , bottom } object containing the coordinates of the cursor position. If mode is "local", they will be relative to the top-left corner of the editable document. If it is "page" or not given, they are relative to the top-left corner of the page. where specifies the precise position at which you want to measure. */ - cursorCoords(where: CodeMirror.Position, mode?: CoordsMode): { left: number; top: number; bottom: number; }; + cursorCoords(where?: CodeMirror.Position | null, mode?: CoordsMode): { left: number; top: number; bottom: number; }; /** Returns the position and dimensions of an arbitrary character. pos should be a { line , ch } object. If mode is "local", they will be relative to the top-left corner of the editable document. @@ -375,6 +385,10 @@ declare namespace CodeMirror { /** Tells you whether the editor's content can be edited by the user. */ isReadOnly(): boolean; + /** Switches between overwrite and normal insert mode (when not given an argument), + or sets the overwrite mode to a specific state (when given an argument). */ + toggleOverwrite(value?: boolean): void; + /** Runs the command with the given name on the editor. */ execCommand(name: string): void; @@ -465,6 +479,9 @@ declare namespace CodeMirror { on(eventName: DOMEvent, handler: (instance: CodeMirror.Editor, event: Event) => void ): void; off(eventName: DOMEvent, handler: (instance: CodeMirror.Editor, event: Event) => void ): void; + /** Fires when the overwrite flag is flipped. */ + on(eventName: "overwriteToggle", handler: (instance: CodeMirror.Editor, overwrite: boolean) => void): void; + /** Expose the state object, so that the Editor.state.completionActive property is reachable*/ state: any; } @@ -677,6 +694,9 @@ declare namespace CodeMirror { Note that the widget node will become a descendant of nodes with CodeMirror-specific CSS classes, and those classes might in some cases affect it. */ addLineWidget(line: any, node: HTMLElement, options?: CodeMirror.LineWidgetOptions): CodeMirror.LineWidget; + /** Remove the line widget */ + removeLineWidget(widget: CodeMirror.LineWidget): void; + /** Gets the mode object for the editor. Note that this is distinct from getOption("mode"), which gives you the mode specification, rather than the resolved, instantiated mode object. */ getMode(): any; @@ -800,6 +820,8 @@ declare namespace CodeMirror { sticky?: string; } + type InputStyle = "textarea" | "contenteditable"; + interface EditorConfiguration { /** string| The starting value of the editor. Can be a string, or a document object. */ value?: any; @@ -875,12 +897,29 @@ declare namespace CodeMirror { */ scrollbarStyle?: string; + /** + * When fixedGutter is on, and there is a horizontal scrollbar, by default the gutter will be visible to the left of this scrollbar. + * If this option is set to true, it will be covered by an element with class CodeMirror-gutter-filler. + */ + coverGutterNextToScrollbar?: boolean; + + /** + * Selects the way CodeMirror handles input and focus. + * The core library defines the "textarea" and "contenteditable" input models. + * On mobile browsers, the default is "contenteditable". On desktop browsers, the default is "textarea". + * Support for IME and screen readers is better in the "contenteditable" model. + */ + inputStyle?: InputStyle; + /** boolean|string. This disables editing of the editor content by the user. If the special value "nocursor" is given (instead of simply true), focusing of the editor is also disallowed. */ readOnly?: any; /**Whether the cursor should be drawn when a selection is active. Defaults to false. */ showCursorWhenSelecting?: boolean; + /** When enabled, which is the default, doing copy or cut when there is no selection will copy or cut the whole lines that have cursors on them. */ + lineWiseCopyCut?: boolean; + /** The maximum number of undo levels that the editor stores. Defaults to 40. */ undoDepth?: number; @@ -918,6 +957,12 @@ declare namespace CodeMirror { /** Half - period in milliseconds used for cursor blinking. The default blink rate is 530ms. */ cursorBlinkRate?: number; + /** + * How much extra space to always keep above and below the cursor when + * approaching the top or bottom of the visible view in a scrollable document. Default is 0. + */ + cursorScrollMargin?: number; + /** Determines the height of the cursor. Default is 1 , meaning it spans the whole height of the line. For some fonts (and by some tastes) a smaller height (for example 0.85), which causes the cursor to not reach all the way to the bottom of the line, looks better */ @@ -1020,6 +1065,10 @@ declare namespace CodeMirror { shared?: boolean; } + interface StringStreamConstructor { + new (text: string): StringStream; + } + interface StringStream { lastColumnPos: number; lastColumnValue: number; @@ -1135,6 +1184,8 @@ declare namespace CodeMirror { * advances it past a token, and returns a style for that token. More advanced modes can also handle indentation for the language. */ interface Mode { + name?: string; + /** * This function should read one token from the stream it is given as an argument, optionally update its state, * and return a style string, or null for tokens that do not have to be styled. Multiple styles can be returned, separated by spaces. @@ -1222,6 +1273,173 @@ declare namespace CodeMirror { */ function overlayMode(base: Mode, overlay: Mode, combine?: boolean): Mode; + interface ModeMap { + [modeName: string]: ModeFactory; + } + + /** + * Maps mode names to their constructors + */ + var modes: ModeMap; + + function defineMIME(mime: string, modeSpec: any): void; + + interface MimeModeMap { + [mimeName: string]: any; + } + + /** + * Maps MIME types to mode specs. + */ + var mimeModes: MimeModeMap; + + interface CommandActions { + /** Select the whole content of the editor. */ + selectAll(cm: CodeMirror.Editor): void; + + /** When multiple selections are present, this deselects all but the primary selection. */ + singleSelection(cm: CodeMirror.Editor): void; + + /** Emacs-style line killing. Deletes the part of the line after the cursor. If that consists only of whitespace, the newline at the end of the line is also deleted. */ + killLine(cm: CodeMirror.Editor): void; + + /** Deletes the whole line under the cursor, including newline at the end. */ + deleteLine(cm: CodeMirror.Editor): void; + + /** Delete the part of the line before the cursor. */ + delLineLeft(cm: CodeMirror.Editor): void; + + /** Delete the part of the line from the left side of the visual line the cursor is on to the cursor. */ + delWrappedLineLeft(cm: CodeMirror.Editor): void; + + /** Delete the part of the line from the cursor to the right side of the visual line the cursor is on. */ + delWrappedLineRight(cm: CodeMirror.Editor): void; + + /** Undo the last change. Note that, because browsers still don't make it possible for scripts to react to or customize the context menu, selecting undo (or redo) from the context menu in a CodeMirror instance does not work. */ + undo(cm: CodeMirror.Editor): void; + + /** Redo the last undone change. */ + redo(cm: CodeMirror.Editor): void; + + /** Undo the last change to the selection, or if there are no selection-only changes at the top of the history, undo the last change. */ + undoSelection(cm: CodeMirror.Editor): void; + + /** Redo the last change to the selection, or the last text change if no selection changes remain. */ + redoSelection(cm: CodeMirror.Editor): void; + + /** Move the cursor to the start of the document. */ + goDocStart(cm: CodeMirror.Editor): void; + + /** Move the cursor to the end of the document. */ + goDocEnd(cm: CodeMirror.Editor): void; + + /** Move the cursor to the start of the line. */ + goLineStart(cm: CodeMirror.Editor): void; + + /** Move to the start of the text on the line, or if we are already there, to the actual start of the line (including whitespace). */ + goLineStartSmart(cm: CodeMirror.Editor): void; + + /** Move the cursor to the end of the line. */ + goLineEnd(cm: CodeMirror.Editor): void; + + /** Move the cursor to the right side of the visual line it is on. */ + goLineRight(cm: CodeMirror.Editor): void; + + /** Move the cursor to the left side of the visual line it is on. If this line is wrapped, that may not be the start of the line. */ + goLineLeft(cm: CodeMirror.Editor): void; + + /** Move the cursor to the left side of the visual line it is on. If that takes it to the start of the line, behave like goLineStartSmart. */ + goLineLeftSmart(cm: CodeMirror.Editor): void; + + /** Move the cursor up one line. */ + goLineUp(cm: CodeMirror.Editor): void; + + /** Move down one line. */ + goLineDown(cm: CodeMirror.Editor): void; + + /** Move the cursor up one screen, and scroll up by the same distance. */ + goPageUp(cm: CodeMirror.Editor): void; + + /** Move the cursor down one screen, and scroll down by the same distance. */ + goPageDown(cm: CodeMirror.Editor): void; + + /** Move the cursor one character left, going to the previous line when hitting the start of line. */ + goCharLeft(cm: CodeMirror.Editor): void; + + /** Move the cursor one character right, going to the next line when hitting the end of line. */ + goCharRight(cm: CodeMirror.Editor): void; + + /** Move the cursor one character left, but don't cross line boundaries. */ + goColumnLeft(cm: CodeMirror.Editor): void; + + /** Move the cursor one character right, don't cross line boundaries. */ + goColumnRight(cm: CodeMirror.Editor): void; + + /** Move the cursor to the start of the previous word. */ + goWordLeft(cm: CodeMirror.Editor): void; + + /** Move the cursor to the end of the next word. */ + goWordRight(cm: CodeMirror.Editor): void; + + /** Move to the left of the group before the cursor. A group is a stretch of word characters, a stretch of punctuation characters, a newline, or a stretch of more than one whitespace character. */ + goGroupLeft(cm: CodeMirror.Editor): void; + + /** Move to the right of the group after the cursor (see above). */ + goGroupRight(cm: CodeMirror.Editor): void; + + /** Delete the character before the cursor. */ + delCharBefore(cm: CodeMirror.Editor): void; + + /** Delete the character after the cursor. */ + delCharAfter(cm: CodeMirror.Editor): void; + + /** Delete up to the start of the word before the cursor. */ + delWordBefore(cm: CodeMirror.Editor): void; + + /** Delete up to the end of the word after the cursor. */ + delWordAfter(cm: CodeMirror.Editor): void; + + /** Delete to the left of the group before the cursor. */ + delGroupBefore(cm: CodeMirror.Editor): void; + + /** Delete to the start of the group after the cursor. */ + delGroupAfter(cm: CodeMirror.Editor): void; + + /** Auto-indent the current line or selection. */ + indentAuto(cm: CodeMirror.Editor): void; + + /** Indent the current line or selection by one indent unit. */ + indentMore(cm: CodeMirror.Editor): void; + + /** Dedent the current line or selection by one indent unit. */ + indentLess(cm: CodeMirror.Editor): void; + + /** Insert a tab character at the cursor. */ + insertTab(cm: CodeMirror.Editor): void; + + /** Insert the amount of spaces that match the width a tab at the cursor position would have. */ + insertSoftTab(cm: CodeMirror.Editor): void; + + /** If something is selected, indent it by one indent unit. If nothing is selected, insert a tab character. */ + defaultTabTab(cm: CodeMirror.Editor): void; + + /** Swap the characters before and after the cursor. */ + transposeChars(cm: CodeMirror.Editor): void; + + /** Insert a newline and auto-indent the new line. */ + newlineAndIndent(cm: CodeMirror.Editor): void; + + /** Flip the overwrite flag. */ + toggleOverwrite(cm: CodeMirror.Editor): void; + } + + /** + * Commands are parameter-less actions that can be performed on an editor. + * Their main use is for key bindings. + * Commands are defined by adding properties to the CodeMirror.commands object. + */ + var commands: CommandActions; + /** * async specifies that the lint process runs asynchronously. hasGutters specifies that lint errors should be displayed in the CodeMirror * gutter, note that you must use this in conjunction with [ "CodeMirror-lint-markers" ] as an element in the gutters argument on diff --git a/types/codemirror/test/addon/edit/closebrackets.ts b/types/codemirror/test/addon/edit/closebrackets.ts new file mode 100644 index 0000000000..2ee95dd5cc --- /dev/null +++ b/types/codemirror/test/addon/edit/closebrackets.ts @@ -0,0 +1,6 @@ + + + +var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { + autoCloseBrackets: "()[]{}''\"\"" +}); diff --git a/types/codemirror/test/addon/edit/closetag.ts b/types/codemirror/test/addon/edit/closetag.ts new file mode 100644 index 0000000000..e5b18beb1a --- /dev/null +++ b/types/codemirror/test/addon/edit/closetag.ts @@ -0,0 +1,6 @@ + + + +var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { + autoCloseTags: true +}); diff --git a/types/codemirror/test/matchbrackets.ts b/types/codemirror/test/addon/edit/matchbrackets.ts similarity index 69% rename from types/codemirror/test/matchbrackets.ts rename to types/codemirror/test/addon/edit/matchbrackets.ts index bfaaaa4ede..0e7bf40b10 100644 --- a/types/codemirror/test/matchbrackets.ts +++ b/types/codemirror/test/addon/edit/matchbrackets.ts @@ -1,4 +1,6 @@ -var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { matchBrackets: true }); +var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { + matchBrackets: true +}); diff --git a/types/codemirror/test/addon/edit/matchtags.ts b/types/codemirror/test/addon/edit/matchtags.ts new file mode 100644 index 0000000000..d959c63e5f --- /dev/null +++ b/types/codemirror/test/addon/edit/matchtags.ts @@ -0,0 +1,6 @@ + + + +var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { + matchTags: { bothTags: true} +}); diff --git a/types/codemirror/test/addon/scroll/scrollpastend.ts b/types/codemirror/test/addon/scroll/scrollpastend.ts new file mode 100644 index 0000000000..d428ad4a97 --- /dev/null +++ b/types/codemirror/test/addon/scroll/scrollpastend.ts @@ -0,0 +1,6 @@ + + + +var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { + scrollPastEnd: true +}); diff --git a/types/codemirror/test/addon/search/match-highlighter.ts b/types/codemirror/test/addon/search/match-highlighter.ts new file mode 100644 index 0000000000..a4a851e699 --- /dev/null +++ b/types/codemirror/test/addon/search/match-highlighter.ts @@ -0,0 +1,6 @@ + + + +var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { + highlightSelectionMatches: true +}); diff --git a/types/codemirror/test/addon/selection/active-line.ts b/types/codemirror/test/addon/selection/active-line.ts new file mode 100644 index 0000000000..acaceb50c7 --- /dev/null +++ b/types/codemirror/test/addon/selection/active-line.ts @@ -0,0 +1,6 @@ + + + +var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { + styleActiveLine: true +}); diff --git a/types/codemirror/test/index.ts b/types/codemirror/test/index.ts index 851e891e8f..8c1a860e31 100644 --- a/types/codemirror/test/index.ts +++ b/types/codemirror/test/index.ts @@ -100,3 +100,7 @@ widget1.clear(); widget2.clear(); htmlElement1.remove(); htmlElement2.remove(); + +CodeMirror.commands.newlineAndIndent(myCodeMirror); + +let stringStream = new CodeMirror.StringStream("var myEditor;"); diff --git a/types/codemirror/tsconfig.json b/types/codemirror/tsconfig.json index ffa5de2be5..ab11d75fe9 100644 --- a/types/codemirror/tsconfig.json +++ b/types/codemirror/tsconfig.json @@ -20,19 +20,31 @@ "files": [ "index.d.ts", "codemirror-comment.d.ts", - "codemirror-matchbrackets.d.ts", "codemirror-panel.d.ts", "codemirror-runmode.d.ts", "codemirror-showhint.d.ts", "codemirror-tern.d.ts", "searchcursor.d.ts", + "addon/edit/closebrackets.d.ts", + "addon/edit/closetag.d.ts", + "addon/edit/matchbrackets.d.ts", + "addon/edit/matchtags.d.ts", + "addon/scroll/scrollpastend.d.ts", + "addon/search/match-highlighter.d.ts", + "addon/selection/active-line.d.ts", "test/comment.ts", "test/index.ts", - "test/matchbrackets.ts", "test/panel.ts", "test/runmode.ts", "test/searchcursor.ts", "test/showhint.ts", - "test/tern.ts" + "test/tern.ts", + "test/addon/edit/closebrackets.ts", + "test/addon/edit/closetag.ts", + "test/addon/edit/matchbrackets.ts", + "test/addon/edit/matchtags.ts", + "test/addon/scroll/scrollpastend.ts", + "test/addon/search/match-highlighter.ts", + "test/addon/selection/active-line.ts" ] } \ No newline at end of file diff --git a/types/coinbase/coinbase-tests.ts b/types/coinbase/coinbase-tests.ts index 65ec9693bd..e45fd89932 100644 --- a/types/coinbase/coinbase-tests.ts +++ b/types/coinbase/coinbase-tests.ts @@ -2,107 +2,107 @@ import * as coinbase from "coinbase"; const client = new coinbase.Client({ apiKey: "key", apiSecret: "secret", version: "2017-10-22" }); -client.getAccounts({}, (error: Error, result: coinbase.Account[]): void => undefined); +client.getAccounts({}, (error: Error | null, result: coinbase.Account[]): void => undefined); -client.getAccount("abcdef", (error: Error, account: coinbase.Account): void => { - account.buy({ amount: "1", commit: false, currency: "BTC", payment_method: "abcdef" }, (error: Error, buy: coinbase.Buy): void => { - buy.commit((error: Error, buy: coinbase.Buy): void => undefined); +client.getAccount("abcdef", (error: Error | null, account: coinbase.Account): void => { + account.buy({ amount: "1", commit: false, currency: "BTC", payment_method: "abcdef" }, (error: Error | null, buy: coinbase.Buy): void => { + buy.commit((error: Error | null, buy: coinbase.Buy): void => undefined); }); - account.createAddress({ name: "foo" }, (error: Error, address: coinbase.Address): void => { - address.getTransactions({}, (error: Error, transactions: coinbase.Transaction[]): void => undefined); + account.createAddress({ name: "foo" }, (error: Error | null, address: coinbase.Address): void => { + address.getTransactions({}, (error: Error | null, transactions: coinbase.Transaction[]): void => undefined); }); - account.delete((error: Error): void => undefined); + account.delete((error: Error | null): void => undefined); - account.deposit({ amount: "1", commit: false, currency: "USD", payment_method: "abcdef" }, (error: Error, deposit: coinbase.Deposit): void => { - deposit.commit((error: Error, deposit: coinbase.Deposit): void => undefined); + account.deposit({ amount: "1", commit: false, currency: "USD", payment_method: "abcdef" }, (error: Error | null, deposit: coinbase.Deposit): void => { + deposit.commit((error: Error | null, deposit: coinbase.Deposit): void => undefined); }); - account.getAddress("abcdef", (error: Error, address: coinbase.Address): void => undefined); + account.getAddress("abcdef", (error: Error | null, address: coinbase.Address): void => undefined); - account.getAddresses((error: Error, address: coinbase.Address[]): void => undefined); + account.getAddresses((error: Error | null, address: coinbase.Address[]): void => undefined); - account.getBuy("abcdef", (error: Error, buy: coinbase.Buy): void => undefined); + account.getBuy("abcdef", (error: Error | null, buy: coinbase.Buy): void => undefined); - account.getBuys(null, (error: Error, buy: coinbase.Buy[]): void => undefined); + account.getBuys(null, (error: Error | null, buy: coinbase.Buy[]): void => undefined); - account.getDeposit("abcdef", (error: Error, deposit: coinbase.Deposit): void => undefined); + account.getDeposit("abcdef", (error: Error | null, deposit: coinbase.Deposit): void => undefined); - account.getDeposits((error: Error, deposit: coinbase.Deposit[]): void => undefined); + account.getDeposits((error: Error | null, deposit: coinbase.Deposit[]): void => undefined); - account.getSell("abcdef", (error: Error, deposit: coinbase.Sell): void => undefined); + account.getSell("abcdef", (error: Error | null, deposit: coinbase.Sell): void => undefined); - account.getSells(null, (error: Error, deposit: coinbase.Sell[]): void => undefined); + account.getSells(null, (error: Error | null, deposit: coinbase.Sell[]): void => undefined); - account.getTransaction("abcdef", (error: Error, deposit: coinbase.Transaction): void => undefined); + account.getTransaction("abcdef", (error: Error | null, deposit: coinbase.Transaction): void => undefined); - account.getTransactions((error: Error, deposit: coinbase.Transaction[]): void => undefined); + account.getTransactions((error: Error | null, deposit: coinbase.Transaction[]): void => undefined); - account.getWithdrawal("abcdef", (error: Error, deposit: coinbase.Withdrawal): void => undefined); + account.getWithdrawal("abcdef", (error: Error | null, deposit: coinbase.Withdrawal): void => undefined); - account.getWithdrawals((error: Error, deposit: coinbase.Withdrawal[]): void => undefined); + account.getWithdrawals((error: Error | null, deposit: coinbase.Withdrawal[]): void => undefined); account.requestMoney( { amount: "1", currency: "EUR", description: "foo", to: "bar", type: "request" }, - (error: Error, result: coinbase.Transaction) => undefined + (error: Error | null, result: coinbase.Transaction) => undefined ); - account.requestMoney({ amount: "1", currency: "EUR", to: "bar", type: "request" }, (error: Error, tx: coinbase.Transaction) => { - tx.cancel((error: Error, tx: coinbase.Transaction): void => undefined); - tx.complete((error: Error, tx: coinbase.Transaction): void => undefined); - tx.resend((error: Error, tx: coinbase.Transaction): void => undefined); + account.requestMoney({ amount: "1", currency: "EUR", to: "bar", type: "request" }, (error: Error | null, tx: coinbase.Transaction) => { + tx.cancel((error: Error | null, tx: coinbase.Transaction): void => undefined); + tx.complete((error: Error | null, tx: coinbase.Transaction): void => undefined); + tx.resend((error: Error | null, tx: coinbase.Transaction): void => undefined); }); account.sell( { agree_btc_amount_varies: true, amount: "1", commit: true, currency: "BTC", payment_method: "abcdef", quote: true}, - (error: Error, sell: coinbase.Sell): void => { - sell.commit((error: Error, sell: coinbase.Sell): void => undefined); + (error: Error | null, sell: coinbase.Sell): void => { + sell.commit((error: Error | null, sell: coinbase.Sell): void => undefined); } ); account.sell( { currency: "BTC", payment_method: "abcdef", total: "3"}, - (error: Error, sell: coinbase.Sell): void => { - sell.commit((error: Error, sell: coinbase.Sell): void => undefined); + (error: Error | null, sell: coinbase.Sell): void => { + sell.commit((error: Error | null, sell: coinbase.Sell): void => undefined); } ); account.sendMoney( { amount: "1", currency: "EUR", description: "foo", fee: "2", idem: "bar", to: "baz", type: "send" }, - (error: Error, result: coinbase.Transaction) => undefined + (error: Error | null, result: coinbase.Transaction) => undefined ); - account.setPrimary((error: Error, result: coinbase.Account): void => undefined); + account.setPrimary((error: Error | null, result: coinbase.Account): void => undefined); account.transferMoney( { amount: "1", currency: "USD", description: "foo", to: "bar", type: "transfer" }, - (error: Error, tx: coinbase.Transaction): void => undefined + (error: Error | null, tx: coinbase.Transaction): void => undefined ); - account.update({ name: "foo" }, (error: Error, result: coinbase.Account): void => undefined); + account.update({ name: "foo" }, (error: Error | null, result: coinbase.Account): void => undefined); - account.withdraw({ amount: "1", commit: false, currency: "ETH", payment_method: "abcdef"}, (error: Error, result: coinbase.Withdrawal): void => { - result.commit((error: Error, result: coinbase.Withdrawal): void => undefined); + account.withdraw({ amount: "1", commit: false, currency: "ETH", payment_method: "abcdef"}, (error: Error | null, result: coinbase.Withdrawal): void => { + result.commit((error: Error | null, result: coinbase.Withdrawal): void => undefined); }); }); -client.getBuyPrice({ currencyPair: "USD-BTC" }, (error: Error, result: coinbase.Price): void => undefined); +client.getBuyPrice({ currencyPair: "USD-BTC" }, (error: Error | null, result: coinbase.Price): void => undefined); -client.getCurrencies((error: Error, result: coinbase.Currency[]): void => undefined); +client.getCurrencies((error: Error | null, result: coinbase.Currency[]): void => undefined); -client.getExchangeRates({currency: "ETC"}, (error: Error, result: coinbase.ExchangeRate): void => undefined); +client.getExchangeRates({currency: "ETC"}, (error: Error | null, result: coinbase.ExchangeRate): void => undefined); -client.getPaymentMethod("foo", (error: Error, result: coinbase.PaymentMethod): void => undefined); +client.getPaymentMethod("foo", (error: Error | null, result: coinbase.PaymentMethod): void => undefined); -client.getPaymentMethods((error: Error, result: coinbase.PaymentMethod[]): void => undefined); +client.getPaymentMethods((error: Error | null, result: coinbase.PaymentMethod[]): void => undefined); -client.getSellPrice({ currencyPair: "USD-BTC" }, (error: Error, result: coinbase.Price): void => undefined); +client.getSellPrice({ currencyPair: "USD-BTC" }, (error: Error | null, result: coinbase.Price): void => undefined); -client.getSpotPrice({ currencyPair: "USD-BTC" }, (error: Error, result: coinbase.Price): void => undefined); -client.getSpotPrice({ currencyPair: "USD-BTC", date: "2017-22-01" }, (error: Error, result: coinbase.Price): void => undefined); +client.getSpotPrice({ currencyPair: "USD-BTC" }, (error: Error | null, result: coinbase.Price): void => undefined); +client.getSpotPrice({ currencyPair: "USD-BTC", date: "2017-22-01" }, (error: Error | null, result: coinbase.Price): void => undefined); -client.getTime((error: Error, result: coinbase.Time): void => undefined); +client.getTime((error: Error | null, result: coinbase.Time): void => undefined); -client.getUser("abcdef", (error: Error, user: coinbase.User): void => { - user.showAuth((error: Error, auth: coinbase.Auth): void => undefined); - user.update({ name: "foo", time_zone: "bar", native_currency: "USD" }, (error: Error, user: coinbase.User): void => undefined); +client.getUser("abcdef", (error: Error | null, user: coinbase.User): void => { + user.showAuth((error: Error | null, auth: coinbase.Auth): void => undefined); + user.update({ name: "foo", time_zone: "bar", native_currency: "USD" }, (error: Error | null, user: coinbase.User): void => undefined); }); diff --git a/types/coinbase/index.d.ts b/types/coinbase/index.d.ts index 891361627f..bdf7211c07 100644 --- a/types/coinbase/index.d.ts +++ b/types/coinbase/index.d.ts @@ -418,13 +418,13 @@ export class User implements Resource { * Get current user’s authorization information including granted scopes and send limits when using OAuth2 authentication * No permission required */ - showAuth(cb: (error: Error, result: Auth) => void): void; + showAuth(cb: (error: Error | null, result: Auth) => void): void; /** * Change user properties * Scope: wallet:user:update */ - update(opts: UpdateUserOpts, cb: (error: Error, result: User) => void): void; + update(opts: UpdateUserOpts, cb: (error: Error | null, result: User) => void): void; } export interface Auth { @@ -474,7 +474,7 @@ export class Address implements Resource { * List transactions that have been sent to a specific address. * Scope: wallet:transactions:read */ - getTransactions(opts: {}, cb: (error: Error, result: Transaction[]) => void): void; + getTransactions(opts: {}, cb: (error: Error | null, result: Transaction[]) => void): void; } export type AccountType = "wallet" | "fiat" | "multisig" | "vault" | "multisig_vault"; @@ -555,13 +555,13 @@ export class Account implements Resource { * Promote an account as primary account. * Scope: wallet:accounts:update */ - setPrimary(cb: (error: Error, result: Account) => void): void; + setPrimary(cb: (error: Error | null, result: Account) => void): void; /** * Modifies user’s account. * Scope: wallet:accounts:update */ - update(opts: UpdateAccountOpts, cb: (error: Error, result: Account) => void): void; + update(opts: UpdateAccountOpts, cb: (error: Error | null, result: Account) => void): void; /** * Removes user’s account. In order to remove an account it can’t be: @@ -571,13 +571,13 @@ export class Account implements Resource { * - Vault with a pending withdrawal * Scope: wallet:accounts:delete */ - delete(cb: (error: Error) => void): void; + delete(cb: (error: Error | null) => void): void; /** * Lists addresses for an account. Important: Addresses should be considered one time use only. Create new addresses. * Scope: wallet:addresses:read */ - getAddresses(cb: (error: Error, result: Address[]) => void): void; + getAddresses(cb: (error: Error | null, result: Address[]) => void): void; /** * Show an individual address for an account. A regular bitcoin, litecoin or ethereum address can be used in place of `id` but the @@ -585,7 +585,7 @@ export class Account implements Resource { * Scope: wallet:addresses:read * @param id resource id or a regular bitcoin, litecoin or ethereum address */ - getAddress(id: string, cb: (error: Error, result: Address) => void): void; + getAddress(id: string, cb: (error: Error | null, result: Address) => void): void; /** * Creates a new address for an account. As all the arguments are optinal, it’s possible just to do a empty POST which will create a new @@ -594,20 +594,20 @@ export class Account implements Resource { * Scope: wallet:addresses:create * @param opts can be null, optional address name */ - createAddress(opts: CreateAddressOpts | null, cb: (error: Error, result: Address) => void): void; + createAddress(opts: CreateAddressOpts | null, cb: (error: Error | null, result: Address) => void): void; /** * Lists account’s transactions. * Scope: wallet:transactions:read */ - getTransactions(cb: (error: Error, result: Transaction[]) => void): void; + getTransactions(cb: (error: Error | null, result: Transaction[]) => void): void; /** * Show an individual transaction for an account * Scope: wallet:transactions:read * @param id resource id */ - getTransaction(id: string, cb: (error: Error, result: Transaction) => void): void; + getTransaction(id: string, cb: (error: Error | null, result: Transaction) => void): void; /** * Send funds to a bitcoin address, litecoin address, ethereum address, or email address. No transaction fees are required for off @@ -625,7 +625,7 @@ export class Account implements Resource { * * Scope: wallet:transactions:send, wallet:transactions:send:bypass-2fa */ - sendMoney(opts: SendMoneyOpts, cb: (error: Error, result: Transaction) => void): void; + sendMoney(opts: SendMoneyOpts, cb: (error: Error | null, result: Transaction) => void): void; /** * Transfer bitcoin, litecoin or ethereum between two of a user’s accounts. Following transfers are allowed: @@ -633,26 +633,26 @@ export class Account implements Resource { * - wallet to vault * Scope: wallet:transactions:transfer */ - transferMoney(opts: TransferMoneyOpts, cb: (error: Error, result: Transaction) => void): void; + transferMoney(opts: TransferMoneyOpts, cb: (error: Error | null, result: Transaction) => void): void; /** * Requests money from an email address. * Scope: wallet:transactions:request */ - requestMoney(opts: RequestMoneyOpts, cb: (error: Error, result: Transaction) => void): void; + requestMoney(opts: RequestMoneyOpts, cb: (error: Error | null, result: Transaction) => void): void; /** * Lists buys for an account. * Scope: wallet:buys:read */ - getBuys(opts: null, cb: (error: Error, result: Buy[]) => void): void; + getBuys(opts: null, cb: (error: Error | null, result: Buy[]) => void): void; /** * Show an individual buy. * Scope: wallet:buys:read * @param id resource id */ - getBuy(id: string, cb: (error: Error, result: Buy) => void): void; + getBuy(id: string, cb: (error: Error | null, result: Buy) => void): void; /** * Buys a user-defined amount of bitcoin, litecoin or ethereum. @@ -672,20 +672,20 @@ export class Account implements Resource { * @param opts indicates what to buy * @param cb receives transaction that you can use to commit the buy */ - buy(opts: BuyOpts, cb: (error: Error, result: Buy) => void): void; + buy(opts: BuyOpts, cb: (error: Error | null, result: Buy) => void): void; /** * Lists sells for an account. * Scope: wallet:sells:read */ - getSells(opts: null, cb: (error: Error, result: Sell[]) => void): void; + getSells(opts: null, cb: (error: Error | null, result: Sell[]) => void): void; /** * Show an individual sell. * Scope: wallet:sells:read * @param id resource id */ - getSell(id: string, cb: (error: Error, result: Sell) => void): void; + getSell(id: string, cb: (error: Error | null, result: Sell) => void): void; /** * Sells a user-defined amount of bitcoin, litecoin or ethereum. @@ -705,45 +705,45 @@ export class Account implements Resource { * the user when they are filling a form or similar situation. * Scope: wallet:sells:create */ - sell(opts: SellOpts, cb: (error: Error, result: Sell) => void): void; + sell(opts: SellOpts, cb: (error: Error | null, result: Sell) => void): void; /** * Lists deposits for an account. * Scope: wallet:deposits:read */ - getDeposits(cb: (error: Error, result: Deposit[]) => void): void; + getDeposits(cb: (error: Error | null, result: Deposit[]) => void): void; /** * Show an individual deposit. * Scope: wallet:deposits:read * @param id resource id */ - getDeposit(id: string, cb: (error: Error, result: Deposit) => void): void; + getDeposit(id: string, cb: (error: Error | null, result: Deposit) => void): void; /** * Deposits user-defined amount of funds to a fiat account. * Scope: wallet:deposits:create */ - deposit(opts: DepositOpts, cb: (error: Error, result: Deposit) => void): void; + deposit(opts: DepositOpts, cb: (error: Error | null, result: Deposit) => void): void; /** * Lists withdrawals for an account. * Scope: wallet:withdrawals:read */ - getWithdrawals(cb: (error: Error, result: Withdrawal[]) => void): void; + getWithdrawals(cb: (error: Error | null, result: Withdrawal[]) => void): void; /** * Show an individual withdrawal. * Scope: wallet:withdrawals:read * @param id resource id */ - getWithdrawal(id: string, cb: (error: Error, result: Withdrawal) => void): void; + getWithdrawal(id: string, cb: (error: Error | null, result: Withdrawal) => void): void; /** * Withdraws user-defined amount of funds from a fiat account. * Scope: wallet:withdrawals:create */ - withdraw(opts: WithdrawOpts, cb: (error: Error, result: Withdrawal) => void): void; + withdraw(opts: WithdrawOpts, cb: (error: Error | null, result: Withdrawal) => void): void; } /** @@ -839,19 +839,19 @@ export class Transaction implements Resource { * This can only be completed by the user to whom the request was made, not the user who sent the request. * Scope: wallet:transactions:request */ - complete(cb: (error: Error, result: Transaction) => void): void; + complete(cb: (error: Error | null, result: Transaction) => void): void; /** * Lets the user resend a money request. This will notify recipient with a new email. * Scope: wallet:transactions:request */ - resend(cb: (error: Error, result: Transaction) => void): void; + resend(cb: (error: Error | null, result: Transaction) => void): void; /** * Lets a user cancel a money request. Money requests can be canceled by the sender or the recipient. * Scope: wallet:transactions:request */ - cancel(cb: (error: Error, result: Transaction) => void): void; + cancel(cb: (error: Error | null, result: Transaction) => void): void; } export type BuyStatus = "created" | "completed" | "canceled"; @@ -962,7 +962,7 @@ export class Buy implements Resource { * values and start the buy at the new rates. * Scope: wallet:buys:create */ - commit(cb: (error: Error, transaction: Buy) => void): void; + commit(cb: (error: Error | null, result: Buy) => void): void; } export interface Fee { @@ -1079,7 +1079,7 @@ export class Sell implements Resource { * values and start the buy at the new rates. * Scope: wallet:sells:create */ - commit(cb: (error: Error, transaction: Sell) => void): void; + commit(cb: (error: Error | null, result: Sell) => void): void; } export type DepositStatus = "created" | "completed" | "canceled"; @@ -1156,7 +1156,7 @@ export class Deposit implements Resource { * Completes a deposit that is created in commit: false state. * Scope: wallet:deposits:create */ - commit(cb: (error: Error, result: Deposit) => void): void; + commit(cb: (error: Error | null, result: Deposit) => void): void; } export type WithdrawalStatus = "created" | "completed" | "canceled"; @@ -1234,7 +1234,7 @@ export class Withdrawal implements Resource { * Completes a withdrawal that is created in commit: false state. * Scope: wallet:withdrawals:create */ - commit(cb: (error: Error, result: Withdrawal) => void): void; + commit(cb: (error: Error | null, result: Withdrawal) => void): void; } export type PaymentMethodType = "ach_bank_account" | "sepa_bank_account" | "ideal_bank_account" | "fiat_account" | "bank_wire" @@ -1376,59 +1376,59 @@ export class Client { * Scopes: none * @param id resource id */ - getUser(id: string, cb: (error: Error, result: User) => void): void; + getUser(id: string, cb: (error: Error | null, result: User) => void): void; /** * Get the current user. To get user’s email or private information, use permissions wallet:user:email and wallet:user:read. If current * request has a wallet:transactions:send scope, then the response will contain a boolean sends_disabled field that indicates * if the user’s send functionality has been disabled. */ - getCurrentUser(cb: (error: Error, result: User) => void): void; + getCurrentUser(cb: (error: Error | null, result: User) => void): void; /** * Returns all accounts for the current user * Scope: wallet:accounts:read */ - getAccounts(opts: {}, cb: (error: Error, result: Account[]) => void): void; + getAccounts(opts: {}, cb: (error: Error | null, result: Account[]) => void): void; /** * Get one account by its Resource ID * Scope: wallet:accounts:read * @param id resource ID or "primary" */ - getAccount(id: string, cb: (error: Error, result: Account) => void): void; + getAccount(id: string, cb: (error: Error | null, result: Account) => void): void; /** * Creates a new account for user. * Scopes: wallet:accounts:create */ - createAccount(opts: CreateAccountOpts, cb: (error: Error, result: Account) => void): void; + createAccount(opts: CreateAccountOpts, cb: (error: Error | null, result: Account) => void): void; /** * Lists current user’s payment methods * Scope: wallet:payment-methods:read */ - getPaymentMethods(cb: (error: Error, result: PaymentMethod[]) => void): void; + getPaymentMethods(cb: (error: Error | null, result: PaymentMethod[]) => void): void; /** * Show current user’s payment method. * Scope: wallet:payment-methods:read */ - getPaymentMethod(id: string, cb: (error: Error, result: PaymentMethod) => void): void; + getPaymentMethod(id: string, cb: (error: Error | null, result: PaymentMethod) => void): void; /** * List known currencies. Currency codes will conform to the ISO 4217 standard where possible. Currencies which have or had no * representation in ISO 4217 may use a custom code (e.g. BTC). * Scope: none */ - getCurrencies(cb: (error: Error, result: Currency[]) => void): void; + getCurrencies(cb: (error: Error | null, result: Currency[]) => void): void; /** * Get current exchange rates. Default base currency is USD but it can be defined as any supported currency. * Returned rates will define the exchange rate for one unit of the base currency. * Scope: none */ - getExchangeRates(opts: GetExchangeRateOpts, cb: (error: Error, result: ExchangeRate) => void): void; + getExchangeRates(opts: GetExchangeRateOpts, cb: (error: Error | null, result: ExchangeRate) => void): void; /** * Get the total price to buy one bitcoin or ether. Note that exchange rates fluctuates so the price is only correct for seconds at the time. @@ -1436,7 +1436,7 @@ export class Client { * If you need more accurate price estimate for a specific payment method or amount, @see Account#buy() and `quote: true` option. * Scope: none */ - getBuyPrice(opts: GetBuyPriceOpts, cb: (error: Error, result: Price) => void): void; + getBuyPrice(opts: GetBuyPriceOpts, cb: (error: Error | null, result: Price) => void): void; /** * Get the total price to sell one bitcoin or ether. Note that exchange rates fluctuates so the price is only correct for seconds at the time. @@ -1444,7 +1444,7 @@ export class Client { * estimate for a specific payment method or amount, see sell bitcoin endpoint and quote: true option. * Scope: none */ - getSellPrice(opts: GetSellPriceOpts, cb: (error: Error, result: Price) => void): void; + getSellPrice(opts: GetSellPriceOpts, cb: (error: Error | null, result: Price) => void): void; /** * Get the current market price for bitcoin. This is usually somewhere in between the buy and sell price. @@ -1452,10 +1452,10 @@ export class Client { * You can also get historic prices with date parameter. * Scope: none */ - getSpotPrice(opts: GetSpotPriceOpts, cb: (error: Error, result: Price) => void): void; + getSpotPrice(opts: GetSpotPriceOpts, cb: (error: Error | null, result: Price) => void): void; /** * Get the API server time. */ - getTime(cb: (error: Error, result: Time) => void): void; + getTime(cb: (error: Error | null, result: Time) => void): void; } diff --git a/types/connect-busboy/connect-busboy-tests.ts b/types/connect-busboy/connect-busboy-tests.ts index 2db8cd45d7..69f8a76d49 100644 --- a/types/connect-busboy/connect-busboy-tests.ts +++ b/types/connect-busboy/connect-busboy-tests.ts @@ -4,3 +4,10 @@ import * as express from 'express'; const options: connectBusboy.ConnectBusboyOptions = { immediate: true }; const result: express.RequestHandler = connectBusboy(options); + +const app = express(); + +app.use(connectBusboy()); +app.use((req: express.Request, res: express.Response, next: express.NextFunction) => { + req.busboy.on('file', () => {}); +}); diff --git a/types/connect-busboy/index.d.ts b/types/connect-busboy/index.d.ts index cb6a3e8702..4085c8d83b 100644 --- a/types/connect-busboy/index.d.ts +++ b/types/connect-busboy/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for connect-busboy 0.0 // Project: https://github.com/mscdex/connect-busboy // Definitions by: Pinguet62 +// Chris Gedrim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -15,4 +16,12 @@ declare namespace connectBusboy { } } +declare global { + namespace Express { + interface Request { + busboy: busboy.Busboy; + } + } +} + export = connectBusboy; diff --git a/types/connect-busboy/tslint.json b/types/connect-busboy/tslint.json index 3db14f85ea..f93cf8562a 100644 --- a/types/connect-busboy/tslint.json +++ b/types/connect-busboy/tslint.json @@ -1 +1,3 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json" +} diff --git a/types/cuint/cuint-tests.ts b/types/cuint/cuint-tests.ts new file mode 100644 index 0000000000..6a5abe305e --- /dev/null +++ b/types/cuint/cuint-tests.ts @@ -0,0 +1,5 @@ +import { UINT32 } from "cuint"; + +const u = UINT32(1, 2); +const d = u.fromBits(4, 5, 6); +d.add(u.multiply(d)).rotl(17).subtract(u).shiftRight(123); diff --git a/types/cuint/index.d.ts b/types/cuint/index.d.ts new file mode 100644 index 0000000000..0300a5d272 --- /dev/null +++ b/types/cuint/index.d.ts @@ -0,0 +1,73 @@ +// Type definitions for cuint 0.2 +// Project: https://github.com/pierrec/js-cuint +// Definitions by: Lukas Tetzlaff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Uint { + // Math + add(x: this): this; + subtract(x: this): this; + multiply(x: this): this; + div(x: this): this; + + // Compare + equals(x: this): boolean; + eq(x: this): boolean; + greaterThan(x: this): boolean; + gt(x: this): boolean; + lessThan(x: this): boolean; + lt(x: this): boolean; + + // Bitwise + negate(): this; + or(x: this): this; + and(x: this): this; + xor(x: this): this; + not(x: this): this; + shiftRight(n: number): this; + shiftr(n: number): this; + shiftLeft(n: number): this; + shiftl(n: number): this; + rorateLeft(n: number): this; + rotl(n: number): this; + rorateRight(n: number): this; + rotr(n: number): this; + + // Deserialize + fromNumber(n: number): this; + fromBits(...bits: number[]): this; + fromString(integer: string, radix?: number): this; + + // Serialize + toNumber(): number; + toString(base?: number): string; + clone(): this; + + _low: number; + _high: number; +} + +export interface UintConstructor { + // called as a function: + (low: number, high?: number): T; + // tslint:disable-next-line:unified-signatures + (text: string, radix?: number): T; + + // called as a constructor: + new (low: number, high?: number): T; + // tslint:disable-next-line:unified-signatures + new (text: string, radix?: number): T; + + prototype: T; +} + +export interface Uint64Constructor extends UintConstructor { + // called as a function: + (a00: number, a16: number, a32: number, a48: number): T; + + // called as constructor: + new (a00: number, a16: number, a32: number, a48: number): T; +} + +export const UINT64: Uint64Constructor; +export const UINT32: UintConstructor; diff --git a/types/sdbm/tsconfig.json b/types/cuint/tsconfig.json similarity index 94% rename from types/sdbm/tsconfig.json rename to types/cuint/tsconfig.json index cad9717aae..44d73f84be 100644 --- a/types/sdbm/tsconfig.json +++ b/types/cuint/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "sdbm-tests.ts" + "cuint-tests.ts" ] } diff --git a/types/ansi-escapes/tslint.json b/types/cuint/tslint.json similarity index 100% rename from types/ansi-escapes/tslint.json rename to types/cuint/tslint.json diff --git a/types/d3-array/d3-array-tests.ts b/types/d3-array/d3-array-tests.ts index b0d00d5d20..697543830b 100644 --- a/types/d3-array/d3-array-tests.ts +++ b/types/d3-array/d3-array-tests.ts @@ -70,7 +70,7 @@ const mixedObjectArray = [ ]; const mixedObjectOrUndefinedArray = [...mixedObjectArray, undefined]; -const mixedObjectArrayLike = mixedObjectArray as ArrayLike; +const mixedObjectArrayLike = mixedObjectArray as Iterable; let typedArray = Uint8Array.from(numbersArray); let readonlyNumbersArray = numbersArray as ReadonlyArray; @@ -81,55 +81,55 @@ const readonlyDateArray = dateArray as ReadonlyArray; const readonlyMixedObjectArray = mixedObjectArray as ReadonlyArray; const readonlyMixedObjectOrUndefinedArray = mixedObjectOrUndefinedArray as ReadonlyArray; -function accessorMixedObjectToNum(datum: MixedObject, index: number, array: ArrayLike): number { +function accessorMixedObjectToNum(datum: MixedObject, index: number, array: Iterable): number { return datum.num; } -function accessorMixedObjectToStr(datum: MixedObject, index: number, array: ArrayLike): string { +function accessorMixedObjectToStr(datum: MixedObject, index: number, array: Iterable): string { return datum.str; } -function accessorMixedObjectToNumeric(datum: MixedObject, index: number, array: ArrayLike): NumCoercible { +function accessorMixedObjectToNumeric(datum: MixedObject, index: number, array: Iterable): NumCoercible { return datum.numeric; } -function accessorMixedObjectToDate(datum: MixedObject, index: number, array: ArrayLike): Date { +function accessorMixedObjectToDate(datum: MixedObject, index: number, array: Iterable): Date { return datum.date; } -function accessorMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { +function accessorMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): number | undefined | null { return datum ? datum.num : undefined; } -function accessorMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): string | undefined | null { +function accessorMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): string | undefined | null { return datum ? datum.str : undefined; } -function accessorLikeMixedObjectToNum(datum: MixedObject, index: number, array: ArrayLike): number { +function accessorLikeMixedObjectToNum(datum: MixedObject, index: number, array: Iterable): number { return datum.num; } -function accessorLikeMixedObjectToStr(datum: MixedObject, index: number, array: ArrayLike): string { +function accessorLikeMixedObjectToStr(datum: MixedObject, index: number, array: Iterable): string { return datum.str; } -function accessorLikeMixedObjectToNumeric(datum: MixedObject, index: number, array: ArrayLike): NumCoercible { +function accessorLikeMixedObjectToNumeric(datum: MixedObject, index: number, array: Iterable): NumCoercible { return datum.numeric; } -function accessorLikeMixedObjectToDate(datum: MixedObject, index: number, array: ArrayLike): Date { +function accessorLikeMixedObjectToDate(datum: MixedObject, index: number, array: Iterable): Date { return datum.date; } -function accessorLikeMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { +function accessorLikeMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): number | undefined | null { return datum ? datum.num : undefined; } -function accessorLikeMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): string | undefined | null { +function accessorLikeMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): string | undefined | null { return datum ? datum.str : undefined; } -function accessorReadOnlyMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { +function accessorReadOnlyMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: Iterable): number | undefined | null { return datum ? datum.num : undefined; } @@ -485,6 +485,12 @@ num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(201 num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14), 1); num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14), 3, 4); +// quickselect +numbersArray = d3Array.quickselect(numbersArray, 3); +numbersArray = d3Array.quickselect(numbersArray, 3, 0); +numbersArray = d3Array.quickselect(numbersArray, 3, 0, 5); +numbersArray = d3Array.quickselect(numbersArray, 3, 0, 5, d3Array.descending); + // ascending() ----------------------------------------------------------------- num = d3Array.ascending(undefined, 20); @@ -536,6 +542,23 @@ mergedArray = d3Array.merge([testArray1, [15, 30]]); // fails, type mismatch mergedArray = d3Array.merge(readonlyTestArrays); // inferred type mergedArray = d3Array.merge(readonlyTestArrays); // explicit type +interface ObjDefinition { + name: string; + amount: string; + date: string; +} + +const objArray: ObjDefinition[] = [ + { name: "jim", amount: "34.0", date: "11/12/2015" }, + { name: "carl", amount: "120.11", date: "11/12/2015" }, + { name: "stacy", amount: "12.01", date: "01/04/2016" }, + { name: "stacy", amount: "34.05", date: "01/04/2016" } +]; + +const grouped: Map = d3Array.group(objArray, d => d.name); +const rolledup: Map = d3Array.rollup(objArray, d => d.length, d => d.name); +const rolledup2: Map = d3Array.rollup(objArray, d => d.map(u => u.name).join(' '), d => d.name); + // cross() --------------------------------------------------------------------- let crossed: Array<[string, number]>; @@ -780,7 +803,7 @@ histoMixedObject_Date = histoMixedObject_Date.domain(timeScale.domain()); // fai domainFnDate = histoMixedObject_Date.domain(); histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain([new Date(2014, 3, 15), new Date(2017, 4, 15)]); histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain([domain[0], domain[domain.length]]); -histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain((values) => [values[0]!, values[values.length]!]); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain((values) => [values[0]!, values[values.length]!]); // thresholds(...) ------------------------------------------------------------- @@ -935,8 +958,3 @@ num = d3Array.thresholdScott(readonlyNumbersArray, -1, 234); num = d3Array.thresholdSturges(numbersArray); num = d3Array.thresholdSturges(typedArray); num = d3Array.thresholdSturges(readonlyNumbersArray); - -// Deprecated ================================================================== - -const histDeprecatedNumber: d3Array.HistogramGenerator = d3Array.histogram(); -const histDeprecatedDate: d3Array.HistogramGenerator = d3Array.histogram(); diff --git a/types/d3-array/index.d.ts b/types/d3-array/index.d.ts index 16a0e659cb..5de77e4e10 100644 --- a/types/d3-array/index.d.ts +++ b/types/d3-array/index.d.ts @@ -1,13 +1,14 @@ -// Type definitions for D3JS d3-array module 1.2 +// Type definitions for D3JS d3-array module 2.0 // Project: https://github.com/d3/d3-array, https://d3js.org/d3-array // Definitions by: Alex Ford // Boris Yankov // Tom Wanzek -// denisname +// denisname , +// Hugues Stefanski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// Last module patch version validated against: 1.2.1 +// Last module patch version validated against: 2.0.3 // -------------------------------------------------------------------------- // Shared Types and Interfaces @@ -32,128 +33,128 @@ export interface Numeric { /** * Return the maximum value in the array of strings using natural order. */ -export function max(array: ArrayLike): string | undefined; +export function max(array: Iterable): string | undefined; /** * Return the maximum value in the array of numbers using natural order. */ -export function max(array: ArrayLike): T | undefined; +export function max(array: Iterable): T | undefined; /** * Return the maximum value in the array using natural order and a projection function to map values to strings. */ -export function max(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): string | undefined; +export function max(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => string | undefined | null): string | undefined; /** * Return the maximum value in the array using natural order and a projection function to map values to easily-sorted values. */ -export function max(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): U | undefined; +export function max(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => U | undefined | null): U | undefined; /** * Return the minimum value in the array using natural order. */ -export function min(array: ArrayLike): string | undefined; +export function min(array: Iterable): string | undefined; /** * Return the minimum value in the array using natural order. */ -export function min(array: ArrayLike): T | undefined; +export function min(array: Iterable): T | undefined; /** * Return the minimum value in the array using natural order. */ -export function min(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): string | undefined; +export function min(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => string | undefined | null): string | undefined; /** * Return the minimum value in the array using natural order. */ -export function min(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): U | undefined; +export function min(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => U | undefined | null): U | undefined; /** * Return the min and max simultaneously. */ -export function extent(array: ArrayLike): [string, string] | [undefined, undefined]; +export function extent(array: Iterable): [string, string] | [undefined, undefined]; /** * Return the min and max simultaneously. */ -export function extent(array: ArrayLike): [T, T] | [undefined, undefined]; +export function extent(array: Iterable): [T, T] | [undefined, undefined]; /** * Return the min and max simultaneously. */ -export function extent(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): [string, string] | [undefined, undefined]; +export function extent(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => string | undefined | null): [string, string] | [undefined, undefined]; /** * Return the min and max simultaneously. */ -export function extent(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): [U, U] | [undefined, undefined]; +export function extent(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => U | undefined | null): [U, U] | [undefined, undefined]; /** * Return the mean of an array of numbers */ -export function mean(array: ArrayLike): number | undefined; +export function mean(array: Iterable): number | undefined; /** * Return the mean of an array of numbers */ -export function mean(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function mean(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => number | undefined | null): number | undefined; /** * Return the median of an array of numbers */ -export function median(array: ArrayLike): number | undefined; +export function median(array: Iterable): number | undefined; /** * Return the median of an array of numbers */ -export function median(array: ArrayLike, accessor: (element: T, i: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function median(array: Iterable, accessor: (element: T, i: number, array: Iterable) => number | undefined | null): number | undefined; /** * Returns the p-quantile of an array of numbers */ -export function quantile(array: ArrayLike, p: number): number | undefined; +export function quantile(array: Iterable, p: number): number | undefined; -export function quantile(array: ArrayLike, p: number, accessor: (element: T, i: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function quantile(array: Iterable, p: number, accessor: (element: T, i: number, array: Iterable) => number | undefined | null): number | undefined; /** * Compute the sum of an array of numbers. */ -export function sum(array: ArrayLike): number; +export function sum(array: Iterable): number; /** * Compute the sum of an array, using the given accessor to convert values to numbers. */ -export function sum(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number; +export function sum(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => number | undefined | null): number; /** * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array of numbers. */ -export function deviation(array: ArrayLike): number | undefined; +export function deviation(array: Iterable): number | undefined; /** * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array, * using the given accessor to convert values to numbers. */ -export function deviation(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function deviation(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => number | undefined | null): number | undefined; /** * Compute an unbiased estimator of the population variance of the given array of numbers. */ -export function variance(array: ArrayLike): number | undefined; +export function variance(array: Iterable): number | undefined; /** * Compute an unbiased estimator of the population variance of the given array, * using the given accessor to convert values to numbers. */ -export function variance(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; +export function variance(array: Iterable, accessor: (datum: T, index: number, array: Iterable) => number | undefined | null): number | undefined; // -------------------------------------------------------------------------------------- // Searching Arrays // -------------------------------------------------------------------------------------- -export function scan(array: ArrayLike, comparator?: (a: number, b: number) => number): number | undefined; -export function scan(array: ArrayLike, comparator: (a: T, b: T) => number): number | undefined; +export function scan(array: Iterable, comparator?: (a: number, b: number) => number): number | undefined; +export function scan(array: Iterable, comparator: (a: T, b: T) => number): number | undefined; export function bisectLeft(array: ArrayLike, x: number, lo?: number, hi?: number): number; export function bisectLeft(array: ArrayLike, x: string, lo?: number, hi?: number): number; @@ -173,6 +174,44 @@ export interface Bisector { export function bisector(comparator: (a: T, b: U) => number): Bisector; export function bisector(accessor: (x: T) => U): Bisector; +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + */ +export function quickselect(array: ArrayLike, k: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + */ +export function quickselect(array: ArrayLike, k: number, left: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + * @param right The right index. + */ +export function quickselect(array: ArrayLike, k: number, left: number, right: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + * @param right The right index. + * @param compare The compare function. + */ +export function quickselect(array: ArrayLike, k: number, left: number, right: number, compare: (a: Primitive | undefined, b: Primitive | undefined) => number): T[]; + // NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. /** * Compares two primitive values for sorting (in ascending order). @@ -189,6 +228,22 @@ export function descending(a: Primitive | undefined, b: Primitive | undefined): // Transforming Arrays // -------------------------------------------------------------------------------------- +/** + * Groups the specified array of values into a Map from key to array of value. + * @param a The array to group. + * @param key The key function. + */ +export function group(a: Iterable, key: (value: TObject) => TKey): Map; + +/** + * Groups and reduces the specified array of values into a Map from key to value. + * + * @param a The array to group. + * @param reduce The reduce function. + * @param key The key function. + */ +export function rollup(a: Iterable, reduce: (value: TObject[]) => TReduce, key: (value: TObject) => TKey): Map; + /** * Returns the Cartesian product of the two arrays a and b. * For each element i in the specified array a and each element j in the specified array b, in order, @@ -197,7 +252,7 @@ export function descending(a: Primitive | undefined, b: Primitive | undefined): * @param a First input array. * @param b Second input array. */ -export function cross(a: ArrayLike, b: ArrayLike): Array<[S, T]>; +export function cross(a: Iterable, b: Iterable): Array<[S, T]>; /** * Returns the Cartesian product of the two arrays a and b. @@ -208,12 +263,12 @@ export function cross(a: ArrayLike, b: ArrayLike): Array<[S, T]>; * @param b Second input array. * @param reducer A reducer function taking as input an element from "a" and "b" and returning a reduced value. */ -export function cross(a: ArrayLike, b: ArrayLike, reducer: (a: S, b: T) => U): U[]; +export function cross(a: Iterable, b: Iterable, reducer: (a: S, b: T) => U): U[]; /** * Merges the specified arrays into a single array. */ -export function merge(arrays: ArrayLike>): T[]; +export function merge(arrays: Iterable>): T[]; /** * For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1. @@ -221,7 +276,7 @@ export function merge(arrays: ArrayLike>): T[]; * * @param array Array of input elements */ -export function pairs(array: ArrayLike): Array<[T, T]>; +export function pairs(array: Iterable): Array<[T, T]>; /** * For each adjacent pair of elements in the specified array, in order, invokes the specified reducer function passing the element i and element i - 1. * Returns the resulting array of pair-wise reduced elements. @@ -230,7 +285,7 @@ export function pairs(array: ArrayLike): Array<[T, T]>; * @param array Array of input elements * @param reducer A reducer function taking as input to adjacent elements of the input array and returning a reduced value. */ -export function pairs(array: ArrayLike, reducer: (a: T, b: T) => U): U[]; +export function pairs(array: Iterable, reducer: (a: T, b: T) => U): U[]; /** * Returns a permutation of the specified array using the specified array of indexes. @@ -351,36 +406,6 @@ export type ThresholdNumberArrayGenerator = export type ThresholdDateArrayGenerator = (values: ArrayLike, min: Date, max: Date) => Value[]; -/** - * @deprecated Use ThresholdNumberArrayGenerator or ThresholdDateArrayGenerator. - */ -export type ThresholdArrayGenerator = ThresholdNumberArrayGenerator; - -/** - * @deprecated Use `HistogramGeneratorNumber` for `number` values and `HistogramGeneratorDate for `Date` values. - */ -export interface HistogramGenerator { - (data: ArrayLike): Array>; - - value(): (d: Datum, i: number, data: ArrayLike) => Value; - value(valueAccessor: (d: Datum, i: number, data: ArrayLike) => Value): this; - - domain(): (values: ArrayLike) => [Value, Value] | [undefined, undefined]; - domain(domain: [Value, Value]): this; - domain(domainAccessor: (values: ArrayLike) => [Value, Value] | [undefined, undefined]): this; - - /** - * Set the array of values to be used as thresholds in determining the bins. - * - * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, - * and the last bin.x1 is always equal to the maximum domain value. - * - * @param thresholds Array of threshold values used for binning. The elements must - * be of the same type as the materialized values of the histogram. - */ - thresholds(thresholds: ArrayLike): this; -} - export interface HistogramCommon { (data: ArrayLike): Array>; @@ -419,9 +444,9 @@ export interface HistogramGeneratorDate e } export interface HistogramGeneratorNumber extends HistogramCommon { - domain(): (values: ArrayLike) => [number, number] | [undefined, undefined]; + domain(): (values: Iterable) => [number, number] | [undefined, undefined]; domain(domain: [number, number]): this; - domain(domainAccessor: (values: ArrayLike) => [number, number] | [undefined, undefined]): this; + domain(domainAccessor: (values: Iterable) => [number, number] | [undefined, undefined]): this; thresholds(): ThresholdCountGenerator | ThresholdNumberArrayGenerator; /** @@ -475,12 +500,6 @@ export function histogram(): HistogramGeneratorNumber; export function histogram(): HistogramGeneratorNumber; export function histogram(): HistogramGeneratorDate; -/** - * @deprecated Do not use Value generic which mixes number and Date types. Use either number or Date - * (in combination with undefined, as applicable) to obtain a type-specific histogram generator. - */ -export function histogram(): HistogramGenerator; - // -------------------------------------------------------------------------------------- // Histogram Thresholds // -------------------------------------------------------------------------------------- diff --git a/types/d3-array/v1/d3-array-tests.ts b/types/d3-array/v1/d3-array-tests.ts new file mode 100644 index 0000000000..01529191b8 --- /dev/null +++ b/types/d3-array/v1/d3-array-tests.ts @@ -0,0 +1,941 @@ +/** + * Typescript definition tests for d3/d3-array module + * + * Note: These tests are intended to test the definitions only + * in the sense of typing and call signature consistency. They + * are not intended as functional tests. + */ + +import * as d3Array from 'd3-array'; +import { scaleTime } from 'd3-scale'; +import { timeYear } from 'd3-time'; + +// ----------------------------------------------------------------------------- +// Preparatory Steps +// ----------------------------------------------------------------------------- + +class NumCoercible { + a: number; + + constructor(a: number) { + this.a = a; + } + valueOf() { + return this.a; + } +} + +class MixedObject { + num: number; + str: string; + numeric: NumCoercible; + date: Date; + + constructor(a: number, date: Date) { + this.num = a; + this.str = a.toString(); + this.numeric = new NumCoercible(a); + this.date = date; + } +} + +let num: number; +let undef: undefined; +let mixedObject: MixedObject; + +let numOrUndefined: number | undefined; +let strOrUndefined: string | undefined; +let numericOrUndefined: NumCoercible | undefined; +let dateOrUndefined: Date | undefined; +let mixedObjectOrUndefined: MixedObject | undefined; +let numOrUndefinedExtent: [number, number] | [undefined, undefined]; +let strOrUndefinedExtent: [string, string] | [undefined, undefined]; +let numericOrUndefinedExtent: [NumCoercible, NumCoercible] | [undefined, undefined]; +let dateMixedOrUndefined: [Date, Date] | [undefined, undefined]; +let mixedOrUndefinedExtent: [d3Array.Primitive | NumCoercible, d3Array.Primitive | NumCoercible] | [undefined, undefined]; +let dateOrUndefinedExtent: [Date, Date] | [undefined, undefined]; + +let numbersArray = [10, 20, 30, 40, 50]; +const numbersOrUndefinedArray = [10, 20, undefined, null, 40, 50]; +let stringyNumbersArray = ['10', '20', '30', '40', '50']; +const numericArray = [new NumCoercible(10), new NumCoercible(20), new NumCoercible(30), new NumCoercible(40), new NumCoercible(50)]; +let dateArray = [new Date(2016, 6, 1), new Date(2016, 7, 30), new Date(2015, 3, 15)]; + +const mixedObjectArray = [ + new MixedObject(10, new Date(2016, 6, 1)), + new MixedObject(20, new Date(2016, 7, 30)), + new MixedObject(30, new Date(2015, 3, 15)), + new MixedObject(40, new Date(2014, 3, 15)), + new MixedObject(50, new Date(2017, 4, 15)) +]; + +const mixedObjectOrUndefinedArray = [...mixedObjectArray, undefined]; +const mixedObjectArrayLike = mixedObjectArray as ArrayLike; + +let typedArray = Uint8Array.from(numbersArray); +let readonlyNumbersArray = numbersArray as ReadonlyArray; +const readonlyNumbersOrUndefinedArray = numbersOrUndefinedArray as ReadonlyArray; +const readonlyStringyNumbersArray = stringyNumbersArray as ReadonlyArray; +const readonlyNumericArray = numericArray as ReadonlyArray; +const readonlyDateArray = dateArray as ReadonlyArray; +const readonlyMixedObjectArray = mixedObjectArray as ReadonlyArray; +const readonlyMixedObjectOrUndefinedArray = mixedObjectOrUndefinedArray as ReadonlyArray; + +function accessorMixedObjectToNum(datum: MixedObject, index: number, array: ArrayLike): number { + return datum.num; +} + +function accessorMixedObjectToStr(datum: MixedObject, index: number, array: ArrayLike): string { + return datum.str; +} + +function accessorMixedObjectToNumeric(datum: MixedObject, index: number, array: ArrayLike): NumCoercible { + return datum.numeric; +} + +function accessorMixedObjectToDate(datum: MixedObject, index: number, array: ArrayLike): Date { + return datum.date; +} + +function accessorMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { + return datum ? datum.num : undefined; +} + +function accessorMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): string | undefined | null { + return datum ? datum.str : undefined; +} + +function accessorLikeMixedObjectToNum(datum: MixedObject, index: number, array: ArrayLike): number { + return datum.num; +} + +function accessorLikeMixedObjectToStr(datum: MixedObject, index: number, array: ArrayLike): string { + return datum.str; +} + +function accessorLikeMixedObjectToNumeric(datum: MixedObject, index: number, array: ArrayLike): NumCoercible { + return datum.numeric; +} + +function accessorLikeMixedObjectToDate(datum: MixedObject, index: number, array: ArrayLike): Date { + return datum.date; +} + +function accessorLikeMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { + return datum ? datum.num : undefined; +} + +function accessorLikeMixedObjectToStrOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): string | undefined | null { + return datum ? datum.str : undefined; +} + +function accessorReadOnlyMixedObjectToNumOrUndefined(datum: MixedObject | undefined, index: number, array: ArrayLike): number | undefined | null { + return datum ? datum.num : undefined; +} + +// ----------------------------------------------------------------------------- +// Test Statistics +// ----------------------------------------------------------------------------- + +// max() ----------------------------------------------------------------------- + +// without accessors + +numOrUndefined = d3Array.max(numbersArray); +strOrUndefined = d3Array.max(stringyNumbersArray); +numericOrUndefined = d3Array.max(numericArray); +dateOrUndefined = d3Array.max(dateArray); + +// ArrayLike test cases + +numOrUndefined = d3Array.max(typedArray); +numOrUndefined = d3Array.max(readonlyNumbersOrUndefinedArray); +strOrUndefined = d3Array.max(readonlyStringyNumbersArray); +numericOrUndefined = d3Array.max(readonlyNumericArray); +dateOrUndefined = d3Array.max(readonlyDateArray); + +// with accessors + +numOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToNum); +strOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToStr); +numericOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToNumeric); +dateOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToDate); +numOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToNumOrUndefined); +strOrUndefined = d3Array.max(mixedObjectArray, accessorMixedObjectToStrOrUndefined); +numOrUndefined = d3Array.max(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +numOrUndefined = d3Array.max(mixedObjectArrayLike, accessorLikeMixedObjectToNum); +numOrUndefined = d3Array.max(mixedObjectArray, accessorLikeMixedObjectToNum); +numOrUndefined = d3Array.max(mixedObjectArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +numOrUndefined = d3Array.max(mixedObjectArray, (d) => { + const l: MixedObject = d; + return l.num; +}); + +strOrUndefined = d3Array.max(mixedObjectArray, (d) => { + const l: MixedObject = d; + return l.str; +}); + +// $ExpectError +numOrUndefined = d3Array.max(readonlyNumbersArray, (d, i, a) => { a.push(3); return 0; }); + +// min() ----------------------------------------------------------------------- + +// without accessors + +numOrUndefined = d3Array.min(numbersArray); +strOrUndefined = d3Array.min(stringyNumbersArray); +numericOrUndefined = d3Array.min(numericArray); +dateOrUndefined = d3Array.min(dateArray); + +// ArrayLike test cases + +numOrUndefined = d3Array.min(typedArray); +numOrUndefined = d3Array.min(readonlyNumbersOrUndefinedArray); +strOrUndefined = d3Array.min(readonlyStringyNumbersArray); +numericOrUndefined = d3Array.min(readonlyNumericArray); +dateOrUndefined = d3Array.min(readonlyDateArray); + +// with accessors + +numOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToNum); +strOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToStr); +numericOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToNumeric); +dateOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToDate); +numOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToNumOrUndefined); +strOrUndefined = d3Array.min(mixedObjectArray, accessorMixedObjectToStrOrUndefined); +numOrUndefined = d3Array.min(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// extent() -------------------------------------------------------------------- + +// without accessors + +numOrUndefinedExtent = d3Array.extent(numbersArray); +strOrUndefinedExtent = d3Array.extent(stringyNumbersArray); +numericOrUndefinedExtent = d3Array.extent(numericArray); +dateOrUndefinedExtent = d3Array.extent(dateArray); + +// ArrayLike test cases + +numOrUndefinedExtent = d3Array.extent(typedArray); +numOrUndefinedExtent = d3Array.extent(readonlyNumbersOrUndefinedArray); +strOrUndefinedExtent = d3Array.extent(readonlyStringyNumbersArray); +numericOrUndefinedExtent = d3Array.extent(readonlyNumericArray); +dateOrUndefinedExtent = d3Array.extent(readonlyDateArray); + +// with accessors + +numOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToNum); +strOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToStr); +mixedOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToNumeric); +dateMixedOrUndefined = d3Array.extent(mixedObjectArray, accessorMixedObjectToDate); +numOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToNumOrUndefined); +strOrUndefinedExtent = d3Array.extent(mixedObjectArray, accessorMixedObjectToStrOrUndefined); +numOrUndefinedExtent = d3Array.extent(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// mean() ---------------------------------------------------------------------- + +numOrUndefined = d3Array.mean(numbersArray); +numOrUndefined = d3Array.mean(numericArray); +numOrUndefined = d3Array.mean(numbersOrUndefinedArray); + +numOrUndefined = d3Array.mean(typedArray); +numOrUndefined = d3Array.mean(readonlyNumbersOrUndefinedArray); +numOrUndefined = d3Array.mean(readonlyNumericArray); +numOrUndefined = d3Array.mean(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.mean(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.mean(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.mean(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// median() -------------------------------------------------------------------- + +numOrUndefined = d3Array.median(numbersArray); +numOrUndefined = d3Array.median(numericArray); +numOrUndefined = d3Array.median(numbersOrUndefinedArray); + +numOrUndefined = d3Array.median(typedArray); +numOrUndefined = d3Array.median(readonlyNumbersArray); +numOrUndefined = d3Array.median(readonlyNumericArray); +numOrUndefined = d3Array.median(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.median(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.median(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.median(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// quantile() ------------------------------------------------------------------ + +numOrUndefined = d3Array.quantile(numbersArray, 0.5); +numOrUndefined = d3Array.quantile(numericArray, 0.5); +numOrUndefined = d3Array.quantile(numbersOrUndefinedArray, 0.5); + +numOrUndefined = d3Array.quantile(typedArray, 0.5); +numOrUndefined = d3Array.quantile(readonlyNumbersArray, 0.5); +numOrUndefined = d3Array.quantile(readonlyNumericArray, 0.5); +numOrUndefined = d3Array.quantile(readonlyNumbersOrUndefinedArray, 0.5); + +numOrUndefined = d3Array.quantile(mixedObjectArray, 0.5, accessorMixedObjectToNum); +numOrUndefined = d3Array.quantile(mixedObjectOrUndefinedArray, 0.5, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.quantile(readonlyMixedObjectOrUndefinedArray, 0.5, accessorReadOnlyMixedObjectToNumOrUndefined); + +// sum() ----------------------------------------------------------------------- + +numOrUndefined = d3Array.sum(numbersArray); +numOrUndefined = d3Array.sum(numericArray); +numOrUndefined = d3Array.sum(numbersOrUndefinedArray); + +numOrUndefined = d3Array.sum(typedArray); +numOrUndefined = d3Array.sum(readonlyNumbersArray); +numOrUndefined = d3Array.sum(readonlyNumericArray); +numOrUndefined = d3Array.sum(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.sum(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.sum(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.sum(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// deviation() ----------------------------------------------------------------- + +numOrUndefined = d3Array.deviation(numbersArray); +numOrUndefined = d3Array.deviation(numericArray); +numOrUndefined = d3Array.deviation(numbersOrUndefinedArray); + +numOrUndefined = d3Array.deviation(typedArray); +numOrUndefined = d3Array.deviation(readonlyNumbersArray); +numOrUndefined = d3Array.deviation(readonlyNumericArray); +numOrUndefined = d3Array.deviation(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.deviation(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.deviation(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.deviation(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// variance() ------------------------------------------------------------------ + +numOrUndefined = d3Array.variance(numbersArray); +numOrUndefined = d3Array.variance(numericArray); +numOrUndefined = d3Array.variance(numbersOrUndefinedArray); + +numOrUndefined = d3Array.variance(typedArray); +numOrUndefined = d3Array.variance(readonlyNumbersArray); +numOrUndefined = d3Array.variance(readonlyNumericArray); +numOrUndefined = d3Array.variance(readonlyNumbersOrUndefinedArray); + +numOrUndefined = d3Array.variance(mixedObjectArray, accessorMixedObjectToNum); +numOrUndefined = d3Array.variance(mixedObjectOrUndefinedArray, accessorMixedObjectToNumOrUndefined); +numOrUndefined = d3Array.variance(readonlyMixedObjectOrUndefinedArray, accessorReadOnlyMixedObjectToNumOrUndefined); + +// ----------------------------------------------------------------------------- +// Test Searching Arrays +// ----------------------------------------------------------------------------- + +numbersArray = [0, 2, 3, 4, 7, 8]; +stringyNumbersArray = ['0', '2', '3', '4', '7', '8']; +dateArray = [new Date(2010, 1, 1), new Date(2011, 1, 1), new Date(2012, 1, 1), new Date(2013, 1, 1)]; +typedArray = Uint8Array.from(numbersArray); + +// scan() ---------------------------------------------------------------------- + +numOrUndefined = d3Array.scan(numbersArray); +numOrUndefined = d3Array.scan(typedArray); +numOrUndefined = d3Array.scan(readonlyNumbersArray); + +numOrUndefined = d3Array.scan(mixedObjectArray, (a, b) => { + const aElem: MixedObject = a; + const bElem: MixedObject = b; + return a.num - b.num; +}); + +numOrUndefined = d3Array.scan(readonlyMixedObjectArray, (a, b) => { + const aElem: MixedObject = a; + const bElem: MixedObject = b; + return a.num - b.num; +}); + +numOrUndefined = d3Array.scan(mixedObjectOrUndefinedArray, (a, b) => { + const aElem: MixedObject | undefined = a; + const bElem: MixedObject | undefined = b; + return a && b ? a.num - b.num : NaN; +}); + +numOrUndefined = d3Array.scan(readonlyMixedObjectOrUndefinedArray, (a, b) => { + const aElem: MixedObject | undefined = a; + const bElem: MixedObject | undefined = b; + return a && b ? a.num - b.num : NaN; +}); + +// bisectLeft() ---------------------------------------------------------------- + +num = d3Array.bisectLeft(numbersArray, 4); +num = d3Array.bisectLeft(numbersArray, 4, 1); +num = d3Array.bisectLeft(numbersArray, 4, 1, 4); + +num = d3Array.bisectLeft(stringyNumbersArray, '21'); +num = d3Array.bisectLeft(stringyNumbersArray, '21', 1); +num = d3Array.bisectLeft(stringyNumbersArray, '21', 1, 4); + +num = d3Array.bisectLeft(dateArray, new Date(2011, 2, 1)); +num = d3Array.bisectLeft(dateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisectLeft(dateArray, new Date(2011, 2, 1), 1, 2); + +num = d3Array.bisectLeft(typedArray, 4); +num = d3Array.bisectLeft(typedArray, 4, 1); +num = d3Array.bisectLeft(typedArray, 4, 1, 4); + +num = d3Array.bisectLeft(readonlyNumbersArray, 4); +num = d3Array.bisectLeft(readonlyNumbersArray, 4, 1); +num = d3Array.bisectLeft(readonlyNumbersArray, 4, 1, 4); + +num = d3Array.bisectLeft(readonlyStringyNumbersArray, '21'); +num = d3Array.bisectLeft(readonlyStringyNumbersArray, '21', 1); +num = d3Array.bisectLeft(readonlyStringyNumbersArray, '21', 1, 4); + +num = d3Array.bisectLeft(readonlyDateArray, new Date(2011, 2, 1)); +num = d3Array.bisectLeft(readonlyDateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisectLeft(readonlyDateArray, new Date(2011, 2, 1), 1, 2); + +// bisectRight() --------------------------------------------------------------- + +num = d3Array.bisectRight(numbersArray, 4); +num = d3Array.bisectRight(numbersArray, 4, 1); +num = d3Array.bisectRight(numbersArray, 4, 1, 4); + +num = d3Array.bisectRight(stringyNumbersArray, '21'); +num = d3Array.bisectRight(stringyNumbersArray, '21', 1); +num = d3Array.bisectRight(stringyNumbersArray, '21', 1, 4); + +num = d3Array.bisectRight(dateArray, new Date(2011, 2, 1)); +num = d3Array.bisectRight(dateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisectRight(dateArray, new Date(2011, 2, 1), 1, 2); + +num = d3Array.bisectRight(typedArray, 4); +num = d3Array.bisectRight(typedArray, 4, 1); +num = d3Array.bisectRight(typedArray, 4, 1, 4); + +num = d3Array.bisectRight(readonlyNumbersArray, 4); +num = d3Array.bisectRight(readonlyNumbersArray, 4, 1); +num = d3Array.bisectRight(readonlyNumbersArray, 4, 1, 4); + +num = d3Array.bisectRight(readonlyStringyNumbersArray, '21'); +num = d3Array.bisectRight(readonlyStringyNumbersArray, '21', 1); +num = d3Array.bisectRight(readonlyStringyNumbersArray, '21', 1, 4); + +num = d3Array.bisectRight(readonlyDateArray, new Date(2011, 2, 1)); +num = d3Array.bisectRight(readonlyDateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisectRight(readonlyDateArray, new Date(2011, 2, 1), 1, 2); + +// bisect() -------------------------------------------------------------------- + +num = d3Array.bisect(numbersArray, 4); +num = d3Array.bisect(numbersArray, 4, 1); +num = d3Array.bisect(numbersArray, 4, 1, 4); + +num = d3Array.bisect(stringyNumbersArray, '21'); +num = d3Array.bisect(stringyNumbersArray, '21', 1); +num = d3Array.bisect(stringyNumbersArray, '21', 1, 4); + +num = d3Array.bisect(dateArray, new Date(2011, 2, 1)); +num = d3Array.bisect(dateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisect(dateArray, new Date(2011, 2, 1), 1, 2); + +num = d3Array.bisect(typedArray, 4); +num = d3Array.bisect(typedArray, 4, 1); +num = d3Array.bisect(typedArray, 4, 1, 4); + +num = d3Array.bisect(readonlyNumbersArray, 4); +num = d3Array.bisect(readonlyNumbersArray, 4, 1); +num = d3Array.bisect(readonlyNumbersArray, 4, 1, 4); + +num = d3Array.bisect(readonlyStringyNumbersArray, '21'); +num = d3Array.bisect(readonlyStringyNumbersArray, '21', 1); +num = d3Array.bisect(readonlyStringyNumbersArray, '21', 1, 4); + +num = d3Array.bisect(readonlyDateArray, new Date(2011, 2, 1)); +num = d3Array.bisect(readonlyDateArray, new Date(2011, 2, 1), 1); +num = d3Array.bisect(readonlyDateArray, new Date(2011, 2, 1), 1, 2); + +// bisector() ------------------------------------------------------------------ + +mixedObjectArray.sort((a, b) => a.date.valueOf() - b.date.valueOf()); + +let mixedObjectDateBisectorObject: d3Array.Bisector; + +// define using accessor +mixedObjectDateBisectorObject = d3Array.bisector(el => el.date); + +// define using comparator +mixedObjectDateBisectorObject = d3Array.bisector((el, x) => + el.date.valueOf() - x.valueOf()); + +// bisect left +num = mixedObjectDateBisectorObject.left(mixedObjectArray, new Date(2015, 3, 14)); +num = mixedObjectDateBisectorObject.left(mixedObjectArray, new Date(2015, 3, 14), 1); +num = mixedObjectDateBisectorObject.left(mixedObjectArray, new Date(2015, 3, 14), 3, 4); + +num = mixedObjectDateBisectorObject.left(readonlyMixedObjectArray, new Date(2015, 3, 14)); +num = mixedObjectDateBisectorObject.left(readonlyMixedObjectArray, new Date(2015, 3, 14), 1); +num = mixedObjectDateBisectorObject.left(readonlyMixedObjectArray, new Date(2015, 3, 14), 3, 4); + +// bisect right +num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14)); +num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14), 1); +num = mixedObjectDateBisectorObject.right(mixedObjectArray, new Date(2015, 3, 14), 3, 4); + +num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14)); +num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14), 1); +num = mixedObjectDateBisectorObject.right(readonlyMixedObjectArray, new Date(2015, 3, 14), 3, 4); + +// ascending() ----------------------------------------------------------------- + +num = d3Array.ascending(undefined, 20); +num = d3Array.ascending(10, 20); +num = d3Array.ascending('10', '20'); +num = d3Array.ascending(new Date(2016, 6, 13), new Date(2016, 6, 14)); + +// descending() ---------------------------------------------------------------- + +num = d3Array.descending(undefined, 20); +num = d3Array.descending(10, 20); +num = d3Array.descending('10', '20'); +num = d3Array.descending(new Date(2016, 6, 13), new Date(2016, 6, 14)); + +// ----------------------------------------------------------------------------- +// Test Transforming Arrays +// ----------------------------------------------------------------------------- + +// merge() --------------------------------------------------------------------- + +const testArray1 = [ + new MixedObject(10, new Date(2016, 6, 1)), + new MixedObject(20, new Date(2016, 7, 30)), + new MixedObject(30, new Date(2015, 3, 15)), + new MixedObject(40, new Date(2014, 3, 15)), + new MixedObject(50, new Date(2017, 4, 15)) +]; + +const testArray2 = [ + new MixedObject(40, new Date(2016, 3, 1)), + new MixedObject(50, new Date(2016, 9, 30)), +]; + +let testArrays: MixedObject[][] = [testArray1, testArray2]; + +const readonlyTestArray1 = testArray1 as ReadonlyArray; +const readonlyTestArray2 = testArray2 as ReadonlyArray; +const readonlyTestArrays = [testArray1, testArray2] as ReadonlyArray>; + +let mergedArray: MixedObject[]; + +mergedArray = d3Array.merge(testArrays); // inferred type +mergedArray = d3Array.merge(testArrays); // explicit type +// $ExpectError +mergedArray = d3Array.merge([[10, 40, 30], [15, 30]]); // fails, type mismatch +// $ExpectError +mergedArray = d3Array.merge([testArray1, [15, 30]]); // fails, type mismatch + +mergedArray = d3Array.merge(readonlyTestArrays); // inferred type +mergedArray = d3Array.merge(readonlyTestArrays); // explicit type + +// cross() --------------------------------------------------------------------- + +let crossed: Array<[string, number]>; + +const chars = ['x', 'y']; +const nums = [1, 2]; + +crossed = d3Array.cross(chars, nums); +crossed = d3Array.cross(chars, nums); + +let strArray: string[] = d3Array.cross([2, 3], [5, 6], (a, b) => (a + b) + 'px'); +strArray = d3Array.cross([2, 3], [5, 6], (a, b) => { + const aa: number = a; + const bb: number = b; + return (aa + bb) + 'px'; +}); + +const readonlyChars = chars as ReadonlyArray; +const readonlyNums = new Uint8Array(nums); + +crossed = d3Array.cross(readonlyChars, readonlyNums); +crossed = d3Array.cross(readonlyChars, readonlyNums); + +strArray = d3Array.cross([2, 3] as ReadonlyArray, new Uint8ClampedArray([5, 6]), (a, b) => (a + b) + 'px'); +strArray = d3Array.cross([2, 3] as ReadonlyArray, new Uint8ClampedArray([5, 6]), (a, b) => { + const aa: number = a; + const bb: number = b; + return (aa + bb) + 'px'; +}); + +d3Array.cross(new Uint8Array([1, 2, 3, 4, 5]), new Uint8Array([10, 20, 30, 40, 50])); + +// pairs() --------------------------------------------------------------------- + +let pairs: Array<[MixedObject, MixedObject]>; + +pairs = d3Array.pairs(mergedArray); + +numbersArray = d3Array.pairs(mergedArray, (a, b) => b.num - a.num); +numbersArray = d3Array.pairs(mergedArray, (a, b) => { + const aa: MixedObject = a; + const bb: MixedObject = b; + return bb.num - aa.num; +}); + +const readonlyMergedArray = mergedArray as ReadonlyArray; +pairs = d3Array.pairs(readonlyMergedArray); + +numbersArray = d3Array.pairs(readonlyMergedArray, (a, b) => b.num - a.num); +numbersArray = d3Array.pairs(readonlyMergedArray, (a, b) => { + const aa: MixedObject = a; + const bb: MixedObject = b; + return bb.num - aa.num; +}); + +// permute() ------------------------------------------------------------------- + +// getting a permutation of array elements +mergedArray = d3Array.permute(mergedArray, [1, 0, 2, 5, 3, 4, 6]); +mergedArray = d3Array.permute(readonlyMergedArray, [1, 0, 2, 5, 3, 4, 6]); +mergedArray = d3Array.permute(readonlyMergedArray, nums); + +// Getting an ordered array with object properties + +const testObject = { + val: 10, + name: 'Test', + when: new Date(), + more: [10, 30, 40] +}; + +const p1: Array = d3Array.permute(testObject, ['name', 'val', 'when', 'more']); +const p2: Array = d3Array.permute(testObject, ['when', 'more']); +// $ExpectError +const p3 = d3Array.permute(testObject, ['when', 'unknown']); + +// range() --------------------------------------------------------------------- + +numbersArray = d3Array.range(10); +numbersArray = d3Array.range(1, 10); +numbersArray = d3Array.range(1, 10, 0.5); + +// shuffle() ------------------------------------------------------------------- + +mergedArray = d3Array.shuffle(mergedArray); +mergedArray = d3Array.shuffle(mergedArray, 1); +mergedArray = d3Array.shuffle(mergedArray, 1, 3); +// $ExpectError +mergedArray = d3Array.shuffle(readonlyMergedArray); // fails, shuffle mutates input array in-place + +// Test each TypedArray explicitly. Can't use ArrayLike in this case because shuffle is mutable and ArrayLike would include ReadonlyArray +const resultInt8: Int8Array = d3Array.shuffle(new Int8Array(numbersArray)); +const resultUint8: Uint8Array = d3Array.shuffle(new Uint8Array(numbersArray)); +const resultUint8Clamped: Uint8ClampedArray = d3Array.shuffle(new Uint8ClampedArray(numbersArray)); +const resultInt16: Int16Array = d3Array.shuffle(new Int16Array(numbersArray)); +const resultUint6: Uint16Array = d3Array.shuffle(new Uint16Array(numbersArray)); +const resultInt32: Int32Array = d3Array.shuffle(new Int32Array(numbersArray)); +const resultUint32: Uint32Array = d3Array.shuffle(new Uint32Array(numbersArray)); +const resultFloat32: Float32Array = d3Array.shuffle(new Float32Array(numbersArray)); +const resultFloat64: Float64Array = d3Array.shuffle(new Float64Array(numbersArray)); + +// ticks() --------------------------------------------------------------------- + +numbersArray = d3Array.ticks(1, 10, 5); + +// tickIncrement() ------------------------------------------------------------------ + +let numDiff: number = d3Array.tickIncrement(1, 10, 5); + +// tickStep() ------------------------------------------------------------------ + +numDiff = d3Array.tickStep(1, 10, 5); + +// transpose() ----------------------------------------------------------------- + +testArrays = d3Array.transpose([testArray1, testArray2]); +testArrays = d3Array.transpose([readonlyTestArray1, readonlyTestArray2] as ReadonlyArray>); + +// zip() ----------------------------------------------------------------------- + +testArrays = d3Array.zip(testArray1, testArray2); +testArrays = d3Array.zip(readonlyTestArray1, readonlyTestArray2); + +// ----------------------------------------------------------------------------- +// Test Histogram +// ----------------------------------------------------------------------------- + +const timeScale = scaleTime(); + +// Create histogram generator ================================================== + +// number - number +let histoNumber_Number: d3Array.HistogramGeneratorNumber; +histoNumber_Number = d3Array.histogram(); +histoNumber_Number = d3Array.histogram(); + +// MixedObject - number | undefined +let histoMixed_NumberOrUndefined: d3Array.HistogramGeneratorNumber; +histoMixed_NumberOrUndefined = d3Array.histogram(); + +// MixedObject | undefined - number | undefined +let histoMixedOrUndefined_NumberOrUndefined: d3Array.HistogramGeneratorNumber; +histoMixedOrUndefined_NumberOrUndefined = d3Array.histogram(); + +// MixedObject | undefined - number +let histoMixedOrUndefined_Number: d3Array.HistogramGeneratorNumber; +histoMixedOrUndefined_Number = d3Array.histogram(); + +// MixedObject - Date +let histoMixedObject_Date: d3Array.HistogramGeneratorDate; +histoMixedObject_Date = d3Array.histogram(); + +// MixedObject - Date | undefined +let histoMixedObject_DateOrUndefined: d3Array.HistogramGeneratorDate; +histoMixedObject_DateOrUndefined = d3Array.histogram(); + +let defaultHistogram: d3Array.HistogramGeneratorNumber; +defaultHistogram = d3Array.histogram(); + +// Configure histogram generator =============================================== + +// value(...) ------------------------------------------------------------------ + +let valueAccessorFn: (d: MixedObject, i: number, data: MixedObject[]) => Date; +valueAccessorFn = histoMixedObject_Date.value(); + +type valueAccessor = (d: D, i: number, data: D[]) => V; + +// number - number +const valueFnNumber_Number: valueAccessor = histoNumber_Number.value(); +histoNumber_Number = histoNumber_Number.value((d: number, i: number, data: ArrayLike) => { + return d - num; +}); + +// MixedObject - number | undefined +const valueFnMixedObject_NumberOrUndefined: valueAccessor = histoMixed_NumberOrUndefined.value(); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.value((d: MixedObject, i: number, data: ArrayLike) => { + return d.str === "NA" ? undefined : d.num; +}); + +// MixedObject | undefined - number | undefined +const valueFnMixedOrUndefined_NumberOrUndefined: valueAccessor = histoMixedOrUndefined_NumberOrUndefined.value(); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.value((d: MixedObject | undefined, i: number, data: ArrayLike) => { + return d ? d.num : undefined; +}); + +// MixedObject | undefined - number +const valueFnMixedOrUndefined_Number: valueAccessor = histoMixedOrUndefined_Number.value(); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.value((d: MixedObject | undefined, i: number, data: ArrayLike) => { + return d ? d.num : 0; +}); + +// MixedObject - Date +const valueFnMixedObject_Date: valueAccessor = histoMixedObject_Date.value(); +histoMixedObject_Date = histoMixedObject_Date.value((d: MixedObject, i: number, data: ArrayLike) => { + return d.date; +}); + +// MixedObject - Date | undefined +const valueFnMixedObject_DateOrUndefined: valueAccessor = histoMixedObject_DateOrUndefined.value(); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.value((d: MixedObject, i: number, data: ArrayLike) => { + return d.date; +}); + +// domain(...) ----------------------------------------------------------------- + +const domain = timeScale.domain(); +let domainFnNumber: (array: number[]) => [number, number] | [undefined, undefined]; +let domainFnNumberOrUndef: (array: Array) => [number, number] | [undefined, undefined]; +let domainFnDate: (values: Date[]) => [Date, Date]; + +// number - number +domainFnNumber = histoNumber_Number.domain(); +histoNumber_Number = histoNumber_Number.domain([0, 100]); +histoNumber_Number = histoNumber_Number.domain(d3Array.extent); + +// MixedObject - number | undefined +domainFnNumber = histoNumber_Number.domain(); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.domain([0, 100]); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.domain(d3Array.extent); + +// MixedObject | undefined - number | undefined +domainFnNumberOrUndef = histoMixedOrUndefined_NumberOrUndefined.domain(); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.domain([0, 100]); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.domain(d3Array.extent); + +// MixedObject | undefined - number +domainFnNumber = histoMixedOrUndefined_Number.domain(); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.domain([0, 100]); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.domain(d3Array.extent); + +// MixedObject - Date +domainFnDate = histoMixedObject_Date.domain(); +histoMixedObject_Date = histoMixedObject_Date.domain([new Date(2014, 3, 15), new Date(2017, 4, 15)]); +histoMixedObject_Date = histoMixedObject_Date.domain([domain[0], domain[domain.length]]); +histoMixedObject_Date = histoMixedObject_Date.domain((values) => [values[0], values[values.length]]); +// $ExpectError +histoMixedObject_Date = histoMixedObject_Date.domain(timeScale.domain()); // fails, as scale domain is an array with possibly more than the two elements expected by histogram + +// MixedObject - Date | undefined +domainFnDate = histoMixedObject_Date.domain(); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain([new Date(2014, 3, 15), new Date(2017, 4, 15)]); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain([domain[0], domain[domain.length]]); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.domain((values) => [values[0]!, values[values.length]!]); + +// thresholds(...) ------------------------------------------------------------- + +type thresholdsWithUndefinedCont = d3Array.ThresholdCountGenerator; +type thresholdsWithUndefinedArray = d3Array.ThresholdNumberArrayGenerator; + +let thresholds: d3Array.ThresholdCountGenerator | d3Array.ThresholdNumberArrayGenerator; +let thresholdsWithUndefined: thresholdsWithUndefinedCont | thresholdsWithUndefinedArray; +const thresholdsArray: d3Array.ThresholdNumberArrayGenerator = (x: ArrayLike) => [5, 10, 20]; + +let thresholdsDate: d3Array.ThresholdDateArrayGenerator; +let thresholdsDateOrUndefined: d3Array.ThresholdDateArrayGenerator; + +// number - number +thresholds = histoNumber_Number.thresholds(); +histoNumber_Number = histoNumber_Number.thresholds(3); +histoNumber_Number = histoNumber_Number.thresholds([5, 10, 20]); +histoNumber_Number = histoNumber_Number.thresholds(d3Array.thresholdScott); +histoNumber_Number = histoNumber_Number.thresholds(thresholdsArray); + +// MixedObject - number | undefined +thresholdsWithUndefined = histoMixed_NumberOrUndefined.thresholds(); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.thresholds(3); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.thresholds([5, 10, 20]); +histoMixed_NumberOrUndefined = histoMixed_NumberOrUndefined.thresholds(d3Array.thresholdScott); + +// MixedObject | undefined - number | undefined +thresholdsWithUndefined = histoMixedOrUndefined_NumberOrUndefined.thresholds(); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.thresholds(3); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.thresholds([5, 10, 20]); +histoMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined.thresholds(d3Array.thresholdScott); + +// MixedObject | undefined - number +thresholds = histoMixedOrUndefined_Number.thresholds(); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.thresholds(5); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.thresholds([5, 10, 20]); +histoMixedOrUndefined_Number = histoMixedOrUndefined_Number.thresholds(d3Array.thresholdSturges); + +// MixedObject - Date +thresholdsDate = histoMixedObject_Date.thresholds(); +histoMixedObject_Date = histoMixedObject_Date.thresholds([new Date(2015, 11, 15), new Date(2016, 6, 1), new Date(2016, 8, 30)]); +histoMixedObject_Date = histoMixedObject_Date.thresholds(timeScale.ticks(timeYear)); +histoMixedObject_Date = histoMixedObject_Date.thresholds((values: ArrayLike) => [new Date(2015, 11, 15), new Date(2016, 6, 1), new Date(2016, 8, 30)]); +histoMixedObject_Date = histoMixedObject_Date.thresholds((values: ArrayLike, min: Date, max: Date) => { + const thresholds: Date[] = [values[0], values[2], values[4]]; + return thresholds; +}); +// $ExpectError +histoMixedObject_Date = histoMixedObject_Date.thresholds(d3Array.thresholdScott); + +// MixedObject - Date | undefined +thresholdsDateOrUndefined = histoMixedObject_DateOrUndefined.thresholds(); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.thresholds([new Date(2015, 11, 15), new Date(2016, 6, 1), new Date(2016, 8, 30)]); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.thresholds(timeScale.ticks(timeYear)); +histoMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined.thresholds((values: ArrayLike, min: Date, max: Date) => { + const thresholds: Date[] = [values[0]!, new Date(2015, 11, 15), values[values.length]!]; + return thresholds; +}); + +// Use histogram generator ===================================================== + +undef = d3Array.histogram()([])[0].x0 as undefined; +undef = d3Array.histogram()([undefined])[0].x0 as undefined; + +// number - number +let binsNumber_Number: Array>; +binsNumber_Number = histoNumber_Number([-1, 0, 1, 1, 3, 20, 234]); + +let binNumber_Number: d3Array.Bin; +binNumber_Number = binsNumber_Number[0]; + +num = binNumber_Number.length; +num = binNumber_Number[0]; +numOrUndefined = binNumber_Number.x0; +numOrUndefined = binNumber_Number.x1; + +// MixedObject - number | undefined +let binsNumberMixed_NumberOrUndefined: Array>; +binsNumberMixed_NumberOrUndefined = histoMixed_NumberOrUndefined(mixedObjectArray); + +let binNumberMixed_NumberOrUndefined: d3Array.Bin; +binNumberMixed_NumberOrUndefined = binsNumberMixed_NumberOrUndefined[0]; + +num = binNumberMixed_NumberOrUndefined.length; +mixedObject = binNumberMixed_NumberOrUndefined[0]; +numOrUndefined = binNumberMixed_NumberOrUndefined.x0; +numOrUndefined = binNumberMixed_NumberOrUndefined.x1; + +// MixedObject | undefined - number | undefined +let binsNumberMixedOrUndefined_NumberOrUndefined: Array>; +binsNumberMixedOrUndefined_NumberOrUndefined = histoMixedOrUndefined_NumberOrUndefined(mixedObjectArray); + +let binNumberMixedOrUndefined_NumberOrUndefined: d3Array.Bin; +binNumberMixedOrUndefined_NumberOrUndefined = binsNumberMixedOrUndefined_NumberOrUndefined[0]; + +num = binNumberMixedOrUndefined_NumberOrUndefined.length; +mixedObjectOrUndefined = binNumberMixedOrUndefined_NumberOrUndefined[0]; +numOrUndefined = binNumberMixedOrUndefined_NumberOrUndefined.x0; +numOrUndefined = binNumberMixedOrUndefined_NumberOrUndefined.x1; + +// MixedObject | undefined - number +let binsNumberMixedOrUndefined_Number: Array>; +binsNumberMixedOrUndefined_Number = histoMixedOrUndefined_Number(mixedObjectArray); + +let binNumberMixedOrUndefined_Number: d3Array.Bin; +binNumberMixedOrUndefined_Number = binsNumberMixedOrUndefined_Number[0]; + +num = binNumberMixedOrUndefined_Number.length; +mixedObjectOrUndefined = binNumberMixedOrUndefined_Number[0]; +numOrUndefined = binNumberMixedOrUndefined_Number.x0; +numOrUndefined = binNumberMixedOrUndefined_Number.x1; + +// MixedObject - Date +let binsMixedObject_Date: Array>; +binsMixedObject_Date = histoMixedObject_Date(mixedObjectArray); +binsMixedObject_Date = histoMixedObject_Date(readonlyMixedObjectArray); + +let binMixedObject_Date: d3Array.Bin; +binMixedObject_Date = binsMixedObject_Date[0]; + +num = binMixedObject_Date.length; +mixedObject = binMixedObject_Date[0]; +dateOrUndefined = binMixedObject_Date.x0; +dateOrUndefined = binMixedObject_Date.x1; + +// MixedObject - Date | undefined +let binsMixedObject_DateOrUndefined: Array>; +binsMixedObject_DateOrUndefined = histoMixedObject_DateOrUndefined(mixedObjectArray); + +let binMixedObject_DateOrUndefined: d3Array.Bin; +binMixedObject_DateOrUndefined = binsMixedObject_DateOrUndefined[0]; + +num = binMixedObject_DateOrUndefined.length; +mixedObject = binMixedObject_DateOrUndefined[0]; +dateOrUndefined = binMixedObject_DateOrUndefined.x0; +dateOrUndefined = binMixedObject_DateOrUndefined.x1; + +// Histogram Thresholds ======================================================== + +numbersArray = [-1, 0, 1, 1, 3, 20, 234]; +typedArray = new Uint8Array(numbersArray); +readonlyNumbersArray = numbersArray as ReadonlyArray; + +num = d3Array.thresholdFreedmanDiaconis(numbersArray, -1, 234); +num = d3Array.thresholdFreedmanDiaconis(typedArray, -1, 234); +num = d3Array.thresholdFreedmanDiaconis(readonlyNumbersArray, -1, 234); + +num = d3Array.thresholdScott(numbersArray, -1, 234); +num = d3Array.thresholdScott(typedArray, -1, 234); +num = d3Array.thresholdScott(readonlyNumbersArray, -1, 234); + +num = d3Array.thresholdSturges(numbersArray); +num = d3Array.thresholdSturges(typedArray); +num = d3Array.thresholdSturges(readonlyNumbersArray); + +// Deprecated ================================================================== + +const histDeprecatedNumber: d3Array.HistogramGenerator = d3Array.histogram(); +const histDeprecatedDate: d3Array.HistogramGenerator = d3Array.histogram(); diff --git a/types/d3-array/v1/index.d.ts b/types/d3-array/v1/index.d.ts new file mode 100644 index 0000000000..7320e1c223 --- /dev/null +++ b/types/d3-array/v1/index.d.ts @@ -0,0 +1,547 @@ +// Type definitions for D3JS d3-array module 1.2 +// Project: https://github.com/d3/d3-array +// Definitions by: Alex Ford +// Boris Yankov +// Tom Wanzek +// denisname , +// Hugues Stefanski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// Last module patch version validated against: 1.2.1 + +// -------------------------------------------------------------------------- +// Shared Types and Interfaces +// -------------------------------------------------------------------------- + +/** + * Administrivia: JavaScript primitive types and Date + */ +export type Primitive = number | string | boolean | Date; + +/** + * Administrivia: anything with a valueOf(): number method is comparable, so we allow it in numeric operations + */ +export interface Numeric { + valueOf(): number; +} + +// -------------------------------------------------------------------------------------- +// Descriptive Statistics +// -------------------------------------------------------------------------------------- + +/** + * Return the maximum value in the array of strings using natural order. + */ +export function max(array: ArrayLike): string | undefined; + +/** + * Return the maximum value in the array of numbers using natural order. + */ +export function max(array: ArrayLike): T | undefined; + +/** + * Return the maximum value in the array using natural order and a projection function to map values to strings. + */ +export function max(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): string | undefined; + +/** + * Return the maximum value in the array using natural order and a projection function to map values to easily-sorted values. + */ +export function max(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): U | undefined; + +/** + * Return the minimum value in the array using natural order. + */ +export function min(array: ArrayLike): string | undefined; + +/** + * Return the minimum value in the array using natural order. + */ +export function min(array: ArrayLike): T | undefined; + +/** + * Return the minimum value in the array using natural order. + */ +export function min(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): string | undefined; + +/** + * Return the minimum value in the array using natural order. + */ +export function min(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): U | undefined; + +/** + * Return the min and max simultaneously. + */ +export function extent(array: ArrayLike): [string, string] | [undefined, undefined]; + +/** + * Return the min and max simultaneously. + */ +export function extent(array: ArrayLike): [T, T] | [undefined, undefined]; + +/** + * Return the min and max simultaneously. + */ +export function extent(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => string | undefined | null): [string, string] | [undefined, undefined]; + +/** + * Return the min and max simultaneously. + */ +export function extent(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => U | undefined | null): [U, U] | [undefined, undefined]; + +/** + * Return the mean of an array of numbers + */ +export function mean(array: ArrayLike): number | undefined; + +/** + * Return the mean of an array of numbers + */ +export function mean(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; + +/** + * Return the median of an array of numbers + */ +export function median(array: ArrayLike): number | undefined; + +/** + * Return the median of an array of numbers + */ +export function median(array: ArrayLike, accessor: (element: T, i: number, array: ArrayLike) => number | undefined | null): number | undefined; + +/** + * Returns the p-quantile of an array of numbers + */ +export function quantile(array: ArrayLike, p: number): number | undefined; + +export function quantile(array: ArrayLike, p: number, accessor: (element: T, i: number, array: ArrayLike) => number | undefined | null): number | undefined; + +/** + * Compute the sum of an array of numbers. + */ +export function sum(array: ArrayLike): number; + +/** + * Compute the sum of an array, using the given accessor to convert values to numbers. + */ +export function sum(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number; + +/** + * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array of numbers. + */ +export function deviation(array: ArrayLike): number | undefined; + +/** + * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array, + * using the given accessor to convert values to numbers. + */ +export function deviation(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; + +/** + * Compute an unbiased estimator of the population variance of the given array of numbers. + */ +export function variance(array: ArrayLike): number | undefined; + +/** + * Compute an unbiased estimator of the population variance of the given array, + * using the given accessor to convert values to numbers. + */ +export function variance(array: ArrayLike, accessor: (datum: T, index: number, array: ArrayLike) => number | undefined | null): number | undefined; + +// -------------------------------------------------------------------------------------- +// Searching Arrays +// -------------------------------------------------------------------------------------- + +export function scan(array: ArrayLike, comparator?: (a: number, b: number) => number): number | undefined; +export function scan(array: ArrayLike, comparator: (a: T, b: T) => number): number | undefined; + +export function bisectLeft(array: ArrayLike, x: number, lo?: number, hi?: number): number; +export function bisectLeft(array: ArrayLike, x: string, lo?: number, hi?: number): number; +export function bisectLeft(array: ArrayLike, x: Date, lo?: number, hi?: number): number; + +export function bisectRight(array: ArrayLike, x: number, lo?: number, hi?: number): number; +export function bisectRight(array: ArrayLike, x: string, lo?: number, hi?: number): number; +export function bisectRight(array: ArrayLike, x: Date, lo?: number, hi?: number): number; + +export const bisect: typeof bisectRight; + +export interface Bisector { + left(array: ArrayLike, x: U, lo?: number, hi?: number): number; + right(array: ArrayLike, x: U, lo?: number, hi?: number): number; +} + +export function bisector(comparator: (a: T, b: U) => number): Bisector; +export function bisector(accessor: (x: T) => U): Bisector; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + */ +export function quickselect(array: ArrayLike, k: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + */ +export function quickselect(array: ArrayLike, k: number, left: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + * @param right The right index. + */ +export function quickselect(array: ArrayLike, k: number, left: number, right: number): T[]; + +/** + * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. + * + * @param array The array to partially sort (in place). + * @param k The middle index for partial sorting. + * @param left The left index of the range to sort. + * @param right The right index. + * @param compare The compare function. + */ +export function quickselect(array: ArrayLike, k: number, left: number, right: number, compare: (a: Primitive | undefined, b: Primitive | undefined) => number): T[]; + +// NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. +/** + * Compares two primitive values for sorting (in ascending order). + */ +export function ascending(a: Primitive | undefined, b: Primitive | undefined): number; + +// NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. +/** + * Compares two primitive values for sorting (in ascending order). + */ +export function descending(a: Primitive | undefined, b: Primitive | undefined): number; + +// -------------------------------------------------------------------------------------- +// Transforming Arrays +// -------------------------------------------------------------------------------------- + +/** + * Groups the specified array of values into a Map from key to array of value. + * @param a The array to group. + * @param key The key function. + */ +export function group(a: ArrayLike, key: (value: TObject) => TKey): Map; + +/** + * Groups and reduces the specified array of values into a Map from key to value. + * + * @param a The array to group. + * @param reduce The reduce function. + * @param key The key function. + */ +export function rollup(a: ArrayLike, reduce: (value: TObject[]) => TReduce, key: (value: TObject) => TKey): Map; + +/** + * Returns the Cartesian product of the two arrays a and b. + * For each element i in the specified array a and each element j in the specified array b, in order, + * it creates a two-element array for each pair. + * + * @param a First input array. + * @param b Second input array. + */ +export function cross(a: ArrayLike, b: ArrayLike): Array<[S, T]>; + +/** + * Returns the Cartesian product of the two arrays a and b. + * For each element i in the specified array a and each element j in the specified array b, in order, + * invokes the specified reducer function passing the element i and element j. + * + * @param a First input array. + * @param b Second input array. + * @param reducer A reducer function taking as input an element from "a" and "b" and returning a reduced value. + */ +export function cross(a: ArrayLike, b: ArrayLike, reducer: (a: S, b: T) => U): U[]; + +/** + * Merges the specified arrays into a single array. + */ +export function merge(arrays: ArrayLike>): T[]; + +/** + * For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1. + * Returns the empty array if the input array has fewer than two elements. + * + * @param array Array of input elements + */ +export function pairs(array: ArrayLike): Array<[T, T]>; +/** + * For each adjacent pair of elements in the specified array, in order, invokes the specified reducer function passing the element i and element i - 1. + * Returns the resulting array of pair-wise reduced elements. + * Returns the empty array if the input array has fewer than two elements. + * + * @param array Array of input elements + * @param reducer A reducer function taking as input to adjacent elements of the input array and returning a reduced value. + */ +export function pairs(array: ArrayLike, reducer: (a: T, b: T) => U): U[]; + +/** + * Returns a permutation of the specified array using the specified array of indexes. + * The returned array contains the corresponding element in array for each index in indexes, in order. + * For example, `permute(["a", "b", "c"], [1, 2, 0]) // ["b", "c", "a"]` + */ +export function permute(array: { [key: number]: T }, keys: ArrayLike): T[]; + +/** + * Extract the values from an object into an array with a stable order. For example: + * `var object = {yield: 27, year: 1931, site: "University Farm"};` + * `d3.permute(object, ["site", "yield"]); // ["University Farm", 27]` + */ +export function permute(object: T, keys: ArrayLike): Array; + +/** + * Generates a 0-based numeric sequence. The output range does not include 'stop'. + */ +export function range(stop: number): number[]; + +/** + * Generates a numeric sequence starting from the given start and stop values. 'step' defaults to 1. The output range does not include 'stop'. + */ +export function range(start: number, stop: number, step?: number): number[]; + +/** + * Randomizes the order of the specified array using the Fisher–Yates shuffle. + */ +export function shuffle(array: T[], lo?: number, hi?: number): T[]; +export function shuffle(array: Int8Array, lo?: number, hi?: number): Int8Array; +export function shuffle(array: Uint8Array, lo?: number, hi?: number): Uint8Array; +export function shuffle(array: Uint8ClampedArray, lo?: number, hi?: number): Uint8ClampedArray; +export function shuffle(array: Int16Array, lo?: number, hi?: number): Int16Array; +export function shuffle(array: Uint16Array, lo?: number, hi?: number): Uint16Array; +export function shuffle(array: Int32Array, lo?: number, hi?: number): Int32Array; +export function shuffle(array: Uint32Array, lo?: number, hi?: number): Uint32Array; +export function shuffle(array: Float32Array, lo?: number, hi?: number): Float32Array; +export function shuffle(array: Float64Array, lo?: number, hi?: number): Float64Array; + +/** + * Generate an array of approximately count + 1 uniformly-spaced, nicely-rounded values between start and stop (inclusive). + * Each value is a power of ten multiplied by 1, 2 or 5. See also d3.tickIncrement, d3.tickStep and linear.ticks. + * + * Ticks are inclusive in the sense that they may include the specified start and stop values if (and only if) they are exact, + * nicely-rounded values consistent with the inferred step. More formally, each returned tick t satisfies start ≀ t and t ≀ stop. + * + * @param start Start value for ticks + * @param stop Stop value for ticks + * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. + */ +export function ticks(start: number, stop: number, count: number): number[]; + +/** + * Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks: + * a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5. + * + * Like d3.tickStep, except requires that start is always less than or equal to step, and if the tick step for the given start, + * stop and count would be less than one, returns the negative inverse tick step instead. + * + * This method is always guaranteed to return an integer, and is used by d3.ticks to avoid guarantee that the returned tick values + * are represented as precisely as possible in IEEE 754 floating point. + * + * @param start Start value for ticks + * @param stop Stop value for ticks + * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. + */ +export function tickIncrement(start: number, stop: number, count: number): number; + +/** + * Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks: + * a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5. + * + * Note that due to the limited precision of IEEE 754 floating point, the returned value may not be exact decimals; + * use d3-format to format numbers for human consumption. + * + * @param start Start value for ticks + * @param stop Stop value for ticks + * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. + */ +export function tickStep(start: number, stop: number, count: number): number; + +/** + * Transpose a matrix provided in Array of Arrays format. + */ +export function transpose(matrix: ArrayLike>): T[][]; + +/** + * Returns an array of arrays, where the ith array contains the ith element from each of the argument arrays. + * The returned array is truncated in length to the shortest array in arrays. If arrays contains only a single array, the returned array + * contains one-element arrays. With no arguments, the returned array is empty. + */ +export function zip(...arrays: Array>): T[][]; + +// -------------------------------------------------------------------------------------- +// Histogram +// -------------------------------------------------------------------------------------- + +export interface Bin extends Array { + x0: Value | undefined; + x1: Value | undefined; +} + +/** + * Type definition for threshold generator which returns the count of recommended thresholds + */ +export type ThresholdCountGenerator = + (values: ArrayLike, min: number, max: number) => number; + +/** + * Type definition for threshold generator which returns an array of recommended numbers thresholds + */ +export type ThresholdNumberArrayGenerator = + (values: ArrayLike, min: number, max: number) => Value[]; + +/** + * Type definition for threshold generator which returns an array of recommended dates thresholds + */ +export type ThresholdDateArrayGenerator = + (values: ArrayLike, min: Date, max: Date) => Value[]; + +/** + * @deprecated Use ThresholdNumberArrayGenerator or ThresholdDateArrayGenerator. + */ +export type ThresholdArrayGenerator = ThresholdNumberArrayGenerator; + +/** + * @deprecated Use `HistogramGeneratorNumber` for `number` values and `HistogramGeneratorDate for `Date` values. + */ +export interface HistogramGenerator { + (data: ArrayLike): Array>; + + value(): (d: Datum, i: number, data: ArrayLike) => Value; + value(valueAccessor: (d: Datum, i: number, data: ArrayLike) => Value): this; + + domain(): (values: ArrayLike) => [Value, Value] | [undefined, undefined]; + domain(domain: [Value, Value]): this; + domain(domainAccessor: (values: ArrayLike) => [Value, Value] | [undefined, undefined]): this; + + /** + * Set the array of values to be used as thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds Array of threshold values used for binning. The elements must + * be of the same type as the materialized values of the histogram. + */ + thresholds(thresholds: ArrayLike): this; +} + +export interface HistogramCommon { + (data: ArrayLike): Array>; + + value(): (d: Datum, i: number, data: ArrayLike) => Value; + value(valueAccessor: (d: Datum, i: number, data: ArrayLike) => Value): this; +} + +export interface HistogramGeneratorDate extends HistogramCommon { + domain(): (values: ArrayLike) => [Date, Date]; + domain(domain: [Date, Date]): this; + domain(domainAccessor: (values: ArrayLike) => [Date, Date]): this; + + thresholds(): ThresholdDateArrayGenerator; + /** + * Set the array of values to be used as thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds Array of threshold values used for binning. The elements must + * be of the same type as the materialized values of the histogram. + */ + thresholds(thresholds: ArrayLike): this; + /** + * Set a threshold accessor function, which returns the array of values to be used as + * thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds A function which accepts as arguments the array of materialized values, and + * optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as + * thresholds in determining the bins. + */ + thresholds(thresholds: ThresholdDateArrayGenerator): this; +} + +export interface HistogramGeneratorNumber extends HistogramCommon { + domain(): (values: ArrayLike) => [number, number] | [undefined, undefined]; + domain(domain: [number, number]): this; + domain(domainAccessor: (values: ArrayLike) => [number, number] | [undefined, undefined]): this; + + thresholds(): ThresholdCountGenerator | ThresholdNumberArrayGenerator; + /** + * Divide the domain uniformly into approximately count bins. IMPORTANT: This threshold + * setting approach only works, when the materialized values are numbers! + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param count The desired number of uniform bins. + */ + thresholds(count: number): this; + /** + * Set a threshold accessor function, which returns the desired number of bins. + * Divides the domain uniformly into approximately count bins. IMPORTANT: This threshold + * setting approach only works, when the materialized values are numbers! + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param count A function which accepts as arguments the array of materialized values, and + * optionally the domain minimum and maximum. The function calculates and returns the suggested + * number of bins. + */ + thresholds(count: ThresholdCountGenerator): this; + /** + * Set the array of values to be used as thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds Array of threshold values used for binning. The elements must + * be of the same type as the materialized values of the histogram. + */ + thresholds(thresholds: ArrayLike): this; + /** + * Set a threshold accessor function, which returns the array of values to be used as + * thresholds in determining the bins. + * + * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, + * and the last bin.x1 is always equal to the maximum domain value. + * + * @param thresholds A function which accepts as arguments the array of materialized values, and + * optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as + * thresholds in determining the bins. + */ + thresholds(thresholds: ThresholdNumberArrayGenerator): this; +} + +export function histogram(): HistogramGeneratorNumber; +export function histogram(): HistogramGeneratorNumber; +export function histogram(): HistogramGeneratorDate; + +/** + * @deprecated Do not use Value generic which mixes number and Date types. Use either number or Date + * (in combination with undefined, as applicable) to obtain a type-specific histogram generator. + */ +export function histogram(): HistogramGenerator; + +// -------------------------------------------------------------------------------------- +// Histogram Thresholds +// -------------------------------------------------------------------------------------- + +export function thresholdFreedmanDiaconis(values: ArrayLike, min: number, max: number): number; // of type ThresholdCountGenerator + +export function thresholdScott(values: ArrayLike, min: number, max: number): number; // of type ThresholdCountGenerator + +export function thresholdSturges(values: ArrayLike): number; // of type ThresholdCountGenerator diff --git a/types/p-wait-for/v1/tsconfig.json b/types/d3-array/v1/tsconfig.json similarity index 77% rename from types/p-wait-for/v1/tsconfig.json rename to types/d3-array/v1/tsconfig.json index 2d81275cae..3edd84862c 100644 --- a/types/p-wait-for/v1/tsconfig.json +++ b/types/d3-array/v1/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, @@ -12,15 +13,17 @@ "typeRoots": [ "../../" ], - "paths": { - "p-wait-for": [ "p-wait-for/v1" ] - }, "types": [], + "paths": { + "d3-array": [ + "d3-array/v1" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "p-wait-for-tests.ts" + "d3-array-tests.ts" ] -} +} \ No newline at end of file diff --git a/types/p-defer/tslint.json b/types/d3-array/v1/tslint.json similarity index 72% rename from types/p-defer/tslint.json rename to types/d3-array/v1/tslint.json index 71ee04c4e1..54efb0b84e 100644 --- a/types/p-defer/tslint.json +++ b/types/d3-array/v1/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { + "unified-signatures": false, "no-unnecessary-generics": false } } diff --git a/types/d3/tsconfig.json b/types/d3/tsconfig.json index bc3e8cf886..9a4848b338 100644 --- a/types/d3/tsconfig.json +++ b/types/d3/tsconfig.json @@ -13,6 +13,11 @@ "typeRoots": [ "../" ], + "paths": { + "d3-array": [ + "d3-array/v1" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/d3/v4/tsconfig.json b/types/d3/v4/tsconfig.json index bf267af99d..6b2cee09dd 100644 --- a/types/d3/v4/tsconfig.json +++ b/types/d3/v4/tsconfig.json @@ -19,6 +19,9 @@ ], "d3": [ "d3/v4" + ], + "d3-array": [ + "d3-array/v1" ] }, "types": [], diff --git a/types/d3kit/tsconfig.json b/types/d3kit/tsconfig.json index 40e266f6f9..79051ab233 100644 --- a/types/d3kit/tsconfig.json +++ b/types/d3kit/tsconfig.json @@ -13,6 +13,11 @@ "typeRoots": [ "../" ], + "paths": { + "d3-array": [ + "d3-array/v1" + ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/debug/index.d.ts b/types/debug/index.d.ts index f4f5866af8..261603e5c6 100644 --- a/types/debug/index.d.ts +++ b/types/debug/index.d.ts @@ -42,6 +42,7 @@ declare namespace debug { enabled: boolean; log: (...args: any[]) => any; namespace: string; + destroy: () => boolean; extend: (namespace: string, delimiter?: string) => Debugger; } } diff --git a/types/dialogflow/index.d.ts b/types/dialogflow/index.d.ts index 29d4a0ae4f..f45809f4cd 100644 --- a/types/dialogflow/index.d.ts +++ b/types/dialogflow/index.d.ts @@ -891,27 +891,166 @@ export interface FollowupIntentInfo { parentFollowupIntentName: string; } -export interface Message { - platform?: string; - text?: Text; - card?: Card; - payload?: any; +export enum Platform { + PLATFORM_UNSPECIFIED, + FACEBOOK, + SLACK, + TELEGRAM, + KIK, + SKYPE, + LINE, + VIBER, + ACTIONS_ON_GOOGLE } +export interface MessageBase { + platform?: Platform; + message: string; +} + +export interface TextMessage extends MessageBase { + text: Text; + message: "text"; +} + +export interface ImageMessage extends MessageBase { + image: Image; + message: "image"; +} + +export interface QuickRepliesMessage extends MessageBase { + quickReplies: QuickReplies; + message: "quickReplies"; +} + +export interface CardMessage extends MessageBase { + card: Card; + message: "card"; +} + +export interface PayloadMessage extends MessageBase { + payload: any; + message: "payload"; +} + +export interface SimpleResponsesMessage extends MessageBase { + simpleResponses: SimpleResponses; + message: "simpleResponses"; +} + +export interface BasicCardMessage extends MessageBase { + basicCard: BasicCard; + message: "basicCard"; +} + +export interface SuggestionsMessage extends MessageBase { + suggestions: Suggestions; + message: "suggestions"; +} + +export interface LinkOutSuggestionMessage extends MessageBase { + linkOutSuggestion: LinkOutSuggestion; + message: "linkOutSuggestion"; +} + +export interface ListSelectMessage extends MessageBase { + listSelect: ListSelect; + message: "listSelect"; +} + +export interface CarouselSelectMessage extends MessageBase { + carouselSelect: CarouselSelect; + message: "carouselSelect"; +} + +export type Message = + | TextMessage + | ImageMessage + | QuickRepliesMessage + | CardMessage + | PayloadMessage + | SimpleResponsesMessage + | BasicCardMessage + | SuggestionsMessage + | LinkOutSuggestionMessage + | ListSelectMessage + | CarouselSelectMessage; + export interface Text { text: string[]; } +export interface Image { + imageUri?: string; + accessibilityText?: string; +} + +export interface QuickReplies { + title?: string; + quickReplies?: string[]; +} + export interface Card { title?: string; subtitle?: string; imageUri?: string; - buttons?: Button[]; + buttons?: Array<{ + text?: string; + postback?: string; + }>; } -export interface Button { - text?: string; - postback?: string; +export interface SimpleResponses { + simpleResponses: SimpleResponse[]; +} + +export interface SimpleResponse { + textToSpeech?: string; + ssml?: string; + displayText?: string; +} + +export interface BasicCard { + title?: string; + subtitle?: string; + formattedText?: string; + image?: Image; + buttons?: Array<{ + title: string; + openUriAction: { + uri: string; + }; + }>; +} + +export interface Suggestions { + suggestions: Array<{ + title: string; + }>; +} + +export interface LinkOutSuggestion { + destinationName: string; + uri: string; +} + +export interface ListSelect { + title?: string; + items: Item[]; +} + +export interface CarouselSelect { + items: Item[]; +} + +export interface Item { + info: { + key: string; + synonyms?: string[]; + }; + title: string; + description?: string; + image?: Image; } export interface EventInput { @@ -958,7 +1097,6 @@ export interface Entity { export interface WebhookRequest { session: string; responseId: string; - queryResult: QueryResult; originalDetectIntentRequest?: any; } diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 0581057dea..34bc22750b 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -449,7 +449,7 @@ declare namespace Dockerode { Image: string; Volumes: { [volume: string]: {} }; WorkingDir: string; - Entrypoint?: any; + Entrypoint?: string | string[]; OnBuild?: any; Labels: { [label: string]: string } }; @@ -667,7 +667,7 @@ declare namespace Dockerode { Image: string; Volumes: { [path: string]: {} }, WorkingDir: string; - Entrypoint?: any; + Entrypoint?: string | string[]; OnBuild?: any[]; Labels: { [label: string]: string } }; @@ -691,7 +691,7 @@ declare namespace Dockerode { Image: string; Volumes: { [path: string]: {} }, WorkingDir: string; - Entrypoint?: any; + Entrypoint?: string | string[]; OnBuild: any[]; Labels: { [label: string]: string } }; @@ -827,7 +827,7 @@ declare namespace Dockerode { StdinOnce?: boolean; Env?: string[]; Cmd?: string[]; - Entrypoint?: string; + Entrypoint?: string | string[]; Image?: string; Labels?: { [label: string]: string }; Volumes?: { [volume: string]: {} }; diff --git a/types/doubleclick-gpt/doubleclick-gpt-tests.ts b/types/doubleclick-gpt/doubleclick-gpt-tests.ts index 4d29a46d91..ce1ff453f1 100644 --- a/types/doubleclick-gpt/doubleclick-gpt-tests.ts +++ b/types/doubleclick-gpt/doubleclick-gpt-tests.ts @@ -262,9 +262,11 @@ googletag.pubads().updateCorrelator(); // The listener will be called only when the pubads service renders a slot. // To listen to companion ads, add a similar listener to // googletag.companionAds(). -googletag.pubads().addEventListener("slotRenderEnded", (event: googletag.events.SlotRenderEndedEvent) => { +googletag.pubads().addEventListener("slotRenderEnded", (event) => { console.log("Slot has been rendered:"); - console.log(event); + console.log(event.isEmpty); + console.log(event.lineItemId); + console.log(event.creativeId); }); // 2. Slot render ended listener, slot specific logic. @@ -273,7 +275,7 @@ googletag.pubads().addEventListener("slotRenderEnded", (event: googletag.events. // however, programmatically filter a listener to respond only to a certain // ad slot, using this pattern: let targetSlot = slot1; -googletag.pubads().addEventListener("slotRenderEnded", (event: googletag.events.SlotRenderEndedEvent) => { +googletag.pubads().addEventListener("slotRenderEnded", (event) => { if (event.slot === targetSlot) { // Slot specific logic. } @@ -283,12 +285,18 @@ googletag.pubads().addEventListener("slotRenderEnded", (event: googletag.events. // The listener will be called when the impression is considered viewable. // This event also operates at service level, but, as above, you can filter // to respond only to a certain ad slot by using this pattern: -googletag.pubads().addEventListener("impressionViewable", (event: googletag.events.ImpressionViewableEvent) => { +googletag.pubads().addEventListener("impressionViewable", (event) => { if (event.slot === targetSlot) { // Slot specific logic. } }); +googletag.pubads().addEventListener("slotVisibilityChanged", (event) => { + if (event.slot === targetSlot) { + console.log(event.inViewPercentage); + } +}); + let mapping1 = googletag.sizeMapping(). addSize([1024, 768], [970, 250]). addSize([980, 690], [728, 90]). diff --git a/types/doubleclick-gpt/index.d.ts b/types/doubleclick-gpt/index.d.ts index 5e693c8f9a..006d8fffc6 100644 --- a/types/doubleclick-gpt/index.d.ts +++ b/types/doubleclick-gpt/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/doubleclick-gpt/reference // Definitions by: John Wright // Steven Joyce +// Joe Flateau // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -25,10 +26,18 @@ declare namespace googletag { } interface Service { + addEventListener( + eventType: "slotRenderEnded", + listener: (event: events.SlotRenderEndedEvent) => void + ): Service; + addEventListener( + eventType: "slotVisibilityChanged", + listener: (event: events.SlotVisibilityChangedEvent) => void + ): Service; addEventListener( eventType: string, - listener: (event: events.ImpressionViewableEvent | events.SlotOnloadEvent | events.SlotRenderEndedEvent | events.slotVisibilityChangedEvent) => void - ): void; + listener: (event: events.Event) => void + ): Service; getSlots(): Slot[]; } @@ -155,32 +164,29 @@ declare namespace googletag { } namespace events { - interface ImpressionViewableEvent { + interface Event { serviceName: string; slot: Slot; } - interface SlotOnloadEvent { - serviceName: string; - slot: Slot; - } + // tslint:disable-next-line:no-empty-interface + interface ImpressionViewableEvent extends Event {} - interface SlotRenderEndedEvent { + // tslint:disable-next-line:no-empty-interface + interface SlotOnloadEvent extends Event {} + + interface SlotRenderEndedEvent extends Event { advertiserId?: number; creativeId?: number; isEmpty: boolean; lineItemId?: number; - serviceName: string; size: number[] | string; - slot: Slot; sourceAgnosticCreativeId?: number; sourceAgnosticLineItemId?: number; } - interface slotVisibilityChangedEvent { + interface SlotVisibilityChangedEvent extends Event { inViewPercentage: number; - serviceName: string; - slot: Slot; } } } diff --git a/types/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts index 778e160f66..7e857ed7c6 100644 --- a/types/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for non-npm package ej.web.all 16.4 +// Type definitions for non-npm package ej.web.all 17.1 // Project: http://help.syncfusion.com/js/typescript // Definitions by: Syncfusion // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -8,7 +8,7 @@ /*! * filename: ej.web.all.d.ts -* version : 16.4.0.52 +* version : 17.1.0.38 * Copyright Syncfusion Inc. 2001 - 2019. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing @@ -2014,6 +2014,11 @@ declare namespace ej { */ itemsCount?: number; + /** To enable or disable the diacritic characters of the Autocomplete suggestion list when filtering. + * @Default {false} + */ + ignoreAccent?: boolean; + /** Set the localization culture for Autocomplete Widget. */ locale?: string; @@ -4655,13 +4660,9 @@ declare namespace ej { export interface ChangeEventArgs { - /** if the event should be canceled; otherwise, false. + /** return the previous color value */ - cancel?: boolean; - - /** returns the color picker model - */ - model?: ej.ColorPicker.Model; + changeFrom?: string; /** returns the name of the event */ @@ -4674,10 +4675,6 @@ declare namespace ej { export interface CloseEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the color picker model */ model?: ej.ColorPicker.Model; @@ -4689,10 +4686,6 @@ declare namespace ej { export interface CreateEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the color picker model */ model?: any; @@ -4719,10 +4712,6 @@ declare namespace ej { export interface OpenEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the color picker model */ model?: ej.ColorPicker.Model; @@ -4734,10 +4723,6 @@ declare namespace ej { export interface SelectEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the color picker model */ model?: ej.ColorPicker.Model; @@ -6606,10 +6591,6 @@ declare namespace ej { export interface BeforeDateCreateEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the DatePicker model. */ model?: ej.DatePicker.Model; @@ -6656,10 +6637,6 @@ declare namespace ej { export interface ChangeEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the DatePicker model. */ model?: ej.DatePicker.Model; @@ -6679,10 +6656,6 @@ declare namespace ej { export interface CloseEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the current date object. */ date?: any; @@ -6706,10 +6679,6 @@ declare namespace ej { export interface CreateEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the DatePicker model. */ model?: ej.DatePicker.Model; @@ -6736,10 +6705,6 @@ declare namespace ej { export interface FocusInEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the DatePicker model. */ model?: ej.DatePicker.Model; @@ -6755,10 +6720,6 @@ declare namespace ej { export interface FocusOutEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the DatePicker model. */ model?: ej.DatePicker.Model; @@ -6778,10 +6739,6 @@ declare namespace ej { export interface NavigateEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the current date object. */ date?: any; @@ -6809,10 +6766,6 @@ declare namespace ej { export interface OpenEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the current date object. */ date?: any; @@ -6836,10 +6789,6 @@ declare namespace ej { export interface SelectEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the selected date object. */ date?: any; @@ -7219,10 +7168,6 @@ declare namespace ej { export interface ChangeEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.DateTimePicker.Model; @@ -7250,10 +7195,6 @@ declare namespace ej { export interface CloseEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.DateTimePicker.Model; @@ -7273,10 +7214,6 @@ declare namespace ej { export interface CreateEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the DateTimePicker model */ model?: ej.DateTimePicker.Model; @@ -7303,10 +7240,6 @@ declare namespace ej { export interface FocusInEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.DateTimePicker.Model; @@ -7322,10 +7255,6 @@ declare namespace ej { export interface FocusOutEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.DateTimePicker.Model; @@ -7341,10 +7270,6 @@ declare namespace ej { export interface OpenEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.DateTimePicker.Model; @@ -7645,10 +7570,6 @@ declare namespace ej { export interface ChangeEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the DateRangePicker model. */ model?: ej.DateRangePicker.Model; @@ -7672,10 +7593,6 @@ declare namespace ej { export interface CloseEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the current date object. */ date?: any; @@ -7695,10 +7612,6 @@ declare namespace ej { export interface CreateEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the DateRangePicker model. */ model?: ej.DateRangePicker.Model; @@ -7725,10 +7638,6 @@ declare namespace ej { export interface OpenEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the current date object. */ date?: any; @@ -7748,10 +7657,6 @@ declare namespace ej { export interface SelectEventArgs { - /** Set to true when the event has to be canceled, else false. - */ - cancel?: boolean; - /** returns the selected date object. */ startDate?: any; @@ -19681,6 +19586,16 @@ declare namespace ej { */ timeFormat?: string; + /** Set the jQuery validation error message in TimePicker. + * @Default {null} + */ + validationMessages?: any; + + /** Set the jQuery validation rules in TimePicker. + * @Default {null} + */ + validationRules?: any; + /** Sets a specified time value on the TimePicker. * @Default {null} */ @@ -19738,10 +19653,6 @@ declare namespace ej { export interface BeforeChangeEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.TimePicker.Model; @@ -19784,10 +19695,6 @@ declare namespace ej { export interface ChangeEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.TimePicker.Model; @@ -19811,10 +19718,6 @@ declare namespace ej { export interface CloseEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.TimePicker.Model; @@ -19834,10 +19737,6 @@ declare namespace ej { export interface CreateEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.TimePicker.Model; @@ -19864,10 +19763,6 @@ declare namespace ej { export interface FocusInEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.TimePicker.Model; @@ -19887,10 +19782,6 @@ declare namespace ej { export interface FocusOutEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.TimePicker.Model; @@ -19910,10 +19801,6 @@ declare namespace ej { export interface OpenEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.TimePicker.Model; @@ -19929,10 +19816,6 @@ declare namespace ej { export interface SelectEventArgs { - /** if the event should be canceled; otherwise, false. - */ - cancel?: boolean; - /** returns the TimePicker model */ model?: ej.TimePicker.Model; @@ -36736,11 +36619,11 @@ declare namespace ej { /** Returns the taskbar background of current item. */ - TaskbarBackground?: string; + taskbarBackground?: string; /** Returns the progressbar background of current item. */ - ProgressbarBackground?: string; + progressbarBackground?: string; /** Returns the parent taskbar background of current item. */ @@ -36750,6 +36633,34 @@ declare namespace ej { */ parentProgressbarBackground?: string; + /** Returns the taskbar text color of current item. + */ + taskbarTextColor?: string; + + /** Returns the taskbar border color of current item. + */ + taskbarBorder?: string; + + /** Returns the parent taskbar border color of current item. + */ + parentTaskbarBorder?: string; + + /** Returns the progressbar border color of current item. + */ + progressbarBorder?: string; + + /** Returns the parent progressbar border color of current item. + */ + parentProgressbarBorder?: string; + + /** Returns the milestone background of current item. + */ + milestoneBackground?: string; + + /** Returns the baseline background of current item. + */ + baselineBackground?: string; + /** Returns the data of the record. */ data?: any; @@ -42166,7 +42077,7 @@ declare namespace ej { */ save(Filename: string): void; - /** Used to Show the signature widget, if it is already hided. + /** Used to Show the signature widget, if it is already hidden. * @returns {void} */ show(): void; @@ -43898,9 +43809,10 @@ declare namespace ej { * @param {string} Pass the cell reference. * @param {string} Optional. Pass comment, if you want. * @param {number} Optional. Pass the sheet index. + * @param {string} Optional. Pass the scope of the name manager. * @returns {void} */ - addNamedRange(name: string, refersTo: string, comment: string, sheetIdx: number): void; + addNamedRange(name: string, refersTo: string, comment: string, sheetIdx: number, scope: string): void; /** This method is used to dynamically add the tab in the ribbon. * @param {string} Specifies the text to be displayed in the tab. @@ -43944,9 +43856,10 @@ declare namespace ej { /** This method is used to delete the defined name in the Spreadsheet name manager. * @param {string} Pass the defined name that you want to remove from name manager. + * @param {string} Optional. Pass the scope of the name manager. * @returns {void} */ - removeNamedRange(name: string): void; + removeNamedRange(name: string, scope: string): void; /** This method is used to remove the tab form ribbon in the spreadsheet. * @param {number} Specifies the index of the tab to be removed from the ribbon. diff --git a/types/elastic-apm-node/elastic-apm-node-tests.ts b/types/elastic-apm-node/elastic-apm-node-tests.ts deleted file mode 100644 index 2e98e84300..0000000000 --- a/types/elastic-apm-node/elastic-apm-node-tests.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { - Agent, - start -} from 'elastic-apm-node'; - -const agent: Agent = start({ - serviceName: '', - secretToken: '', - serverUrl: '' -}); -const started: boolean = agent.isStarted(); - -function testCallbacks() { - const testError: Error = new Error("Test Error"); - agent.captureError(testError, {error: "test"}, (err: Error) => err = testError); - agent.captureError(testError, {error: "test"}); - agent.captureError(testError); - - agent.addFilter((payload: any) => { - return payload; - }); - - agent.handleUncaughtExceptions((err: Error) => err = testError); - - agent.flush((test: any) => test); -} - -const customContext: boolean = agent.setCustomContext({ - id: "test id", - username: "test user", - email: "testEmail@test.com" -}); - -const userContext: boolean = agent.setUserContext({ - id: "test id", - username: "test user", - email: "testEmail@test.com" -}); - -const transactionName: any = agent.setTransactionName("new name"); - -const tags: any = agent.setTag("name", "value"); - -const addedTags: any = agent.addTags({name: "value"}); - -const startSpan: any = agent.startSpan(); - -const secondStartSpan: any = agent.startSpan("name", 13); - -const transaction = agent.startTransaction(); diff --git a/types/elastic-apm-node/index.d.ts b/types/elastic-apm-node/index.d.ts deleted file mode 100644 index 182a56782e..0000000000 --- a/types/elastic-apm-node/index.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Type definitions for Elastic APM Node.js Agent 1.x -// Project: https://www.elastic.co/solutions/apm, https://github.com/elastic/apm-agent-nodejs -// Definitions by: Shahaed Hasan -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 - -export = a; - -declare const a: a.Agent; - -declare namespace a { - interface Agent { - currentTransaction: any; - logger: any; - - start(opts?: AgentOptions): Agent; - isStarted(): boolean; - addFilter(filter: (payload: any) => any): void; - setUserContext(context: Context): boolean; - setCustomContext(context: any): boolean; - setTag(name: string, value: string): any; - addTags(tags: any): any; - captureError(error: Error | string | object, options?: object, callback?: (err?: any) => any): void; - startTransaction(name?: string, type?: string): any; - endTransaction(result?: any): any; - setTransactionName(name: string): any; - startSpan(name?: string, type?: any): any; - handleUncaughtExceptions(callback?: (err: Error) => any): any; - flush(callback?: any): any; - lambda(type: any, handler?: any): any; - } - - interface AgentOptions { - serviceName?: string; - secretToken?: string; - serverUrl?: string; - verifyServerCert?: boolean; - serviceVersion?: string; - active?: boolean; - instrument?: boolean; - asyncHooks?: boolean; - ignoreUrls?: Array; - ignoreUserAgents?: Array; - captureBody?: string; - errorOnAbortedRequests?: boolean; - abortedErrorThreshold?: number; - transactionSampleRate?: number; - hostname?: string; - frameworkName?: string; - frameworkVersion?: string; - logLevel?: string; - logger?: any; - captureExceptions?: boolean; - captureErrorLogStackTraces?: string; - captureSpanStackTraces?: boolean; - sourceLinesErrorAppFrames?: number; - sourceLinesErrorLibraryFrames?: number; - sourceLinesSpanAppFrames?: number; - sourceLinesSpanLibraryFrames?: number; - errorMessageMaxLength?: number; - stackTraceLimit?: number; - transactionMaxSpans?: number; - flushInterval?: number; - serverTimeout?: number; - maxQueueSize?: number; - filterHttpHeaders?: boolean; - disableInstrumentations?: string; - } - - interface Context { - id?: string; - username?: string; - email?: string; - } -} diff --git a/types/elastic-apm-node/start.d.ts b/types/elastic-apm-node/start.d.ts deleted file mode 100644 index 83cf99b4d5..0000000000 --- a/types/elastic-apm-node/start.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import * as agent from './'; -export = agent; diff --git a/types/elastic-apm-node/tsconfig.json b/types/elastic-apm-node/tsconfig.json deleted file mode 100644 index 336364b281..0000000000 --- a/types/elastic-apm-node/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "elastic-apm-node-tests.ts", - "start.d.ts" - ] -} \ No newline at end of file diff --git a/types/ember/test/inject.ts b/types/ember/test/inject.ts index 3ea0176ea6..aed79066c8 100755 --- a/types/ember/test/inject.ts +++ b/types/ember/test/inject.ts @@ -33,7 +33,8 @@ class LoginRoute extends Ember.Route { } anyOldMethod() { - this.controllerFor('application').set('string', 'must be a string'); + this.get('application').set('string', 'must be a string'); + this.controllerFor('application'); // $ExpectType Controller } } diff --git a/types/ember__routing/route.d.ts b/types/ember__routing/route.d.ts index 30c9654be9..a07f802bb0 100644 --- a/types/ember__routing/route.d.ts +++ b/types/ember__routing/route.d.ts @@ -44,11 +44,15 @@ export default class Route extends EmberObject.extend(ActionHandler, Evented) { beforeModel(transition: Transition): any; /** - * Returns the controller for a particular route or name. - * The controller instance must already have been created, either through entering the - * associated route or using `generateController`. + * Returns the controller of the current route, or a parent (or any + * ancestor) route in a route hierarchy. + * + * The controller instance must already have been created, either through + * entering the associated route or using `generateController`. + * + * @param name the name of the route or controller */ - controllerFor(name: K): ControllerRegistry[K]; + controllerFor(name: string): Controller; /** * Disconnects a view that has been rendered into an outlet. diff --git a/types/ember__routing/test/route.ts b/types/ember__routing/test/route.ts index b347768301..1660b921ff 100755 --- a/types/ember__routing/test/route.ts +++ b/types/ember__routing/test/route.ts @@ -110,6 +110,9 @@ Route.extend({ }, }); +const route = Route.create(); +route.controllerFor('whatever'); // $ExpectType Controller + class RouteUsingClass extends Route.extend({ randomProperty: 'the .extend + extends bit type-checks properly', }) { diff --git a/types/emscripten/emscripten-tests.ts b/types/emscripten/emscripten-tests.ts index 627efba590..2057f012a5 100644 --- a/types/emscripten/emscripten-tests.ts +++ b/types/emscripten/emscripten-tests.ts @@ -8,7 +8,7 @@ function ModuleTest(): void { Module.preinitializedWebGLContext = new WebGLRenderingContext(); let package: ArrayBuffer = Module.getPreloadedPackage("package-name", 100); - let exports: WebAssembly.Exports = Module.instantiateWasm( + let exports: Module.WebAssemblyExports = Module.instantiateWasm( [{name: "func-name", kind: "function"}], (module: WebAssembly.Module) => {} ); diff --git a/types/emscripten/index.d.ts b/types/emscripten/index.d.ts index 4db8ac4925..5da83ae2b5 100644 --- a/types/emscripten/index.d.ts +++ b/types/emscripten/index.d.ts @@ -5,7 +5,10 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -/// +/** Other WebAssembly declarations, for compatibility with older versions of Typescript */ +declare namespace WebAssembly { + interface Module { } +} declare namespace Emscripten { interface FileSystemType { @@ -15,6 +18,17 @@ declare namespace Emscripten { declare namespace Module { type EnvironmentType = "WEB" | "NODE" | "SHELL" | "WORKER"; + type WebAssemblyImports = Array<{ + name: string; + kind: string; + }>; + + type WebAssemblyExports = Array<{ + module: string; + name: string; + kind: string; + }>; + function print(str: string): void; function printErr(str: string): void; var arguments: string[]; @@ -32,9 +46,9 @@ declare namespace Module { function destroy(object: object): void; function getPreloadedPackage(remotePackageName: string, remotePackageSize: number): ArrayBuffer; function instantiateWasm( - imports: WebAssembly.Imports, + imports: WebAssemblyImports, successCallback: (module: WebAssembly.Module) => void - ): WebAssembly.Exports; + ): WebAssemblyExports; function locateFile(url: string): string; function onCustomMessage(event: MessageEvent): void; diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index a2aacb485e..9cdfe6b1ae 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -167,6 +167,7 @@ Audio.setAudioModeAsync({ interruptionModeIOS: 2, interruptionModeAndroid: 1, allowsRecordingIOS: true, + playThroughEarpieceAndroid: true, }); Audio.setIsEnabledAsync(true); diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index b051946110..e54bfa8430 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -418,6 +418,9 @@ export namespace Audio { /** an enum selecting how your experience’s audio should interact with the audio from other apps on Android: */ interruptionModeAndroid: InterruptionModeAndroid; + + /** Boolean selecting if your experience’s audio should route to earpiece on Android: */ + playThroughEarpieceAndroid: boolean; } function setIsEnabledAsync(value: boolean): Promise; diff --git a/types/express-handlebars/express-handlebars-tests.ts b/types/express-handlebars/express-handlebars-tests.ts index e923542a65..1a38578d5e 100644 --- a/types/express-handlebars/express-handlebars-tests.ts +++ b/types/express-handlebars/express-handlebars-tests.ts @@ -1,11 +1,23 @@ import express = require('express'); import exphbs = require('express-handlebars'); +import assert = require('assert'); var app = express(); app.engine('handlebars', exphbs({defaultLayout: 'main'})); app.set('view engine', 'handlebars'); +const hbs = exphbs.create({defaultLayout: 'main'}); + +hbs.renderView('test', (err: any) => {}); +hbs.renderView('test', (err: any, content: string) => {}); +hbs.renderView('test', { + layout: 'main' +}, (err: any) => {}); +hbs.renderView('test', { + layout: 'main' +}, (err: any, content: string) => {}); + app.listen(1337); console.log('Test Express Handlebars app on port 1337..'); console.log('Done'); diff --git a/types/express-handlebars/index.d.ts b/types/express-handlebars/index.d.ts index 2c718e08b8..50eb804939 100644 --- a/types/express-handlebars/index.d.ts +++ b/types/express-handlebars/index.d.ts @@ -26,6 +26,10 @@ interface ExphbsOptions { compilerOptions?: any; } +interface ExphbsCallback { + (err: any, content?: string): void; +} + interface Exphbs { engine: Function; extname: string; @@ -36,7 +40,8 @@ interface Exphbs { getTemplate(filePath: string, options?: PartialTemplateOptions): Promise; getTemplates(dirPath: string, options?: PartialTemplateOptions): Promise; render(filePath: string, context: Object, options?: RenderOptions): Promise; - renderView(viewPath: string, optionsOrCallback: any, callback?: () => string): void; + renderView(viewPath: string, callback: ExphbsCallback): void; + renderView(viewPath: string, options: any, callback: ExphbsCallback): void; } interface ExpressHandlebars { diff --git a/types/express-http-proxy/express-http-proxy-tests.ts b/types/express-http-proxy/express-http-proxy-tests.ts index 56156369cc..c96ec0fc8d 100644 --- a/types/express-http-proxy/express-http-proxy-tests.ts +++ b/types/express-http-proxy/express-http-proxy-tests.ts @@ -26,3 +26,5 @@ proxy('www.google.com', { return headers; } }); + +proxy((req) => 'com.google.www'.split('.').reverse().join('.')); diff --git a/types/express-http-proxy/index.d.ts b/types/express-http-proxy/index.d.ts index 3a74bef6db..d1935f3bc3 100644 --- a/types/express-http-proxy/index.d.ts +++ b/types/express-http-proxy/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/villadora/express-http-proxy#readme // Definitions by: ulrichb // Daniel Schopf +// Gabriel Fournier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -15,6 +16,6 @@ interface ProxyOptions { userResHeaderDecorator?: (headers: IncomingHttpHeaders, userReq: Request, userRes: Response, proxyReq: Request, proxyRes: Response) => OutgoingHttpHeaders; } -declare function proxy(host: string, options?: ProxyOptions): RequestHandler; +declare function proxy(host: string|((req: Request) => string), options?: ProxyOptions): RequestHandler; export = proxy; diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index d800fe01bc..4af44275e9 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -1075,6 +1075,8 @@ export class StaticCanvas { */ constructor(element: HTMLCanvasElement | string, options?: ICanvasOptions); + _activeObject?: Object | Group; + /** * Calculates canvas element offset relative to the document * This method is also attached as "resize" event handler of window @@ -1454,7 +1456,7 @@ export class StaticCanvas { * @return {Boolean | null} `true` if method is supported (or at least exists), * `null` if canvas element or context can not be initialized */ - supports(methodName: "getImageData" | "toDataURL" | "toDataURLWithQuality" | "setLineDash"): boolean; + static supports(methodName: "getImageData" | "toDataURL" | "toDataURLWithQuality" | "setLineDash"): boolean; /** * Exports canvas element to a dataurl image. Note that when multiplier is used, cropping is scaled appropriately @@ -2030,10 +2032,11 @@ export class Group { constructor(objects?: Object[], options?: IGroupOptions, isAlreadyGrouped?: boolean); /** * Adds an object to a group; Then recalculates group's dimension, position. + * @param [Object] object * @return thisArg * @chainable */ - addWithUpdate(object: Object): Group; + addWithUpdate(object?: Object): Group; /** * Removes an object from a group; Then recalculates group's dimension, position. * @return thisArg @@ -2346,6 +2349,11 @@ export class Line { * Produces a function that calculates distance from canvas edge to Line origin. */ makeEdgeToOriginGetter(propertyNames: {origin: number, axis1: any, axis2: any, dimension: any}, originValues: {nearest: any, center: any, farthest: any}): Function; + /** + * Recalculates line points given width and height + * @private + */ + calcLinePoints(): {x1: number, x2: number, y1: number, y2: number}; } interface IObjectOptions { @@ -2498,7 +2506,7 @@ interface IObjectOptions { /** * Color of object's fill */ - fill?: string; + fill?: string | Pattern; /** * Fill rule used to fill an object @@ -2831,6 +2839,23 @@ interface IObjectOptions { * storage for object transform matrix */ ownMatrixCache?: any; + + /** + * Indicates the angle that an object will lock to while rotating. Can get from canvas. + */ + snapAngle?: number; + /** + * Indicates the distance from the snapAngle the rotation will lock to the snapAngle. Can get from canvas. + */ + snapThreshold?: null | number; + /** + * The group the object is part of + */ + group?: Group; + /** + * The canvas the object belongs to + */ + canvas?: Canvas; } export interface Object extends IObservable, IObjectOptions, IObjectAnimation { } export class Object { @@ -3549,7 +3574,7 @@ export class Object { * @param {Array} dashArray array representing dashes * @param {Function} alternative function to call if browser does not support lineDash */ - _setLineDash(ctx: CanvasRenderingContext2D, dashArray: number[], alternative: Function): void; + _setLineDash(ctx: CanvasRenderingContext2D, dashArray: number[], alternative?: (ctx: CanvasRenderingContext2D) => void): void; /** * @private * @param {CanvasRenderingContext2D} ctx Context to render on @@ -3558,6 +3583,16 @@ export class Object { * @return {Object} offset.offsetY offset for text rendering */ _applyPatternGradientTransform(ctx: CanvasRenderingContext2D, filler: string | Pattern | Gradient): void; + /** + * @private + * @param {CanvasRenderingContext2D} ctx Context to render on + */ + _render(ctx: CanvasRenderingContext2D): void; + /** + * @private + * @param {CanvasRenderingContext2D} ctx Context to render on + */ + _renderPaintInOrder(ctx: CanvasRenderingContext2D): void; } interface IPathOptions extends IObjectOptions { @@ -3802,6 +3837,11 @@ interface TextOptions extends IObjectOptions { * @type Array */ stateProperties?: string[]; + /** + * List of lines in text object + * @type Array + */ + textLines?: string[]; } export interface Text extends TextOptions { } export class Text extends Object { @@ -4070,6 +4110,10 @@ interface ITextOptions extends TextOptions { * The function must be in fabric.Itext.prototype.myFunction And will receive event as args[0] */ keysMap?: any; + /** + * Exposes underlying hidden text area + */ + hiddenTextarea?: HTMLTextAreaElement; } export interface IText extends ITextOptions { } export class IText extends Text { @@ -4484,6 +4528,11 @@ export class Textbox extends IText { * @return {Boolean} */ isEndOfWrapping(lineIndex: number): boolean; + /** + * Returns larger of min width and dynamic min width + * @return {Number} + */ + getMinWidth(): number; /** * Returns fabric.Textbox instance from an object representation * @static @@ -5277,6 +5326,13 @@ interface IUtilString { * @param string String to escape */ escapeXml(string: string): string; + + /** + * Divide a string in the user perceived single units + * @param {String} textstring String to escape + * @return {Array} array containing the graphemes + */ + graphemeSplit(string: string): string[]; } interface IUtilMisc { diff --git a/types/facepaint/facepaint-tests.ts b/types/facepaint/facepaint-tests.ts new file mode 100644 index 0000000000..63696381a8 --- /dev/null +++ b/types/facepaint/facepaint-tests.ts @@ -0,0 +1,10 @@ +import facepaint = require('facepaint'); + +facepaint([ + '@media(min-width: 420px)', + '@media(min-width: 920px)', + '@media(min-width: 1120px)' +], { + literal: true, + overlap: true +}); diff --git a/types/facepaint/index.d.ts b/types/facepaint/index.d.ts new file mode 100644 index 0000000000..5d23987a43 --- /dev/null +++ b/types/facepaint/index.d.ts @@ -0,0 +1,35 @@ +// Type definitions for facepaint 1.2 +// Project: https://github.com/emotion-js/facepaint +// Definitions by: CiarĂĄn Curley +// Anton Samper Rivaya +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace facepaint { + type BaseArg = object | object[]; + type Arg = BaseArg | BaseArg[]; + + type Selector = string; + + interface DynamicStyle { + [key: string]: { + [key: string]: string | number; + }; + } + + interface DynamicStyleFunction { + (...args: Arg[]): DynamicStyle; + } + + interface Options { + literal?: boolean; + overlap?: boolean; + } +} + +declare function facepaint( + breakpoints: facepaint.Selector[], + options?: facepaint.Options +): facepaint.DynamicStyleFunction; + +export = facepaint; diff --git a/types/p-forever/tsconfig.json b/types/facepaint/tsconfig.json similarity index 94% rename from types/p-forever/tsconfig.json rename to types/facepaint/tsconfig.json index 0bf6e83d7f..75b133849f 100644 --- a/types/p-forever/tsconfig.json +++ b/types/facepaint/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "p-forever-tests.ts" + "facepaint-tests.ts" ] } diff --git a/types/array-move/tslint.json b/types/facepaint/tslint.json similarity index 100% rename from types/array-move/tslint.json rename to types/facepaint/tslint.json diff --git a/types/fast-ratelimit/fast-ratelimit-tests.ts b/types/fast-ratelimit/fast-ratelimit-tests.ts new file mode 100644 index 0000000000..2ca23b1fc9 --- /dev/null +++ b/types/fast-ratelimit/fast-ratelimit-tests.ts @@ -0,0 +1,22 @@ +import { FastRateLimit } from 'fast-ratelimit'; + +const limit = new FastRateLimit({ // $type: FastRateLimit + threshold: 20, + ttl: 60, +}); + +const someNamespace = 'some-namespace'; + +const consume = limit.consume(someNamespace); // $type: Promise +consume.then(() => {}); // User can send message. +consume.catch(() => {}); // Use cannot send message. + +const hasToken = limit.hasToken(someNamespace); // $type: Promise +hasToken.then(() => {}); // User has remaining token. +hasToken.catch(() => {}); // User does not have remaining token. + +// Synchronously check if user is allowed to send message. +const consumeSync = limit.consumeSync(someNamespace); // $type: boolean + +// Synchronously check if user has remaining token. +const hasTokenSync = limit.hasTokenSync(someNamespace); // $type: boolean diff --git a/types/fast-ratelimit/index.d.ts b/types/fast-ratelimit/index.d.ts new file mode 100644 index 0000000000..5306b364b1 --- /dev/null +++ b/types/fast-ratelimit/index.d.ts @@ -0,0 +1,41 @@ +// Type definitions for fast-ratelimit 2.2 +// Project: https://github.com/valeriansaliou/node-fast-ratelimit +// Definitions by: JĂžrgen Vatle +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Constructor options for fast-ratelimit. + * {@link https://github.com/valeriansaliou/node-fast-ratelimit#1-create-the-rate-limiter} + */ +export interface FastRateLimitOptions { + threshold: number; // available tokens over timespan + ttl: number; // time-to-live value of token bucket (in seconds) +} + +export class FastRateLimit { + /** + * FastRateLimit constructor + * @param options + */ + constructor(options: FastRateLimitOptions); + + /** + * FastRateLimit.prototype.consumeSync + */ + consumeSync(namespace: string): boolean; + + /** + * FastRateLimit.prototype.hasTokenSync + */ + hasTokenSync(namespace: string): boolean; + + /** + * FastRateLimit.prototype.consume + */ + consume(namespace: string): Promise; + + /** + * FastRateLimit.prototype.hasToken + */ + hasToken(namespace: string): Promise; +} diff --git a/types/fast-ratelimit/tsconfig.json b/types/fast-ratelimit/tsconfig.json new file mode 100644 index 0000000000..cb8a2f5d3d --- /dev/null +++ b/types/fast-ratelimit/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fast-ratelimit-tests.ts" + ] +} \ No newline at end of file diff --git a/types/fast-ratelimit/tslint.json b/types/fast-ratelimit/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/fast-ratelimit/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/feathersjs__feathers/index.d.ts b/types/feathersjs__feathers/index.d.ts index 4746b29ff7..e5ffc8abf7 100644 --- a/types/feathersjs__feathers/index.d.ts +++ b/types/feathersjs__feathers/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Jan Lohage // Abraao Alves // Tim Mensch +// Jordan Tucker // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript // TypeScript Version: 2.3 @@ -10,190 +11,195 @@ /// import { EventEmitter } from 'events'; -import * as self from '@feathersjs/feathers'; -// tslint:disable-next-line no-unnecessary-generics -declare const feathers: (() => Application) & typeof self; -export default feathers; - -export const version: string; -export const SKIP: SkipSymbol; - -export type Id = number | string; -export type NullableId = Id | null; - -export interface Query { - [key: string]: any; -} - -export interface PaginationOptions { - default: number; - max: number; -} - -export type ClientSideParams = Pick; -export type ServerSideParams = Params; - -export interface Params { - query?: Query; - paginate?: false | Pick; - - [key: string]: any; // (JL) not sure if we want this -} - -export interface Paginated { - total: number; - limit: number; - skip: number; - data: T[]; -} - -// tslint:disable-next-line void-return -export type Hook = (hook: HookContext) => (Promise | HookContext | SkipSymbol | void); - -export type SkipSymbol = symbol | '__feathersSkipHooks'; - -export interface HookContext { - /** - * A read only property that contains the Feathers application object. This can be used to - * retrieve other services (via context.app.service('name')) or configuration values. - */ - readonly app: Application; - /** - * A writeable property containing the data of a create, update and patch service - * method call. - */ - data?: T; - /** - * A writeable property with the error object that was thrown in a failed method call. - * It is only available in error hooks. - */ - error?: any; - /** - * A writeable property and the id for a get, remove, update and patch service - * method call. For remove, update and patch context.id can also be null when - * modifying multiple entries. In all other cases it will be undefined. - */ - id?: string | number; - /** - * A read only property with the name of the service method (one of find, get, - * create, update, patch, remove). - */ - readonly method: string; - /** - * A writeable property that contains the service method parameters (including - * params.query). - */ - params: Params; - /** - * A read only property and contains the service name (or path) without leading or - * trailing slashes. - */ - readonly path: string; - /** - * A writeable property containing the result of the successful service method call. - * It is only available in after hooks. - * - * `context.result` can also be set in - * - * - A before hook to skip the actual service method (database) call - * - An error hook to swallow the error and return a result instead - */ - result?: T; - /** - * A read only property and contains the service this hook currently runs on. - */ - readonly service: Service; - /** - * A writeable, optional property and contains a "safe" version of the data that - * should be sent to any client. If context.dispatch has not been set context.result - * will be sent to the client instead. - */ - dispatch?: T; - /** - * A writeable, optional property that allows to override the standard HTTP status - * code that should be returned. - */ - statusCode?: number; - /** - * A read only property with the hook type (one of before, after or error). - */ - readonly type: "before" | "after" | "error"; -} - -export interface HookMap { - all: Hook | Hook[]; - find: Hook | Hook[]; - get: Hook | Hook[]; - create: Hook | Hook[]; - update: Hook | Hook[]; - patch: Hook | Hook[]; - remove: Hook | Hook[]; -} - -export interface HooksObject { - before: Partial; - after: Partial; - error: Partial; -} - -// todo: figure out what to do: These methods don't actually need to be implemented, so they can be undefined at runtime. Yet making them optional gets cumbersome in strict mode. -export interface ServiceMethods { - find(params?: Params): Promise>; - - get(id: Id, params?: Params): Promise; - - create(data: Partial | Array>, params?: Params): Promise; - - update(id: NullableId, data: T, params?: Params): Promise; - - patch(id: NullableId, data: Partial, params?: Params): Promise; - - remove(id: NullableId, params?: Params): Promise; -} - -export interface SetupMethod { - setup(app: Application, path: string): void; -} - -export interface ServiceOverloads { - create(data: Array>, params?: Params): Promise; - - create(data: Partial, params?: Params): Promise; - - patch(id: NullableId, data: Pick, params?: Params): Promise; -} - -export interface ServiceAddons extends EventEmitter { - hooks(hooks: Partial): this; -} - -export type Service = ServiceOverloads & ServiceAddons & ServiceMethods; - -export interface Application extends EventEmitter { - get(name: string): any; - - set(name: string, value: any): this; - - disable(name: string): this; - - disabled(name: string): boolean; - - enable(name: string): this; - - enabled(name: string): boolean; - - configure(callback: (this: this, app: this) => void): this; - - hooks(hooks: Partial): this; - - setup(server?: any): this; - - service(location: L): Service; - - service(location: string): Service; - - use(path: string, service: Partial & SetupMethod> | Application, options?: any): this; +declare const feathers: Feathers; +export = feathers; +interface Feathers { + // tslint:disable-next-line no-unnecessary-generics + (): feathers.Application; version: string; + SKIP: feathers.SkipSymbol; + default: Feathers; +} + +declare namespace feathers { + type Id = number | string; + type NullableId = Id | null; + + interface Query { + [key: string]: any; + } + + interface PaginationOptions { + default: number; + max: number; + } + + type ClientSideParams = Pick; + type ServerSideParams = Params; + + interface Params { + query?: Query; + paginate?: false | Pick; + + [key: string]: any; // (JL) not sure if we want this + } + + interface Paginated { + total: number; + limit: number; + skip: number; + data: T[]; + } + + // tslint:disable-next-line void-return + type Hook = (hook: HookContext) => (Promise | HookContext | SkipSymbol | void); + + type SkipSymbol = symbol | '__feathersSkipHooks'; + + interface HookContext { + /** + * A read only property that contains the Feathers application object. This can be used to + * retrieve other services (via context.app.service('name')) or configuration values. + */ + readonly app: Application; + /** + * A writeable property containing the data of a create, update and patch service + * method call. + */ + data?: T; + /** + * A writeable property with the error object that was thrown in a failed method call. + * It is only available in error hooks. + */ + error?: any; + /** + * A writeable property and the id for a get, remove, update and patch service + * method call. For remove, update and patch context.id can also be null when + * modifying multiple entries. In all other cases it will be undefined. + */ + id?: string | number; + /** + * A read only property with the name of the service method (one of find, get, + * create, update, patch, remove). + */ + readonly method: string; + /** + * A writeable property that contains the service method parameters (including + * params.query). + */ + params: Params; + /** + * A read only property and contains the service name (or path) without leading or + * trailing slashes. + */ + readonly path: string; + /** + * A writeable property containing the result of the successful service method call. + * It is only available in after hooks. + * + * `context.result` can also be set in + * + * - A before hook to skip the actual service method (database) call + * - An error hook to swallow the error and return a result instead + */ + result?: T; + /** + * A read only property and contains the service this hook currently runs on. + */ + readonly service: Service; + /** + * A writeable, optional property and contains a "safe" version of the data that + * should be sent to any client. If context.dispatch has not been set context.result + * will be sent to the client instead. + */ + dispatch?: T; + /** + * A writeable, optional property that allows to override the standard HTTP status + * code that should be returned. + */ + statusCode?: number; + /** + * A read only property with the hook type (one of before, after or error). + */ + readonly type: "before" | "after" | "error"; + } + + interface HookMap { + all: Hook | Hook[]; + find: Hook | Hook[]; + get: Hook | Hook[]; + create: Hook | Hook[]; + update: Hook | Hook[]; + patch: Hook | Hook[]; + remove: Hook | Hook[]; + } + + interface HooksObject { + before: Partial; + after: Partial; + error: Partial; + } + + // todo: figure out what to do: These methods don't actually need to be implemented, so they can be undefined at runtime. Yet making them optional gets cumbersome in strict mode. + interface ServiceMethods { + find(params?: Params): Promise>; + + get(id: Id, params?: Params): Promise; + + create(data: Partial | Array>, params?: Params): Promise; + + update(id: NullableId, data: T, params?: Params): Promise; + + patch(id: NullableId, data: Partial, params?: Params): Promise; + + remove(id: NullableId, params?: Params): Promise; + } + + interface SetupMethod { + setup(app: Application, path: string): void; + } + + interface ServiceOverloads { + create(data: Array>, params?: Params): Promise; + + create(data: Partial, params?: Params): Promise; + + patch(id: NullableId, data: Pick, params?: Params): Promise; + } + + interface ServiceAddons extends EventEmitter { + hooks(hooks: Partial): this; + } + + type Service = ServiceOverloads & ServiceAddons & ServiceMethods; + + interface Application extends EventEmitter { + get(name: string): any; + + set(name: string, value: any): this; + + disable(name: string): this; + + disabled(name: string): boolean; + + enable(name: string): this; + + enabled(name: string): boolean; + + configure(callback: (this: this, app: this) => void): this; + + hooks(hooks: Partial): this; + + setup(server?: any): this; + + service(location: L): Service; + + service(location: string): Service; + + use(path: string, service: Partial & SetupMethod> | Application, options?: any): this; + + version: string; + } } diff --git a/types/finalhandler/finalhandler-tests.ts b/types/finalhandler/finalhandler-tests.ts index 772a788e30..f2705bd2fa 100644 --- a/types/finalhandler/finalhandler-tests.ts +++ b/types/finalhandler/finalhandler-tests.ts @@ -1,15 +1,14 @@ import { IncomingMessage, ServerResponse } from "http"; -import finalHandler = require("finalhandler"); +import finalhandler = require("finalhandler"); -let req: IncomingMessage; -let res: ServerResponse; -let options: { - onerror: (err: any, req: IncomingMessage, res: ServerResponse) => void; - message: boolean|((err: any, status: number) => string); - stacktrace: boolean; +const req: IncomingMessage = null; +const res: ServerResponse = null; +const options = { + env: 'anEnv', + onerror: (err: any, req: IncomingMessage, res: ServerResponse): any => { return; } }; let result: (err: any) => void; -result = finalHandler(req, res); -result = finalHandler(req, res, options); +result = finalhandler(req, res); +result = finalhandler(req, res, options); diff --git a/types/finalhandler/index.d.ts b/types/finalhandler/index.d.ts index d67b9e4a98..b143e92916 100644 --- a/types/finalhandler/index.d.ts +++ b/types/finalhandler/index.d.ts @@ -1,20 +1,21 @@ -// Type definitions for finalhandler +// Type definitions for finalhandler 1.1 // Project: https://github.com/pillarjs/finalhandler // Definitions by: Ilya Mochalov +// Mark Veronda // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// -import { IncomingMessage, ServerResponse } from "http"; +import { IncomingMessage, ServerResponse } from 'http'; -declare function finalHandler(req: IncomingMessage, res: ServerResponse, options?: finalHandler.Options): (err: any) => void; +declare function finalhandler(req: IncomingMessage, res: ServerResponse, + options?: finalhandler.Options): (err: any) => void; -declare namespace finalHandler { - export interface Options { - message?: boolean|((err: any, status: number) => string); - onerror?: (err: any, req: IncomingMessage, res: ServerResponse) => void; - stacktrace?: boolean; - } +declare namespace finalhandler { + interface Options { + env?: string; + onerror?: (err: any, req: IncomingMessage, res: ServerResponse) => void; + } } -export = finalHandler; +export = finalhandler; diff --git a/types/finalhandler/tslint.json b/types/finalhandler/tslint.json index 3d59f55fda..f93cf8562a 100644 --- a/types/finalhandler/tslint.json +++ b/types/finalhandler/tslint.json @@ -1,80 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "npm-naming": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } + "extends": "dtslint/dt.json" } diff --git a/types/find-down/find-down-tests.ts b/types/find-down/find-down-tests.ts new file mode 100644 index 0000000000..cc7ab9e81b --- /dev/null +++ b/types/find-down/find-down-tests.ts @@ -0,0 +1,13 @@ +import findDown = require('find-down'); + +findDown('unicorn.png').then(file => { + file; // $ExpectType string | null +}); + +findDown(['unicorn.png']).then(file => { + file; // $ExpectType string | null +}); + +findDown('unicorn.png', { cwd: '.' }).then(file => { + file; // $ExpectType string | null +}); diff --git a/types/find-down/index.d.ts b/types/find-down/index.d.ts new file mode 100644 index 0000000000..390c410b54 --- /dev/null +++ b/types/find-down/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for find-down 0.1 +// Project: https://github.com/sholladay/find-down +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace findDown { + interface Options { + /** Directory to end with. Default: `process.cwd()` */ + cwd?: string; + } +} + +declare function findDown(filename: string | string[], options?: findDown.Options): Promise; + +export = findDown; diff --git a/types/all-keys/tsconfig.json b/types/find-down/tsconfig.json similarity index 94% rename from types/all-keys/tsconfig.json rename to types/find-down/tsconfig.json index a6f20f786f..6d397bf959 100644 --- a/types/all-keys/tsconfig.json +++ b/types/find-down/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "all-keys-tests.ts" + "find-down-tests.ts" ] } diff --git a/types/array-uniq/tslint.json b/types/find-down/tslint.json similarity index 100% rename from types/array-uniq/tslint.json rename to types/find-down/tslint.json diff --git a/types/firefox-webext-browser/firefox-webext-browser-tests.ts b/types/firefox-webext-browser/firefox-webext-browser-tests.ts index 26ae079172..2ea924cfd3 100644 --- a/types/firefox-webext-browser/firefox-webext-browser-tests.ts +++ b/types/firefox-webext-browser/firefox-webext-browser-tests.ts @@ -12,3 +12,26 @@ const port = browser.runtime.connect(); port.postMessage(); // $ExpectError browser.bookmarks.getTree(); + +browser.proxy.onProxyError.addListener(error => { + console.error(`Proxy error: ${error.message}`); +}); + +browser.proxy.onRequest.addListener(d => { + console.log(d.requestId); +}, { + urls: ['test'] +}, ["requestHeaders"]); + +browser.webNavigation.onBeforeNavigate.addListener(d => { + console.log(d.url, d.timeStamp); +}, { + url: [ + {hostContains: 'something'}, + {hostPrefix: 'somethineelse'} + ] +}); + +browser.runtime.connect().onDisconnect.addListener(() => { + console.log('ok'); +}); diff --git a/types/firefox-webext-browser/index.d.ts b/types/firefox-webext-browser/index.d.ts index c0a8896e56..d7373635be 100644 --- a/types/firefox-webext-browser/index.d.ts +++ b/types/firefox-webext-browser/index.d.ts @@ -1,20 +1,18 @@ -// Type definitions for non-npm package WebExtension Development in FireFox 65.0 +// Type definitions for non-npm package WebExtension Development in FireFox 67.0 // Project: https://developer.mozilla.org/en-US/Add-ons/WebExtensions // Definitions by: Jasmin Bom // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.9 // Generated using script at github.com/jsmnbom/definitelytyped-firefox-webext-browser -interface WebExtEventBase any, TCallback> { - addListener: TAddListener; +interface WebExtEvent any> { + addListener(cb: TCallback): void; removeListener(cb: TCallback): void; hasListener(cb: TCallback): boolean; } -type WebExtEvent any> = WebExtEventBase<(callback: TCallback) => void, TCallback>; - interface Window { browser: typeof browser; } @@ -114,7 +112,7 @@ declare namespace browser._manifest { minimum_chrome_version?: string; minimum_opera_version?: string; icons?: { - [key: number]: string; + [key: number]: ExtensionFileUrl; }; incognito?: _WebExtensionManifestIncognito; background?: { @@ -365,6 +363,8 @@ declare namespace browser._manifest { type ExtensionURL = string; + type ExtensionFileUrl = string; + type ImageDataOrExtensionURL = string; type ExtensionID = string; @@ -416,8 +416,8 @@ declare namespace browser._manifest { } type IconPath = { - [key: number]: ExtensionURL; - } | ExtensionURL; + [key: number]: ExtensionFileUrl; + } | ExtensionFileUrl; type IconImageData = { [key: number]: ImageData; @@ -504,6 +504,8 @@ declare namespace browser._manifest { sidebar_text?: ThemeColor; sidebar_highlight?: ThemeColor; sidebar_highlight_text?: ThemeColor; + toolbar_field_highlight?: ThemeColor; + toolbar_field_highlight_text?: ThemeColor; }; icons?: { back?: ExtensionURL; @@ -650,7 +652,7 @@ declare namespace browser._manifest { | "pkcs11" | "sessions"; - type _WebExtensionManifestIncognito = "spanning"; + type _WebExtensionManifestIncognito = "not_allowed" | "spanning"; /** Defines the location the browserAction will appear by default. The default location is navbar. */ type _WebExtensionManifestBrowserActionDefaultArea = @@ -1317,7 +1319,7 @@ declare namespace browser.downloads { /** Indication of whether this download is thought to be safe or known to be suspicious. */ danger: DangerType; /** The file's MIME type. */ - mime: string; + mime?: string; /** Number of milliseconds between the unix epoch and when this download began. */ startTime: string; /** Number of milliseconds between the unix epoch and when this download ended. */ @@ -2676,7 +2678,7 @@ declare namespace browser.proxy { | "manual" | "autoConfig"; - type _ProxyOnRequestEvent void> = WebExtEventBase<(callback: T, filter: webRequest.RequestFilter, extraInfoSpec?: Array<"requestHeaders">) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: webRequest.RequestFilter, extraInfoSpec?: Array<"requestHeaders">): void; + + removeListener(cb: TCallback): void; + + hasListener(cb: TCallback): boolean; + } /* proxy properties */ /** Configures proxy settings. This setting's value is an object of type ProxyConfig. */ @@ -2736,10 +2744,10 @@ declare namespace browser.proxy { const onRequest: _ProxyOnRequestEvent; /** Notifies about proxy script errors. */ - const onError: WebExtEvent<(error: object) => void>; + const onError: WebExtEvent<(error: Error) => void>; /** Please use `proxy.onError`. */ - const onProxyError: WebExtEvent<(error: object) => void>; + const onProxyError: WebExtEvent<(error: Error) => void>; } /** @@ -2755,8 +2763,8 @@ declare namespace browser.runtime { interface Port { name: string; disconnect: () => void; - onDisconnect: events.Event; - onMessage: events.Event; + onDisconnect: WebExtEvent<() => void>; + onMessage: WebExtEvent<() => void>; postMessage: (message: object) => void; /** This property will **only** be present on ports passed to onConnect/onConnectExternal listeners. */ sender?: MessageSender; @@ -2900,10 +2908,10 @@ declare namespace browser.runtime { /** * Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and * implement surveys. Maximum 255 characters. - * @param url URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. + * @param [url] URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. * Set an empty string to not open a new tab upon uninstallation. */ - function setUninstallURL(url: string): Promise; + function setUninstallURL(url?: string): Promise; /** Reloads the app or extension. */ function reload(): void; @@ -3188,7 +3196,7 @@ declare namespace browser.storage { * @param changes Object mapping each key that changed to its corresponding `storage.StorageChange` for that item. * @param areaName The name of the storage area (`"sync"`, `"local"` or `"managed"`) the changes are for. */ - const onChanged: WebExtEvent<(changes: {[key: string]: StorageChange}, areaName: string) => void>; + const onChanged: WebExtEvent<(changes: StorageChange, areaName: string) => void>; } /** @@ -3258,7 +3266,7 @@ declare namespace browser.telemetry { usePingSender?: boolean; }): Promise; - /** Checks if Telemetry is enabled. */ + /** Checks if Telemetry upload is enabled. */ function canUpload(): Promise; /** @@ -3609,7 +3617,7 @@ declare namespace browser.webNavigation { url: events.UrlFilter[]; } - type _WebNavigationOnBeforeNavigateEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnCommittedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnDOMContentLoadedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnCompletedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnErrorOccurredEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnCreatedNavigationTargetEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnReferenceFragmentUpdatedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; - type _WebNavigationOnHistoryStateUpdatedEvent void> = WebExtEventBase<(callback: T, filters?: EventUrlFilters) => void, T>; + }) => void> { + addListener(cb: TCallback, filters?: EventUrlFilters): void; + + removeListener(cb: TCallback): void; + + hasListener(cb: TCallback): boolean; + } /* webNavigation functions */ /** @@ -4115,7 +4171,7 @@ declare namespace browser.webRequest { | "TLSv1.3" | "unknown"; - type _WebRequestOnBeforeRequestEvent BlockingResponse | Promise | void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnBeforeRequestOptions[]) => void, T>; + }) => BlockingResponse | Promise | void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnBeforeRequestOptions[]): void; - type _WebRequestOnBeforeSendHeadersEvent BlockingResponse | Promise | void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnBeforeSendHeadersOptions[]) => void, T>; + }) => BlockingResponse | Promise | void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnBeforeSendHeadersOptions[]): void; - type _WebRequestOnSendHeadersEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnSendHeadersOptions[]) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnSendHeadersOptions[]): void; - type _WebRequestOnHeadersReceivedEvent BlockingResponse | Promise | void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnHeadersReceivedOptions[]) => void, T>; + }) => BlockingResponse | Promise | void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnHeadersReceivedOptions[]): void; - type _WebRequestOnAuthRequiredEvent BlockingResponse | Promise | void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnAuthRequiredOptions[]) => void, T>; + }) => BlockingResponse | Promise | void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnAuthRequiredOptions[]): void; - type _WebRequestOnResponseStartedEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnResponseStartedOptions[]) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnResponseStartedOptions[]): void; - type _WebRequestOnBeforeRedirectEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnBeforeRedirectOptions[]) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnBeforeRedirectOptions[]): void; - type _WebRequestOnCompletedEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter, extraInfoSpec?: OnCompletedOptions[]) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter, extraInfoSpec?: OnCompletedOptions[]): void; - type _WebRequestOnErrorOccurredEvent void> = WebExtEventBase<(callback: T, filter: RequestFilter) => void, T>; + }) => void> { + addListener(cb: TCallback, filter: RequestFilter): void; + + removeListener(cb: TCallback): void; + + hasListener(cb: TCallback): boolean; + } /* webRequest properties */ /** @@ -7118,7 +7228,7 @@ declare namespace browser.tabs { | "Window" | "Application"; - type _TabsOnUpdatedEvent void> = WebExtEventBase<(callback: T, filter?: UpdateFilter) => void, T>; + }, tab: Tab) => void> { + addListener(cb: TCallback, filter?: UpdateFilter): void; + + removeListener(cb: TCallback): void; + + hasListener(cb: TCallback): boolean; + } /* tabs properties */ /** An ID which represents the absence of a browser tab. */ diff --git a/types/flexmonster/index.d.ts b/types/flexmonster/index.d.ts index eeb8ed56d7..3f7772ed08 100644 --- a/types/flexmonster/index.d.ts +++ b/types/flexmonster/index.d.ts @@ -130,7 +130,7 @@ declare namespace Flexmonster { showCharts(type?: string, multiple?: boolean): void; showGrid(): void; showGridAndCharts(type?: string, position?: string, multiple?: boolean): void; - sortingMethod(hierarchyName: string, compareFunction: (a: string, b: string) => boolean): void; + sortingMethod(hierarchyName: string, compareFunction: (a: string, b: string) => number): void; sortValues(axisName: string, type: string, tuple: number[], measure: MeasureObject): void; toolbar: Toolbar; updateData(object: DataSource | object[]): void; @@ -485,6 +485,8 @@ declare namespace Flexmonster { maxSymbols?: number; currencySymbol?: string; currencySymbolAlign?: string; + negativeCurrencyFormat?: string; + positiveCurrencyFormat?: string; nullValue?: string; infinityValue?: string; divideByZeroValue?: string; diff --git a/types/flowjs/index.d.ts b/types/flowjs/index.d.ts index 0a6c361c73..d56385e1b9 100644 --- a/types/flowjs/index.d.ts +++ b/types/flowjs/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for flowjs +// Type definitions for flowjs 2.13 // Project: https://github.com/flowjs/flow.js // Definitions by: Ryan McNamara +// Martin Nuc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace flowjs { diff --git a/types/flowjs/package.json b/types/flowjs/package.json new file mode 100644 index 0000000000..bb80441dc0 --- /dev/null +++ b/types/flowjs/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*": ["ts3.1/*"] } + } +} diff --git a/types/flowjs/ts3.1/flowjs-tests.ts b/types/flowjs/ts3.1/flowjs-tests.ts new file mode 100644 index 0000000000..5c68c768e2 --- /dev/null +++ b/types/flowjs/ts3.1/flowjs-tests.ts @@ -0,0 +1,85 @@ +// flow object +let flowObject!: flowjs.Flow; +let bool: boolean = flowObject.support; +bool = flowObject.supportDirectory; +let flowOpts: flowjs.FlowOptions = flowObject.opts; +let flowFileArray: flowjs.FlowFile[] = flowObject.files; +let flowChunkParams: flowjs.FlowChunkParams; + +flowObject.assignBrowse( []); +flowObject.assignBrowse( [], false, false, {}); +flowObject.assignDrop( []); +flowObject.unAssignDrop( []); +flowObject.on("fileSuccess", (file: flowjs.FlowFile, serverMessage: string, chunk: flowjs.FlowChunk) => {}); +flowObject.off("fileSuccess", () => {}); +flowObject.upload(); +flowObject.pause(); +flowObject.resume(); +flowObject.cancel(); +flowObject.progress(); +bool = flowObject.isUploading(); +flowObject.addFile({} as any as File); +flowObject.removeFile({} as any as flowjs.FlowFile); +let flowFile: flowjs.FlowFile = flowObject.getFromUniqueIdentifier(""); +let num: number = flowObject.getSize(); +num = flowObject.sizeUploaded(); +num = flowObject.timeRemaining(); + +// flow options +let flowOptions: flowjs.FlowOptions = {}; +flowOptions.target = ""; +flowOptions.singleFile = true; +flowOptions.chunkSize = 0; +flowOptions.forceChunkSize = true; +flowOptions.simultaneousUploads = 0; +flowOptions.fileParameterName = ""; +flowOptions.query = {}; +flowOptions.headers = {}; +flowOptions.withCredentials = true; +flowOptions.method = ""; +flowOptions.testMethod = ""; +flowOptions.uploadMethod = ""; +flowOptions.allowDuplicateUploads = true; +flowOptions.prioritizeFirstAndLastChunk = true; +flowOptions.testChunks = true; +flowOptions.preprocess = () => {}; +flowOptions.initFileFn = () => {}; +flowOptions.generateUniqueIdentifier = () => {}; +flowOptions.maxChunkRetries = 0; +flowOptions.chunkRetryInterval = 0; +flowOptions.progressCallbacksInterval = 0; +flowOptions.speedSmoothingFactor = 0; +flowOptions.successStatuses = [""]; +flowOptions.permanentErrors = [""]; + +// flow file +flowObject = flowFile.flowObj; +let htmlFile: File = flowFile.file; +let str: string = flowFile.name; +str = flowFile.relativePath; +num = flowFile.size; +str = flowFile.uniqueIdentifier; +num = flowFile.averageSpeed; +num = flowFile.currentSpeed; +let chunksArray: ReadonlyArray = flowFile.chunks; +chunksArray[0].abort(); +num = chunksArray[0].chunkSize; +num = chunksArray[0].endByte; +flowFile = chunksArray[0].fileObj; +flowObject = chunksArray[0].flowObj; +flowChunkParams = chunksArray[0].getParams(); +num = chunksArray[0].startByte; +bool = flowFile.paused; +bool = flowFile.error; +num = flowFile.progress(true); +flowFile.pause(); +flowFile.resume(); +flowFile.cancel(); +flowFile.retry(); +flowFile.bootstrap(); +bool = flowFile.isUploading(); +bool = flowFile.isComplete(); +num = flowFile.sizeUploaded(); +num = flowFile.timeRemaining(); +str = flowFile.getExtension(); +str = flowFile.getType(); diff --git a/types/flowjs/ts3.1/index.d.ts b/types/flowjs/ts3.1/index.d.ts new file mode 100644 index 0000000000..f9f0bbd460 --- /dev/null +++ b/types/flowjs/ts3.1/index.d.ts @@ -0,0 +1,159 @@ +declare namespace flowjs { + interface Flow { + support: boolean; + supportDirectory: boolean; + opts: FlowOptions; + files: FlowFile[]; + + assignBrowse( + domNodes: ReadonlyArray, + isDirectory?: boolean, + singleFile?: boolean, + attributes?: object + ): void; + assignDrop(node: HTMLElement | ReadonlyArray): void; + unAssignDrop(node: HTMLElement | ReadonlyArray): void; + on(event: T, callback: (...args: FlowEventMap[T]) => void): void; + off(event?: EventName, callback?: () => void): void; + upload(): void; + pause(): void; + resume(): void; + cancel(): void; + progress(): number; + isUploading(): boolean; + addFile(file: File): void; + removeFile(file: FlowFile): void; + getFromUniqueIdentifier(uniqueIdentifier: string): FlowFile; + getSize(): number; + sizeUploaded(): number; + timeRemaining(): number; + } + + interface FlowOptions { + target?: string; + singleFile?: boolean; + chunkSize?: number; + forceChunkSize?: boolean; + simultaneousUploads?: number; + fileParameterName?: string; + query?: object; + headers?: object; + withCredentials?: boolean; + method?: string; + testMethod?: string; + uploadMethod?: string; + allowDuplicateUploads?: boolean; + prioritizeFirstAndLastChunk?: boolean; + testChunks?: boolean; + preprocess?: (chunk: FlowChunk) => void; + initFileFn?: (file: FlowFile, chunk: FlowChunk) => void; + readFileFn?: (file: FlowFile, startByte: number, endByte: number, fileType: string, chunk: FlowChunk) => void; + generateUniqueIdentifier?: (file: FlowFile) => any; + maxChunkRetries?: number; + chunkRetryInterval?: number; + progressCallbacksInterval?: number; + speedSmoothingFactor?: number; + successStatuses?: string[]; + permanentErrors?: string[]; + } + + interface FlowFile { + flowObj: Flow; + file: File; + name: string; + relativePath: string; + size: number; + uniqueIdentifier: string; + averageSpeed: number; + currentSpeed: number; + chunks: ReadonlyArray; + paused: boolean; + error: boolean; + + progress(relative: boolean): number; + pause(): void; + resume(): void; + cancel(): void; + retry(): void; + bootstrap(): void; + isUploading(): boolean; + isComplete(): boolean; + sizeUploaded(): number; + timeRemaining(): number; + getExtension(): string; + getType(): string; + } + + interface FlowChunk { + flowObj: Flow; + fileObj: FlowFile; + offset: number; + tested: boolean; + retries: number; + pendingRetry: false; + preprocessState: 0 | 1 | 2; + readState: 0 | 1 | 2; + loaded: number; + total: number; + chunkSize: number; + startByte: number; + endByte: number; + xhr: XMLHttpRequest; + getParams(): FlowChunkParams; + test(): void; + send(): void; + abort(): void; + status(): void; + message(): void; + progress(): void; + sizeUploaded(): number; + } + + interface FlowChunkParams { + flowChunkNumber: number; + flowChunkSize: number; + flowCurrentChunkSize: number; + flowTotalSize: number; + flowIdentifier: any; + flowFilename: string; + flowRelativePath: string; + flowTotalChunks: number; + } + + interface FlowEventMap { + fileSuccess: FileSuccessCallbackArguments; + fileProgress: FileProgressCallbackArguments; + fileAdded: FilesAddedCallbackArguments; + filesAdded: FileAddedCallbackArguments; + filesSubmitted: FilesSubmittedCallbackArguments; + fileRemoved: FileRemovedCallbackArguments; + fileRetry: FileRetryCallbackArguments; + fileError: FileErrorCallbackArguments; + uploadStart: UploadStartCallbackArguments; + complete: UploadStartCallbackArguments; + progress: ProgressCallbackArguments; + error: ErrorCallbackArguments; + catchAll: CatchAllCallbackArguments; + } + + type EventName = keyof FlowEventMap; + type FlowEvent = FlowEventMap[keyof FlowEventMap]; + + type FlowEventFromEventName = FlowEventMap[T]; + type FlowEventTypeFromFlowEvent = + T extends FlowEventFromEventName ? U : never; + + type FileSuccessCallbackArguments = [FlowFile, string, FlowChunk]; + type FileProgressCallbackArguments = [FlowFile, FlowChunk]; + type FileAddedCallbackArguments = [FlowFile, Event]; + type FilesAddedCallbackArguments = [FlowFile[], Event]; + type FilesSubmittedCallbackArguments = [FlowFile[], Event]; + type FileRemovedCallbackArguments = [FlowFile]; + type FileRetryCallbackArguments = [FlowFile, FlowChunk]; + type FileErrorCallbackArguments = [FlowFile, string, FlowChunk]; + type UploadStartCallbackArguments = []; + type CompleteCallbackArguments = []; + type ProgressCallbackArguments = []; + type ErrorCallbackArguments = [string, FlowFile, FlowChunk]; + type CatchAllCallbackArguments = [Event]; +} diff --git a/types/flowjs/ts3.1/tsconfig.json b/types/flowjs/ts3.1/tsconfig.json new file mode 100644 index 0000000000..c18324eb21 --- /dev/null +++ b/types/flowjs/ts3.1/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": ["../../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "flowjs-tests.ts"] +} diff --git a/types/arrify/tslint.json b/types/flowjs/ts3.1/tslint.json similarity index 100% rename from types/arrify/tslint.json rename to types/flowjs/ts3.1/tslint.json diff --git a/types/follow-redirects/follow-redirects-tests.ts b/types/follow-redirects/follow-redirects-tests.ts new file mode 100644 index 0000000000..96219ad2a8 --- /dev/null +++ b/types/follow-redirects/follow-redirects-tests.ts @@ -0,0 +1,32 @@ +import { http, https } from 'follow-redirects'; + +http.request({ + host: 'localhost', + path: '/a/b', + port: 8000, + maxRedirects: 12, +}, (response) => { + console.log(response.responseUrl, response.redirects); + response.on('data', (chunk) => { + console.log(chunk); + }); +}).on('error', (err) => { + console.error(err); +}); + +http.get('http://bit.ly/900913', (response) => { + response.on('data', (chunk) => { + console.log(chunk); + }); +}).on('error', (err) => { + console.error(err); +}); + +https.get('http://bit.ly/900913', (response) => { + console.log(response.responseUrl, response.redirects); + response.on('data', (chunk) => { + console.log(chunk); + }); +}).on('error', (err: Error) => { + console.error(err); +}); diff --git a/types/follow-redirects/http.d.ts b/types/follow-redirects/http.d.ts new file mode 100644 index 0000000000..43206e2838 --- /dev/null +++ b/types/follow-redirects/http.d.ts @@ -0,0 +1,3 @@ +import { http } from '.'; + +export = http; diff --git a/types/follow-redirects/https.d.ts b/types/follow-redirects/https.d.ts new file mode 100644 index 0000000000..12e081c8f5 --- /dev/null +++ b/types/follow-redirects/https.d.ts @@ -0,0 +1,3 @@ +import { https } from '.'; + +export = https; diff --git a/types/follow-redirects/index.d.ts b/types/follow-redirects/index.d.ts new file mode 100644 index 0000000000..e7144e1f7f --- /dev/null +++ b/types/follow-redirects/index.d.ts @@ -0,0 +1,118 @@ +// Type definitions for follow-redirects 1.5 +// Project: https://github.com/follow-redirects/follow-redirects +// Definitions by: Emily Klassen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +import * as coreHttp from 'http'; +import * as coreHttps from 'https'; +import { Writable } from 'stream'; + +export interface WrappableRequest { + getHeader?(...args: any[]): any; + setHeader(...args: any[]): any; + removeHeader(...args: any[]): any; + + abort?(...args: any[]): any; + flushHeaders?(...args: any[]): any; + setNoDelay?(...args: any[]): any; + setSocketKeepAlive?(...args: any[]): any; + setTimeout?(...args: any[]): any; +} +export interface WrappableResponse { + statusCode?: number; + headers: { + location?: string + }; + destroy(): any; +} + +export interface Scheme { + request(options: Options, callback?: (res: Response) => any): Request; +} + +export interface RedirectableRequest extends Writable { + setHeader: Request['setHeader']; + removeHeader: Request['removeHeader']; + abort: Request['abort']; + flushHeaders: Request['flushHeaders']; + getHeader: Request['getHeader']; + setNoDelay: Request['setNoDelay']; + setSocketKeepAlive: Request['setSocketKeepAlive']; + setTimeout: Request['setTimeout']; + + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "response", listener: (response: Response) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "response", response: Response): boolean; + emit(event: "error", err: Error): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "response", listener: (response: Response) => void): this; + on(event: "error", listener: (err: Error) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "response", listener: (response: Response) => void): this; + once(event: "error", listener: (err: Error) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "response", listener: (response: Response) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "response", listener: (response: Response) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; +} + +export interface RedirectScheme { + request( + options: string | Options & FollowOptions, + callback?: (res: Response & FollowResponse) => void + ): RedirectableRequest; + get( + options: string | Options & FollowOptions, + callback?: (res: Response & FollowResponse) => void + ): RedirectableRequest; +} + +export type Override = Pick> & U; +export interface FollowOptions { + maxRedirects?: number; + maxBodyLength?: number; +} + +export interface FollowResponse { + responseUrl: string; + redirects: Redirect[]; +} + +export interface Redirect { + url: string; + headers: coreHttp.IncomingHttpHeaders; + statusCode: number; +} + +export const http: Override>; +export const https: Override>; + +export type WrappedScheme> = Override ? Options : never, + T extends Scheme ? Request : never, + T extends Scheme ? Response : never +>>; + +export function wrap}>(protocols: T): { + [K in keyof T]: WrappedScheme +}; diff --git a/types/follow-redirects/tsconfig.json b/types/follow-redirects/tsconfig.json new file mode 100644 index 0000000000..1b3c66288e --- /dev/null +++ b/types/follow-redirects/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "http.d.ts", + "https.d.ts", + "follow-redirects-tests.ts" + ] +} diff --git a/types/hard-rejection/tslint.json b/types/follow-redirects/tslint.json similarity index 100% rename from types/hard-rejection/tslint.json rename to types/follow-redirects/tslint.json diff --git a/types/force-graph/index.d.ts b/types/force-graph/index.d.ts index b9b056ce04..b78737e74e 100644 --- a/types/force-graph/index.d.ts +++ b/types/force-graph/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for force-graph >= 1.14 +// Type definitions for force-graph 1.14 // Project: https://github.com/vasturiano/force-graph // Definitions by: Peter Kimberley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -68,13 +68,19 @@ declare namespace ForceGraph { /** * Represents ForceGraph runtime object * @example: + * // Create an empty ForceGraph instance on an existing DOM element * let forceGraph = ForceGraph(); * forceGraph(myHtmlElement); - * forceGraph.graphData([]) + * forceGraph.graphData([]); + * + * // Destroy the ForceGraph instance + * forceGraph._destructor(); */ interface ForceGraphInstance { + // Init / de-init (element: HTMLElement): ForceGraphInstance; + _destructor(): void; // Data input graphData(data?: GraphData): ForceGraphInstance & GraphData; diff --git a/types/forge-viewer/package.json b/types/forge-viewer/package.json new file mode 100644 index 0000000000..8115ad827f --- /dev/null +++ b/types/forge-viewer/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "@types/three": "^0.93.30" + } +} diff --git a/types/google-apps-script/apis/adsense_v1_4.d.ts b/types/google-apps-script/apis/adsense_v1_4.d.ts index 43113d9c99..b093e051a1 100644 --- a/types/google-apps-script/apis/adsense_v1_4.d.ts +++ b/types/google-apps-script/apis/adsense_v1_4.d.ts @@ -5,217 +5,217 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Adsense_v1_4 { + namespace Adsense { namespace Collection { namespace Accounts { namespace Adunits { export interface CustomchannelsCollection { // List all custom channels which the specified ad unit belongs to. - list(accountId: string, adClientId: string, adUnitId: string): Adsense_v1_4.Schema.CustomChannels; + list(accountId: string, adClientId: string, adUnitId: string): Adsense.Schema.CustomChannels; // List all custom channels which the specified ad unit belongs to. - list(accountId: string, adClientId: string, adUnitId: string, optionalArgs: object): Adsense_v1_4.Schema.CustomChannels; + list(accountId: string, adClientId: string, adUnitId: string, optionalArgs: object): Adsense.Schema.CustomChannels; } } namespace Customchannels { export interface AdunitsCollection { // List all ad units in the specified custom channel. - list(accountId: string, adClientId: string, customChannelId: string): Adsense_v1_4.Schema.AdUnits; + list(accountId: string, adClientId: string, customChannelId: string): Adsense.Schema.AdUnits; // List all ad units in the specified custom channel. - list(accountId: string, adClientId: string, customChannelId: string, optionalArgs: object): Adsense_v1_4.Schema.AdUnits; + list(accountId: string, adClientId: string, customChannelId: string, optionalArgs: object): Adsense.Schema.AdUnits; } } namespace Reports { export interface SavedCollection { // Generate an AdSense report based on the saved report ID sent in the query parameters. - generate(accountId: string, savedReportId: string): Adsense_v1_4.Schema.AdsenseReportsGenerateResponse; + generate(accountId: string, savedReportId: string): Adsense.Schema.AdsenseReportsGenerateResponse; // Generate an AdSense report based on the saved report ID sent in the query parameters. - generate(accountId: string, savedReportId: string, optionalArgs: object): Adsense_v1_4.Schema.AdsenseReportsGenerateResponse; + generate(accountId: string, savedReportId: string, optionalArgs: object): Adsense.Schema.AdsenseReportsGenerateResponse; // List all saved reports in the specified AdSense account. - list(accountId: string): Adsense_v1_4.Schema.SavedReports; + list(accountId: string): Adsense.Schema.SavedReports; // List all saved reports in the specified AdSense account. - list(accountId: string, optionalArgs: object): Adsense_v1_4.Schema.SavedReports; + list(accountId: string, optionalArgs: object): Adsense.Schema.SavedReports; } } export interface AdclientsCollection { // Get Auto ad code for a given ad client. - getAdCode(accountId: string, adClientId: string): Adsense_v1_4.Schema.AdCode; + getAdCode(accountId: string, adClientId: string): Adsense.Schema.AdCode; // List all ad clients in the specified account. - list(accountId: string): Adsense_v1_4.Schema.AdClients; + list(accountId: string): Adsense.Schema.AdClients; // List all ad clients in the specified account. - list(accountId: string, optionalArgs: object): Adsense_v1_4.Schema.AdClients; + list(accountId: string, optionalArgs: object): Adsense.Schema.AdClients; } export interface AdunitsCollection { - Customchannels?: Adsense_v1_4.Collection.Accounts.Adunits.CustomchannelsCollection; + Customchannels?: Adsense.Collection.Accounts.Adunits.CustomchannelsCollection; // Gets the specified ad unit in the specified ad client for the specified account. - get(accountId: string, adClientId: string, adUnitId: string): Adsense_v1_4.Schema.AdUnit; + get(accountId: string, adClientId: string, adUnitId: string): Adsense.Schema.AdUnit; // Get ad code for the specified ad unit. - getAdCode(accountId: string, adClientId: string, adUnitId: string): Adsense_v1_4.Schema.AdCode; + getAdCode(accountId: string, adClientId: string, adUnitId: string): Adsense.Schema.AdCode; // List all ad units in the specified ad client for the specified account. - list(accountId: string, adClientId: string): Adsense_v1_4.Schema.AdUnits; + list(accountId: string, adClientId: string): Adsense.Schema.AdUnits; // List all ad units in the specified ad client for the specified account. - list(accountId: string, adClientId: string, optionalArgs: object): Adsense_v1_4.Schema.AdUnits; + list(accountId: string, adClientId: string, optionalArgs: object): Adsense.Schema.AdUnits; } export interface AlertsCollection { // List the alerts for the specified AdSense account. - list(accountId: string): Adsense_v1_4.Schema.Alerts; + list(accountId: string): Adsense.Schema.Alerts; // List the alerts for the specified AdSense account. - list(accountId: string, optionalArgs: object): Adsense_v1_4.Schema.Alerts; + list(accountId: string, optionalArgs: object): Adsense.Schema.Alerts; // Dismiss (delete) the specified alert from the specified publisher AdSense account. remove(accountId: string, alertId: string): void; } export interface CustomchannelsCollection { - Adunits?: Adsense_v1_4.Collection.Accounts.Customchannels.AdunitsCollection; + Adunits?: Adsense.Collection.Accounts.Customchannels.AdunitsCollection; // Get the specified custom channel from the specified ad client for the specified account. - get(accountId: string, adClientId: string, customChannelId: string): Adsense_v1_4.Schema.CustomChannel; + get(accountId: string, adClientId: string, customChannelId: string): Adsense.Schema.CustomChannel; // List all custom channels in the specified ad client for the specified account. - list(accountId: string, adClientId: string): Adsense_v1_4.Schema.CustomChannels; + list(accountId: string, adClientId: string): Adsense.Schema.CustomChannels; // List all custom channels in the specified ad client for the specified account. - list(accountId: string, adClientId: string, optionalArgs: object): Adsense_v1_4.Schema.CustomChannels; + list(accountId: string, adClientId: string, optionalArgs: object): Adsense.Schema.CustomChannels; } export interface PaymentsCollection { // List the payments for the specified AdSense account. - list(accountId: string): Adsense_v1_4.Schema.Payments; + list(accountId: string): Adsense.Schema.Payments; } export interface ReportsCollection { - Saved?: Adsense_v1_4.Collection.Accounts.Reports.SavedCollection; + Saved?: Adsense.Collection.Accounts.Reports.SavedCollection; // Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. - generate(accountId: string, startDate: string, endDate: string): Adsense_v1_4.Schema.AdsenseReportsGenerateResponse; + generate(accountId: string, startDate: string, endDate: string): Adsense.Schema.AdsenseReportsGenerateResponse; // Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. - generate(accountId: string, startDate: string, endDate: string, optionalArgs: object): Adsense_v1_4.Schema.AdsenseReportsGenerateResponse; + generate(accountId: string, startDate: string, endDate: string, optionalArgs: object): Adsense.Schema.AdsenseReportsGenerateResponse; } export interface SavedadstylesCollection { // List a specific saved ad style for the specified account. - get(accountId: string, savedAdStyleId: string): Adsense_v1_4.Schema.SavedAdStyle; + get(accountId: string, savedAdStyleId: string): Adsense.Schema.SavedAdStyle; // List all saved ad styles in the specified account. - list(accountId: string): Adsense_v1_4.Schema.SavedAdStyles; + list(accountId: string): Adsense.Schema.SavedAdStyles; // List all saved ad styles in the specified account. - list(accountId: string, optionalArgs: object): Adsense_v1_4.Schema.SavedAdStyles; + list(accountId: string, optionalArgs: object): Adsense.Schema.SavedAdStyles; } export interface UrlchannelsCollection { // List all URL channels in the specified ad client for the specified account. - list(accountId: string, adClientId: string): Adsense_v1_4.Schema.UrlChannels; + list(accountId: string, adClientId: string): Adsense.Schema.UrlChannels; // List all URL channels in the specified ad client for the specified account. - list(accountId: string, adClientId: string, optionalArgs: object): Adsense_v1_4.Schema.UrlChannels; + list(accountId: string, adClientId: string, optionalArgs: object): Adsense.Schema.UrlChannels; } } namespace Adunits { export interface CustomchannelsCollection { // List all custom channels which the specified ad unit belongs to. - list(adClientId: string, adUnitId: string): Adsense_v1_4.Schema.CustomChannels; + list(adClientId: string, adUnitId: string): Adsense.Schema.CustomChannels; // List all custom channels which the specified ad unit belongs to. - list(adClientId: string, adUnitId: string, optionalArgs: object): Adsense_v1_4.Schema.CustomChannels; + list(adClientId: string, adUnitId: string, optionalArgs: object): Adsense.Schema.CustomChannels; } } namespace Customchannels { export interface AdunitsCollection { // List all ad units in the specified custom channel. - list(adClientId: string, customChannelId: string): Adsense_v1_4.Schema.AdUnits; + list(adClientId: string, customChannelId: string): Adsense.Schema.AdUnits; // List all ad units in the specified custom channel. - list(adClientId: string, customChannelId: string, optionalArgs: object): Adsense_v1_4.Schema.AdUnits; + list(adClientId: string, customChannelId: string, optionalArgs: object): Adsense.Schema.AdUnits; } } namespace Metadata { export interface DimensionsCollection { // List the metadata for the dimensions available to this AdSense account. - list(): Adsense_v1_4.Schema.Metadata; + list(): Adsense.Schema.Metadata; } export interface MetricsCollection { // List the metadata for the metrics available to this AdSense account. - list(): Adsense_v1_4.Schema.Metadata; + list(): Adsense.Schema.Metadata; } } namespace Reports { export interface SavedCollection { // Generate an AdSense report based on the saved report ID sent in the query parameters. - generate(savedReportId: string): Adsense_v1_4.Schema.AdsenseReportsGenerateResponse; + generate(savedReportId: string): Adsense.Schema.AdsenseReportsGenerateResponse; // Generate an AdSense report based on the saved report ID sent in the query parameters. - generate(savedReportId: string, optionalArgs: object): Adsense_v1_4.Schema.AdsenseReportsGenerateResponse; + generate(savedReportId: string, optionalArgs: object): Adsense.Schema.AdsenseReportsGenerateResponse; // List all saved reports in this AdSense account. - list(): Adsense_v1_4.Schema.SavedReports; + list(): Adsense.Schema.SavedReports; // List all saved reports in this AdSense account. - list(optionalArgs: object): Adsense_v1_4.Schema.SavedReports; + list(optionalArgs: object): Adsense.Schema.SavedReports; } } export interface AccountsCollection { - Adclients?: Adsense_v1_4.Collection.Accounts.AdclientsCollection; - Adunits?: Adsense_v1_4.Collection.Accounts.AdunitsCollection; - Alerts?: Adsense_v1_4.Collection.Accounts.AlertsCollection; - Customchannels?: Adsense_v1_4.Collection.Accounts.CustomchannelsCollection; - Payments?: Adsense_v1_4.Collection.Accounts.PaymentsCollection; - Reports?: Adsense_v1_4.Collection.Accounts.ReportsCollection; - Savedadstyles?: Adsense_v1_4.Collection.Accounts.SavedadstylesCollection; - Urlchannels?: Adsense_v1_4.Collection.Accounts.UrlchannelsCollection; + Adclients?: Adsense.Collection.Accounts.AdclientsCollection; + Adunits?: Adsense.Collection.Accounts.AdunitsCollection; + Alerts?: Adsense.Collection.Accounts.AlertsCollection; + Customchannels?: Adsense.Collection.Accounts.CustomchannelsCollection; + Payments?: Adsense.Collection.Accounts.PaymentsCollection; + Reports?: Adsense.Collection.Accounts.ReportsCollection; + Savedadstyles?: Adsense.Collection.Accounts.SavedadstylesCollection; + Urlchannels?: Adsense.Collection.Accounts.UrlchannelsCollection; // Get information about the selected AdSense account. - get(accountId: string): Adsense_v1_4.Schema.Account; + get(accountId: string): Adsense.Schema.Account; // Get information about the selected AdSense account. - get(accountId: string, optionalArgs: object): Adsense_v1_4.Schema.Account; + get(accountId: string, optionalArgs: object): Adsense.Schema.Account; // List all accounts available to this AdSense account. - list(): Adsense_v1_4.Schema.Accounts; + list(): Adsense.Schema.Accounts; // List all accounts available to this AdSense account. - list(optionalArgs: object): Adsense_v1_4.Schema.Accounts; + list(optionalArgs: object): Adsense.Schema.Accounts; } export interface AdclientsCollection { // List all ad clients in this AdSense account. - list(): Adsense_v1_4.Schema.AdClients; + list(): Adsense.Schema.AdClients; // List all ad clients in this AdSense account. - list(optionalArgs: object): Adsense_v1_4.Schema.AdClients; + list(optionalArgs: object): Adsense.Schema.AdClients; } export interface AdunitsCollection { - Customchannels?: Adsense_v1_4.Collection.Adunits.CustomchannelsCollection; + Customchannels?: Adsense.Collection.Adunits.CustomchannelsCollection; // Gets the specified ad unit in the specified ad client. - get(adClientId: string, adUnitId: string): Adsense_v1_4.Schema.AdUnit; + get(adClientId: string, adUnitId: string): Adsense.Schema.AdUnit; // Get ad code for the specified ad unit. - getAdCode(adClientId: string, adUnitId: string): Adsense_v1_4.Schema.AdCode; + getAdCode(adClientId: string, adUnitId: string): Adsense.Schema.AdCode; // List all ad units in the specified ad client for this AdSense account. - list(adClientId: string): Adsense_v1_4.Schema.AdUnits; + list(adClientId: string): Adsense.Schema.AdUnits; // List all ad units in the specified ad client for this AdSense account. - list(adClientId: string, optionalArgs: object): Adsense_v1_4.Schema.AdUnits; + list(adClientId: string, optionalArgs: object): Adsense.Schema.AdUnits; } export interface AlertsCollection { // List the alerts for this AdSense account. - list(): Adsense_v1_4.Schema.Alerts; + list(): Adsense.Schema.Alerts; // List the alerts for this AdSense account. - list(optionalArgs: object): Adsense_v1_4.Schema.Alerts; + list(optionalArgs: object): Adsense.Schema.Alerts; // Dismiss (delete) the specified alert from the publisher's AdSense account. remove(alertId: string): void; } export interface CustomchannelsCollection { - Adunits?: Adsense_v1_4.Collection.Customchannels.AdunitsCollection; + Adunits?: Adsense.Collection.Customchannels.AdunitsCollection; // Get the specified custom channel from the specified ad client. - get(adClientId: string, customChannelId: string): Adsense_v1_4.Schema.CustomChannel; + get(adClientId: string, customChannelId: string): Adsense.Schema.CustomChannel; // List all custom channels in the specified ad client for this AdSense account. - list(adClientId: string): Adsense_v1_4.Schema.CustomChannels; + list(adClientId: string): Adsense.Schema.CustomChannels; // List all custom channels in the specified ad client for this AdSense account. - list(adClientId: string, optionalArgs: object): Adsense_v1_4.Schema.CustomChannels; + list(adClientId: string, optionalArgs: object): Adsense.Schema.CustomChannels; } export interface MetadataCollection { - Dimensions?: Adsense_v1_4.Collection.Metadata.DimensionsCollection; - Metrics?: Adsense_v1_4.Collection.Metadata.MetricsCollection; + Dimensions?: Adsense.Collection.Metadata.DimensionsCollection; + Metrics?: Adsense.Collection.Metadata.MetricsCollection; } export interface PaymentsCollection { // List the payments for this AdSense account. - list(): Adsense_v1_4.Schema.Payments; + list(): Adsense.Schema.Payments; } export interface ReportsCollection { - Saved?: Adsense_v1_4.Collection.Reports.SavedCollection; + Saved?: Adsense.Collection.Reports.SavedCollection; // Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. - generate(startDate: string, endDate: string): Adsense_v1_4.Schema.AdsenseReportsGenerateResponse; + generate(startDate: string, endDate: string): Adsense.Schema.AdsenseReportsGenerateResponse; // Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. - generate(startDate: string, endDate: string, optionalArgs: object): Adsense_v1_4.Schema.AdsenseReportsGenerateResponse; + generate(startDate: string, endDate: string, optionalArgs: object): Adsense.Schema.AdsenseReportsGenerateResponse; } export interface SavedadstylesCollection { // Get a specific saved ad style from the user's account. - get(savedAdStyleId: string): Adsense_v1_4.Schema.SavedAdStyle; + get(savedAdStyleId: string): Adsense.Schema.SavedAdStyle; // List all saved ad styles in the user's account. - list(): Adsense_v1_4.Schema.SavedAdStyles; + list(): Adsense.Schema.SavedAdStyles; // List all saved ad styles in the user's account. - list(optionalArgs: object): Adsense_v1_4.Schema.SavedAdStyles; + list(optionalArgs: object): Adsense.Schema.SavedAdStyles; } export interface UrlchannelsCollection { // List all URL channels in the specified ad client for this AdSense account. - list(adClientId: string): Adsense_v1_4.Schema.UrlChannels; + list(adClientId: string): Adsense.Schema.UrlChannels; // List all URL channels in the specified ad client for this AdSense account. - list(adClientId: string, optionalArgs: object): Adsense_v1_4.Schema.UrlChannels; + list(adClientId: string, optionalArgs: object): Adsense.Schema.UrlChannels; } } namespace Schema { @@ -225,12 +225,12 @@ declare namespace GoogleAppsScript { kind?: string; name?: string; premium?: boolean; - subAccounts?: Adsense_v1_4.Schema.Account[]; + subAccounts?: Adsense.Schema.Account[]; timezone?: string; } export interface Accounts { etag?: string; - items?: Adsense_v1_4.Schema.Account[]; + items?: Adsense.Schema.Account[]; kind?: string; nextPageToken?: string; } @@ -243,7 +243,7 @@ declare namespace GoogleAppsScript { } export interface AdClients { etag?: string; - items?: Adsense_v1_4.Schema.AdClient[]; + items?: Adsense.Schema.AdClient[]; kind?: string; nextPageToken?: string; } @@ -254,9 +254,9 @@ declare namespace GoogleAppsScript { kind?: string; } export interface AdStyle { - colors?: Adsense_v1_4.Schema.AdStyleColors; + colors?: Adsense.Schema.AdStyleColors; corners?: string; - font?: Adsense_v1_4.Schema.AdStyleFont; + font?: Adsense.Schema.AdStyleFont; kind?: string; } export interface AdStyleColors { @@ -272,18 +272,18 @@ declare namespace GoogleAppsScript { } export interface AdUnit { code?: string; - contentAdsSettings?: Adsense_v1_4.Schema.AdUnitContentAdsSettings; - customStyle?: Adsense_v1_4.Schema.AdStyle; - feedAdsSettings?: Adsense_v1_4.Schema.AdUnitFeedAdsSettings; + contentAdsSettings?: Adsense.Schema.AdUnitContentAdsSettings; + customStyle?: Adsense.Schema.AdStyle; + feedAdsSettings?: Adsense.Schema.AdUnitFeedAdsSettings; id?: string; kind?: string; - mobileContentAdsSettings?: Adsense_v1_4.Schema.AdUnitMobileContentAdsSettings; + mobileContentAdsSettings?: Adsense.Schema.AdUnitMobileContentAdsSettings; name?: string; savedStyleId?: string; status?: string; } export interface AdUnitContentAdsSettings { - backupOption?: Adsense_v1_4.Schema.AdUnitContentAdsSettingsBackupOption; + backupOption?: Adsense.Schema.AdUnitContentAdsSettingsBackupOption; size?: string; type?: string; } @@ -306,14 +306,14 @@ declare namespace GoogleAppsScript { } export interface AdUnits { etag?: string; - items?: Adsense_v1_4.Schema.AdUnit[]; + items?: Adsense.Schema.AdUnit[]; kind?: string; nextPageToken?: string; } export interface AdsenseReportsGenerateResponse { averages?: string[]; endDate?: string; - headers?: Adsense_v1_4.Schema.AdsenseReportsGenerateResponseHeaders[]; + headers?: Adsense.Schema.AdsenseReportsGenerateResponseHeaders[]; kind?: string; rows?: String[][]; startDate?: string; @@ -335,7 +335,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface Alerts { - items?: Adsense_v1_4.Schema.Alert[]; + items?: Adsense.Schema.Alert[]; kind?: string; } export interface CustomChannel { @@ -343,7 +343,7 @@ declare namespace GoogleAppsScript { id?: string; kind?: string; name?: string; - targetingInfo?: Adsense_v1_4.Schema.CustomChannelTargetingInfo; + targetingInfo?: Adsense.Schema.CustomChannelTargetingInfo; } export interface CustomChannelTargetingInfo { adsAppearOn?: string; @@ -353,12 +353,12 @@ declare namespace GoogleAppsScript { } export interface CustomChannels { etag?: string; - items?: Adsense_v1_4.Schema.CustomChannel[]; + items?: Adsense.Schema.CustomChannel[]; kind?: string; nextPageToken?: string; } export interface Metadata { - items?: Adsense_v1_4.Schema.ReportingMetadataEntry[]; + items?: Adsense.Schema.ReportingMetadataEntry[]; kind?: string; } export interface Payment { @@ -369,7 +369,7 @@ declare namespace GoogleAppsScript { paymentDate?: string; } export interface Payments { - items?: Adsense_v1_4.Schema.Payment[]; + items?: Adsense.Schema.Payment[]; kind?: string; } export interface ReportingMetadataEntry { @@ -382,14 +382,14 @@ declare namespace GoogleAppsScript { supportedProducts?: string[]; } export interface SavedAdStyle { - adStyle?: Adsense_v1_4.Schema.AdStyle; + adStyle?: Adsense.Schema.AdStyle; id?: string; kind?: string; name?: string; } export interface SavedAdStyles { etag?: string; - items?: Adsense_v1_4.Schema.SavedAdStyle[]; + items?: Adsense.Schema.SavedAdStyle[]; kind?: string; nextPageToken?: string; } @@ -400,7 +400,7 @@ declare namespace GoogleAppsScript { } export interface SavedReports { etag?: string; - items?: Adsense_v1_4.Schema.SavedReport[]; + items?: Adsense.Schema.SavedReport[]; kind?: string; nextPageToken?: string; } @@ -411,24 +411,24 @@ declare namespace GoogleAppsScript { } export interface UrlChannels { etag?: string; - items?: Adsense_v1_4.Schema.UrlChannel[]; + items?: Adsense.Schema.UrlChannel[]; kind?: string; nextPageToken?: string; } } } - export interface Adsense_v1_4 { - Accounts?: Adsense_v1_4.Collection.AccountsCollection; - Adclients?: Adsense_v1_4.Collection.AdclientsCollection; - Adunits?: Adsense_v1_4.Collection.AdunitsCollection; - Alerts?: Adsense_v1_4.Collection.AlertsCollection; - Customchannels?: Adsense_v1_4.Collection.CustomchannelsCollection; - Metadata?: Adsense_v1_4.Collection.MetadataCollection; - Payments?: Adsense_v1_4.Collection.PaymentsCollection; - Reports?: Adsense_v1_4.Collection.ReportsCollection; - Savedadstyles?: Adsense_v1_4.Collection.SavedadstylesCollection; - Urlchannels?: Adsense_v1_4.Collection.UrlchannelsCollection; + export interface Adsense { + Accounts?: Adsense.Collection.AccountsCollection; + Adclients?: Adsense.Collection.AdclientsCollection; + Adunits?: Adsense.Collection.AdunitsCollection; + Alerts?: Adsense.Collection.AlertsCollection; + Customchannels?: Adsense.Collection.CustomchannelsCollection; + Metadata?: Adsense.Collection.MetadataCollection; + Payments?: Adsense.Collection.PaymentsCollection; + Reports?: Adsense.Collection.ReportsCollection; + Savedadstyles?: Adsense.Collection.SavedadstylesCollection; + Urlchannels?: Adsense.Collection.UrlchannelsCollection; } } -declare var Adsense_v1_4: GoogleAppsScript.Adsense_v1_4; \ No newline at end of file +declare var Adsense: GoogleAppsScript.Adsense; diff --git a/types/google-apps-script/apis/analytics_v3.d.ts b/types/google-apps-script/apis/analytics_v3.d.ts index 2bcccb5546..f97dd231d3 100644 --- a/types/google-apps-script/apis/analytics_v3.d.ts +++ b/types/google-apps-script/apis/analytics_v3.d.ts @@ -5,220 +5,220 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Analytics_v3 { + namespace Analytics { namespace Collection { namespace Data { export interface GaCollection { // Returns Analytics data for a view (profile). - get(ids: string, start_date: string, end_date: string, metrics: string): Analytics_v3.Schema.GaData; + get(ids: string, start_date: string, end_date: string, metrics: string): Analytics.Schema.GaData; // Returns Analytics data for a view (profile). - get(ids: string, start_date: string, end_date: string, metrics: string, optionalArgs: object): Analytics_v3.Schema.GaData; + get(ids: string, start_date: string, end_date: string, metrics: string, optionalArgs: object): Analytics.Schema.GaData; } export interface McfCollection { // Returns Analytics Multi-Channel Funnels data for a view (profile). - get(ids: string, start_date: string, end_date: string, metrics: string): Analytics_v3.Schema.McfData; + get(ids: string, start_date: string, end_date: string, metrics: string): Analytics.Schema.McfData; // Returns Analytics Multi-Channel Funnels data for a view (profile). - get(ids: string, start_date: string, end_date: string, metrics: string, optionalArgs: object): Analytics_v3.Schema.McfData; + get(ids: string, start_date: string, end_date: string, metrics: string, optionalArgs: object): Analytics.Schema.McfData; } export interface RealtimeCollection { // Returns real time data for a view (profile). - get(ids: string, metrics: string): Analytics_v3.Schema.RealtimeData; + get(ids: string, metrics: string): Analytics.Schema.RealtimeData; // Returns real time data for a view (profile). - get(ids: string, metrics: string, optionalArgs: object): Analytics_v3.Schema.RealtimeData; + get(ids: string, metrics: string, optionalArgs: object): Analytics.Schema.RealtimeData; } } namespace Management { export interface AccountSummariesCollection { // Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access. - list(): Analytics_v3.Schema.AccountSummaries; + list(): Analytics.Schema.AccountSummaries; // Lists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access. - list(optionalArgs: object): Analytics_v3.Schema.AccountSummaries; + list(optionalArgs: object): Analytics.Schema.AccountSummaries; } export interface AccountUserLinksCollection { // Adds a new user to the given account. - insert(resource: Schema.EntityUserLink, accountId: string): Analytics_v3.Schema.EntityUserLink; + insert(resource: Schema.EntityUserLink, accountId: string): Analytics.Schema.EntityUserLink; // Lists account-user links for a given account. - list(accountId: string): Analytics_v3.Schema.EntityUserLinks; + list(accountId: string): Analytics.Schema.EntityUserLinks; // Lists account-user links for a given account. - list(accountId: string, optionalArgs: object): Analytics_v3.Schema.EntityUserLinks; + list(accountId: string, optionalArgs: object): Analytics.Schema.EntityUserLinks; // Removes a user from the given account. remove(accountId: string, linkId: string): void; // Updates permissions for an existing user on the given account. - update(resource: Schema.EntityUserLink, accountId: string, linkId: string): Analytics_v3.Schema.EntityUserLink; + update(resource: Schema.EntityUserLink, accountId: string, linkId: string): Analytics.Schema.EntityUserLink; } export interface AccountsCollection { // Lists all accounts to which the user has access. - list(): Analytics_v3.Schema.Accounts; + list(): Analytics.Schema.Accounts; // Lists all accounts to which the user has access. - list(optionalArgs: object): Analytics_v3.Schema.Accounts; + list(optionalArgs: object): Analytics.Schema.Accounts; } export interface ClientIdCollection { // Hashes the given Client ID. - hashClientId(resource: Analytics_v3.Schema.HashClientIdRequest): Analytics_v3.Schema.HashClientIdResponse; + hashClientId(resource: Analytics.Schema.HashClientIdRequest): Analytics.Schema.HashClientIdResponse; } export interface CustomDataSourcesCollection { // List custom data sources to which the user has access. - list(accountId: string, webPropertyId: string): Analytics_v3.Schema.CustomDataSources; + list(accountId: string, webPropertyId: string): Analytics.Schema.CustomDataSources; // List custom data sources to which the user has access. - list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics_v3.Schema.CustomDataSources; + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.CustomDataSources; } export interface CustomDimensionsCollection { // Get a custom dimension to which the user has access. - get(accountId: string, webPropertyId: string, customDimensionId: string): Analytics_v3.Schema.CustomDimension; + get(accountId: string, webPropertyId: string, customDimensionId: string): Analytics.Schema.CustomDimension; // Create a new custom dimension. - insert(resource: Schema.CustomDimension, accountId: string, webPropertyId: string): Analytics_v3.Schema.CustomDimension; + insert(resource: Schema.CustomDimension, accountId: string, webPropertyId: string): Analytics.Schema.CustomDimension; // Lists custom dimensions to which the user has access. - list(accountId: string, webPropertyId: string): Analytics_v3.Schema.CustomDimensions; + list(accountId: string, webPropertyId: string): Analytics.Schema.CustomDimensions; // Lists custom dimensions to which the user has access. - list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics_v3.Schema.CustomDimensions; + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.CustomDimensions; // Updates an existing custom dimension. This method supports patch semantics. - patch(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string): Analytics_v3.Schema.CustomDimension; + patch(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string): Analytics.Schema.CustomDimension; // Updates an existing custom dimension. This method supports patch semantics. - patch(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string, optionalArgs: object): Analytics_v3.Schema.CustomDimension; + patch(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string, optionalArgs: object): Analytics.Schema.CustomDimension; // Updates an existing custom dimension. - update(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string): Analytics_v3.Schema.CustomDimension; + update(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string): Analytics.Schema.CustomDimension; // Updates an existing custom dimension. - update(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string, optionalArgs: object): Analytics_v3.Schema.CustomDimension; + update(resource: Schema.CustomDimension, accountId: string, webPropertyId: string, customDimensionId: string, optionalArgs: object): Analytics.Schema.CustomDimension; } export interface CustomMetricsCollection { // Get a custom metric to which the user has access. - get(accountId: string, webPropertyId: string, customMetricId: string): Analytics_v3.Schema.CustomMetric; + get(accountId: string, webPropertyId: string, customMetricId: string): Analytics.Schema.CustomMetric; // Create a new custom metric. - insert(resource: Schema.CustomMetric, accountId: string, webPropertyId: string): Analytics_v3.Schema.CustomMetric; + insert(resource: Schema.CustomMetric, accountId: string, webPropertyId: string): Analytics.Schema.CustomMetric; // Lists custom metrics to which the user has access. - list(accountId: string, webPropertyId: string): Analytics_v3.Schema.CustomMetrics; + list(accountId: string, webPropertyId: string): Analytics.Schema.CustomMetrics; // Lists custom metrics to which the user has access. - list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics_v3.Schema.CustomMetrics; + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.CustomMetrics; // Updates an existing custom metric. This method supports patch semantics. - patch(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string): Analytics_v3.Schema.CustomMetric; + patch(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string): Analytics.Schema.CustomMetric; // Updates an existing custom metric. This method supports patch semantics. - patch(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string, optionalArgs: object): Analytics_v3.Schema.CustomMetric; + patch(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string, optionalArgs: object): Analytics.Schema.CustomMetric; // Updates an existing custom metric. - update(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string): Analytics_v3.Schema.CustomMetric; + update(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string): Analytics.Schema.CustomMetric; // Updates an existing custom metric. - update(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string, optionalArgs: object): Analytics_v3.Schema.CustomMetric; + update(resource: Schema.CustomMetric, accountId: string, webPropertyId: string, customMetricId: string, optionalArgs: object): Analytics.Schema.CustomMetric; } export interface ExperimentsCollection { // Returns an experiment to which the user has access. - get(accountId: string, webPropertyId: string, profileId: string, experimentId: string): Analytics_v3.Schema.Experiment; + get(accountId: string, webPropertyId: string, profileId: string, experimentId: string): Analytics.Schema.Experiment; // Create a new experiment. - insert(resource: Schema.Experiment, accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.Experiment; + insert(resource: Schema.Experiment, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Experiment; // Lists experiments to which the user has access. - list(accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.Experiments; + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Experiments; // Lists experiments to which the user has access. - list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics_v3.Schema.Experiments; + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.Experiments; // Update an existing experiment. This method supports patch semantics. - patch(resource: Schema.Experiment, accountId: string, webPropertyId: string, profileId: string, experimentId: string): Analytics_v3.Schema.Experiment; + patch(resource: Schema.Experiment, accountId: string, webPropertyId: string, profileId: string, experimentId: string): Analytics.Schema.Experiment; // Delete an experiment. remove(accountId: string, webPropertyId: string, profileId: string, experimentId: string): void; // Update an existing experiment. - update(resource: Schema.Experiment, accountId: string, webPropertyId: string, profileId: string, experimentId: string): Analytics_v3.Schema.Experiment; + update(resource: Schema.Experiment, accountId: string, webPropertyId: string, profileId: string, experimentId: string): Analytics.Schema.Experiment; } export interface FiltersCollection { // Returns a filters to which the user has access. - get(accountId: string, filterId: string): Analytics_v3.Schema.Filter; + get(accountId: string, filterId: string): Analytics.Schema.Filter; // Create a new filter. - insert(resource: Schema.Filter, accountId: string): Analytics_v3.Schema.Filter; + insert(resource: Schema.Filter, accountId: string): Analytics.Schema.Filter; // Lists all filters for an account - list(accountId: string): Analytics_v3.Schema.Filters; + list(accountId: string): Analytics.Schema.Filters; // Lists all filters for an account - list(accountId: string, optionalArgs: object): Analytics_v3.Schema.Filters; + list(accountId: string, optionalArgs: object): Analytics.Schema.Filters; // Updates an existing filter. This method supports patch semantics. - patch(resource: Schema.Filter, accountId: string, filterId: string): Analytics_v3.Schema.Filter; + patch(resource: Schema.Filter, accountId: string, filterId: string): Analytics.Schema.Filter; // Delete a filter. - remove(accountId: string, filterId: string): Analytics_v3.Schema.Filter; + remove(accountId: string, filterId: string): Analytics.Schema.Filter; // Updates an existing filter. - update(resource: Schema.Filter, accountId: string, filterId: string): Analytics_v3.Schema.Filter; + update(resource: Schema.Filter, accountId: string, filterId: string): Analytics.Schema.Filter; } export interface GoalsCollection { // Gets a goal to which the user has access. - get(accountId: string, webPropertyId: string, profileId: string, goalId: string): Analytics_v3.Schema.Goal; + get(accountId: string, webPropertyId: string, profileId: string, goalId: string): Analytics.Schema.Goal; // Create a new goal. - insert(resource: Analytics_v3.Schema.Goal, accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.Goal; + insert(resource: Analytics.Schema.Goal, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Goal; // Lists goals to which the user has access. - list(accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.Goals; + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Goals; // Lists goals to which the user has access. - list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics_v3.Schema.Goals; + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.Goals; // Updates an existing goal. This method supports patch semantics. - patch(resource: Schema.Goal, accountId: string, webPropertyId: string, profileId: string, goalId: string): Analytics_v3.Schema.Goal; + patch(resource: Schema.Goal, accountId: string, webPropertyId: string, profileId: string, goalId: string): Analytics.Schema.Goal; // Updates an existing goal. - update(resource: Schema.Goal, accountId: string, webPropertyId: string, profileId: string, goalId: string): Analytics_v3.Schema.Goal; + update(resource: Schema.Goal, accountId: string, webPropertyId: string, profileId: string, goalId: string): Analytics.Schema.Goal; } export interface ProfileFilterLinksCollection { // Returns a single profile filter link. - get(accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics_v3.Schema.ProfileFilterLink; + get(accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics.Schema.ProfileFilterLink; // Create a new profile filter link. - insert(resource: Schema.ProfileFilterLink, accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.ProfileFilterLink; + insert(resource: Schema.ProfileFilterLink, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.ProfileFilterLink; // Lists all profile filter links for a profile. - list(accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.ProfileFilterLinks; + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.ProfileFilterLinks; // Lists all profile filter links for a profile. - list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics_v3.Schema.ProfileFilterLinks; + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.ProfileFilterLinks; // Update an existing profile filter link. This method supports patch semantics. - patch(resource: Schema.ProfileFilterLink, accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics_v3.Schema.ProfileFilterLink; + patch(resource: Schema.ProfileFilterLink, accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics.Schema.ProfileFilterLink; // Delete a profile filter link. remove(accountId: string, webPropertyId: string, profileId: string, linkId: string): void; // Update an existing profile filter link. - update(resource: Schema.ProfileFilterLink, accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics_v3.Schema.ProfileFilterLink; + update(resource: Schema.ProfileFilterLink, accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics.Schema.ProfileFilterLink; } export interface ProfileUserLinksCollection { // Adds a new user to the given view (profile). - insert(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.EntityUserLink; + insert(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.EntityUserLink; // Lists profile-user links for a given view (profile). - list(accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.EntityUserLinks; + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.EntityUserLinks; // Lists profile-user links for a given view (profile). - list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics_v3.Schema.EntityUserLinks; + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.EntityUserLinks; // Removes a user from the given view (profile). remove(accountId: string, webPropertyId: string, profileId: string, linkId: string): void; // Updates permissions for an existing user on the given view (profile). - update(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics_v3.Schema.EntityUserLink; + update(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string, profileId: string, linkId: string): Analytics.Schema.EntityUserLink; } export interface ProfilesCollection { // Gets a view (profile) to which the user has access. - get(accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.Profile; + get(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Profile; // Create a new view (profile). - insert(resource: Schema.Profile, accountId: string, webPropertyId: string): Analytics_v3.Schema.Profile; + insert(resource: Schema.Profile, accountId: string, webPropertyId: string): Analytics.Schema.Profile; // Lists views (profiles) to which the user has access. - list(accountId: string, webPropertyId: string): Analytics_v3.Schema.Profiles; + list(accountId: string, webPropertyId: string): Analytics.Schema.Profiles; // Lists views (profiles) to which the user has access. - list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics_v3.Schema.Profiles; + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.Profiles; // Updates an existing view (profile). This method supports patch semantics. - patch(resource: Schema.Profile, accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.Profile; + patch(resource: Schema.Profile, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Profile; // Deletes a view (profile). remove(accountId: string, webPropertyId: string, profileId: string): void; // Updates an existing view (profile). - update(resource: Schema.Profile, accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.Profile; + update(resource: Schema.Profile, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.Profile; } export interface RemarketingAudienceCollection { // Gets a remarketing audience to which the user has access. - get(accountId: string, webPropertyId: string, remarketingAudienceId: string): Analytics_v3.Schema.RemarketingAudience; + get(accountId: string, webPropertyId: string, remarketingAudienceId: string): Analytics.Schema.RemarketingAudience; // Creates a new remarketing audience. - insert(resource: Schema.RemarketingAudience, accountId: string, webPropertyId: string): Analytics_v3.Schema.RemarketingAudience; + insert(resource: Schema.RemarketingAudience, accountId: string, webPropertyId: string): Analytics.Schema.RemarketingAudience; // Lists remarketing audiences to which the user has access. - list(accountId: string, webPropertyId: string): Analytics_v3.Schema.RemarketingAudiences; + list(accountId: string, webPropertyId: string): Analytics.Schema.RemarketingAudiences; // Lists remarketing audiences to which the user has access. - list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics_v3.Schema.RemarketingAudiences; + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.RemarketingAudiences; // Updates an existing remarketing audience. This method supports patch semantics. - patch(resource: Schema.RemarketingAudience, accountId: string, webPropertyId: string, remarketingAudienceId: string): Analytics_v3.Schema.RemarketingAudience; + patch(resource: Schema.RemarketingAudience, accountId: string, webPropertyId: string, remarketingAudienceId: string): Analytics.Schema.RemarketingAudience; // Delete a remarketing audience. remove(accountId: string, webPropertyId: string, remarketingAudienceId: string): void; // Updates an existing remarketing audience. - update(resource: Schema.RemarketingAudience, accountId: string, webPropertyId: string, remarketingAudienceId: string): Analytics_v3.Schema.RemarketingAudience; + update(resource: Schema.RemarketingAudience, accountId: string, webPropertyId: string, remarketingAudienceId: string): Analytics.Schema.RemarketingAudience; } export interface SegmentsCollection { // Lists segments to which the user has access. - list(): Analytics_v3.Schema.Segments; + list(): Analytics.Schema.Segments; // Lists segments to which the user has access. - list(optionalArgs: object): Analytics_v3.Schema.Segments; + list(optionalArgs: object): Analytics.Schema.Segments; } export interface UnsampledReportsCollection { // Returns a single unsampled report. - get(accountId: string, webPropertyId: string, profileId: string, unsampledReportId: string): Analytics_v3.Schema.UnsampledReport; + get(accountId: string, webPropertyId: string, profileId: string, unsampledReportId: string): Analytics.Schema.UnsampledReport; // Create a new unsampled report. - insert(resource: Schema.UnsampledReport, accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.UnsampledReport; + insert(resource: Schema.UnsampledReport, accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.UnsampledReport; // Lists unsampled reports to which the user has access. - list(accountId: string, webPropertyId: string, profileId: string): Analytics_v3.Schema.UnsampledReports; + list(accountId: string, webPropertyId: string, profileId: string): Analytics.Schema.UnsampledReports; // Lists unsampled reports to which the user has access. - list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics_v3.Schema.UnsampledReports; + list(accountId: string, webPropertyId: string, profileId: string, optionalArgs: object): Analytics.Schema.UnsampledReports; // Deletes an unsampled report. remove(accountId: string, webPropertyId: string, profileId: string, unsampledReportId: string): void; } @@ -226,119 +226,119 @@ declare namespace GoogleAppsScript { // Delete data associated with a previous upload. deleteUploadData(resource: Schema.AnalyticsDataimportDeleteUploadDataRequest, accountId: string, webPropertyId: string, customDataSourceId: string): void; // List uploads to which the user has access. - get(accountId: string, webPropertyId: string, customDataSourceId: string, uploadId: string): Analytics_v3.Schema.Upload; + get(accountId: string, webPropertyId: string, customDataSourceId: string, uploadId: string): Analytics.Schema.Upload; // List uploads to which the user has access. - list(accountId: string, webPropertyId: string, customDataSourceId: string): Analytics_v3.Schema.Uploads; + list(accountId: string, webPropertyId: string, customDataSourceId: string): Analytics.Schema.Uploads; // List uploads to which the user has access. - list(accountId: string, webPropertyId: string, customDataSourceId: string, optionalArgs: object): Analytics_v3.Schema.Uploads; + list(accountId: string, webPropertyId: string, customDataSourceId: string, optionalArgs: object): Analytics.Schema.Uploads; // Upload data for a custom data source. - uploadData(accountId: string, webPropertyId: string, customDataSourceId: string): Analytics_v3.Schema.Upload; + uploadData(accountId: string, webPropertyId: string, customDataSourceId: string): Analytics.Schema.Upload; // Upload data for a custom data source. - uploadData(accountId: string, webPropertyId: string, customDataSourceId: string, mediaData: any): Analytics_v3.Schema.Upload; + uploadData(accountId: string, webPropertyId: string, customDataSourceId: string, mediaData: any): Analytics.Schema.Upload; } export interface WebPropertyAdWordsLinksCollection { // Returns a web property-Google Ads link to which the user has access. - get(accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): Analytics_v3.Schema.EntityAdWordsLink; + get(accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): Analytics.Schema.EntityAdWordsLink; // Creates a webProperty-Google Ads link. - insert(resource: Schema.EntityAdWordsLink, accountId: string, webPropertyId: string): Analytics_v3.Schema.EntityAdWordsLink; + insert(resource: Schema.EntityAdWordsLink, accountId: string, webPropertyId: string): Analytics.Schema.EntityAdWordsLink; // Lists webProperty-Google Ads links for a given web property. - list(accountId: string, webPropertyId: string): Analytics_v3.Schema.EntityAdWordsLinks; + list(accountId: string, webPropertyId: string): Analytics.Schema.EntityAdWordsLinks; // Lists webProperty-Google Ads links for a given web property. - list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics_v3.Schema.EntityAdWordsLinks; + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.EntityAdWordsLinks; // Updates an existing webProperty-Google Ads link. This method supports patch semantics. - patch(resource: Schema.EntityAdWordsLink, accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): Analytics_v3.Schema.EntityAdWordsLink; + patch(resource: Schema.EntityAdWordsLink, accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): Analytics.Schema.EntityAdWordsLink; // Deletes a web property-Google Ads link. remove(accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): void; // Updates an existing webProperty-Google Ads link. - update(resource: Schema.EntityAdWordsLink, accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): Analytics_v3.Schema.EntityAdWordsLink; + update(resource: Schema.EntityAdWordsLink, accountId: string, webPropertyId: string, webPropertyAdWordsLinkId: string): Analytics.Schema.EntityAdWordsLink; } export interface WebpropertiesCollection { // Gets a web property to which the user has access. - get(accountId: string, webPropertyId: string): Analytics_v3.Schema.Webproperty; + get(accountId: string, webPropertyId: string): Analytics.Schema.Webproperty; // Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile. - insert(resource: Schema.Webproperty, accountId: string): Analytics_v3.Schema.Webproperty; + insert(resource: Schema.Webproperty, accountId: string): Analytics.Schema.Webproperty; // Lists web properties to which the user has access. - list(accountId: string): Analytics_v3.Schema.Webproperties; + list(accountId: string): Analytics.Schema.Webproperties; // Lists web properties to which the user has access. - list(accountId: string, optionalArgs: object): Analytics_v3.Schema.Webproperties; + list(accountId: string, optionalArgs: object): Analytics.Schema.Webproperties; // Updates an existing web property. This method supports patch semantics. - patch(resource: Schema.Webproperty, accountId: string, webPropertyId: string): Analytics_v3.Schema.Webproperty; + patch(resource: Schema.Webproperty, accountId: string, webPropertyId: string): Analytics.Schema.Webproperty; // Updates an existing web property. - update(resource: Schema.Webproperty, accountId: string, webPropertyId: string): Analytics_v3.Schema.Webproperty; + update(resource: Schema.Webproperty, accountId: string, webPropertyId: string): Analytics.Schema.Webproperty; } export interface WebpropertyUserLinksCollection { // Adds a new user to the given web property. - insert(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string): Analytics_v3.Schema.EntityUserLink; + insert(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string): Analytics.Schema.EntityUserLink; // Lists webProperty-user links for a given web property. - list(accountId: string, webPropertyId: string): Analytics_v3.Schema.EntityUserLinks; + list(accountId: string, webPropertyId: string): Analytics.Schema.EntityUserLinks; // Lists webProperty-user links for a given web property. - list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics_v3.Schema.EntityUserLinks; + list(accountId: string, webPropertyId: string, optionalArgs: object): Analytics.Schema.EntityUserLinks; // Removes a user from the given web property. remove(accountId: string, webPropertyId: string, linkId: string): void; // Updates permissions for an existing user on the given web property. - update(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string, linkId: string): Analytics_v3.Schema.EntityUserLink; + update(resource: Schema.EntityUserLink, accountId: string, webPropertyId: string, linkId: string): Analytics.Schema.EntityUserLink; } } namespace Metadata { export interface ColumnsCollection { // Lists all columns for a report type - list(reportType: string): Analytics_v3.Schema.Columns; + list(reportType: string): Analytics.Schema.Columns; } } namespace UserDeletion { export interface UserDeletionRequestCollection { // Insert or update a user deletion requests. - upsert(resource: Schema.UserDeletionRequest): Analytics_v3.Schema.UserDeletionRequest; + upsert(resource: Schema.UserDeletionRequest): Analytics.Schema.UserDeletionRequest; } } export interface DataCollection { - Ga?: Analytics_v3.Collection.Data.GaCollection; - Mcf?: Analytics_v3.Collection.Data.McfCollection; - Realtime?: Analytics_v3.Collection.Data.RealtimeCollection; + Ga?: Analytics.Collection.Data.GaCollection; + Mcf?: Analytics.Collection.Data.McfCollection; + Realtime?: Analytics.Collection.Data.RealtimeCollection; } export interface ManagementCollection { - AccountSummaries?: Analytics_v3.Collection.Management.AccountSummariesCollection; - AccountUserLinks?: Analytics_v3.Collection.Management.AccountUserLinksCollection; - Accounts?: Analytics_v3.Collection.Management.AccountsCollection; - ClientId?: Analytics_v3.Collection.Management.ClientIdCollection; - CustomDataSources?: Analytics_v3.Collection.Management.CustomDataSourcesCollection; - CustomDimensions?: Analytics_v3.Collection.Management.CustomDimensionsCollection; - CustomMetrics?: Analytics_v3.Collection.Management.CustomMetricsCollection; - Experiments?: Analytics_v3.Collection.Management.ExperimentsCollection; - Filters?: Analytics_v3.Collection.Management.FiltersCollection; - Goals?: Analytics_v3.Collection.Management.GoalsCollection; - ProfileFilterLinks?: Analytics_v3.Collection.Management.ProfileFilterLinksCollection; - ProfileUserLinks?: Analytics_v3.Collection.Management.ProfileUserLinksCollection; - Profiles?: Analytics_v3.Collection.Management.ProfilesCollection; - RemarketingAudience?: Analytics_v3.Collection.Management.RemarketingAudienceCollection; - Segments?: Analytics_v3.Collection.Management.SegmentsCollection; - UnsampledReports?: Analytics_v3.Collection.Management.UnsampledReportsCollection; - Uploads?: Analytics_v3.Collection.Management.UploadsCollection; - WebPropertyAdWordsLinks?: Analytics_v3.Collection.Management.WebPropertyAdWordsLinksCollection; - Webproperties?: Analytics_v3.Collection.Management.WebpropertiesCollection; - WebpropertyUserLinks?: Analytics_v3.Collection.Management.WebpropertyUserLinksCollection; + AccountSummaries?: Analytics.Collection.Management.AccountSummariesCollection; + AccountUserLinks?: Analytics.Collection.Management.AccountUserLinksCollection; + Accounts?: Analytics.Collection.Management.AccountsCollection; + ClientId?: Analytics.Collection.Management.ClientIdCollection; + CustomDataSources?: Analytics.Collection.Management.CustomDataSourcesCollection; + CustomDimensions?: Analytics.Collection.Management.CustomDimensionsCollection; + CustomMetrics?: Analytics.Collection.Management.CustomMetricsCollection; + Experiments?: Analytics.Collection.Management.ExperimentsCollection; + Filters?: Analytics.Collection.Management.FiltersCollection; + Goals?: Analytics.Collection.Management.GoalsCollection; + ProfileFilterLinks?: Analytics.Collection.Management.ProfileFilterLinksCollection; + ProfileUserLinks?: Analytics.Collection.Management.ProfileUserLinksCollection; + Profiles?: Analytics.Collection.Management.ProfilesCollection; + RemarketingAudience?: Analytics.Collection.Management.RemarketingAudienceCollection; + Segments?: Analytics.Collection.Management.SegmentsCollection; + UnsampledReports?: Analytics.Collection.Management.UnsampledReportsCollection; + Uploads?: Analytics.Collection.Management.UploadsCollection; + WebPropertyAdWordsLinks?: Analytics.Collection.Management.WebPropertyAdWordsLinksCollection; + Webproperties?: Analytics.Collection.Management.WebpropertiesCollection; + WebpropertyUserLinks?: Analytics.Collection.Management.WebpropertyUserLinksCollection; } export interface MetadataCollection { - Columns?: Analytics_v3.Collection.Metadata.ColumnsCollection; + Columns?: Analytics.Collection.Metadata.ColumnsCollection; } export interface ProvisioningCollection { // Creates an account ticket. - createAccountTicket(resource: Schema.AccountTicket): Analytics_v3.Schema.AccountTicket; + createAccountTicket(resource: Schema.AccountTicket): Analytics.Schema.AccountTicket; // Provision account. - createAccountTree(resource: Schema.AccountTreeRequest): Analytics_v3.Schema.AccountTreeResponse; + createAccountTree(resource: Schema.AccountTreeRequest): Analytics.Schema.AccountTreeResponse; } export interface UserDeletionCollection { - UserDeletionRequest?: Analytics_v3.Collection.UserDeletion.UserDeletionRequestCollection; + UserDeletionRequest?: Analytics.Collection.UserDeletion.UserDeletionRequestCollection; } } namespace Schema { export interface Account { - childLink?: Analytics_v3.Schema.AccountChildLink; + childLink?: Analytics.Schema.AccountChildLink; created?: string; id?: string; kind?: string; name?: string; - permissions?: Analytics_v3.Schema.AccountPermissions; + permissions?: Analytics.Schema.AccountPermissions; selfLink?: string; starred?: boolean; updated?: string; @@ -357,7 +357,7 @@ declare namespace GoogleAppsScript { name?: string; } export interface AccountSummaries { - items?: Analytics_v3.Schema.AccountSummary[]; + items?: Analytics.Schema.AccountSummary[]; itemsPerPage?: number; kind?: string; nextLink?: string; @@ -371,15 +371,15 @@ declare namespace GoogleAppsScript { kind?: string; name?: string; starred?: boolean; - webProperties?: Analytics_v3.Schema.WebPropertySummary[]; + webProperties?: Analytics.Schema.WebPropertySummary[]; } export interface AccountTicket { - account?: Analytics_v3.Schema.Account; + account?: Analytics.Schema.Account; id?: string; kind?: string; - profile?: Analytics_v3.Schema.Profile; + profile?: Analytics.Schema.Profile; redirectUri?: string; - webproperty?: Analytics_v3.Schema.Webproperty; + webproperty?: Analytics.Schema.Webproperty; } export interface AccountTreeRequest { accountName?: string; @@ -390,13 +390,13 @@ declare namespace GoogleAppsScript { websiteUrl?: string; } export interface AccountTreeResponse { - account?: Analytics_v3.Schema.Account; + account?: Analytics.Schema.Account; kind?: string; - profile?: Analytics_v3.Schema.Profile; - webproperty?: Analytics_v3.Schema.Webproperty; + profile?: Analytics.Schema.Profile; + webproperty?: Analytics.Schema.Webproperty; } export interface Accounts { - items?: Analytics_v3.Schema.Account[]; + items?: Analytics.Schema.Account[]; itemsPerPage?: number; kind?: string; nextLink?: string; @@ -421,20 +421,20 @@ declare namespace GoogleAppsScript { export interface Columns { attributeNames?: string[]; etag?: string; - items?: Analytics_v3.Schema.Column[]; + items?: Analytics.Schema.Column[]; kind?: string; totalResults?: number; } export interface CustomDataSource { accountId?: string; - childLink?: Analytics_v3.Schema.CustomDataSourceChildLink; + childLink?: Analytics.Schema.CustomDataSourceChildLink; created?: string; description?: string; id?: string; importBehavior?: string; kind?: string; name?: string; - parentLink?: Analytics_v3.Schema.CustomDataSourceParentLink; + parentLink?: Analytics.Schema.CustomDataSourceParentLink; profilesLinked?: string[]; schema?: string[]; selfLink?: string; @@ -452,7 +452,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface CustomDataSources { - items?: Analytics_v3.Schema.CustomDataSource[]; + items?: Analytics.Schema.CustomDataSource[]; itemsPerPage?: number; kind?: string; nextLink?: string; @@ -469,7 +469,7 @@ declare namespace GoogleAppsScript { index?: number; kind?: string; name?: string; - parentLink?: Analytics_v3.Schema.CustomDimensionParentLink; + parentLink?: Analytics.Schema.CustomDimensionParentLink; scope?: string; selfLink?: string; updated?: string; @@ -480,7 +480,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface CustomDimensions { - items?: Analytics_v3.Schema.CustomDimension[]; + items?: Analytics.Schema.CustomDimension[]; itemsPerPage?: number; kind?: string; nextLink?: string; @@ -499,7 +499,7 @@ declare namespace GoogleAppsScript { max_value?: string; min_value?: string; name?: string; - parentLink?: Analytics_v3.Schema.CustomMetricParentLink; + parentLink?: Analytics.Schema.CustomMetricParentLink; scope?: string; selfLink?: string; type?: string; @@ -511,7 +511,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface CustomMetrics { - items?: Analytics_v3.Schema.CustomMetric[]; + items?: Analytics.Schema.CustomMetric[]; itemsPerPage?: number; kind?: string; nextLink?: string; @@ -521,8 +521,8 @@ declare namespace GoogleAppsScript { username?: string; } export interface EntityAdWordsLink { - adWordsAccounts?: Analytics_v3.Schema.AdWordsAccount[]; - entity?: Analytics_v3.Schema.EntityAdWordsLinkEntity; + adWordsAccounts?: Analytics.Schema.AdWordsAccount[]; + entity?: Analytics.Schema.EntityAdWordsLinkEntity; id?: string; kind?: string; name?: string; @@ -530,10 +530,10 @@ declare namespace GoogleAppsScript { selfLink?: string; } export interface EntityAdWordsLinkEntity { - webPropertyRef?: Analytics_v3.Schema.WebPropertyRef; + webPropertyRef?: Analytics.Schema.WebPropertyRef; } export interface EntityAdWordsLinks { - items?: Analytics_v3.Schema.EntityAdWordsLink[]; + items?: Analytics.Schema.EntityAdWordsLink[]; itemsPerPage?: number; kind?: string; nextLink?: string; @@ -542,24 +542,24 @@ declare namespace GoogleAppsScript { totalResults?: number; } export interface EntityUserLink { - entity?: Analytics_v3.Schema.EntityUserLinkEntity; + entity?: Analytics.Schema.EntityUserLinkEntity; id?: string; kind?: string; - permissions?: Analytics_v3.Schema.EntityUserLinkPermissions; + permissions?: Analytics.Schema.EntityUserLinkPermissions; selfLink?: string; - userRef?: Analytics_v3.Schema.UserRef; + userRef?: Analytics.Schema.UserRef; } export interface EntityUserLinkEntity { - accountRef?: Analytics_v3.Schema.AccountRef; - profileRef?: Analytics_v3.Schema.ProfileRef; - webPropertyRef?: Analytics_v3.Schema.WebPropertyRef; + accountRef?: Analytics.Schema.AccountRef; + profileRef?: Analytics.Schema.ProfileRef; + webPropertyRef?: Analytics.Schema.WebPropertyRef; } export interface EntityUserLinkPermissions { effective?: string[]; local?: string[]; } export interface EntityUserLinks { - items?: Analytics_v3.Schema.EntityUserLink[]; + items?: Analytics.Schema.EntityUserLink[]; itemsPerPage?: number; kind?: string; nextLink?: string; @@ -581,7 +581,7 @@ declare namespace GoogleAppsScript { name?: string; objectiveMetric?: string; optimizationType?: string; - parentLink?: Analytics_v3.Schema.ExperimentParentLink; + parentLink?: Analytics.Schema.ExperimentParentLink; profileId?: string; reasonExperimentEnded?: string; rewriteVariationUrlsAsOriginal?: boolean; @@ -592,7 +592,7 @@ declare namespace GoogleAppsScript { status?: string; trafficCoverage?: Number; updated?: string; - variations?: Analytics_v3.Schema.ExperimentVariations[]; + variations?: Analytics.Schema.ExperimentVariations[]; webPropertyId?: string; winnerConfidenceLevel?: Number; winnerFound?: boolean; @@ -609,7 +609,7 @@ declare namespace GoogleAppsScript { won?: boolean; } export interface Experiments { - items?: Analytics_v3.Schema.Experiment[]; + items?: Analytics.Schema.Experiment[]; itemsPerPage?: number; kind?: string; nextLink?: string; @@ -620,20 +620,20 @@ declare namespace GoogleAppsScript { } export interface Filter { accountId?: string; - advancedDetails?: Analytics_v3.Schema.FilterAdvancedDetails; + advancedDetails?: Analytics.Schema.FilterAdvancedDetails; created?: string; - excludeDetails?: Analytics_v3.Schema.FilterExpression; + excludeDetails?: Analytics.Schema.FilterExpression; id?: string; - includeDetails?: Analytics_v3.Schema.FilterExpression; + includeDetails?: Analytics.Schema.FilterExpression; kind?: string; - lowercaseDetails?: Analytics_v3.Schema.FilterLowercaseDetails; + lowercaseDetails?: Analytics.Schema.FilterLowercaseDetails; name?: string; - parentLink?: Analytics_v3.Schema.FilterParentLink; - searchAndReplaceDetails?: Analytics_v3.Schema.FilterSearchAndReplaceDetails; + parentLink?: Analytics.Schema.FilterParentLink; + searchAndReplaceDetails?: Analytics.Schema.FilterSearchAndReplaceDetails; selfLink?: string; type?: string; updated?: string; - uppercaseDetails?: Analytics_v3.Schema.FilterUppercaseDetails; + uppercaseDetails?: Analytics.Schema.FilterUppercaseDetails; } export interface FilterAdvancedDetails { caseSensitive?: boolean; @@ -685,7 +685,7 @@ declare namespace GoogleAppsScript { fieldIndex?: number; } export interface Filters { - items?: Analytics_v3.Schema.Filter[]; + items?: Analytics.Schema.Filter[]; itemsPerPage?: number; kind?: string; nextLink?: string; @@ -695,17 +695,17 @@ declare namespace GoogleAppsScript { username?: string; } export interface GaData { - columnHeaders?: Analytics_v3.Schema.GaDataColumnHeaders[]; + columnHeaders?: Analytics.Schema.GaDataColumnHeaders[]; containsSampledData?: boolean; dataLastRefreshed?: string; - dataTable?: Analytics_v3.Schema.GaDataDataTable; + dataTable?: Analytics.Schema.GaDataDataTable; id?: string; itemsPerPage?: number; kind?: string; nextLink?: string; previousLink?: string; - profileInfo?: Analytics_v3.Schema.GaDataProfileInfo; - query?: Analytics_v3.Schema.GaDataQuery; + profileInfo?: Analytics.Schema.GaDataProfileInfo; + query?: Analytics.Schema.GaDataQuery; rows?: String[][]; sampleSize?: string; sampleSpace?: string; @@ -719,8 +719,8 @@ declare namespace GoogleAppsScript { name?: string; } export interface GaDataDataTable { - cols?: Analytics_v3.Schema.GaDataDataTableCols[]; - rows?: Analytics_v3.Schema.GaDataDataTableRows[]; + cols?: Analytics.Schema.GaDataDataTableCols[]; + rows?: Analytics.Schema.GaDataDataTableRows[]; } export interface GaDataDataTableCols { id?: string; @@ -728,7 +728,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface GaDataDataTableRows { - c?: Analytics_v3.Schema.GaDataDataTableRowsC[]; + c?: Analytics.Schema.GaDataDataTableRowsC[]; } export interface GaDataDataTableRowsC { v?: string; @@ -758,20 +758,20 @@ declare namespace GoogleAppsScript { accountId?: string; active?: boolean; created?: string; - eventDetails?: Analytics_v3.Schema.GoalEventDetails; + eventDetails?: Analytics.Schema.GoalEventDetails; id?: string; internalWebPropertyId?: string; kind?: string; name?: string; - parentLink?: Analytics_v3.Schema.GoalParentLink; + parentLink?: Analytics.Schema.GoalParentLink; profileId?: string; selfLink?: string; type?: string; updated?: string; - urlDestinationDetails?: Analytics_v3.Schema.GoalUrlDestinationDetails; + urlDestinationDetails?: Analytics.Schema.GoalUrlDestinationDetails; value?: Number; - visitNumPagesDetails?: Analytics_v3.Schema.GoalVisitNumPagesDetails; - visitTimeOnSiteDetails?: Analytics_v3.Schema.GoalVisitTimeOnSiteDetails; + visitNumPagesDetails?: Analytics.Schema.GoalVisitNumPagesDetails; + visitTimeOnSiteDetails?: Analytics.Schema.GoalVisitTimeOnSiteDetails; webPropertyId?: string; } export interface GoalEventDetails { @@ -933,7 +933,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface ProfileFilterLink { - filterRef?: Analytics_v3.Schema.FilterRef; + filterRef?: Analytics.Schema.FilterRef; id?: string; kind?: string; profileRef?: ProfileRef; @@ -1207,133 +1207,133 @@ declare namespace GoogleAppsScript { } } } - export interface Analytics_v3 { - Data?: Analytics_v3.Collection.DataCollection; - Management?: Analytics_v3.Collection.ManagementCollection; - Metadata?: Analytics_v3.Collection.MetadataCollection; - Provisioning?: Analytics_v3.Collection.ProvisioningCollection; - UserDeletion?: Analytics_v3.Collection.UserDeletionCollection; + export interface Analytics { + Data?: Analytics.Collection.DataCollection; + Management?: Analytics.Collection.ManagementCollection; + Metadata?: Analytics.Collection.MetadataCollection; + Provisioning?: Analytics.Collection.ProvisioningCollection; + UserDeletion?: Analytics.Collection.UserDeletionCollection; // Create a new instance of Account - newAccount(): Analytics_v3.Schema.Account; + newAccount(): Analytics.Schema.Account; // Create a new instance of AccountChildLink - newAccountChildLink(): Analytics_v3.Schema.AccountChildLink; + newAccountChildLink(): Analytics.Schema.AccountChildLink; // Create a new instance of AccountPermissions - newAccountPermissions(): Analytics_v3.Schema.AccountPermissions; + newAccountPermissions(): Analytics.Schema.AccountPermissions; // Create a new instance of AccountRef - newAccountRef(): Analytics_v3.Schema.AccountRef; + newAccountRef(): Analytics.Schema.AccountRef; // Create a new instance of AccountTicket - newAccountTicket(): Analytics_v3.Schema.AccountTicket; + newAccountTicket(): Analytics.Schema.AccountTicket; // Create a new instance of AccountTreeRequest - newAccountTreeRequest(): Analytics_v3.Schema.AccountTreeRequest; + newAccountTreeRequest(): Analytics.Schema.AccountTreeRequest; // Create a new instance of AdWordsAccount - newAdWordsAccount(): Analytics_v3.Schema.AdWordsAccount; + newAdWordsAccount(): Analytics.Schema.AdWordsAccount; // Create a new instance of AnalyticsDataimportDeleteUploadDataRequest - newAnalyticsDataimportDeleteUploadDataRequest(): Analytics_v3.Schema.AnalyticsDataimportDeleteUploadDataRequest; + newAnalyticsDataimportDeleteUploadDataRequest(): Analytics.Schema.AnalyticsDataimportDeleteUploadDataRequest; // Create a new instance of CustomDimension - newCustomDimension(): Analytics_v3.Schema.CustomDimension; + newCustomDimension(): Analytics.Schema.CustomDimension; // Create a new instance of CustomDimensionParentLink - newCustomDimensionParentLink(): Analytics_v3.Schema.CustomDimensionParentLink; + newCustomDimensionParentLink(): Analytics.Schema.CustomDimensionParentLink; // Create a new instance of CustomMetric - newCustomMetric(): Analytics_v3.Schema.CustomMetric; + newCustomMetric(): Analytics.Schema.CustomMetric; // Create a new instance of CustomMetricParentLink - newCustomMetricParentLink(): Analytics_v3.Schema.CustomMetricParentLink; + newCustomMetricParentLink(): Analytics.Schema.CustomMetricParentLink; // Create a new instance of EntityAdWordsLink - newEntityAdWordsLink(): Analytics_v3.Schema.EntityAdWordsLink; + newEntityAdWordsLink(): Analytics.Schema.EntityAdWordsLink; // Create a new instance of EntityAdWordsLinkEntity - newEntityAdWordsLinkEntity(): Analytics_v3.Schema.EntityAdWordsLinkEntity; + newEntityAdWordsLinkEntity(): Analytics.Schema.EntityAdWordsLinkEntity; // Create a new instance of EntityUserLink - newEntityUserLink(): Analytics_v3.Schema.EntityUserLink; + newEntityUserLink(): Analytics.Schema.EntityUserLink; // Create a new instance of EntityUserLinkEntity - newEntityUserLinkEntity(): Analytics_v3.Schema.EntityUserLinkEntity; + newEntityUserLinkEntity(): Analytics.Schema.EntityUserLinkEntity; // Create a new instance of EntityUserLinkPermissions - newEntityUserLinkPermissions(): Analytics_v3.Schema.EntityUserLinkPermissions; + newEntityUserLinkPermissions(): Analytics.Schema.EntityUserLinkPermissions; // Create a new instance of Experiment - newExperiment(): Analytics_v3.Schema.Experiment; + newExperiment(): Analytics.Schema.Experiment; // Create a new instance of ExperimentParentLink - newExperimentParentLink(): Analytics_v3.Schema.ExperimentParentLink; + newExperimentParentLink(): Analytics.Schema.ExperimentParentLink; // Create a new instance of ExperimentVariations - newExperimentVariations(): Analytics_v3.Schema.ExperimentVariations; + newExperimentVariations(): Analytics.Schema.ExperimentVariations; // Create a new instance of Filter - newFilter(): Analytics_v3.Schema.Filter; + newFilter(): Analytics.Schema.Filter; // Create a new instance of FilterAdvancedDetails - newFilterAdvancedDetails(): Analytics_v3.Schema.FilterAdvancedDetails; + newFilterAdvancedDetails(): Analytics.Schema.FilterAdvancedDetails; // Create a new instance of FilterExpression - newFilterExpression(): Analytics_v3.Schema.FilterExpression; + newFilterExpression(): Analytics.Schema.FilterExpression; // Create a new instance of FilterLowercaseDetails - newFilterLowercaseDetails(): Analytics_v3.Schema.FilterLowercaseDetails; + newFilterLowercaseDetails(): Analytics.Schema.FilterLowercaseDetails; // Create a new instance of FilterParentLink - newFilterParentLink(): Analytics_v3.Schema.FilterParentLink; + newFilterParentLink(): Analytics.Schema.FilterParentLink; // Create a new instance of FilterRef - newFilterRef(): Analytics_v3.Schema.FilterRef; + newFilterRef(): Analytics.Schema.FilterRef; // Create a new instance of FilterSearchAndReplaceDetails - newFilterSearchAndReplaceDetails(): Analytics_v3.Schema.FilterSearchAndReplaceDetails; + newFilterSearchAndReplaceDetails(): Analytics.Schema.FilterSearchAndReplaceDetails; // Create a new instance of FilterUppercaseDetails - newFilterUppercaseDetails(): Analytics_v3.Schema.FilterUppercaseDetails; + newFilterUppercaseDetails(): Analytics.Schema.FilterUppercaseDetails; // Create a new instance of Goal - newGoal(): Analytics_v3.Schema.Goal; + newGoal(): Analytics.Schema.Goal; // Create a new instance of GoalEventDetails - newGoalEventDetails(): Analytics_v3.Schema.GoalEventDetails; + newGoalEventDetails(): Analytics.Schema.GoalEventDetails; // Create a new instance of GoalEventDetailsEventConditions - newGoalEventDetailsEventConditions(): Analytics_v3.Schema.GoalEventDetailsEventConditions; + newGoalEventDetailsEventConditions(): Analytics.Schema.GoalEventDetailsEventConditions; // Create a new instance of GoalParentLink - newGoalParentLink(): Analytics_v3.Schema.GoalParentLink; + newGoalParentLink(): Analytics.Schema.GoalParentLink; // Create a new instance of GoalUrlDestinationDetails - newGoalUrlDestinationDetails(): Analytics_v3.Schema.GoalUrlDestinationDetails; + newGoalUrlDestinationDetails(): Analytics.Schema.GoalUrlDestinationDetails; // Create a new instance of GoalUrlDestinationDetailsSteps - newGoalUrlDestinationDetailsSteps(): Analytics_v3.Schema.GoalUrlDestinationDetailsSteps; + newGoalUrlDestinationDetailsSteps(): Analytics.Schema.GoalUrlDestinationDetailsSteps; // Create a new instance of GoalVisitNumPagesDetails - newGoalVisitNumPagesDetails(): Analytics_v3.Schema.GoalVisitNumPagesDetails; + newGoalVisitNumPagesDetails(): Analytics.Schema.GoalVisitNumPagesDetails; // Create a new instance of GoalVisitTimeOnSiteDetails - newGoalVisitTimeOnSiteDetails(): Analytics_v3.Schema.GoalVisitTimeOnSiteDetails; + newGoalVisitTimeOnSiteDetails(): Analytics.Schema.GoalVisitTimeOnSiteDetails; // Create a new instance of HashClientIdRequest - newHashClientIdRequest(): Analytics_v3.Schema.HashClientIdRequest; + newHashClientIdRequest(): Analytics.Schema.HashClientIdRequest; // Create a new instance of IncludeConditions - newIncludeConditions(): Analytics_v3.Schema.IncludeConditions; + newIncludeConditions(): Analytics.Schema.IncludeConditions; // Create a new instance of LinkedForeignAccount - newLinkedForeignAccount(): Analytics_v3.Schema.LinkedForeignAccount; + newLinkedForeignAccount(): Analytics.Schema.LinkedForeignAccount; // Create a new instance of Profile - newProfile(): Analytics_v3.Schema.Profile; + newProfile(): Analytics.Schema.Profile; // Create a new instance of ProfileChildLink - newProfileChildLink(): Analytics_v3.Schema.ProfileChildLink; + newProfileChildLink(): Analytics.Schema.ProfileChildLink; // Create a new instance of ProfileFilterLink - newProfileFilterLink(): Analytics_v3.Schema.ProfileFilterLink; + newProfileFilterLink(): Analytics.Schema.ProfileFilterLink; // Create a new instance of ProfileParentLink - newProfileParentLink(): Analytics_v3.Schema.ProfileParentLink; + newProfileParentLink(): Analytics.Schema.ProfileParentLink; // Create a new instance of ProfilePermissions - newProfilePermissions(): Analytics_v3.Schema.ProfilePermissions; + newProfilePermissions(): Analytics.Schema.ProfilePermissions; // Create a new instance of ProfileRef - newProfileRef(): Analytics_v3.Schema.ProfileRef; + newProfileRef(): Analytics.Schema.ProfileRef; // Create a new instance of RemarketingAudience - newRemarketingAudience(): Analytics_v3.Schema.RemarketingAudience; + newRemarketingAudience(): Analytics.Schema.RemarketingAudience; // Create a new instance of RemarketingAudienceAudienceDefinition - newRemarketingAudienceAudienceDefinition(): Analytics_v3.Schema.RemarketingAudienceAudienceDefinition; + newRemarketingAudienceAudienceDefinition(): Analytics.Schema.RemarketingAudienceAudienceDefinition; // Create a new instance of RemarketingAudienceStateBasedAudienceDefinition - newRemarketingAudienceStateBasedAudienceDefinition(): Analytics_v3.Schema.RemarketingAudienceStateBasedAudienceDefinition; + newRemarketingAudienceStateBasedAudienceDefinition(): Analytics.Schema.RemarketingAudienceStateBasedAudienceDefinition; // Create a new instance of RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions - newRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(): Analytics_v3.Schema.RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions; + newRemarketingAudienceStateBasedAudienceDefinitionExcludeConditions(): Analytics.Schema.RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions; // Create a new instance of UnsampledReport - newUnsampledReport(): Analytics_v3.Schema.UnsampledReport; + newUnsampledReport(): Analytics.Schema.UnsampledReport; // Create a new instance of UnsampledReportCloudStorageDownloadDetails - newUnsampledReportCloudStorageDownloadDetails(): Analytics_v3.Schema.UnsampledReportCloudStorageDownloadDetails; + newUnsampledReportCloudStorageDownloadDetails(): Analytics.Schema.UnsampledReportCloudStorageDownloadDetails; // Create a new instance of UnsampledReportDriveDownloadDetails - newUnsampledReportDriveDownloadDetails(): Analytics_v3.Schema.UnsampledReportDriveDownloadDetails; + newUnsampledReportDriveDownloadDetails(): Analytics.Schema.UnsampledReportDriveDownloadDetails; // Create a new instance of UserDeletionRequest - newUserDeletionRequest(): Analytics_v3.Schema.UserDeletionRequest; + newUserDeletionRequest(): Analytics.Schema.UserDeletionRequest; // Create a new instance of UserDeletionRequestId - newUserDeletionRequestId(): Analytics_v3.Schema.UserDeletionRequestId; + newUserDeletionRequestId(): Analytics.Schema.UserDeletionRequestId; // Create a new instance of UserRef - newUserRef(): Analytics_v3.Schema.UserRef; + newUserRef(): Analytics.Schema.UserRef; // Create a new instance of WebPropertyRef - newWebPropertyRef(): Analytics_v3.Schema.WebPropertyRef; + newWebPropertyRef(): Analytics.Schema.WebPropertyRef; // Create a new instance of Webproperty - newWebproperty(): Analytics_v3.Schema.Webproperty; + newWebproperty(): Analytics.Schema.Webproperty; // Create a new instance of WebpropertyChildLink - newWebpropertyChildLink(): Analytics_v3.Schema.WebpropertyChildLink; + newWebpropertyChildLink(): Analytics.Schema.WebpropertyChildLink; // Create a new instance of WebpropertyParentLink - newWebpropertyParentLink(): Analytics_v3.Schema.WebpropertyParentLink; + newWebpropertyParentLink(): Analytics.Schema.WebpropertyParentLink; // Create a new instance of WebpropertyPermissions - newWebpropertyPermissions(): Analytics_v3.Schema.WebpropertyPermissions; + newWebpropertyPermissions(): Analytics.Schema.WebpropertyPermissions; } } -declare var Analytics_v3: GoogleAppsScript.Analytics_v3; \ No newline at end of file +declare var Analytics: GoogleAppsScript.Analytics; diff --git a/types/google-apps-script/apis/analyticsreporting_v4.d.ts b/types/google-apps-script/apis/analyticsreporting_v4.d.ts index 35345734d9..ee89c52701 100644 --- a/types/google-apps-script/apis/analyticsreporting_v4.d.ts +++ b/types/google-apps-script/apis/analyticsreporting_v4.d.ts @@ -5,47 +5,47 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Analyticsreporting_v4 { + namespace Analyticsreporting { namespace Collection { export interface ReportsCollection { // Returns the Analytics data. - batchGet(resource: Schema.GetReportsRequest): Analyticsreporting_v4.Schema.GetReportsResponse; + batchGet(resource: Schema.GetReportsRequest): Analyticsreporting.Schema.GetReportsResponse; } export interface UserActivityCollection { // Returns User Activity data. - search(resource: Schema.SearchUserActivityRequest): Analyticsreporting_v4.Schema.SearchUserActivityResponse; + search(resource: Schema.SearchUserActivityRequest): Analyticsreporting.Schema.SearchUserActivityResponse; } } namespace Schema { export interface Activity { activityTime?: string; activityType?: string; - appview?: Analyticsreporting_v4.Schema.ScreenviewData; + appview?: Analyticsreporting.Schema.ScreenviewData; campaign?: string; channelGrouping?: string; - customDimension?: Analyticsreporting_v4.Schema.CustomDimension[]; - ecommerce?: Analyticsreporting_v4.Schema.EcommerceData; - event?: Analyticsreporting_v4.Schema.EventData; - goals?: Analyticsreporting_v4.Schema.GoalSetData; + customDimension?: Analyticsreporting.Schema.CustomDimension[]; + ecommerce?: Analyticsreporting.Schema.EcommerceData; + event?: Analyticsreporting.Schema.EventData; + goals?: Analyticsreporting.Schema.GoalSetData; hostname?: string; keyword?: string; landingPagePath?: string; medium?: string; - pageview?: Analyticsreporting_v4.Schema.PageviewData; + pageview?: Analyticsreporting.Schema.PageviewData; source?: string; } export interface Cohort { - dateRange?: Analyticsreporting_v4.Schema.DateRange; + dateRange?: Analyticsreporting.Schema.DateRange; name?: string; type?: string; } export interface CohortGroup { - cohorts?: Analyticsreporting_v4.Schema.Cohort[]; + cohorts?: Analyticsreporting.Schema.Cohort[]; lifetimeValue?: boolean; } export interface ColumnHeader { dimensions?: string[]; - metricHeader?: Analyticsreporting_v4.Schema.MetricHeader; + metricHeader?: Analyticsreporting.Schema.MetricHeader; } export interface CustomDimension { index?: number; @@ -56,7 +56,7 @@ declare namespace GoogleAppsScript { startDate?: string; } export interface DateRangeValues { - pivotValueRegions?: Analyticsreporting_v4.Schema.PivotValueRegion[]; + pivotValueRegions?: Analyticsreporting.Schema.PivotValueRegion[]; values?: string[]; } export interface Dimension { @@ -71,19 +71,19 @@ declare namespace GoogleAppsScript { operator?: string; } export interface DimensionFilterClause { - filters?: Analyticsreporting_v4.Schema.DimensionFilter[]; + filters?: Analyticsreporting.Schema.DimensionFilter[]; operator?: string; } export interface DynamicSegment { name?: string; - sessionSegment?: Analyticsreporting_v4.Schema.SegmentDefinition; - userSegment?: Analyticsreporting_v4.Schema.SegmentDefinition; + sessionSegment?: Analyticsreporting.Schema.SegmentDefinition; + userSegment?: Analyticsreporting.Schema.SegmentDefinition; } export interface EcommerceData { actionType?: string; ecommerceType?: string; - products?: Analyticsreporting_v4.Schema.ProductData[]; - transaction?: Analyticsreporting_v4.Schema.TransactionData; + products?: Analyticsreporting.Schema.ProductData[]; + transaction?: Analyticsreporting.Schema.TransactionData; } export interface EventData { eventAction?: string; @@ -93,13 +93,13 @@ declare namespace GoogleAppsScript { eventValue?: string; } export interface GetReportsRequest { - reportRequests?: Analyticsreporting_v4.Schema.ReportRequest[]; + reportRequests?: Analyticsreporting.Schema.ReportRequest[]; useResourceQuotas?: boolean; } export interface GetReportsResponse { queryCost?: number; - reports?: Analyticsreporting_v4.Schema.Report[]; - resourceQuotasRemaining?: Analyticsreporting_v4.Schema.ResourceQuotasRemaining; + reports?: Analyticsreporting.Schema.Report[]; + resourceQuotasRemaining?: Analyticsreporting.Schema.ResourceQuotasRemaining; } export interface GoalData { goalCompletionLocation?: string; @@ -112,7 +112,7 @@ declare namespace GoogleAppsScript { goalValue?: Number; } export interface GoalSetData { - goals?: Analyticsreporting_v4.Schema.GoalData[]; + goals?: Analyticsreporting.Schema.GoalData[]; } export interface Metric { alias?: string; @@ -126,19 +126,19 @@ declare namespace GoogleAppsScript { operator?: string; } export interface MetricFilterClause { - filters?: Analyticsreporting_v4.Schema.MetricFilter[]; + filters?: Analyticsreporting.Schema.MetricFilter[]; operator?: string; } export interface MetricHeader { - metricHeaderEntries?: Analyticsreporting_v4.Schema.MetricHeaderEntry[]; - pivotHeaders?: Analyticsreporting_v4.Schema.PivotHeader[]; + metricHeaderEntries?: Analyticsreporting.Schema.MetricHeaderEntry[]; + pivotHeaders?: Analyticsreporting.Schema.PivotHeader[]; } export interface MetricHeaderEntry { name?: string; type?: string; } export interface OrFiltersForSegment { - segmentFilterClauses?: Analyticsreporting_v4.Schema.SegmentFilterClause[]; + segmentFilterClauses?: Analyticsreporting.Schema.SegmentFilterClause[]; } export interface OrderBy { fieldName?: string; @@ -150,20 +150,20 @@ declare namespace GoogleAppsScript { pageTitle?: string; } export interface Pivot { - dimensionFilterClauses?: Analyticsreporting_v4.Schema.DimensionFilterClause[]; - dimensions?: Analyticsreporting_v4.Schema.Dimension[]; + dimensionFilterClauses?: Analyticsreporting.Schema.DimensionFilterClause[]; + dimensions?: Analyticsreporting.Schema.Dimension[]; maxGroupCount?: number; - metrics?: Analyticsreporting_v4.Schema.Metric[]; + metrics?: Analyticsreporting.Schema.Metric[]; startGroup?: number; } export interface PivotHeader { - pivotHeaderEntries?: Analyticsreporting_v4.Schema.PivotHeaderEntry[]; + pivotHeaderEntries?: Analyticsreporting.Schema.PivotHeaderEntry[]; totalPivotGroupsCount?: number; } export interface PivotHeaderEntry { dimensionNames?: string[]; dimensionValues?: string[]; - metric?: Analyticsreporting_v4.Schema.MetricHeaderEntry; + metric?: Analyticsreporting.Schema.MetricHeaderEntry; } export interface PivotValueRegion { values?: string[]; @@ -175,43 +175,43 @@ declare namespace GoogleAppsScript { productSku?: string; } export interface Report { - columnHeader?: Analyticsreporting_v4.Schema.ColumnHeader; - data?: Analyticsreporting_v4.Schema.ReportData; + columnHeader?: Analyticsreporting.Schema.ColumnHeader; + data?: Analyticsreporting.Schema.ReportData; nextPageToken?: string; } export interface ReportData { dataLastRefreshed?: string; isDataGolden?: boolean; - maximums?: Analyticsreporting_v4.Schema.DateRangeValues[]; - minimums?: Analyticsreporting_v4.Schema.DateRangeValues[]; + maximums?: Analyticsreporting.Schema.DateRangeValues[]; + minimums?: Analyticsreporting.Schema.DateRangeValues[]; rowCount?: number; - rows?: Analyticsreporting_v4.Schema.ReportRow[]; + rows?: Analyticsreporting.Schema.ReportRow[]; samplesReadCounts?: string[]; samplingSpaceSizes?: string[]; - totals?: Analyticsreporting_v4.Schema.DateRangeValues[]; + totals?: Analyticsreporting.Schema.DateRangeValues[]; } export interface ReportRequest { - cohortGroup?: Analyticsreporting_v4.Schema.CohortGroup; - dateRanges?: Analyticsreporting_v4.Schema.DateRange[]; - dimensionFilterClauses?: Analyticsreporting_v4.Schema.DimensionFilterClause[]; - dimensions?: Analyticsreporting_v4.Schema.Dimension[]; + cohortGroup?: Analyticsreporting.Schema.CohortGroup; + dateRanges?: Analyticsreporting.Schema.DateRange[]; + dimensionFilterClauses?: Analyticsreporting.Schema.DimensionFilterClause[]; + dimensions?: Analyticsreporting.Schema.Dimension[]; filtersExpression?: string; hideTotals?: boolean; hideValueRanges?: boolean; includeEmptyRows?: boolean; - metricFilterClauses?: Analyticsreporting_v4.Schema.MetricFilterClause[]; - metrics?: Analyticsreporting_v4.Schema.Metric[]; - orderBys?: Analyticsreporting_v4.Schema.OrderBy[]; + metricFilterClauses?: Analyticsreporting.Schema.MetricFilterClause[]; + metrics?: Analyticsreporting.Schema.Metric[]; + orderBys?: Analyticsreporting.Schema.OrderBy[]; pageSize?: number; pageToken?: string; - pivots?: Analyticsreporting_v4.Schema.Pivot[]; + pivots?: Analyticsreporting.Schema.Pivot[]; samplingLevel?: string; - segments?: Analyticsreporting_v4.Schema.Segment[]; + segments?: Analyticsreporting.Schema.Segment[]; viewId?: string; } export interface ReportRow { dimensions?: string[]; - metrics?: Analyticsreporting_v4.Schema.DateRangeValues[]; + metrics?: Analyticsreporting.Schema.DateRangeValues[]; } export interface ResourceQuotasRemaining { dailyQuotaTokensRemaining?: number; @@ -225,24 +225,24 @@ declare namespace GoogleAppsScript { } export interface SearchUserActivityRequest { activityTypes?: string[]; - dateRange?: Analyticsreporting_v4.Schema.DateRange; + dateRange?: Analyticsreporting.Schema.DateRange; pageSize?: number; pageToken?: string; - user?: Analyticsreporting_v4.Schema.User; + user?: Analyticsreporting.Schema.User; viewId?: string; } export interface SearchUserActivityResponse { nextPageToken?: string; sampleRate?: Number; - sessions?: Analyticsreporting_v4.Schema.UserActivitySession[]; + sessions?: Analyticsreporting.Schema.UserActivitySession[]; totalRows?: number; } export interface Segment { - dynamicSegment?: Analyticsreporting_v4.Schema.DynamicSegment; + dynamicSegment?: Analyticsreporting.Schema.DynamicSegment; segmentId?: string; } export interface SegmentDefinition { - segmentFilters?: Analyticsreporting_v4.Schema.SegmentFilter[]; + segmentFilters?: Analyticsreporting.Schema.SegmentFilter[]; } export interface SegmentDimensionFilter { caseSensitive?: boolean; @@ -254,12 +254,12 @@ declare namespace GoogleAppsScript { } export interface SegmentFilter { not?: boolean; - sequenceSegment?: Analyticsreporting_v4.Schema.SequenceSegment; - simpleSegment?: Analyticsreporting_v4.Schema.SimpleSegment; + sequenceSegment?: Analyticsreporting.Schema.SequenceSegment; + simpleSegment?: Analyticsreporting.Schema.SimpleSegment; } export interface SegmentFilterClause { - dimensionFilter?: Analyticsreporting_v4.Schema.SegmentDimensionFilter; - metricFilter?: Analyticsreporting_v4.Schema.SegmentMetricFilter; + dimensionFilter?: Analyticsreporting.Schema.SegmentDimensionFilter; + metricFilter?: Analyticsreporting.Schema.SegmentMetricFilter; not?: boolean; } export interface SegmentMetricFilter { @@ -271,14 +271,14 @@ declare namespace GoogleAppsScript { } export interface SegmentSequenceStep { matchType?: string; - orFiltersForSegment?: Analyticsreporting_v4.Schema.OrFiltersForSegment[]; + orFiltersForSegment?: Analyticsreporting.Schema.OrFiltersForSegment[]; } export interface SequenceSegment { firstStepShouldMatchFirstHit?: boolean; - segmentSequenceSteps?: Analyticsreporting_v4.Schema.SegmentSequenceStep[]; + segmentSequenceSteps?: Analyticsreporting.Schema.SegmentSequenceStep[]; } export interface SimpleSegment { - orFiltersForSegment?: Analyticsreporting_v4.Schema.OrFiltersForSegment[]; + orFiltersForSegment?: Analyticsreporting.Schema.OrFiltersForSegment[]; } export interface TransactionData { transactionId?: string; @@ -291,7 +291,7 @@ declare namespace GoogleAppsScript { userId?: string; } export interface UserActivitySession { - activities?: Analyticsreporting_v4.Schema.Activity[]; + activities?: Analyticsreporting.Schema.Activity[]; dataSource?: string; deviceCategory?: string; platform?: string; @@ -300,62 +300,62 @@ declare namespace GoogleAppsScript { } } } - export interface Analyticsreporting_v4 { - Reports?: Analyticsreporting_v4.Collection.ReportsCollection; - UserActivity?: Analyticsreporting_v4.Collection.UserActivityCollection; + export interface Analyticsreporting { + Reports?: Analyticsreporting.Collection.ReportsCollection; + UserActivity?: Analyticsreporting.Collection.UserActivityCollection; // Create a new instance of Cohort - newCohort(): Analyticsreporting_v4.Schema.Cohort; + newCohort(): Analyticsreporting.Schema.Cohort; // Create a new instance of CohortGroup - newCohortGroup(): Analyticsreporting_v4.Schema.CohortGroup; + newCohortGroup(): Analyticsreporting.Schema.CohortGroup; // Create a new instance of DateRange - newDateRange(): Analyticsreporting_v4.Schema.DateRange; + newDateRange(): Analyticsreporting.Schema.DateRange; // Create a new instance of Dimension - newDimension(): Analyticsreporting_v4.Schema.Dimension; + newDimension(): Analyticsreporting.Schema.Dimension; // Create a new instance of DimensionFilter - newDimensionFilter(): Analyticsreporting_v4.Schema.DimensionFilter; + newDimensionFilter(): Analyticsreporting.Schema.DimensionFilter; // Create a new instance of DimensionFilterClause - newDimensionFilterClause(): Analyticsreporting_v4.Schema.DimensionFilterClause; + newDimensionFilterClause(): Analyticsreporting.Schema.DimensionFilterClause; // Create a new instance of DynamicSegment - newDynamicSegment(): Analyticsreporting_v4.Schema.DynamicSegment; + newDynamicSegment(): Analyticsreporting.Schema.DynamicSegment; // Create a new instance of GetReportsRequest - newGetReportsRequest(): Analyticsreporting_v4.Schema.GetReportsRequest; + newGetReportsRequest(): Analyticsreporting.Schema.GetReportsRequest; // Create a new instance of Metric - newMetric(): Analyticsreporting_v4.Schema.Metric; + newMetric(): Analyticsreporting.Schema.Metric; // Create a new instance of MetricFilter - newMetricFilter(): Analyticsreporting_v4.Schema.MetricFilter; + newMetricFilter(): Analyticsreporting.Schema.MetricFilter; // Create a new instance of MetricFilterClause - newMetricFilterClause(): Analyticsreporting_v4.Schema.MetricFilterClause; + newMetricFilterClause(): Analyticsreporting.Schema.MetricFilterClause; // Create a new instance of OrFiltersForSegment - newOrFiltersForSegment(): Analyticsreporting_v4.Schema.OrFiltersForSegment; + newOrFiltersForSegment(): Analyticsreporting.Schema.OrFiltersForSegment; // Create a new instance of OrderBy - newOrderBy(): Analyticsreporting_v4.Schema.OrderBy; + newOrderBy(): Analyticsreporting.Schema.OrderBy; // Create a new instance of Pivot - newPivot(): Analyticsreporting_v4.Schema.Pivot; + newPivot(): Analyticsreporting.Schema.Pivot; // Create a new instance of ReportRequest - newReportRequest(): Analyticsreporting_v4.Schema.ReportRequest; + newReportRequest(): Analyticsreporting.Schema.ReportRequest; // Create a new instance of SearchUserActivityRequest - newSearchUserActivityRequest(): Analyticsreporting_v4.Schema.SearchUserActivityRequest; + newSearchUserActivityRequest(): Analyticsreporting.Schema.SearchUserActivityRequest; // Create a new instance of Segment - newSegment(): Analyticsreporting_v4.Schema.Segment; + newSegment(): Analyticsreporting.Schema.Segment; // Create a new instance of SegmentDefinition - newSegmentDefinition(): Analyticsreporting_v4.Schema.SegmentDefinition; + newSegmentDefinition(): Analyticsreporting.Schema.SegmentDefinition; // Create a new instance of SegmentDimensionFilter - newSegmentDimensionFilter(): Analyticsreporting_v4.Schema.SegmentDimensionFilter; + newSegmentDimensionFilter(): Analyticsreporting.Schema.SegmentDimensionFilter; // Create a new instance of SegmentFilter - newSegmentFilter(): Analyticsreporting_v4.Schema.SegmentFilter; + newSegmentFilter(): Analyticsreporting.Schema.SegmentFilter; // Create a new instance of SegmentFilterClause - newSegmentFilterClause(): Analyticsreporting_v4.Schema.SegmentFilterClause; + newSegmentFilterClause(): Analyticsreporting.Schema.SegmentFilterClause; // Create a new instance of SegmentMetricFilter - newSegmentMetricFilter(): Analyticsreporting_v4.Schema.SegmentMetricFilter; + newSegmentMetricFilter(): Analyticsreporting.Schema.SegmentMetricFilter; // Create a new instance of SegmentSequenceStep - newSegmentSequenceStep(): Analyticsreporting_v4.Schema.SegmentSequenceStep; + newSegmentSequenceStep(): Analyticsreporting.Schema.SegmentSequenceStep; // Create a new instance of SequenceSegment - newSequenceSegment(): Analyticsreporting_v4.Schema.SequenceSegment; + newSequenceSegment(): Analyticsreporting.Schema.SequenceSegment; // Create a new instance of SimpleSegment - newSimpleSegment(): Analyticsreporting_v4.Schema.SimpleSegment; + newSimpleSegment(): Analyticsreporting.Schema.SimpleSegment; // Create a new instance of User - newUser(): Analyticsreporting_v4.Schema.User; + newUser(): Analyticsreporting.Schema.User; } } -declare var Analyticsreporting_v4: GoogleAppsScript.Analyticsreporting_v4; \ No newline at end of file +declare var Analyticsreporting: GoogleAppsScript.Analyticsreporting; diff --git a/types/google-apps-script/apis/appsactivity_v1.d.ts b/types/google-apps-script/apis/appsactivity_v1.d.ts index 4ac06a4dc9..866a62873b 100644 --- a/types/google-apps-script/apis/appsactivity_v1.d.ts +++ b/types/google-apps-script/apis/appsactivity_v1.d.ts @@ -5,38 +5,38 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Appsactivity_v1 { + namespace Appsactivity { namespace Collection { export interface ActivitiesCollection { // Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter. - list(): Appsactivity_v1.Schema.ListActivitiesResponse; + list(): Appsactivity.Schema.ListActivitiesResponse; // Returns a list of activities visible to the current logged in user. Visible activities are determined by the visiblity settings of the object that was acted on, e.g. Drive files a user can see. An activity is a record of past events. Multiple events may be merged if they are similar. A request is scoped to activities from a given Google service using the source parameter. - list(optionalArgs: object): Appsactivity_v1.Schema.ListActivitiesResponse; + list(optionalArgs: object): Appsactivity.Schema.ListActivitiesResponse; } } namespace Schema { export interface Activity { - combinedEvent?: Appsactivity_v1.Schema.Event; - singleEvents?: Appsactivity_v1.Schema.Event[]; + combinedEvent?: Appsactivity.Schema.Event; + singleEvents?: Appsactivity.Schema.Event[]; } export interface Event { additionalEventTypes?: string[]; eventTimeMillis?: string; fromUserDeletion?: boolean; - move?: Appsactivity_v1.Schema.Move; - permissionChanges?: Appsactivity_v1.Schema.PermissionChange[]; + move?: Appsactivity.Schema.Move; + permissionChanges?: Appsactivity.Schema.PermissionChange[]; primaryEventType?: string; - rename?: Appsactivity_v1.Schema.Rename; - target?: Appsactivity_v1.Schema.Target; - user?: Appsactivity_v1.Schema.User; + rename?: Appsactivity.Schema.Rename; + target?: Appsactivity.Schema.Target; + user?: Appsactivity.Schema.User; } export interface ListActivitiesResponse { - activities?: Appsactivity_v1.Schema.Activity[]; + activities?: Appsactivity.Schema.Activity[]; nextPageToken?: string; } export interface Move { - addedParents?: Appsactivity_v1.Schema.Parent[]; - removedParents?: Appsactivity_v1.Schema.Parent[]; + addedParents?: Appsactivity.Schema.Parent[]; + removedParents?: Appsactivity.Schema.Parent[]; } export interface Parent { id?: string; @@ -48,12 +48,12 @@ declare namespace GoogleAppsScript { permissionId?: string; role?: string; type?: string; - user?: Appsactivity_v1.Schema.User; + user?: Appsactivity.Schema.User; withLink?: boolean; } export interface PermissionChange { - addedPermissions?: Appsactivity_v1.Schema.Permission[]; - removedPermissions?: Appsactivity_v1.Schema.Permission[]; + addedPermissions?: Appsactivity.Schema.Permission[]; + removedPermissions?: Appsactivity.Schema.Permission[]; } export interface Photo { url?: string; @@ -72,13 +72,13 @@ declare namespace GoogleAppsScript { isMe?: boolean; name?: string; permissionId?: string; - photo?: Appsactivity_v1.Schema.Photo; + photo?: Appsactivity.Schema.Photo; } } } - export interface Appsactivity_v1 { - Activities?: Appsactivity_v1.Collection.ActivitiesCollection; + export interface Appsactivity { + Activities?: Appsactivity.Collection.ActivitiesCollection; } } -declare var Appsactivity_v1: GoogleAppsScript.Appsactivity_v1; \ No newline at end of file +declare var Appsactivity: GoogleAppsScript.Appsactivity; diff --git a/types/google-apps-script/apis/bigquery_v2.d.ts b/types/google-apps-script/apis/bigquery_v2.d.ts index 74bbfe8562..d199f276e8 100644 --- a/types/google-apps-script/apis/bigquery_v2.d.ts +++ b/types/google-apps-script/apis/bigquery_v2.d.ts @@ -5,83 +5,83 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Bigquery_v2 { + namespace Bigquery { namespace Collection { export interface DatasetsCollection { // Returns the dataset specified by datasetID. - get(projectId: string, datasetId: string): Bigquery_v2.Schema.Dataset; + get(projectId: string, datasetId: string): Bigquery.Schema.Dataset; // Creates a new empty dataset. - insert(resource: Bigquery_v2.Schema.Dataset, projectId: string): Bigquery_v2.Schema.Dataset; + insert(resource: Bigquery.Schema.Dataset, projectId: string): Bigquery.Schema.Dataset; // Lists all datasets in the specified project to which you have been granted the READER dataset role. - list(projectId: string): Bigquery_v2.Schema.DatasetList; + list(projectId: string): Bigquery.Schema.DatasetList; // Lists all datasets in the specified project to which you have been granted the READER dataset role. - list(projectId: string, optionalArgs: object): Bigquery_v2.Schema.DatasetList; + list(projectId: string, optionalArgs: object): Bigquery.Schema.DatasetList; // Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics. - patch(resource: Bigquery_v2.Schema.Dataset, projectId: string, datasetId: string): Bigquery_v2.Schema.Dataset; + patch(resource: Bigquery.Schema.Dataset, projectId: string, datasetId: string): Bigquery.Schema.Dataset; // Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name. remove(projectId: string, datasetId: string): void; // Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name. remove(projectId: string, datasetId: string, optionalArgs: object): void; // Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. - update(resource: Bigquery_v2.Schema.Dataset, projectId: string, datasetId: string): Bigquery_v2.Schema.Dataset; + update(resource: Bigquery.Schema.Dataset, projectId: string, datasetId: string): Bigquery.Schema.Dataset; } export interface JobsCollection { // Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs. - cancel(projectId: string, jobId: string): Bigquery_v2.Schema.JobCancelResponse; + cancel(projectId: string, jobId: string): Bigquery.Schema.JobCancelResponse; // Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs. - cancel(projectId: string, jobId: string, optionalArgs: object): Bigquery_v2.Schema.JobCancelResponse; + cancel(projectId: string, jobId: string, optionalArgs: object): Bigquery.Schema.JobCancelResponse; // Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role. - get(projectId: string, jobId: string): Bigquery_v2.Schema.Job; + get(projectId: string, jobId: string): Bigquery.Schema.Job; // Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role. - get(projectId: string, jobId: string, optionalArgs: object): Bigquery_v2.Schema.Job; + get(projectId: string, jobId: string, optionalArgs: object): Bigquery.Schema.Job; // Retrieves the results of a query job. - getQueryResults(projectId: string, jobId: string): Bigquery_v2.Schema.GetQueryResultsResponse; + getQueryResults(projectId: string, jobId: string): Bigquery.Schema.GetQueryResultsResponse; // Retrieves the results of a query job. - getQueryResults(projectId: string, jobId: string, optionalArgs: object): Bigquery_v2.Schema.GetQueryResultsResponse; + getQueryResults(projectId: string, jobId: string, optionalArgs: object): Bigquery.Schema.GetQueryResultsResponse; // Starts a new asynchronous job. Requires the Can View project role. - insert(resource: Bigquery_v2.Schema.Job, projectId: string): Bigquery_v2.Schema.Job; + insert(resource: Bigquery.Schema.Job, projectId: string): Bigquery.Schema.Job; // Starts a new asynchronous job. Requires the Can View project role. - insert(resource: Bigquery_v2.Schema.Job, projectId: string, mediaData: any): Bigquery_v2.Schema.Job; + insert(resource: Bigquery.Schema.Job, projectId: string, mediaData: any): Bigquery.Schema.Job; // Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property. - list(projectId: string): Bigquery_v2.Schema.JobList; + list(projectId: string): Bigquery.Schema.JobList; // Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property. - list(projectId: string, optionalArgs: object): Bigquery_v2.Schema.JobList; + list(projectId: string, optionalArgs: object): Bigquery.Schema.JobList; // Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. - query(resource: Bigquery_v2.Schema.QueryRequest, projectId: string): Bigquery_v2.Schema.QueryResponse; + query(resource: Bigquery.Schema.QueryRequest, projectId: string): Bigquery.Schema.QueryResponse; } export interface ProjectsCollection { // Returns the email address of the service account for your project used for interactions with Google Cloud KMS. - getServiceAccount(projectId: string): Bigquery_v2.Schema.GetServiceAccountResponse; + getServiceAccount(projectId: string): Bigquery.Schema.GetServiceAccountResponse; // Lists all projects to which you have been granted any project role. - list(): Bigquery_v2.Schema.ProjectList; + list(): Bigquery.Schema.ProjectList; // Lists all projects to which you have been granted any project role. - list(optionalArgs: object): Bigquery_v2.Schema.ProjectList; + list(optionalArgs: object): Bigquery.Schema.ProjectList; } export interface TabledataCollection { // Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role. - insertAll(resource: Bigquery_v2.Schema.TableDataInsertAllRequest, projectId: string, datasetId: string, tableId: string): Bigquery_v2.Schema.TableDataInsertAllResponse; + insertAll(resource: Bigquery.Schema.TableDataInsertAllRequest, projectId: string, datasetId: string, tableId: string): Bigquery.Schema.TableDataInsertAllResponse; // Retrieves table data from a specified set of rows. Requires the READER dataset role. - list(projectId: string, datasetId: string, tableId: string): Bigquery_v2.Schema.TableDataList; + list(projectId: string, datasetId: string, tableId: string): Bigquery.Schema.TableDataList; // Retrieves table data from a specified set of rows. Requires the READER dataset role. - list(projectId: string, datasetId: string, tableId: string, optionalArgs: object): Bigquery_v2.Schema.TableDataList; + list(projectId: string, datasetId: string, tableId: string, optionalArgs: object): Bigquery.Schema.TableDataList; } export interface TablesCollection { // Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. - get(projectId: string, datasetId: string, tableId: string): Bigquery_v2.Schema.Table; + get(projectId: string, datasetId: string, tableId: string): Bigquery.Schema.Table; // Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table. - get(projectId: string, datasetId: string, tableId: string, optionalArgs: object): Bigquery_v2.Schema.Table; + get(projectId: string, datasetId: string, tableId: string, optionalArgs: object): Bigquery.Schema.Table; // Creates a new, empty table in the dataset. - insert(resource: Bigquery_v2.Schema.Table, projectId: string, datasetId: string): Bigquery_v2.Schema.Table; + insert(resource: Bigquery.Schema.Table, projectId: string, datasetId: string): Bigquery.Schema.Table; // Lists all tables in the specified dataset. Requires the READER dataset role. - list(projectId: string, datasetId: string): Bigquery_v2.Schema.TableList; + list(projectId: string, datasetId: string): Bigquery.Schema.TableList; // Lists all tables in the specified dataset. Requires the READER dataset role. - list(projectId: string, datasetId: string, optionalArgs: object): Bigquery_v2.Schema.TableList; + list(projectId: string, datasetId: string, optionalArgs: object): Bigquery.Schema.TableList; // Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics. - patch(resource: Bigquery_v2.Schema.Table, projectId: string, datasetId: string, tableId: string): Bigquery_v2.Schema.Table; + patch(resource: Bigquery.Schema.Table, projectId: string, datasetId: string, tableId: string): Bigquery.Schema.Table; // Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. remove(projectId: string, datasetId: string, tableId: string): void; // Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. - update(resource: Bigquery_v2.Schema.Table, projectId: string, datasetId: string, tableId: string): Bigquery_v2.Schema.Table; + update(resource: Bigquery.Schema.Table, projectId: string, datasetId: string, tableId: string): Bigquery.Schema.Table; } } namespace Schema { @@ -98,14 +98,14 @@ declare namespace GoogleAppsScript { type?: string; } export interface BigtableColumnFamily { - columns?: Bigquery_v2.Schema.BigtableColumn[]; + columns?: Bigquery.Schema.BigtableColumn[]; encoding?: string; familyId?: string; onlyReadLatest?: boolean; type?: string; } export interface BigtableOptions { - columnFamilies?: Bigquery_v2.Schema.BigtableColumnFamily[]; + columnFamilies?: Bigquery.Schema.BigtableColumnFamily[]; ignoreUnspecifiedColumnFamilies?: boolean; readRowkeyAsString?: boolean; } @@ -117,10 +117,10 @@ declare namespace GoogleAppsScript { trainingLoss?: Number; } export interface BqmlTrainingRun { - iterationResults?: Bigquery_v2.Schema.BqmlIterationResult[]; + iterationResults?: Bigquery.Schema.BqmlIterationResult[]; startTime?: string; state?: string; - trainingOptions?: Bigquery_v2.Schema.BqmlTrainingRunTrainingOptions; + trainingOptions?: Bigquery.Schema.BqmlTrainingRunTrainingOptions; } export interface BqmlTrainingRunTrainingOptions { earlyStop?: boolean; @@ -145,9 +145,9 @@ declare namespace GoogleAppsScript { skipLeadingRows?: string; } export interface Dataset { - access?: Bigquery_v2.Schema.DatasetAccess[]; + access?: Bigquery.Schema.DatasetAccess[]; creationTime?: string; - datasetReference?: Bigquery_v2.Schema.DatasetReference; + datasetReference?: Bigquery.Schema.DatasetReference; defaultPartitionExpirationMs?: string; defaultTableExpirationMs?: string; description?: string; @@ -167,16 +167,16 @@ declare namespace GoogleAppsScript { role?: string; specialGroup?: string; userByEmail?: string; - view?: Bigquery_v2.Schema.TableReference; + view?: Bigquery.Schema.TableReference; } export interface DatasetList { - datasets?: Bigquery_v2.Schema.DatasetListDatasets[]; + datasets?: Bigquery.Schema.DatasetListDatasets[]; etag?: string; kind?: string; nextPageToken?: string; } export interface DatasetListDatasets { - datasetReference?: Bigquery_v2.Schema.DatasetReference; + datasetReference?: Bigquery.Schema.DatasetReference; friendlyName?: string; id?: string; kind?: string; @@ -222,7 +222,7 @@ declare namespace GoogleAppsScript { shuffleOutputBytesSpilled?: string; startMs?: string; status?: string; - steps?: Bigquery_v2.Schema.ExplainQueryStep[]; + steps?: Bigquery.Schema.ExplainQueryStep[]; waitMsAvg?: string; waitMsMax?: string; waitRatioAvg?: Number; @@ -238,28 +238,28 @@ declare namespace GoogleAppsScript { } export interface ExternalDataConfiguration { autodetect?: boolean; - bigtableOptions?: Bigquery_v2.Schema.BigtableOptions; + bigtableOptions?: Bigquery.Schema.BigtableOptions; compression?: string; - csvOptions?: Bigquery_v2.Schema.CsvOptions; - googleSheetsOptions?: Bigquery_v2.Schema.GoogleSheetsOptions; + csvOptions?: Bigquery.Schema.CsvOptions; + googleSheetsOptions?: Bigquery.Schema.GoogleSheetsOptions; hivePartitioningMode?: string; ignoreUnknownValues?: boolean; maxBadRecords?: number; - schema?: Bigquery_v2.Schema.TableSchema; + schema?: Bigquery.Schema.TableSchema; sourceFormat?: string; sourceUris?: string[]; } export interface GetQueryResultsResponse { cacheHit?: boolean; - errors?: Bigquery_v2.Schema.ErrorProto[]; + errors?: Bigquery.Schema.ErrorProto[]; etag?: string; jobComplete?: boolean; - jobReference?: Bigquery_v2.Schema.JobReference; + jobReference?: Bigquery.Schema.JobReference; kind?: string; numDmlAffectedRows?: string; pageToken?: string; - rows?: Bigquery_v2.Schema.TableRow[]; - schema?: Bigquery_v2.Schema.TableSchema; + rows?: Bigquery.Schema.TableRow[]; + schema?: Bigquery.Schema.TableSchema; totalBytesProcessed?: string; totalRows?: string; } @@ -272,29 +272,29 @@ declare namespace GoogleAppsScript { skipLeadingRows?: string; } export interface Job { - configuration?: Bigquery_v2.Schema.JobConfiguration; + configuration?: Bigquery.Schema.JobConfiguration; etag?: string; id?: string; - jobReference?: Bigquery_v2.Schema.JobReference; + jobReference?: Bigquery.Schema.JobReference; kind?: string; selfLink?: string; - statistics?: Bigquery_v2.Schema.JobStatistics; - status?: Bigquery_v2.Schema.JobStatus; + statistics?: Bigquery.Schema.JobStatistics; + status?: Bigquery.Schema.JobStatus; user_email?: string; } export interface JobCancelResponse { - job?: Bigquery_v2.Schema.Job; + job?: Bigquery.Schema.Job; kind?: string; } export interface JobConfiguration { - copy?: Bigquery_v2.Schema.JobConfigurationTableCopy; + copy?: Bigquery.Schema.JobConfigurationTableCopy; dryRun?: boolean; - extract?: Bigquery_v2.Schema.JobConfigurationExtract; + extract?: Bigquery.Schema.JobConfigurationExtract; jobTimeoutMs?: string; jobType?: string; labels?: object; - load?: Bigquery_v2.Schema.JobConfigurationLoad; - query?: Bigquery_v2.Schema.JobConfigurationQuery; + load?: Bigquery.Schema.JobConfigurationLoad; + query?: Bigquery.Schema.JobConfigurationQuery; } export interface JobConfigurationExtract { compression?: string; @@ -303,17 +303,17 @@ declare namespace GoogleAppsScript { destinationUris?: string[]; fieldDelimiter?: string; printHeader?: boolean; - sourceTable?: Bigquery_v2.Schema.TableReference; + sourceTable?: Bigquery.Schema.TableReference; } export interface JobConfigurationLoad { allowJaggedRows?: boolean; allowQuotedNewlines?: boolean; autodetect?: boolean; - clustering?: Bigquery_v2.Schema.Clustering; + clustering?: Bigquery.Schema.Clustering; createDisposition?: string; - destinationEncryptionConfiguration?: Bigquery_v2.Schema.EncryptionConfiguration; - destinationTable?: Bigquery_v2.Schema.TableReference; - destinationTableProperties?: Bigquery_v2.Schema.DestinationTableProperties; + destinationEncryptionConfiguration?: Bigquery.Schema.EncryptionConfiguration; + destinationTable?: Bigquery.Schema.TableReference; + destinationTableProperties?: Bigquery.Schema.DestinationTableProperties; encoding?: string; fieldDelimiter?: string; hivePartitioningMode?: string; @@ -322,25 +322,25 @@ declare namespace GoogleAppsScript { nullMarker?: string; projectionFields?: string[]; quote?: string; - rangePartitioning?: Bigquery_v2.Schema.RangePartitioning; - schema?: Bigquery_v2.Schema.TableSchema; + rangePartitioning?: Bigquery.Schema.RangePartitioning; + schema?: Bigquery.Schema.TableSchema; schemaInline?: string; schemaInlineFormat?: string; schemaUpdateOptions?: string[]; skipLeadingRows?: number; sourceFormat?: string; sourceUris?: string[]; - timePartitioning?: Bigquery_v2.Schema.TimePartitioning; + timePartitioning?: Bigquery.Schema.TimePartitioning; useAvroLogicalTypes?: boolean; writeDisposition?: string; } export interface JobConfigurationQuery { allowLargeResults?: boolean; - clustering?: Bigquery_v2.Schema.Clustering; + clustering?: Bigquery.Schema.Clustering; createDisposition?: string; - defaultDataset?: Bigquery_v2.Schema.DatasetReference; - destinationEncryptionConfiguration?: Bigquery_v2.Schema.EncryptionConfiguration; - destinationTable?: Bigquery_v2.Schema.TableReference; + defaultDataset?: Bigquery.Schema.DatasetReference; + destinationEncryptionConfiguration?: Bigquery.Schema.EncryptionConfiguration; + destinationTable?: Bigquery.Schema.TableReference; flattenResults?: boolean; maximumBillingTier?: number; maximumBytesBilled?: string; @@ -348,39 +348,39 @@ declare namespace GoogleAppsScript { preserveNulls?: boolean; priority?: string; query?: string; - queryParameters?: Bigquery_v2.Schema.QueryParameter[]; - rangePartitioning?: Bigquery_v2.Schema.RangePartitioning; + queryParameters?: Bigquery.Schema.QueryParameter[]; + rangePartitioning?: Bigquery.Schema.RangePartitioning; schemaUpdateOptions?: string[]; tableDefinitions?: object; - timePartitioning?: Bigquery_v2.Schema.TimePartitioning; + timePartitioning?: Bigquery.Schema.TimePartitioning; useLegacySql?: boolean; useQueryCache?: boolean; - userDefinedFunctionResources?: Bigquery_v2.Schema.UserDefinedFunctionResource[]; + userDefinedFunctionResources?: Bigquery.Schema.UserDefinedFunctionResource[]; writeDisposition?: string; } export interface JobConfigurationTableCopy { createDisposition?: string; - destinationEncryptionConfiguration?: Bigquery_v2.Schema.EncryptionConfiguration; - destinationTable?: Bigquery_v2.Schema.TableReference; - sourceTable?: Bigquery_v2.Schema.TableReference; - sourceTables?: Bigquery_v2.Schema.TableReference[]; + destinationEncryptionConfiguration?: Bigquery.Schema.EncryptionConfiguration; + destinationTable?: Bigquery.Schema.TableReference; + sourceTable?: Bigquery.Schema.TableReference; + sourceTables?: Bigquery.Schema.TableReference[]; writeDisposition?: string; } export interface JobList { etag?: string; - jobs?: Bigquery_v2.Schema.JobListJobs[]; + jobs?: Bigquery.Schema.JobListJobs[]; kind?: string; nextPageToken?: string; } export interface JobListJobs { - configuration?: Bigquery_v2.Schema.JobConfiguration; - errorResult?: Bigquery_v2.Schema.ErrorProto; + configuration?: Bigquery.Schema.JobConfiguration; + errorResult?: Bigquery.Schema.ErrorProto; id?: string; - jobReference?: Bigquery_v2.Schema.JobReference; + jobReference?: Bigquery.Schema.JobReference; kind?: string; state?: string; - statistics?: Bigquery_v2.Schema.JobStatistics; - status?: Bigquery_v2.Schema.JobStatus; + statistics?: Bigquery.Schema.JobStatistics; + status?: Bigquery.Schema.JobStatus; user_email?: string; } export interface JobReference { @@ -392,13 +392,13 @@ declare namespace GoogleAppsScript { completionRatio?: Number; creationTime?: string; endTime?: string; - extract?: Bigquery_v2.Schema.JobStatistics4; - load?: Bigquery_v2.Schema.JobStatistics3; + extract?: Bigquery.Schema.JobStatistics4; + load?: Bigquery.Schema.JobStatistics3; numChildJobs?: string; parentJobId?: string; - query?: Bigquery_v2.Schema.JobStatistics2; + query?: Bigquery.Schema.JobStatistics2; quotaDeferments?: string[]; - reservationUsage?: Bigquery_v2.Schema.JobStatisticsReservationUsage[]; + reservationUsage?: Bigquery.Schema.JobStatisticsReservationUsage[]; startTime?: string; totalBytesProcessed?: string; totalSlotMs?: string; @@ -407,25 +407,25 @@ declare namespace GoogleAppsScript { billingTier?: number; cacheHit?: boolean; ddlOperationPerformed?: string; - ddlTargetRoutine?: Bigquery_v2.Schema.RoutineReference; - ddlTargetTable?: Bigquery_v2.Schema.TableReference; + ddlTargetRoutine?: Bigquery.Schema.RoutineReference; + ddlTargetTable?: Bigquery.Schema.TableReference; estimatedBytesProcessed?: string; - modelTraining?: Bigquery_v2.Schema.BigQueryModelTraining; + modelTraining?: Bigquery.Schema.BigQueryModelTraining; modelTrainingCurrentIteration?: number; modelTrainingExpectedTotalIteration?: string; numDmlAffectedRows?: string; - queryPlan?: Bigquery_v2.Schema.ExplainQueryStage[]; - referencedTables?: Bigquery_v2.Schema.TableReference[]; - reservationUsage?: Bigquery_v2.Schema.JobStatistics2ReservationUsage[]; - schema?: Bigquery_v2.Schema.TableSchema; + queryPlan?: Bigquery.Schema.ExplainQueryStage[]; + referencedTables?: Bigquery.Schema.TableReference[]; + reservationUsage?: Bigquery.Schema.JobStatistics2ReservationUsage[]; + schema?: Bigquery.Schema.TableSchema; statementType?: string; - timeline?: Bigquery_v2.Schema.QueryTimelineSample[]; + timeline?: Bigquery.Schema.QueryTimelineSample[]; totalBytesBilled?: string; totalBytesProcessed?: string; totalBytesProcessedAccuracy?: string; totalPartitionsProcessed?: string; totalSlotMs?: string; - undeclaredQueryParameters?: Bigquery_v2.Schema.QueryParameter[]; + undeclaredQueryParameters?: Bigquery.Schema.QueryParameter[]; } export interface JobStatistics2ReservationUsage { name?: string; @@ -447,8 +447,8 @@ declare namespace GoogleAppsScript { slotMs?: string; } export interface JobStatus { - errorResult?: Bigquery_v2.Schema.ErrorProto; - errors?: Bigquery_v2.Schema.ErrorProto[]; + errorResult?: Bigquery.Schema.ErrorProto; + errors?: Bigquery.Schema.ErrorProto[]; state?: string; } export interface MaterializedViewDefinition { @@ -456,8 +456,8 @@ declare namespace GoogleAppsScript { query?: string; } export interface ModelDefinition { - modelOptions?: Bigquery_v2.Schema.ModelDefinitionModelOptions; - trainingRuns?: Bigquery_v2.Schema.BqmlTrainingRun[]; + modelOptions?: Bigquery.Schema.ModelDefinitionModelOptions; + trainingRuns?: Bigquery.Schema.BqmlTrainingRun[]; } export interface ModelDefinitionModelOptions { labels?: string[]; @@ -468,7 +468,7 @@ declare namespace GoogleAppsScript { etag?: string; kind?: string; nextPageToken?: string; - projects?: Bigquery_v2.Schema.ProjectListProjects[]; + projects?: Bigquery.Schema.ProjectListProjects[]; totalItems?: number; } export interface ProjectListProjects { @@ -476,33 +476,33 @@ declare namespace GoogleAppsScript { id?: string; kind?: string; numericId?: string; - projectReference?: Bigquery_v2.Schema.ProjectReference; + projectReference?: Bigquery.Schema.ProjectReference; } export interface ProjectReference { projectId?: string; } export interface QueryParameter { name?: string; - parameterType?: Bigquery_v2.Schema.QueryParameterType; - parameterValue?: Bigquery_v2.Schema.QueryParameterValue; + parameterType?: Bigquery.Schema.QueryParameterType; + parameterValue?: Bigquery.Schema.QueryParameterValue; } export interface QueryParameterType { - arrayType?: Bigquery_v2.Schema.QueryParameterType; - structTypes?: Bigquery_v2.Schema.QueryParameterTypeStructTypes[]; + arrayType?: Bigquery.Schema.QueryParameterType; + structTypes?: Bigquery.Schema.QueryParameterTypeStructTypes[]; type?: string; } export interface QueryParameterTypeStructTypes { description?: string; name?: string; - type?: Bigquery_v2.Schema.QueryParameterType; + type?: Bigquery.Schema.QueryParameterType; } export interface QueryParameterValue { - arrayValues?: Bigquery_v2.Schema.QueryParameterValue[]; + arrayValues?: Bigquery.Schema.QueryParameterValue[]; structValues?: object; value?: string; } export interface QueryRequest { - defaultDataset?: Bigquery_v2.Schema.DatasetReference; + defaultDataset?: Bigquery.Schema.DatasetReference; dryRun?: boolean; kind?: string; location?: string; @@ -510,21 +510,21 @@ declare namespace GoogleAppsScript { parameterMode?: string; preserveNulls?: boolean; query?: string; - queryParameters?: Bigquery_v2.Schema.QueryParameter[]; + queryParameters?: Bigquery.Schema.QueryParameter[]; timeoutMs?: number; useLegacySql?: boolean; useQueryCache?: boolean; } export interface QueryResponse { cacheHit?: boolean; - errors?: Bigquery_v2.Schema.ErrorProto[]; + errors?: Bigquery.Schema.ErrorProto[]; jobComplete?: boolean; - jobReference?: Bigquery_v2.Schema.JobReference; + jobReference?: Bigquery.Schema.JobReference; kind?: string; numDmlAffectedRows?: string; pageToken?: string; - rows?: Bigquery_v2.Schema.TableRow[]; - schema?: Bigquery_v2.Schema.TableSchema; + rows?: Bigquery.Schema.TableRow[]; + schema?: Bigquery.Schema.TableSchema; totalBytesProcessed?: string; totalRows?: string; } @@ -537,7 +537,7 @@ declare namespace GoogleAppsScript { } export interface RangePartitioning { field?: string; - range?: Bigquery_v2.Schema.RangePartitioningRange; + range?: Bigquery.Schema.RangePartitioningRange; } export interface RangePartitioningRange { end?: string; @@ -555,34 +555,34 @@ declare namespace GoogleAppsScript { oldestEntryTime?: string; } export interface Table { - clustering?: Bigquery_v2.Schema.Clustering; + clustering?: Bigquery.Schema.Clustering; creationTime?: string; description?: string; - encryptionConfiguration?: Bigquery_v2.Schema.EncryptionConfiguration; + encryptionConfiguration?: Bigquery.Schema.EncryptionConfiguration; etag?: string; expirationTime?: string; - externalDataConfiguration?: Bigquery_v2.Schema.ExternalDataConfiguration; + externalDataConfiguration?: Bigquery.Schema.ExternalDataConfiguration; friendlyName?: string; id?: string; kind?: string; labels?: object; lastModifiedTime?: string; location?: string; - materializedView?: Bigquery_v2.Schema.MaterializedViewDefinition; - model?: Bigquery_v2.Schema.ModelDefinition; + materializedView?: Bigquery.Schema.MaterializedViewDefinition; + model?: Bigquery.Schema.ModelDefinition; numBytes?: string; numLongTermBytes?: string; numPhysicalBytes?: string; numRows?: string; - rangePartitioning?: Bigquery_v2.Schema.RangePartitioning; + rangePartitioning?: Bigquery.Schema.RangePartitioning; requirePartitionFilter?: boolean; - schema?: Bigquery_v2.Schema.TableSchema; + schema?: Bigquery.Schema.TableSchema; selfLink?: string; - streamingBuffer?: Bigquery_v2.Schema.Streamingbuffer; - tableReference?: Bigquery_v2.Schema.TableReference; - timePartitioning?: Bigquery_v2.Schema.TimePartitioning; + streamingBuffer?: Bigquery.Schema.Streamingbuffer; + tableReference?: Bigquery.Schema.TableReference; + timePartitioning?: Bigquery.Schema.TimePartitioning; type?: string; - view?: Bigquery_v2.Schema.ViewDefinition; + view?: Bigquery.Schema.ViewDefinition; } export interface TableCell { v?: object; @@ -590,7 +590,7 @@ declare namespace GoogleAppsScript { export interface TableDataInsertAllRequest { ignoreUnknownValues?: boolean; kind?: string; - rows?: Bigquery_v2.Schema.TableDataInsertAllRequestRows[]; + rows?: Bigquery.Schema.TableDataInsertAllRequestRows[]; skipInvalidRows?: boolean; templateSuffix?: string; } @@ -599,24 +599,24 @@ declare namespace GoogleAppsScript { json?: object; } export interface TableDataInsertAllResponse { - insertErrors?: Bigquery_v2.Schema.TableDataInsertAllResponseInsertErrors[]; + insertErrors?: Bigquery.Schema.TableDataInsertAllResponseInsertErrors[]; kind?: string; } export interface TableDataInsertAllResponseInsertErrors { - errors?: Bigquery_v2.Schema.ErrorProto[]; + errors?: Bigquery.Schema.ErrorProto[]; index?: number; } export interface TableDataList { etag?: string; kind?: string; pageToken?: string; - rows?: Bigquery_v2.Schema.TableRow[]; + rows?: Bigquery.Schema.TableRow[]; totalRows?: string; } export interface TableFieldSchema { - categories?: Bigquery_v2.Schema.TableFieldSchemaCategories; + categories?: Bigquery.Schema.TableFieldSchemaCategories; description?: string; - fields?: Bigquery_v2.Schema.TableFieldSchema[]; + fields?: Bigquery.Schema.TableFieldSchema[]; mode?: string; name?: string; type?: string; @@ -628,21 +628,21 @@ declare namespace GoogleAppsScript { etag?: string; kind?: string; nextPageToken?: string; - tables?: Bigquery_v2.Schema.TableListTables[]; + tables?: Bigquery.Schema.TableListTables[]; totalItems?: number; } export interface TableListTables { - clustering?: Bigquery_v2.Schema.Clustering; + clustering?: Bigquery.Schema.Clustering; creationTime?: string; expirationTime?: string; friendlyName?: string; id?: string; kind?: string; labels?: object; - tableReference?: Bigquery_v2.Schema.TableReference; - timePartitioning?: Bigquery_v2.Schema.TimePartitioning; + tableReference?: Bigquery.Schema.TableReference; + timePartitioning?: Bigquery.Schema.TimePartitioning; type?: string; - view?: Bigquery_v2.Schema.TableListTablesView; + view?: Bigquery.Schema.TableListTablesView; } export interface TableListTablesView { useLegacySql?: boolean; @@ -653,10 +653,10 @@ declare namespace GoogleAppsScript { tableId?: string; } export interface TableRow { - f?: Bigquery_v2.Schema.TableCell[]; + f?: Bigquery.Schema.TableCell[]; } export interface TableSchema { - fields?: Bigquery_v2.Schema.TableFieldSchema[]; + fields?: Bigquery.Schema.TableFieldSchema[]; } export interface TimePartitioning { expirationMs?: string; @@ -671,129 +671,129 @@ declare namespace GoogleAppsScript { export interface ViewDefinition { query?: string; useLegacySql?: boolean; - userDefinedFunctionResources?: Bigquery_v2.Schema.UserDefinedFunctionResource[]; + userDefinedFunctionResources?: Bigquery.Schema.UserDefinedFunctionResource[]; } } } - export interface Bigquery_v2 { - Datasets?: Bigquery_v2.Collection.DatasetsCollection; - Jobs?: Bigquery_v2.Collection.JobsCollection; - Projects?: Bigquery_v2.Collection.ProjectsCollection; - Tabledata?: Bigquery_v2.Collection.TabledataCollection; - Tables?: Bigquery_v2.Collection.TablesCollection; + export interface Bigquery { + Datasets?: Bigquery.Collection.DatasetsCollection; + Jobs?: Bigquery.Collection.JobsCollection; + Projects?: Bigquery.Collection.ProjectsCollection; + Tabledata?: Bigquery.Collection.TabledataCollection; + Tables?: Bigquery.Collection.TablesCollection; // Create a new instance of BigQueryModelTraining - newBigQueryModelTraining(): Bigquery_v2.Schema.BigQueryModelTraining; + newBigQueryModelTraining(): Bigquery.Schema.BigQueryModelTraining; // Create a new instance of BigtableColumn - newBigtableColumn(): Bigquery_v2.Schema.BigtableColumn; + newBigtableColumn(): Bigquery.Schema.BigtableColumn; // Create a new instance of BigtableColumnFamily - newBigtableColumnFamily(): Bigquery_v2.Schema.BigtableColumnFamily; + newBigtableColumnFamily(): Bigquery.Schema.BigtableColumnFamily; // Create a new instance of BigtableOptions - newBigtableOptions(): Bigquery_v2.Schema.BigtableOptions; + newBigtableOptions(): Bigquery.Schema.BigtableOptions; // Create a new instance of BqmlIterationResult - newBqmlIterationResult(): Bigquery_v2.Schema.BqmlIterationResult; + newBqmlIterationResult(): Bigquery.Schema.BqmlIterationResult; // Create a new instance of BqmlTrainingRun - newBqmlTrainingRun(): Bigquery_v2.Schema.BqmlTrainingRun; + newBqmlTrainingRun(): Bigquery.Schema.BqmlTrainingRun; // Create a new instance of BqmlTrainingRunTrainingOptions - newBqmlTrainingRunTrainingOptions(): Bigquery_v2.Schema.BqmlTrainingRunTrainingOptions; + newBqmlTrainingRunTrainingOptions(): Bigquery.Schema.BqmlTrainingRunTrainingOptions; // Create a new instance of Clustering - newClustering(): Bigquery_v2.Schema.Clustering; + newClustering(): Bigquery.Schema.Clustering; // Create a new instance of CsvOptions - newCsvOptions(): Bigquery_v2.Schema.CsvOptions; + newCsvOptions(): Bigquery.Schema.CsvOptions; // Create a new instance of Dataset - newDataset(): Bigquery_v2.Schema.Dataset; + newDataset(): Bigquery.Schema.Dataset; // Create a new instance of DatasetAccess - newDatasetAccess(): Bigquery_v2.Schema.DatasetAccess; + newDatasetAccess(): Bigquery.Schema.DatasetAccess; // Create a new instance of DatasetReference - newDatasetReference(): Bigquery_v2.Schema.DatasetReference; + newDatasetReference(): Bigquery.Schema.DatasetReference; // Create a new instance of DestinationTableProperties - newDestinationTableProperties(): Bigquery_v2.Schema.DestinationTableProperties; + newDestinationTableProperties(): Bigquery.Schema.DestinationTableProperties; // Create a new instance of EncryptionConfiguration - newEncryptionConfiguration(): Bigquery_v2.Schema.EncryptionConfiguration; + newEncryptionConfiguration(): Bigquery.Schema.EncryptionConfiguration; // Create a new instance of ErrorProto - newErrorProto(): Bigquery_v2.Schema.ErrorProto; + newErrorProto(): Bigquery.Schema.ErrorProto; // Create a new instance of ExplainQueryStage - newExplainQueryStage(): Bigquery_v2.Schema.ExplainQueryStage; + newExplainQueryStage(): Bigquery.Schema.ExplainQueryStage; // Create a new instance of ExplainQueryStep - newExplainQueryStep(): Bigquery_v2.Schema.ExplainQueryStep; + newExplainQueryStep(): Bigquery.Schema.ExplainQueryStep; // Create a new instance of ExternalDataConfiguration - newExternalDataConfiguration(): Bigquery_v2.Schema.ExternalDataConfiguration; + newExternalDataConfiguration(): Bigquery.Schema.ExternalDataConfiguration; // Create a new instance of GoogleSheetsOptions - newGoogleSheetsOptions(): Bigquery_v2.Schema.GoogleSheetsOptions; + newGoogleSheetsOptions(): Bigquery.Schema.GoogleSheetsOptions; // Create a new instance of Job - newJob(): Bigquery_v2.Schema.Job; + newJob(): Bigquery.Schema.Job; // Create a new instance of JobConfiguration - newJobConfiguration(): Bigquery_v2.Schema.JobConfiguration; + newJobConfiguration(): Bigquery.Schema.JobConfiguration; // Create a new instance of JobConfigurationExtract - newJobConfigurationExtract(): Bigquery_v2.Schema.JobConfigurationExtract; + newJobConfigurationExtract(): Bigquery.Schema.JobConfigurationExtract; // Create a new instance of JobConfigurationLoad - newJobConfigurationLoad(): Bigquery_v2.Schema.JobConfigurationLoad; + newJobConfigurationLoad(): Bigquery.Schema.JobConfigurationLoad; // Create a new instance of JobConfigurationQuery - newJobConfigurationQuery(): Bigquery_v2.Schema.JobConfigurationQuery; + newJobConfigurationQuery(): Bigquery.Schema.JobConfigurationQuery; // Create a new instance of JobConfigurationTableCopy - newJobConfigurationTableCopy(): Bigquery_v2.Schema.JobConfigurationTableCopy; + newJobConfigurationTableCopy(): Bigquery.Schema.JobConfigurationTableCopy; // Create a new instance of JobReference - newJobReference(): Bigquery_v2.Schema.JobReference; + newJobReference(): Bigquery.Schema.JobReference; // Create a new instance of JobStatistics - newJobStatistics(): Bigquery_v2.Schema.JobStatistics; + newJobStatistics(): Bigquery.Schema.JobStatistics; // Create a new instance of JobStatistics2 - newJobStatistics2(): Bigquery_v2.Schema.JobStatistics2; + newJobStatistics2(): Bigquery.Schema.JobStatistics2; // Create a new instance of JobStatistics2ReservationUsage - newJobStatistics2ReservationUsage(): Bigquery_v2.Schema.JobStatistics2ReservationUsage; + newJobStatistics2ReservationUsage(): Bigquery.Schema.JobStatistics2ReservationUsage; // Create a new instance of JobStatistics3 - newJobStatistics3(): Bigquery_v2.Schema.JobStatistics3; + newJobStatistics3(): Bigquery.Schema.JobStatistics3; // Create a new instance of JobStatistics4 - newJobStatistics4(): Bigquery_v2.Schema.JobStatistics4; + newJobStatistics4(): Bigquery.Schema.JobStatistics4; // Create a new instance of JobStatisticsReservationUsage - newJobStatisticsReservationUsage(): Bigquery_v2.Schema.JobStatisticsReservationUsage; + newJobStatisticsReservationUsage(): Bigquery.Schema.JobStatisticsReservationUsage; // Create a new instance of JobStatus - newJobStatus(): Bigquery_v2.Schema.JobStatus; + newJobStatus(): Bigquery.Schema.JobStatus; // Create a new instance of MaterializedViewDefinition - newMaterializedViewDefinition(): Bigquery_v2.Schema.MaterializedViewDefinition; + newMaterializedViewDefinition(): Bigquery.Schema.MaterializedViewDefinition; // Create a new instance of ModelDefinition - newModelDefinition(): Bigquery_v2.Schema.ModelDefinition; + newModelDefinition(): Bigquery.Schema.ModelDefinition; // Create a new instance of ModelDefinitionModelOptions - newModelDefinitionModelOptions(): Bigquery_v2.Schema.ModelDefinitionModelOptions; + newModelDefinitionModelOptions(): Bigquery.Schema.ModelDefinitionModelOptions; // Create a new instance of QueryParameter - newQueryParameter(): Bigquery_v2.Schema.QueryParameter; + newQueryParameter(): Bigquery.Schema.QueryParameter; // Create a new instance of QueryParameterType - newQueryParameterType(): Bigquery_v2.Schema.QueryParameterType; + newQueryParameterType(): Bigquery.Schema.QueryParameterType; // Create a new instance of QueryParameterTypeStructTypes - newQueryParameterTypeStructTypes(): Bigquery_v2.Schema.QueryParameterTypeStructTypes; + newQueryParameterTypeStructTypes(): Bigquery.Schema.QueryParameterTypeStructTypes; // Create a new instance of QueryParameterValue - newQueryParameterValue(): Bigquery_v2.Schema.QueryParameterValue; + newQueryParameterValue(): Bigquery.Schema.QueryParameterValue; // Create a new instance of QueryRequest - newQueryRequest(): Bigquery_v2.Schema.QueryRequest; + newQueryRequest(): Bigquery.Schema.QueryRequest; // Create a new instance of QueryTimelineSample - newQueryTimelineSample(): Bigquery_v2.Schema.QueryTimelineSample; + newQueryTimelineSample(): Bigquery.Schema.QueryTimelineSample; // Create a new instance of RangePartitioning - newRangePartitioning(): Bigquery_v2.Schema.RangePartitioning; + newRangePartitioning(): Bigquery.Schema.RangePartitioning; // Create a new instance of RangePartitioningRange - newRangePartitioningRange(): Bigquery_v2.Schema.RangePartitioningRange; + newRangePartitioningRange(): Bigquery.Schema.RangePartitioningRange; // Create a new instance of RoutineReference - newRoutineReference(): Bigquery_v2.Schema.RoutineReference; + newRoutineReference(): Bigquery.Schema.RoutineReference; // Create a new instance of Streamingbuffer - newStreamingbuffer(): Bigquery_v2.Schema.Streamingbuffer; + newStreamingbuffer(): Bigquery.Schema.Streamingbuffer; // Create a new instance of Table - newTable(): Bigquery_v2.Schema.Table; + newTable(): Bigquery.Schema.Table; // Create a new instance of TableDataInsertAllRequest - newTableDataInsertAllRequest(): Bigquery_v2.Schema.TableDataInsertAllRequest; + newTableDataInsertAllRequest(): Bigquery.Schema.TableDataInsertAllRequest; // Create a new instance of TableDataInsertAllRequestRows - newTableDataInsertAllRequestRows(): Bigquery_v2.Schema.TableDataInsertAllRequestRows; + newTableDataInsertAllRequestRows(): Bigquery.Schema.TableDataInsertAllRequestRows; // Create a new instance of TableFieldSchema - newTableFieldSchema(): Bigquery_v2.Schema.TableFieldSchema; + newTableFieldSchema(): Bigquery.Schema.TableFieldSchema; // Create a new instance of TableFieldSchemaCategories - newTableFieldSchemaCategories(): Bigquery_v2.Schema.TableFieldSchemaCategories; + newTableFieldSchemaCategories(): Bigquery.Schema.TableFieldSchemaCategories; // Create a new instance of TableReference - newTableReference(): Bigquery_v2.Schema.TableReference; + newTableReference(): Bigquery.Schema.TableReference; // Create a new instance of TableSchema - newTableSchema(): Bigquery_v2.Schema.TableSchema; + newTableSchema(): Bigquery.Schema.TableSchema; // Create a new instance of TimePartitioning - newTimePartitioning(): Bigquery_v2.Schema.TimePartitioning; + newTimePartitioning(): Bigquery.Schema.TimePartitioning; // Create a new instance of UserDefinedFunctionResource - newUserDefinedFunctionResource(): Bigquery_v2.Schema.UserDefinedFunctionResource; + newUserDefinedFunctionResource(): Bigquery.Schema.UserDefinedFunctionResource; // Create a new instance of ViewDefinition - newViewDefinition(): Bigquery_v2.Schema.ViewDefinition; + newViewDefinition(): Bigquery.Schema.ViewDefinition; } } -declare var Bigquery_v2: GoogleAppsScript.Bigquery_v2; \ No newline at end of file +declare var Bigquery: GoogleAppsScript.Bigquery; diff --git a/types/google-apps-script/apis/calendar_v3.d.ts b/types/google-apps-script/apis/calendar_v3.d.ts index 53aa4f03ea..12b2676eec 100644 --- a/types/google-apps-script/apis/calendar_v3.d.ts +++ b/types/google-apps-script/apis/calendar_v3.d.ts @@ -5,87 +5,87 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Calendar_v3 { + namespace Calendar { namespace Collection { export interface AclCollection { // Returns an access control rule. - get(calendarId: string, ruleId: string): Calendar_v3.Schema.AclRule; + get(calendarId: string, ruleId: string): Calendar.Schema.AclRule; // Returns an access control rule. - get(calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.AclRule; + get(calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar.Schema.AclRule; // Creates an access control rule. - insert(resource: Schema.AclRule, calendarId: string): Calendar_v3.Schema.AclRule; + insert(resource: Schema.AclRule, calendarId: string): Calendar.Schema.AclRule; // Creates an access control rule. - insert(resource: Schema.AclRule, calendarId: string, optionalArgs: object): Calendar_v3.Schema.AclRule; + insert(resource: Schema.AclRule, calendarId: string, optionalArgs: object): Calendar.Schema.AclRule; // Creates an access control rule. - insert(resource: Schema.AclRule, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.AclRule; + insert(resource: Schema.AclRule, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.AclRule; // Returns the rules in the access control list for the calendar. - list(calendarId: string): Calendar_v3.Schema.Acl; + list(calendarId: string): Calendar.Schema.Acl; // Returns the rules in the access control list for the calendar. - list(calendarId: string, optionalArgs: object): Calendar_v3.Schema.Acl; + list(calendarId: string, optionalArgs: object): Calendar.Schema.Acl; // Returns the rules in the access control list for the calendar. - list(calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Acl; + list(calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Acl; // Updates an access control rule. This method supports patch semantics. - patch(resource: Schema.AclRule, calendarId: string, ruleId: string): Calendar_v3.Schema.AclRule; + patch(resource: Schema.AclRule, calendarId: string, ruleId: string): Calendar.Schema.AclRule; // Updates an access control rule. This method supports patch semantics. - patch(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object): Calendar_v3.Schema.AclRule; + patch(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object): Calendar.Schema.AclRule; // Updates an access control rule. This method supports patch semantics. - patch(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.AclRule; + patch(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar.Schema.AclRule; // Deletes an access control rule. remove(calendarId: string, ruleId: string): void; // Deletes an access control rule. remove(calendarId: string, ruleId: string, optionalArgs: object, headers: object): void; // Updates an access control rule. - update(resource: Schema.AclRule, calendarId: string, ruleId: string): Calendar_v3.Schema.AclRule; + update(resource: Schema.AclRule, calendarId: string, ruleId: string): Calendar.Schema.AclRule; // Updates an access control rule. - update(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object): Calendar_v3.Schema.AclRule; + update(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object): Calendar.Schema.AclRule; // Updates an access control rule. - update(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.AclRule; + update(resource: Schema.AclRule, calendarId: string, ruleId: string, optionalArgs: object, headers: object): Calendar.Schema.AclRule; // Watch for changes to ACL resources. - watch(resource: Schema.Channel, calendarId: string): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string): Calendar.Schema.Channel; // Watch for changes to ACL resources. - watch(resource: Schema.Channel, calendarId: string, optionalArgs: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string, optionalArgs: object): Calendar.Schema.Channel; // Watch for changes to ACL resources. - watch(resource: Schema.Channel, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Channel; } export interface CalendarListCollection { // Returns a calendar from the user's calendar list. - get(calendarId: string): Calendar_v3.Schema.CalendarListEntry; + get(calendarId: string): Calendar.Schema.CalendarListEntry; // Returns a calendar from the user's calendar list. - get(calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarListEntry; + get(calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.CalendarListEntry; // Inserts an existing calendar into the user's calendar list. - insert(resource: Schema.CalendarListEntry): Calendar_v3.Schema.CalendarListEntry; + insert(resource: Schema.CalendarListEntry): Calendar.Schema.CalendarListEntry; // Inserts an existing calendar into the user's calendar list. - insert(resource: Schema.CalendarListEntry, optionalArgs: object): Calendar_v3.Schema.CalendarListEntry; + insert(resource: Schema.CalendarListEntry, optionalArgs: object): Calendar.Schema.CalendarListEntry; // Inserts an existing calendar into the user's calendar list. - insert(resource: Schema.CalendarListEntry, optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarListEntry; + insert(resource: Schema.CalendarListEntry, optionalArgs: object, headers: object): Calendar.Schema.CalendarListEntry; // Returns the calendars on the user's calendar list. - list(): Calendar_v3.Schema.CalendarList; + list(): Calendar.Schema.CalendarList; // Returns the calendars on the user's calendar list. - list(optionalArgs: object): Calendar_v3.Schema.CalendarList; + list(optionalArgs: object): Calendar.Schema.CalendarList; // Returns the calendars on the user's calendar list. - list(optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarList; + list(optionalArgs: object, headers: object): Calendar.Schema.CalendarList; // Updates an existing calendar on the user's calendar list. This method supports patch semantics. - patch(resource: Schema.CalendarListEntry, calendarId: string): Calendar_v3.Schema.CalendarListEntry; + patch(resource: Schema.CalendarListEntry, calendarId: string): Calendar.Schema.CalendarListEntry; // Updates an existing calendar on the user's calendar list. This method supports patch semantics. - patch(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object): Calendar_v3.Schema.CalendarListEntry; + patch(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object): Calendar.Schema.CalendarListEntry; // Updates an existing calendar on the user's calendar list. This method supports patch semantics. - patch(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarListEntry; + patch(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.CalendarListEntry; // Removes a calendar from the user's calendar list. remove(calendarId: string): void; // Removes a calendar from the user's calendar list. remove(calendarId: string, optionalArgs: object, headers: object): void; // Updates an existing calendar on the user's calendar list. - update(resource: Schema.CalendarListEntry, calendarId: string): Calendar_v3.Schema.CalendarListEntry; + update(resource: Schema.CalendarListEntry, calendarId: string): Calendar.Schema.CalendarListEntry; // Updates an existing calendar on the user's calendar list. - update(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object): Calendar_v3.Schema.CalendarListEntry; + update(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object): Calendar.Schema.CalendarListEntry; // Updates an existing calendar on the user's calendar list. - update(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.CalendarListEntry; + update(resource: Schema.CalendarListEntry, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.CalendarListEntry; // Watch for changes to CalendarList resources. - watch(resource: Schema.Channel): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel): Calendar.Schema.Channel; // Watch for changes to CalendarList resources. - watch(resource: Schema.Channel, optionalArgs: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object): Calendar.Schema.Channel; // Watch for changes to CalendarList resources. - watch(resource: Schema.Channel, optionalArgs: object, headers: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object, headers: object): Calendar.Schema.Channel; } export interface CalendarsCollection { // Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. @@ -93,25 +93,25 @@ declare namespace GoogleAppsScript { // Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. clear(calendarId: string, optionalArgs: object, headers: object): void; // Returns metadata for a calendar. - get(calendarId: string): Calendar_v3.Schema.Calendar; + get(calendarId: string): Calendar.Schema.Calendar; // Returns metadata for a calendar. - get(calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Calendar; + get(calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Calendar; // Creates a secondary calendar. - insert(resource: Schema.Calendar): Calendar_v3.Schema.Calendar; + insert(resource: Schema.Calendar): Calendar.Schema.Calendar; // Creates a secondary calendar. - insert(resource: Schema.Calendar, optionalArgs: object, headers: object): Calendar_v3.Schema.Calendar; + insert(resource: Schema.Calendar, optionalArgs: object, headers: object): Calendar.Schema.Calendar; // Updates metadata for a calendar. This method supports patch semantics. - patch(resource: Schema.Calendar, calendarId: string): Calendar_v3.Schema.Calendar; + patch(resource: Schema.Calendar, calendarId: string): Calendar.Schema.Calendar; // Updates metadata for a calendar. This method supports patch semantics. - patch(resource: Schema.Calendar, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Calendar; + patch(resource: Schema.Calendar, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Calendar; // Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. remove(calendarId: string): void; // Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. remove(calendarId: string, optionalArgs: object, headers: object): void; // Updates metadata for a calendar. - update(resource: Schema.Calendar, calendarId: string): Calendar_v3.Schema.Calendar; + update(resource: Schema.Calendar, calendarId: string): Calendar.Schema.Calendar; // Updates metadata for a calendar. - update(resource: Schema.Calendar, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Calendar; + update(resource: Schema.Calendar, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Calendar; } export interface ChannelsCollection { // Stop watching resources through this channel @@ -121,59 +121,59 @@ declare namespace GoogleAppsScript { } export interface ColorsCollection { // Returns the color definitions for calendars and events. - get(): Calendar_v3.Schema.Colors; + get(): Calendar.Schema.Colors; // Returns the color definitions for calendars and events. - get(optionalArgs: object, headers: object): Calendar_v3.Schema.Colors; + get(optionalArgs: object, headers: object): Calendar.Schema.Colors; } export interface EventsCollection { // Returns an event. - get(calendarId: string, eventId: string): Calendar_v3.Schema.Event; + get(calendarId: string, eventId: string): Calendar.Schema.Event; // Returns an event. - get(calendarId: string, eventId: string, optionalArgs: object): Calendar_v3.Schema.Event; + get(calendarId: string, eventId: string, optionalArgs: object): Calendar.Schema.Event; // Returns an event. - get(calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + get(calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Imports an event. This operation is used to add a private copy of an existing event to a calendar. - import(resource: Schema.Event, calendarId: string): Calendar_v3.Schema.Event; + import(resource: Schema.Event, calendarId: string): Calendar.Schema.Event; // Imports an event. This operation is used to add a private copy of an existing event to a calendar. - import(resource: Schema.Event, calendarId: string, optionalArgs: object): Calendar_v3.Schema.Event; + import(resource: Schema.Event, calendarId: string, optionalArgs: object): Calendar.Schema.Event; // Imports an event. This operation is used to add a private copy of an existing event to a calendar. - import(resource: Schema.Event, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + import(resource: Schema.Event, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Creates an event. - insert(resource: Schema.Event, calendarId: string): Calendar_v3.Schema.Event; + insert(resource: Schema.Event, calendarId: string): Calendar.Schema.Event; // Creates an event. - insert(resource: Schema.Event, calendarId: string, optionalArgs: object): Calendar_v3.Schema.Event; + insert(resource: Schema.Event, calendarId: string, optionalArgs: object): Calendar.Schema.Event; // Creates an event. - insert(resource: Schema.Event, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + insert(resource: Schema.Event, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Returns instances of the specified recurring event. - instances(calendarId: string, eventId: string): Calendar_v3.Schema.Events; + instances(calendarId: string, eventId: string): Calendar.Schema.Events; // Returns instances of the specified recurring event. - instances(calendarId: string, eventId: string, optionalArgs: object): Calendar_v3.Schema.Events; + instances(calendarId: string, eventId: string, optionalArgs: object): Calendar.Schema.Events; // Returns instances of the specified recurring event. - instances(calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Events; + instances(calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar.Schema.Events; // Returns events on the specified calendar. - list(calendarId: string): Calendar_v3.Schema.Events; + list(calendarId: string): Calendar.Schema.Events; // Returns events on the specified calendar. - list(calendarId: string, optionalArgs: object): Calendar_v3.Schema.Events; + list(calendarId: string, optionalArgs: object): Calendar.Schema.Events; // Returns events on the specified calendar. - list(calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Events; + list(calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Events; // Moves an event to another calendar, i.e. changes an event's organizer. - move(calendarId: string, eventId: string, destination: string): Calendar_v3.Schema.Event; + move(calendarId: string, eventId: string, destination: string): Calendar.Schema.Event; // Moves an event to another calendar, i.e. changes an event's organizer. - move(calendarId: string, eventId: string, destination: string, optionalArgs: object): Calendar_v3.Schema.Event; + move(calendarId: string, eventId: string, destination: string, optionalArgs: object): Calendar.Schema.Event; // Moves an event to another calendar, i.e. changes an event's organizer. - move(calendarId: string, eventId: string, destination: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + move(calendarId: string, eventId: string, destination: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Updates an event. This method supports patch semantics. - patch(resource: Schema.Event, calendarId: string, eventId: string): Calendar_v3.Schema.Event; + patch(resource: Schema.Event, calendarId: string, eventId: string): Calendar.Schema.Event; // Updates an event. This method supports patch semantics. - patch(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object): Calendar_v3.Schema.Event; + patch(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object): Calendar.Schema.Event; // Updates an event. This method supports patch semantics. - patch(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + patch(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Creates an event based on a simple text string. - quickAdd(calendarId: string, text: string): Calendar_v3.Schema.Event; + quickAdd(calendarId: string, text: string): Calendar.Schema.Event; // Creates an event based on a simple text string. - quickAdd(calendarId: string, text: string, optionalArgs: object): Calendar_v3.Schema.Event; + quickAdd(calendarId: string, text: string, optionalArgs: object): Calendar.Schema.Event; // Creates an event based on a simple text string. - quickAdd(calendarId: string, text: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + quickAdd(calendarId: string, text: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Deletes an event. remove(calendarId: string, eventId: string): void; // Deletes an event. @@ -181,47 +181,47 @@ declare namespace GoogleAppsScript { // Deletes an event. remove(calendarId: string, eventId: string, optionalArgs: object, headers: object): void; // Updates an event. - update(resource: Schema.Event, calendarId: string, eventId: string): Calendar_v3.Schema.Event; + update(resource: Schema.Event, calendarId: string, eventId: string): Calendar.Schema.Event; // Updates an event. - update(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object): Calendar_v3.Schema.Event; + update(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object): Calendar.Schema.Event; // Updates an event. - update(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Event; + update(resource: Schema.Event, calendarId: string, eventId: string, optionalArgs: object, headers: object): Calendar.Schema.Event; // Watch for changes to Events resources. - watch(resource: Schema.Channel, calendarId: string): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string): Calendar.Schema.Channel; // Watch for changes to Events resources. - watch(resource: Schema.Channel, calendarId: string, optionalArgs: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string, optionalArgs: object): Calendar.Schema.Channel; // Watch for changes to Events resources. - watch(resource: Schema.Channel, calendarId: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, calendarId: string, optionalArgs: object, headers: object): Calendar.Schema.Channel; } export interface FreebusyCollection { // Returns free/busy information for a set of calendars. - query(resource: Schema.FreeBusyRequest): Calendar_v3.Schema.FreeBusyResponse; + query(resource: Schema.FreeBusyRequest): Calendar.Schema.FreeBusyResponse; // Returns free/busy information for a set of calendars. - query(resource: Schema.FreeBusyRequest, optionalArgs: object, headers: object): Calendar_v3.Schema.FreeBusyResponse; + query(resource: Schema.FreeBusyRequest, optionalArgs: object, headers: object): Calendar.Schema.FreeBusyResponse; } export interface SettingsCollection { // Returns a single user setting. - get(setting: string): Calendar_v3.Schema.Setting; + get(setting: string): Calendar.Schema.Setting; // Returns a single user setting. - get(setting: string, optionalArgs: object, headers: object): Calendar_v3.Schema.Setting; + get(setting: string, optionalArgs: object, headers: object): Calendar.Schema.Setting; // Returns all user settings for the authenticated user. - list(): Calendar_v3.Schema.Settings; + list(): Calendar.Schema.Settings; // Returns all user settings for the authenticated user. - list(optionalArgs: object): Calendar_v3.Schema.Settings; + list(optionalArgs: object): Calendar.Schema.Settings; // Returns all user settings for the authenticated user. - list(optionalArgs: object, headers: object): Calendar_v3.Schema.Settings; + list(optionalArgs: object, headers: object): Calendar.Schema.Settings; // Watch for changes to Settings resources. - watch(resource: Schema.Channel): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel): Calendar.Schema.Channel; // Watch for changes to Settings resources. - watch(resource: Schema.Channel, optionalArgs: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object): Calendar.Schema.Channel; // Watch for changes to Settings resources. - watch(resource: Schema.Channel, optionalArgs: object, headers: object): Calendar_v3.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object, headers: object): Calendar.Schema.Channel; } } namespace Schema { export interface Acl { etag?: string; - items?: Calendar_v3.Schema.AclRule[]; + items?: Calendar.Schema.AclRule[]; kind?: string; nextPageToken?: string; nextSyncToken?: string; @@ -231,14 +231,14 @@ declare namespace GoogleAppsScript { id?: string; kind?: string; role?: string; - scope?: Calendar_v3.Schema.AclRuleScope; + scope?: Calendar.Schema.AclRuleScope; } export interface AclRuleScope { type?: string; value?: string; } export interface Calendar { - conferenceProperties?: Calendar_v3.Schema.ConferenceProperties; + conferenceProperties?: Calendar.Schema.ConferenceProperties; description?: string; etag?: string; id?: string; @@ -249,7 +249,7 @@ declare namespace GoogleAppsScript { } export interface CalendarList { etag?: string; - items?: Calendar_v3.Schema.CalendarListEntry[]; + items?: Calendar.Schema.CalendarListEntry[]; kind?: string; nextPageToken?: string; nextSyncToken?: string; @@ -258,8 +258,8 @@ declare namespace GoogleAppsScript { accessRole?: string; backgroundColor?: string; colorId?: string; - conferenceProperties?: Calendar_v3.Schema.ConferenceProperties; - defaultReminders?: Calendar_v3.Schema.EventReminder[]; + conferenceProperties?: Calendar.Schema.ConferenceProperties; + defaultReminders?: Calendar.Schema.EventReminder[]; deleted?: boolean; description?: string; etag?: string; @@ -268,7 +268,7 @@ declare namespace GoogleAppsScript { id?: string; kind?: string; location?: string; - notificationSettings?: Calendar_v3.Schema.CalendarListEntryNotificationSettings; + notificationSettings?: Calendar.Schema.CalendarListEntryNotificationSettings; primary?: boolean; selected?: boolean; summary?: string; @@ -276,7 +276,7 @@ declare namespace GoogleAppsScript { timeZone?: string; } export interface CalendarListEntryNotificationSettings { - notifications?: Calendar_v3.Schema.CalendarNotification[]; + notifications?: Calendar.Schema.CalendarNotification[]; } export interface CalendarNotification { method?: string; @@ -306,15 +306,15 @@ declare namespace GoogleAppsScript { } export interface ConferenceData { conferenceId?: string; - conferenceSolution?: Calendar_v3.Schema.ConferenceSolution; - createRequest?: Calendar_v3.Schema.CreateConferenceRequest; - entryPoints?: Calendar_v3.Schema.EntryPoint[]; + conferenceSolution?: Calendar.Schema.ConferenceSolution; + createRequest?: Calendar.Schema.CreateConferenceRequest; + entryPoints?: Calendar.Schema.EntryPoint[]; notes?: string; - parameters?: Calendar_v3.Schema.ConferenceParameters; + parameters?: Calendar.Schema.ConferenceParameters; signature?: string; } export interface ConferenceParameters { - addOnParameters?: Calendar_v3.Schema.ConferenceParametersAddOnParameters; + addOnParameters?: Calendar.Schema.ConferenceParametersAddOnParameters; } export interface ConferenceParametersAddOnParameters { parameters?: object; @@ -327,16 +327,16 @@ declare namespace GoogleAppsScript { } export interface ConferenceSolution { iconUri?: string; - key?: Calendar_v3.Schema.ConferenceSolutionKey; + key?: Calendar.Schema.ConferenceSolutionKey; name?: string; } export interface ConferenceSolutionKey { type?: string; } export interface CreateConferenceRequest { - conferenceSolutionKey?: Calendar_v3.Schema.ConferenceSolutionKey; + conferenceSolutionKey?: Calendar.Schema.ConferenceSolutionKey; requestId?: string; - status?: Calendar_v3.Schema.ConferenceRequestStatus; + status?: Calendar.Schema.ConferenceRequestStatus; } export interface EntryPoint { accessCode?: string; @@ -356,19 +356,19 @@ declare namespace GoogleAppsScript { } export interface Event { anyoneCanAddSelf?: boolean; - attachments?: Calendar_v3.Schema.EventAttachment[]; - attendees?: Calendar_v3.Schema.EventAttendee[]; + attachments?: Calendar.Schema.EventAttachment[]; + attendees?: Calendar.Schema.EventAttendee[]; attendeesOmitted?: boolean; colorId?: string; - conferenceData?: Calendar_v3.Schema.ConferenceData; + conferenceData?: Calendar.Schema.ConferenceData; created?: string; - creator?: Calendar_v3.Schema.EventCreator; + creator?: Calendar.Schema.EventCreator; description?: string; - end?: Calendar_v3.Schema.EventDateTime; + end?: Calendar.Schema.EventDateTime; endTimeUnspecified?: boolean; etag?: string; - extendedProperties?: Calendar_v3.Schema.EventExtendedProperties; - gadget?: Calendar_v3.Schema.EventGadget; + extendedProperties?: Calendar.Schema.EventExtendedProperties; + gadget?: Calendar.Schema.EventGadget; guestsCanInviteOthers?: boolean; guestsCanModify?: boolean; guestsCanSeeOtherGuests?: boolean; @@ -379,15 +379,15 @@ declare namespace GoogleAppsScript { kind?: string; location?: string; locked?: boolean; - organizer?: Calendar_v3.Schema.EventOrganizer; - originalStartTime?: Calendar_v3.Schema.EventDateTime; + organizer?: Calendar.Schema.EventOrganizer; + originalStartTime?: Calendar.Schema.EventDateTime; privateCopy?: boolean; recurrence?: string[]; recurringEventId?: string; - reminders?: Calendar_v3.Schema.EventReminders; + reminders?: Calendar.Schema.EventReminders; sequence?: number; - source?: Calendar_v3.Schema.EventSource; - start?: Calendar_v3.Schema.EventDateTime; + source?: Calendar.Schema.EventSource; + start?: Calendar.Schema.EventDateTime; status?: string; summary?: string; transparency?: string; @@ -449,7 +449,7 @@ declare namespace GoogleAppsScript { minutes?: number; } export interface EventReminders { - overrides?: Calendar_v3.Schema.EventReminder[]; + overrides?: Calendar.Schema.EventReminder[]; useDefault?: boolean; } export interface EventSource { @@ -458,10 +458,10 @@ declare namespace GoogleAppsScript { } export interface Events { accessRole?: string; - defaultReminders?: Calendar_v3.Schema.EventReminder[]; + defaultReminders?: Calendar.Schema.EventReminder[]; description?: string; etag?: string; - items?: Calendar_v3.Schema.Event[]; + items?: Calendar.Schema.Event[]; kind?: string; nextPageToken?: string; nextSyncToken?: string; @@ -470,17 +470,17 @@ declare namespace GoogleAppsScript { updated?: string; } export interface FreeBusyCalendar { - busy?: Calendar_v3.Schema.TimePeriod[]; - errors?: Calendar_v3.Schema.Error[]; + busy?: Calendar.Schema.TimePeriod[]; + errors?: Calendar.Schema.Error[]; } export interface FreeBusyGroup { calendars?: string[]; - errors?: Calendar_v3.Schema.Error[]; + errors?: Calendar.Schema.Error[]; } export interface FreeBusyRequest { calendarExpansionMax?: number; groupExpansionMax?: number; - items?: Calendar_v3.Schema.FreeBusyRequestItem[]; + items?: Calendar.Schema.FreeBusyRequestItem[]; timeMax?: string; timeMin?: string; timeZone?: string; @@ -503,7 +503,7 @@ declare namespace GoogleAppsScript { } export interface Settings { etag?: string; - items?: Calendar_v3.Schema.Setting[]; + items?: Calendar.Schema.Setting[]; kind?: string; nextPageToken?: string; nextSyncToken?: string; @@ -514,74 +514,74 @@ declare namespace GoogleAppsScript { } } } - export interface Calendar_v3 { - Acl?: Calendar_v3.Collection.AclCollection; - CalendarList?: Calendar_v3.Collection.CalendarListCollection; - Calendars?: Calendar_v3.Collection.CalendarsCollection; - Channels?: Calendar_v3.Collection.ChannelsCollection; - Colors?: Calendar_v3.Collection.ColorsCollection; - Events?: Calendar_v3.Collection.EventsCollection; - Freebusy?: Calendar_v3.Collection.FreebusyCollection; - Settings?: Calendar_v3.Collection.SettingsCollection; + export interface Calendar { + Acl?: Calendar.Collection.AclCollection; + CalendarList?: Calendar.Collection.CalendarListCollection; + Calendars?: Calendar.Collection.CalendarsCollection; + Channels?: Calendar.Collection.ChannelsCollection; + Colors?: Calendar.Collection.ColorsCollection; + Events?: Calendar.Collection.EventsCollection; + Freebusy?: Calendar.Collection.FreebusyCollection; + Settings?: Calendar.Collection.SettingsCollection; // Create a new instance of AclRule - newAclRule(): Calendar_v3.Schema.AclRule; + newAclRule(): Calendar.Schema.AclRule; // Create a new instance of AclRuleScope - newAclRuleScope(): Calendar_v3.Schema.AclRuleScope; + newAclRuleScope(): Calendar.Schema.AclRuleScope; // Create a new instance of Calendar - newCalendar(): Calendar_v3.Schema.Calendar; + newCalendar(): Calendar.Schema.Calendar; // Create a new instance of CalendarListEntry - newCalendarListEntry(): Calendar_v3.Schema.CalendarListEntry; + newCalendarListEntry(): Calendar.Schema.CalendarListEntry; // Create a new instance of CalendarListEntryNotificationSettings - newCalendarListEntryNotificationSettings(): Calendar_v3.Schema.CalendarListEntryNotificationSettings; + newCalendarListEntryNotificationSettings(): Calendar.Schema.CalendarListEntryNotificationSettings; // Create a new instance of CalendarNotification - newCalendarNotification(): Calendar_v3.Schema.CalendarNotification; + newCalendarNotification(): Calendar.Schema.CalendarNotification; // Create a new instance of Channel - newChannel(): Calendar_v3.Schema.Channel; + newChannel(): Calendar.Schema.Channel; // Create a new instance of ConferenceData - newConferenceData(): Calendar_v3.Schema.ConferenceData; + newConferenceData(): Calendar.Schema.ConferenceData; // Create a new instance of ConferenceParameters - newConferenceParameters(): Calendar_v3.Schema.ConferenceParameters; + newConferenceParameters(): Calendar.Schema.ConferenceParameters; // Create a new instance of ConferenceParametersAddOnParameters - newConferenceParametersAddOnParameters(): Calendar_v3.Schema.ConferenceParametersAddOnParameters; + newConferenceParametersAddOnParameters(): Calendar.Schema.ConferenceParametersAddOnParameters; // Create a new instance of ConferenceProperties - newConferenceProperties(): Calendar_v3.Schema.ConferenceProperties; + newConferenceProperties(): Calendar.Schema.ConferenceProperties; // Create a new instance of ConferenceRequestStatus - newConferenceRequestStatus(): Calendar_v3.Schema.ConferenceRequestStatus; + newConferenceRequestStatus(): Calendar.Schema.ConferenceRequestStatus; // Create a new instance of ConferenceSolution - newConferenceSolution(): Calendar_v3.Schema.ConferenceSolution; + newConferenceSolution(): Calendar.Schema.ConferenceSolution; // Create a new instance of ConferenceSolutionKey - newConferenceSolutionKey(): Calendar_v3.Schema.ConferenceSolutionKey; + newConferenceSolutionKey(): Calendar.Schema.ConferenceSolutionKey; // Create a new instance of CreateConferenceRequest - newCreateConferenceRequest(): Calendar_v3.Schema.CreateConferenceRequest; + newCreateConferenceRequest(): Calendar.Schema.CreateConferenceRequest; // Create a new instance of EntryPoint - newEntryPoint(): Calendar_v3.Schema.EntryPoint; + newEntryPoint(): Calendar.Schema.EntryPoint; // Create a new instance of Event - newEvent(): Calendar_v3.Schema.Event; + newEvent(): Calendar.Schema.Event; // Create a new instance of EventAttachment - newEventAttachment(): Calendar_v3.Schema.EventAttachment; + newEventAttachment(): Calendar.Schema.EventAttachment; // Create a new instance of EventAttendee - newEventAttendee(): Calendar_v3.Schema.EventAttendee; + newEventAttendee(): Calendar.Schema.EventAttendee; // Create a new instance of EventCreator - newEventCreator(): Calendar_v3.Schema.EventCreator; + newEventCreator(): Calendar.Schema.EventCreator; // Create a new instance of EventDateTime - newEventDateTime(): Calendar_v3.Schema.EventDateTime; + newEventDateTime(): Calendar.Schema.EventDateTime; // Create a new instance of EventExtendedProperties - newEventExtendedProperties(): Calendar_v3.Schema.EventExtendedProperties; + newEventExtendedProperties(): Calendar.Schema.EventExtendedProperties; // Create a new instance of EventGadget - newEventGadget(): Calendar_v3.Schema.EventGadget; + newEventGadget(): Calendar.Schema.EventGadget; // Create a new instance of EventOrganizer - newEventOrganizer(): Calendar_v3.Schema.EventOrganizer; + newEventOrganizer(): Calendar.Schema.EventOrganizer; // Create a new instance of EventReminder - newEventReminder(): Calendar_v3.Schema.EventReminder; + newEventReminder(): Calendar.Schema.EventReminder; // Create a new instance of EventReminders - newEventReminders(): Calendar_v3.Schema.EventReminders; + newEventReminders(): Calendar.Schema.EventReminders; // Create a new instance of EventSource - newEventSource(): Calendar_v3.Schema.EventSource; + newEventSource(): Calendar.Schema.EventSource; // Create a new instance of FreeBusyRequest - newFreeBusyRequest(): Calendar_v3.Schema.FreeBusyRequest; + newFreeBusyRequest(): Calendar.Schema.FreeBusyRequest; // Create a new instance of FreeBusyRequestItem - newFreeBusyRequestItem(): Calendar_v3.Schema.FreeBusyRequestItem; + newFreeBusyRequestItem(): Calendar.Schema.FreeBusyRequestItem; } } -declare var Calendar_v3: GoogleAppsScript.Calendar_v3; \ No newline at end of file +declare var Calendar: GoogleAppsScript.Calendar; diff --git a/types/google-apps-script/apis/classroom_v1.d.ts b/types/google-apps-script/apis/classroom_v1.d.ts index bf0151793d..e92af8a3d8 100644 --- a/types/google-apps-script/apis/classroom_v1.d.ts +++ b/types/google-apps-script/apis/classroom_v1.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Classroom_v1 { + namespace Classroom { namespace Collection { namespace Courses { namespace CourseWork { @@ -17,7 +17,7 @@ declare namespace GoogleAppsScript { // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course, course work, or student submission // does not exist. - get(courseId: string, courseWorkId: string, id: string): Classroom_v1.Schema.StudentSubmission; + get(courseId: string, courseWorkId: string, id: string): Classroom.Schema.StudentSubmission; // Returns a list of student submissions that the requester is permitted to // view, factoring in the OAuth scopes of the request. // `-` may be specified as the `course_work_id` to include student @@ -29,7 +29,7 @@ declare namespace GoogleAppsScript { // requested course or course work, or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course does not exist. - list(courseId: string, courseWorkId: string): Classroom_v1.Schema.ListStudentSubmissionsResponse; + list(courseId: string, courseWorkId: string): Classroom.Schema.ListStudentSubmissionsResponse; // Returns a list of student submissions that the requester is permitted to // view, factoring in the OAuth scopes of the request. // `-` may be specified as the `course_work_id` to include student @@ -41,7 +41,7 @@ declare namespace GoogleAppsScript { // requested course or course work, or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course does not exist. - list(courseId: string, courseWorkId: string, optionalArgs: object): Classroom_v1.Schema.ListStudentSubmissionsResponse; + list(courseId: string, courseWorkId: string, optionalArgs: object): Classroom.Schema.ListStudentSubmissionsResponse; // Modifies attachments of student submission. // Attachments may only be added to student submissions belonging to course // work objects with a `workType` of `ASSIGNMENT`. @@ -56,7 +56,7 @@ declare namespace GoogleAppsScript { // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course, course work, or student submission // does not exist. - modifyAttachments(resource: Schema.ModifyAttachmentsRequest, courseId: string, courseWorkId: string, id: string): Classroom_v1.Schema.StudentSubmission; + modifyAttachments(resource: Schema.ModifyAttachmentsRequest, courseId: string, courseWorkId: string, id: string): Classroom.Schema.StudentSubmission; // Updates one or more fields of a student submission. // See google.StudentSubmission for details // of which fields may be updated and who may change them. @@ -71,7 +71,7 @@ declare namespace GoogleAppsScript { // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course, course work, or student submission // does not exist. - patch(resource: Schema.StudentSubmission, courseId: string, courseWorkId: string, id: string): Classroom_v1.Schema.StudentSubmission; + patch(resource: Schema.StudentSubmission, courseId: string, courseWorkId: string, id: string): Classroom.Schema.StudentSubmission; // Updates one or more fields of a student submission. // See google.StudentSubmission for details // of which fields may be updated and who may change them. @@ -86,7 +86,7 @@ declare namespace GoogleAppsScript { // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course, course work, or student submission // does not exist. - patch(resource: Schema.StudentSubmission, courseId: string, courseWorkId: string, id: string, optionalArgs: object): Classroom_v1.Schema.StudentSubmission; + patch(resource: Schema.StudentSubmission, courseId: string, courseWorkId: string, id: string, optionalArgs: object): Classroom.Schema.StudentSubmission; // Reclaims a student submission on behalf of the student that owns it. // Reclaiming a student submission transfers ownership of attached Drive // files to the student and updates the submission state. @@ -150,19 +150,19 @@ declare namespace GoogleAppsScript { // * `FAILED_PRECONDITION` if the alias requested does not make sense for the // requesting user or course (for example, if a user not in a domain // attempts to access a domain-scoped alias). - create(resource: Schema.CourseAlias, courseId: string): Classroom_v1.Schema.CourseAlias; + create(resource: Schema.CourseAlias, courseId: string): Classroom.Schema.CourseAlias; // Returns a list of aliases for a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to access the // course or for access errors. // * `NOT_FOUND` if the course does not exist. - list(courseId: string): Classroom_v1.Schema.ListCourseAliasesResponse; + list(courseId: string): Classroom.Schema.ListCourseAliasesResponse; // Returns a list of aliases for a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to access the // course or for access errors. // * `NOT_FOUND` if the course does not exist. - list(courseId: string, optionalArgs: object): Classroom_v1.Schema.ListCourseAliasesResponse; + list(courseId: string, optionalArgs: object): Classroom.Schema.ListCourseAliasesResponse; // Deletes an alias of a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to remove the @@ -183,14 +183,14 @@ declare namespace GoogleAppsScript { // * `NOT_FOUND` if the requested course does not exist. // * `FAILED_PRECONDITION` for the following request error: // * AttachmentNotVisible - create(resource: Schema.Announcement, courseId: string): Classroom_v1.Schema.Announcement; + create(resource: Schema.Announcement, courseId: string): Classroom.Schema.Announcement; // Returns an announcement. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to access the // requested course or announcement, or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course or announcement does not exist. - get(courseId: string, id: string): Classroom_v1.Schema.Announcement; + get(courseId: string, id: string): Classroom.Schema.Announcement; // Returns a list of announcements that the requester is permitted to view. // Course students may only view `PUBLISHED` announcements. Course teachers // and domain administrators may view all announcements. @@ -199,7 +199,7 @@ declare namespace GoogleAppsScript { // the requested course or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course does not exist. - list(courseId: string): Classroom_v1.Schema.ListAnnouncementsResponse; + list(courseId: string): Classroom.Schema.ListAnnouncementsResponse; // Returns a list of announcements that the requester is permitted to view. // Course students may only view `PUBLISHED` announcements. Course teachers // and domain administrators may view all announcements. @@ -208,7 +208,7 @@ declare namespace GoogleAppsScript { // the requested course or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course does not exist. - list(courseId: string, optionalArgs: object): Classroom_v1.Schema.ListAnnouncementsResponse; + list(courseId: string, optionalArgs: object): Classroom.Schema.ListAnnouncementsResponse; // Modifies assignee mode and options of an announcement. // Only a teacher of the course that contains the announcement may // call this method. @@ -217,7 +217,7 @@ declare namespace GoogleAppsScript { // requested course or course work or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course or course work does not exist. - modifyAssignees(resource: Schema.ModifyAnnouncementAssigneesRequest, courseId: string, id: string): Classroom_v1.Schema.Announcement; + modifyAssignees(resource: Schema.ModifyAnnouncementAssigneesRequest, courseId: string, id: string): Classroom.Schema.Announcement; // Updates one or more fields of an announcement. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting developer project did not create @@ -226,7 +226,7 @@ declare namespace GoogleAppsScript { // * `FAILED_PRECONDITION` if the requested announcement has already been // deleted. // * `NOT_FOUND` if the requested course or announcement does not exist - patch(resource: Schema.Announcement, courseId: string, id: string): Classroom_v1.Schema.Announcement; + patch(resource: Schema.Announcement, courseId: string, id: string): Classroom.Schema.Announcement; // Updates one or more fields of an announcement. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting developer project did not create @@ -235,7 +235,7 @@ declare namespace GoogleAppsScript { // * `FAILED_PRECONDITION` if the requested announcement has already been // deleted. // * `NOT_FOUND` if the requested course or announcement does not exist - patch(resource: Schema.Announcement, courseId: string, id: string, optionalArgs: object): Classroom_v1.Schema.Announcement; + patch(resource: Schema.Announcement, courseId: string, id: string, optionalArgs: object): Classroom.Schema.Announcement; // Deletes an announcement. // This request must be made by the Developer Console project of the // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to @@ -250,7 +250,7 @@ declare namespace GoogleAppsScript { remove(courseId: string, id: string): void; } export interface CourseWorkCollection { - StudentSubmissions?: Classroom_v1.Collection.Courses.CourseWork.StudentSubmissionsCollection; + StudentSubmissions?: Classroom.Collection.Courses.CourseWork.StudentSubmissionsCollection; // Creates course work. // The resulting course work (and corresponding student submissions) are // associated with the Developer Console project of the @@ -266,14 +266,14 @@ declare namespace GoogleAppsScript { // * `NOT_FOUND` if the requested course does not exist. // * `FAILED_PRECONDITION` for the following request error: // * AttachmentNotVisible - create(resource: Schema.CourseWork, courseId: string): Classroom_v1.Schema.CourseWork; + create(resource: Schema.CourseWork, courseId: string): Classroom.Schema.CourseWork; // Returns course work. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to access the // requested course or course work, or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course or course work does not exist. - get(courseId: string, id: string): Classroom_v1.Schema.CourseWork; + get(courseId: string, id: string): Classroom.Schema.CourseWork; // Returns a list of course work that the requester is permitted to view. // Course students may only view `PUBLISHED` course work. Course teachers // and domain administrators may view all course work. @@ -282,7 +282,7 @@ declare namespace GoogleAppsScript { // the requested course or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course does not exist. - list(courseId: string): Classroom_v1.Schema.ListCourseWorkResponse; + list(courseId: string): Classroom.Schema.ListCourseWorkResponse; // Returns a list of course work that the requester is permitted to view. // Course students may only view `PUBLISHED` course work. Course teachers // and domain administrators may view all course work. @@ -291,7 +291,7 @@ declare namespace GoogleAppsScript { // the requested course or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course does not exist. - list(courseId: string, optionalArgs: object): Classroom_v1.Schema.ListCourseWorkResponse; + list(courseId: string, optionalArgs: object): Classroom.Schema.ListCourseWorkResponse; // Modifies assignee mode and options of a coursework. // Only a teacher of the course that contains the coursework may // call this method. @@ -300,7 +300,7 @@ declare namespace GoogleAppsScript { // requested course or course work or for access errors. // * `INVALID_ARGUMENT` if the request is malformed. // * `NOT_FOUND` if the requested course or course work does not exist. - modifyAssignees(resource: Schema.ModifyCourseWorkAssigneesRequest, courseId: string, id: string): Classroom_v1.Schema.CourseWork; + modifyAssignees(resource: Schema.ModifyCourseWorkAssigneesRequest, courseId: string, id: string): Classroom.Schema.CourseWork; // Updates one or more fields of a course work. // See google.CourseWork for details // of which fields may be updated and who may change them. @@ -317,7 +317,7 @@ declare namespace GoogleAppsScript { // deleted. // * `NOT_FOUND` if the requested course, course work, or student submission // does not exist. - patch(resource: Schema.CourseWork, courseId: string, id: string): Classroom_v1.Schema.CourseWork; + patch(resource: Schema.CourseWork, courseId: string, id: string): Classroom.Schema.CourseWork; // Updates one or more fields of a course work. // See google.CourseWork for details // of which fields may be updated and who may change them. @@ -334,7 +334,7 @@ declare namespace GoogleAppsScript { // deleted. // * `NOT_FOUND` if the requested course, course work, or student submission // does not exist. - patch(resource: Schema.CourseWork, courseId: string, id: string, optionalArgs: object): Classroom_v1.Schema.CourseWork; + patch(resource: Schema.CourseWork, courseId: string, id: string, optionalArgs: object): Classroom.Schema.CourseWork; // Deletes a course work. // This request must be made by the Developer Console project of the // [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to @@ -361,7 +361,7 @@ declare namespace GoogleAppsScript { // * UserGroupsMembershipLimitReached // * `ALREADY_EXISTS` if the user is already a student or teacher in the // course. - create(resource: Schema.Student, courseId: string): Classroom_v1.Schema.Student; + create(resource: Schema.Student, courseId: string): Classroom.Schema.Student; // Adds a user as a student of a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to create @@ -374,26 +374,26 @@ declare namespace GoogleAppsScript { // * UserGroupsMembershipLimitReached // * `ALREADY_EXISTS` if the user is already a student or teacher in the // course. - create(resource: Schema.Student, courseId: string, optionalArgs: object): Classroom_v1.Schema.Student; + create(resource: Schema.Student, courseId: string, optionalArgs: object): Classroom.Schema.Student; // Returns a student of a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to view // students of this course or for access errors. // * `NOT_FOUND` if no student of this course has the requested ID or if the // course does not exist. - get(courseId: string, userId: string): Classroom_v1.Schema.Student; + get(courseId: string, userId: string): Classroom.Schema.Student; // Returns a list of students of this course that the requester // is permitted to view. // This method returns the following error codes: // * `NOT_FOUND` if the course does not exist. // * `PERMISSION_DENIED` for access errors. - list(courseId: string): Classroom_v1.Schema.ListStudentsResponse; + list(courseId: string): Classroom.Schema.ListStudentsResponse; // Returns a list of students of this course that the requester // is permitted to view. // This method returns the following error codes: // * `NOT_FOUND` if the course does not exist. // * `PERMISSION_DENIED` for access errors. - list(courseId: string, optionalArgs: object): Classroom_v1.Schema.ListStudentsResponse; + list(courseId: string, optionalArgs: object): Classroom.Schema.ListStudentsResponse; // Deletes a student of a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to delete @@ -416,26 +416,26 @@ declare namespace GoogleAppsScript { // * UserGroupsMembershipLimitReached // * `ALREADY_EXISTS` if the user is already a teacher or student in the // course. - create(resource: Schema.Teacher, courseId: string): Classroom_v1.Schema.Teacher; + create(resource: Schema.Teacher, courseId: string): Classroom.Schema.Teacher; // Returns a teacher of a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to view // teachers of this course or for access errors. // * `NOT_FOUND` if no teacher of this course has the requested ID or if the // course does not exist. - get(courseId: string, userId: string): Classroom_v1.Schema.Teacher; + get(courseId: string, userId: string): Classroom.Schema.Teacher; // Returns a list of teachers of this course that the requester // is permitted to view. // This method returns the following error codes: // * `NOT_FOUND` if the course does not exist. // * `PERMISSION_DENIED` for access errors. - list(courseId: string): Classroom_v1.Schema.ListTeachersResponse; + list(courseId: string): Classroom.Schema.ListTeachersResponse; // Returns a list of teachers of this course that the requester // is permitted to view. // This method returns the following error codes: // * `NOT_FOUND` if the course does not exist. // * `PERMISSION_DENIED` for access errors. - list(courseId: string, optionalArgs: object): Classroom_v1.Schema.ListTeachersResponse; + list(courseId: string, optionalArgs: object): Classroom.Schema.ListTeachersResponse; // Deletes a teacher of a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to delete @@ -475,7 +475,7 @@ declare namespace GoogleAppsScript { // the student and `invited_email_address` provided, or if the provided // `invited_email_address` matches the Google account of an existing // `Guardian` for this user. - create(resource: Schema.GuardianInvitation, studentId: string): Classroom_v1.Schema.GuardianInvitation; + create(resource: Schema.GuardianInvitation, studentId: string): Classroom.Schema.GuardianInvitation; // Returns a specific guardian invitation. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to view @@ -488,7 +488,7 @@ declare namespace GoogleAppsScript { // * `NOT_FOUND` if Classroom cannot find any record of the given student or // `invitation_id`. May also be returned if the student exists, but the // requesting user does not have access to see that student. - get(studentId: string, invitationId: string): Classroom_v1.Schema.GuardianInvitation; + get(studentId: string, invitationId: string): Classroom.Schema.GuardianInvitation; // Returns a list of guardian invitations that the requesting user is // permitted to view, filtered by the parameters provided. // This method returns the following error codes: @@ -503,7 +503,7 @@ declare namespace GoogleAppsScript { // `page_token` or `state` is provided. // * `NOT_FOUND` if a `student_id` is specified, and its format can be // recognized, but Classroom has no record of that student. - list(studentId: string): Classroom_v1.Schema.ListGuardianInvitationsResponse; + list(studentId: string): Classroom.Schema.ListGuardianInvitationsResponse; // Returns a list of guardian invitations that the requesting user is // permitted to view, filtered by the parameters provided. // This method returns the following error codes: @@ -518,7 +518,7 @@ declare namespace GoogleAppsScript { // `page_token` or `state` is provided. // * `NOT_FOUND` if a `student_id` is specified, and its format can be // recognized, but Classroom has no record of that student. - list(studentId: string, optionalArgs: object): Classroom_v1.Schema.ListGuardianInvitationsResponse; + list(studentId: string, optionalArgs: object): Classroom.Schema.ListGuardianInvitationsResponse; // Modifies a guardian invitation. // Currently, the only valid modification is to change the `state` from // `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. @@ -534,7 +534,7 @@ declare namespace GoogleAppsScript { // * `NOT_FOUND` if the student ID provided is a valid student ID, but // Classroom has no record of that student, or if the `id` field does not // refer to a guardian invitation known to Classroom. - patch(resource: Schema.GuardianInvitation, studentId: string, invitationId: string): Classroom_v1.Schema.GuardianInvitation; + patch(resource: Schema.GuardianInvitation, studentId: string, invitationId: string): Classroom.Schema.GuardianInvitation; // Modifies a guardian invitation. // Currently, the only valid modification is to change the `state` from // `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. @@ -550,7 +550,7 @@ declare namespace GoogleAppsScript { // * `NOT_FOUND` if the student ID provided is a valid student ID, but // Classroom has no record of that student, or if the `id` field does not // refer to a guardian invitation known to Classroom. - patch(resource: Schema.GuardianInvitation, studentId: string, invitationId: string, optionalArgs: object): Classroom_v1.Schema.GuardianInvitation; + patch(resource: Schema.GuardianInvitation, studentId: string, invitationId: string, optionalArgs: object): Classroom.Schema.GuardianInvitation; } export interface GuardiansCollection { // Returns a specific guardian. @@ -566,7 +566,7 @@ declare namespace GoogleAppsScript { // * `NOT_FOUND` if the requesting user is permitted to view guardians for // the requested `student_id`, but no `Guardian` record exists for that // student that matches the provided `guardian_id`. - get(studentId: string, guardianId: string): Classroom_v1.Schema.Guardian; + get(studentId: string, guardianId: string): Classroom.Schema.Guardian; // Returns a list of guardians that the requesting user is permitted to // view, restricted to those that match the request. // To list guardians for any student that the requesting user may view @@ -584,7 +584,7 @@ declare namespace GoogleAppsScript { // `page_token` is provided. // * `NOT_FOUND` if a `student_id` is specified, and its format can be // recognized, but Classroom has no record of that student. - list(studentId: string): Classroom_v1.Schema.ListGuardiansResponse; + list(studentId: string): Classroom.Schema.ListGuardiansResponse; // Returns a list of guardians that the requesting user is permitted to // view, restricted to those that match the request. // To list guardians for any student that the requesting user may view @@ -602,7 +602,7 @@ declare namespace GoogleAppsScript { // `page_token` is provided. // * `NOT_FOUND` if a `student_id` is specified, and its format can be // recognized, but Classroom has no record of that student. - list(studentId: string, optionalArgs: object): Classroom_v1.Schema.ListGuardiansResponse; + list(studentId: string, optionalArgs: object): Classroom.Schema.ListGuardiansResponse; // Deletes a guardian. // The guardian will no longer receive guardian notifications and the guardian // will no longer be accessible via the API. @@ -622,11 +622,11 @@ declare namespace GoogleAppsScript { } } export interface CoursesCollection { - Aliases?: Classroom_v1.Collection.Courses.AliasesCollection; - Announcements?: Classroom_v1.Collection.Courses.AnnouncementsCollection; - CourseWork?: Classroom_v1.Collection.Courses.CourseWorkCollection; - Students?: Classroom_v1.Collection.Courses.StudentsCollection; - Teachers?: Classroom_v1.Collection.Courses.TeachersCollection; + Aliases?: Classroom.Collection.Courses.AliasesCollection; + Announcements?: Classroom.Collection.Courses.AnnouncementsCollection; + CourseWork?: Classroom.Collection.Courses.CourseWorkCollection; + Students?: Classroom.Collection.Courses.StudentsCollection; + Teachers?: Classroom.Collection.Courses.TeachersCollection; // Creates a course. // The user specified in `ownerId` is the owner of the created course // and added as a teacher. @@ -639,13 +639,13 @@ declare namespace GoogleAppsScript { // * UserGroupsMembershipLimitReached // * `ALREADY_EXISTS` if an alias was specified in the `id` and // already exists. - create(resource: Schema.Course): Classroom_v1.Schema.Course; + create(resource: Schema.Course): Classroom.Schema.Course; // Returns a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to access the // requested course or for access errors. // * `NOT_FOUND` if no course exists with the requested ID. - get(id: string): Classroom_v1.Schema.Course; + get(id: string): Classroom.Schema.Course; // Returns a list of courses that the requesting user is permitted to view, // restricted to those that match the request. Returned courses are ordered by // creation time, with the most recently created coming first. @@ -653,7 +653,7 @@ declare namespace GoogleAppsScript { // * `PERMISSION_DENIED` for access errors. // * `INVALID_ARGUMENT` if the query argument is malformed. // * `NOT_FOUND` if any users specified in the query arguments do not exist. - list(): Classroom_v1.Schema.ListCoursesResponse; + list(): Classroom.Schema.ListCoursesResponse; // Returns a list of courses that the requesting user is permitted to view, // restricted to those that match the request. Returned courses are ordered by // creation time, with the most recently created coming first. @@ -661,7 +661,7 @@ declare namespace GoogleAppsScript { // * `PERMISSION_DENIED` for access errors. // * `INVALID_ARGUMENT` if the query argument is malformed. // * `NOT_FOUND` if any users specified in the query arguments do not exist. - list(optionalArgs: object): Classroom_v1.Schema.ListCoursesResponse; + list(optionalArgs: object): Classroom.Schema.ListCoursesResponse; // Updates one or more fields in a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to modify the @@ -671,7 +671,7 @@ declare namespace GoogleAppsScript { // if no update mask is supplied. // * `FAILED_PRECONDITION` for the following request errors: // * CourseNotModifiable - patch(resource: Schema.Course, id: string): Classroom_v1.Schema.Course; + patch(resource: Schema.Course, id: string): Classroom.Schema.Course; // Updates one or more fields in a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to modify the @@ -681,7 +681,7 @@ declare namespace GoogleAppsScript { // if no update mask is supplied. // * `FAILED_PRECONDITION` for the following request errors: // * CourseNotModifiable - patch(resource: Schema.Course, id: string, optionalArgs: object): Classroom_v1.Schema.Course; + patch(resource: Schema.Course, id: string, optionalArgs: object): Classroom.Schema.Course; // Deletes a course. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to delete the @@ -695,7 +695,7 @@ declare namespace GoogleAppsScript { // * `NOT_FOUND` if no course exists with the requested ID. // * `FAILED_PRECONDITION` for the following request errors: // * CourseNotModifiable - update(resource: Schema.Course, id: string): Classroom_v1.Schema.Course; + update(resource: Schema.Course, id: string): Classroom.Schema.Course; } export interface InvitationsCollection { // Accepts an invitation, removing it and adding the invited user to the @@ -721,27 +721,27 @@ declare namespace GoogleAppsScript { // the user already has this role or a role with greater permissions. // * `ALREADY_EXISTS` if an invitation for the specified user and course // already exists. - create(resource: Schema.Invitation): Classroom_v1.Schema.Invitation; + create(resource: Schema.Invitation): Classroom.Schema.Invitation; // Returns an invitation. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to view the // requested invitation or for access errors. // * `NOT_FOUND` if no invitation exists with the requested ID. - get(id: string): Classroom_v1.Schema.Invitation; + get(id: string): Classroom.Schema.Invitation; // Returns a list of invitations that the requesting user is permitted to // view, restricted to those that match the list request. // *Note:* At least one of `user_id` or `course_id` must be supplied. Both // fields can be supplied. // This method returns the following error codes: // * `PERMISSION_DENIED` for access errors. - list(): Classroom_v1.Schema.ListInvitationsResponse; + list(): Classroom.Schema.ListInvitationsResponse; // Returns a list of invitations that the requesting user is permitted to // view, restricted to those that match the list request. // *Note:* At least one of `user_id` or `course_id` must be supplied. Both // fields can be supplied. // This method returns the following error codes: // * `PERMISSION_DENIED` for access errors. - list(optionalArgs: object): Classroom_v1.Schema.ListInvitationsResponse; + list(optionalArgs: object): Classroom.Schema.ListInvitationsResponse; // Deletes an invitation. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to delete the @@ -776,20 +776,20 @@ declare namespace GoogleAppsScript { // not have permission to determine whether or not it exists; or // * the specified `cloudPubsubTopic` cannot be located, or Classroom has // not been granted permission to publish to it. - create(resource: Schema.Registration): Classroom_v1.Schema.Registration; + create(resource: Schema.Registration): Classroom.Schema.Registration; // Deletes a `Registration`, causing Classroom to stop sending notifications // for that `Registration`. remove(registrationId: string): void; } export interface UserProfilesCollection { - GuardianInvitations?: Classroom_v1.Collection.UserProfiles.GuardianInvitationsCollection; - Guardians?: Classroom_v1.Collection.UserProfiles.GuardiansCollection; + GuardianInvitations?: Classroom.Collection.UserProfiles.GuardianInvitationsCollection; + Guardians?: Classroom.Collection.UserProfiles.GuardiansCollection; // Returns a user profile. // This method returns the following error codes: // * `PERMISSION_DENIED` if the requesting user is not permitted to access // this user profile, if no profile exists with the requested ID, or for // access errors. - get(userId: string): Classroom_v1.Schema.UserProfile; + get(userId: string): Classroom.Schema.UserProfile; } } namespace Schema { @@ -800,24 +800,24 @@ declare namespace GoogleAppsScript { creationTime?: string; creatorUserId?: string; id?: string; - individualStudentsOptions?: Classroom_v1.Schema.IndividualStudentsOptions; - materials?: Classroom_v1.Schema.Material[]; + individualStudentsOptions?: Classroom.Schema.IndividualStudentsOptions; + materials?: Classroom.Schema.Material[]; scheduledTime?: string; state?: string; text?: string; updateTime?: string; } export interface Assignment { - studentWorkFolder?: Classroom_v1.Schema.DriveFolder; + studentWorkFolder?: Classroom.Schema.DriveFolder; } export interface AssignmentSubmission { - attachments?: Classroom_v1.Schema.Attachment[]; + attachments?: Classroom.Schema.Attachment[]; } export interface Attachment { - driveFile?: Classroom_v1.Schema.DriveFile; - form?: Classroom_v1.Schema.Form; - link?: Classroom_v1.Schema.Link; - youTubeVideo?: Classroom_v1.Schema.YouTubeVideo; + driveFile?: Classroom.Schema.DriveFile; + form?: Classroom.Schema.Form; + link?: Classroom.Schema.Link; + youTubeVideo?: Classroom.Schema.YouTubeVideo; } export interface CloudPubsubTopic { topicName?: string; @@ -826,7 +826,7 @@ declare namespace GoogleAppsScript { alternateLink?: string; calendarId?: string; courseGroupEmail?: string; - courseMaterialSets?: Classroom_v1.Schema.CourseMaterialSet[]; + courseMaterialSets?: Classroom.Schema.CourseMaterialSet[]; courseState?: string; creationTime?: string; description?: string; @@ -838,7 +838,7 @@ declare namespace GoogleAppsScript { ownerId?: string; room?: string; section?: string; - teacherFolder?: Classroom_v1.Schema.DriveFolder; + teacherFolder?: Classroom.Schema.DriveFolder; teacherGroupEmail?: string; updateTime?: string; } @@ -846,13 +846,13 @@ declare namespace GoogleAppsScript { alias?: string; } export interface CourseMaterial { - driveFile?: Classroom_v1.Schema.DriveFile; - form?: Classroom_v1.Schema.Form; - link?: Classroom_v1.Schema.Link; - youTubeVideo?: Classroom_v1.Schema.YouTubeVideo; + driveFile?: Classroom.Schema.DriveFile; + form?: Classroom.Schema.Form; + link?: Classroom.Schema.Link; + youTubeVideo?: Classroom.Schema.YouTubeVideo; } export interface CourseMaterialSet { - materials?: Classroom_v1.Schema.CourseMaterial[]; + materials?: Classroom.Schema.CourseMaterial[]; title?: string; } export interface CourseRosterChangesInfo { @@ -861,19 +861,19 @@ declare namespace GoogleAppsScript { export interface CourseWork { alternateLink?: string; assigneeMode?: string; - assignment?: Classroom_v1.Schema.Assignment; + assignment?: Classroom.Schema.Assignment; associatedWithDeveloper?: boolean; courseId?: string; creationTime?: string; creatorUserId?: string; description?: string; - dueDate?: Classroom_v1.Schema.Date; - dueTime?: Classroom_v1.Schema.TimeOfDay; + dueDate?: Classroom.Schema.Date; + dueTime?: Classroom.Schema.TimeOfDay; id?: string; - individualStudentsOptions?: Classroom_v1.Schema.IndividualStudentsOptions; - materials?: Classroom_v1.Schema.Material[]; + individualStudentsOptions?: Classroom.Schema.IndividualStudentsOptions; + materials?: Classroom.Schema.Material[]; maxPoints?: Number; - multipleChoiceQuestion?: Classroom_v1.Schema.MultipleChoiceQuestion; + multipleChoiceQuestion?: Classroom.Schema.MultipleChoiceQuestion; scheduledTime?: string; state?: string; submissionModificationMode?: string; @@ -901,8 +901,8 @@ declare namespace GoogleAppsScript { title?: string; } export interface Feed { - courseRosterChangesInfo?: Classroom_v1.Schema.CourseRosterChangesInfo; - courseWorkChangesInfo?: Classroom_v1.Schema.CourseWorkChangesInfo; + courseRosterChangesInfo?: Classroom.Schema.CourseRosterChangesInfo; + courseWorkChangesInfo?: Classroom.Schema.CourseWorkChangesInfo; feedType?: string; } export interface Form { @@ -923,7 +923,7 @@ declare namespace GoogleAppsScript { } export interface Guardian { guardianId?: string; - guardianProfile?: Classroom_v1.Schema.UserProfile; + guardianProfile?: Classroom.Schema.UserProfile; invitedEmailAddress?: string; studentId?: string; } @@ -949,61 +949,61 @@ declare namespace GoogleAppsScript { url?: string; } export interface ListAnnouncementsResponse { - announcements?: Classroom_v1.Schema.Announcement[]; + announcements?: Classroom.Schema.Announcement[]; nextPageToken?: string; } export interface ListCourseAliasesResponse { - aliases?: Classroom_v1.Schema.CourseAlias[]; + aliases?: Classroom.Schema.CourseAlias[]; nextPageToken?: string; } export interface ListCourseWorkResponse { - courseWork?: Classroom_v1.Schema.CourseWork[]; + courseWork?: Classroom.Schema.CourseWork[]; nextPageToken?: string; } export interface ListCoursesResponse { - courses?: Classroom_v1.Schema.Course[]; + courses?: Classroom.Schema.Course[]; nextPageToken?: string; } export interface ListGuardianInvitationsResponse { - guardianInvitations?: Classroom_v1.Schema.GuardianInvitation[]; + guardianInvitations?: Classroom.Schema.GuardianInvitation[]; nextPageToken?: string; } export interface ListGuardiansResponse { - guardians?: Classroom_v1.Schema.Guardian[]; + guardians?: Classroom.Schema.Guardian[]; nextPageToken?: string; } export interface ListInvitationsResponse { - invitations?: Classroom_v1.Schema.Invitation[]; + invitations?: Classroom.Schema.Invitation[]; nextPageToken?: string; } export interface ListStudentSubmissionsResponse { nextPageToken?: string; - studentSubmissions?: Classroom_v1.Schema.StudentSubmission[]; + studentSubmissions?: Classroom.Schema.StudentSubmission[]; } export interface ListStudentsResponse { nextPageToken?: string; - students?: Classroom_v1.Schema.Student[]; + students?: Classroom.Schema.Student[]; } export interface ListTeachersResponse { nextPageToken?: string; - teachers?: Classroom_v1.Schema.Teacher[]; + teachers?: Classroom.Schema.Teacher[]; } export interface Material { - driveFile?: Classroom_v1.Schema.SharedDriveFile; - form?: Classroom_v1.Schema.Form; - link?: Classroom_v1.Schema.Link; - youtubeVideo?: Classroom_v1.Schema.YouTubeVideo; + driveFile?: Classroom.Schema.SharedDriveFile; + form?: Classroom.Schema.Form; + link?: Classroom.Schema.Link; + youtubeVideo?: Classroom.Schema.YouTubeVideo; } export interface ModifyAnnouncementAssigneesRequest { assigneeMode?: string; - modifyIndividualStudentsOptions?: Classroom_v1.Schema.ModifyIndividualStudentsOptions; + modifyIndividualStudentsOptions?: Classroom.Schema.ModifyIndividualStudentsOptions; } export interface ModifyAttachmentsRequest { - addAttachments?: Classroom_v1.Schema.Attachment[]; + addAttachments?: Classroom.Schema.Attachment[]; } export interface ModifyCourseWorkAssigneesRequest { assigneeMode?: string; - modifyIndividualStudentsOptions?: Classroom_v1.Schema.ModifyIndividualStudentsOptions; + modifyIndividualStudentsOptions?: Classroom.Schema.ModifyIndividualStudentsOptions; } export interface ModifyIndividualStudentsOptions { addStudentIds?: string[]; @@ -1021,13 +1021,13 @@ declare namespace GoogleAppsScript { givenName?: string; } export interface Registration { - cloudPubsubTopic?: Classroom_v1.Schema.CloudPubsubTopic; + cloudPubsubTopic?: Classroom.Schema.CloudPubsubTopic; expiryTime?: string; - feed?: Classroom_v1.Schema.Feed; + feed?: Classroom.Schema.Feed; registrationId?: string; } export interface SharedDriveFile { - driveFile?: Classroom_v1.Schema.DriveFile; + driveFile?: Classroom.Schema.DriveFile; shareMode?: string; } export interface ShortAnswerSubmission { @@ -1040,14 +1040,14 @@ declare namespace GoogleAppsScript { } export interface Student { courseId?: string; - profile?: Classroom_v1.Schema.UserProfile; - studentWorkFolder?: Classroom_v1.Schema.DriveFolder; + profile?: Classroom.Schema.UserProfile; + studentWorkFolder?: Classroom.Schema.DriveFolder; userId?: string; } export interface StudentSubmission { alternateLink?: string; assignedGrade?: Number; - assignmentSubmission?: Classroom_v1.Schema.AssignmentSubmission; + assignmentSubmission?: Classroom.Schema.AssignmentSubmission; associatedWithDeveloper?: boolean; courseId?: string; courseWorkId?: string; @@ -1056,20 +1056,20 @@ declare namespace GoogleAppsScript { draftGrade?: Number; id?: string; late?: boolean; - multipleChoiceSubmission?: Classroom_v1.Schema.MultipleChoiceSubmission; - shortAnswerSubmission?: Classroom_v1.Schema.ShortAnswerSubmission; + multipleChoiceSubmission?: Classroom.Schema.MultipleChoiceSubmission; + shortAnswerSubmission?: Classroom.Schema.ShortAnswerSubmission; state?: string; - submissionHistory?: Classroom_v1.Schema.SubmissionHistory[]; + submissionHistory?: Classroom.Schema.SubmissionHistory[]; updateTime?: string; userId?: string; } export interface SubmissionHistory { - gradeHistory?: Classroom_v1.Schema.GradeHistory; - stateHistory?: Classroom_v1.Schema.StateHistory; + gradeHistory?: Classroom.Schema.GradeHistory; + stateHistory?: Classroom.Schema.StateHistory; } export interface Teacher { courseId?: string; - profile?: Classroom_v1.Schema.UserProfile; + profile?: Classroom.Schema.UserProfile; userId?: string; } export interface TimeOfDay { @@ -1081,8 +1081,8 @@ declare namespace GoogleAppsScript { export interface UserProfile { emailAddress?: string; id?: string; - name?: Classroom_v1.Schema.Name; - permissions?: Classroom_v1.Schema.GlobalPermission[]; + name?: Classroom.Schema.Name; + permissions?: Classroom.Schema.GlobalPermission[]; photoUrl?: string; verifiedTeacher?: boolean; } @@ -1094,102 +1094,102 @@ declare namespace GoogleAppsScript { } } } - export interface Classroom_v1 { - Courses?: Classroom_v1.Collection.CoursesCollection; - Invitations?: Classroom_v1.Collection.InvitationsCollection; - Registrations?: Classroom_v1.Collection.RegistrationsCollection; - UserProfiles?: Classroom_v1.Collection.UserProfilesCollection; + export interface Classroom { + Courses?: Classroom.Collection.CoursesCollection; + Invitations?: Classroom.Collection.InvitationsCollection; + Registrations?: Classroom.Collection.RegistrationsCollection; + UserProfiles?: Classroom.Collection.UserProfilesCollection; // Create a new instance of Announcement - newAnnouncement(): Classroom_v1.Schema.Announcement; + newAnnouncement(): Classroom.Schema.Announcement; // Create a new instance of Assignment - newAssignment(): Classroom_v1.Schema.Assignment; + newAssignment(): Classroom.Schema.Assignment; // Create a new instance of AssignmentSubmission - newAssignmentSubmission(): Classroom_v1.Schema.AssignmentSubmission; + newAssignmentSubmission(): Classroom.Schema.AssignmentSubmission; // Create a new instance of Attachment - newAttachment(): Classroom_v1.Schema.Attachment; + newAttachment(): Classroom.Schema.Attachment; // Create a new instance of CloudPubsubTopic - newCloudPubsubTopic(): Classroom_v1.Schema.CloudPubsubTopic; + newCloudPubsubTopic(): Classroom.Schema.CloudPubsubTopic; // Create a new instance of Course - newCourse(): Classroom_v1.Schema.Course; + newCourse(): Classroom.Schema.Course; // Create a new instance of CourseAlias - newCourseAlias(): Classroom_v1.Schema.CourseAlias; + newCourseAlias(): Classroom.Schema.CourseAlias; // Create a new instance of CourseMaterial - newCourseMaterial(): Classroom_v1.Schema.CourseMaterial; + newCourseMaterial(): Classroom.Schema.CourseMaterial; // Create a new instance of CourseMaterialSet - newCourseMaterialSet(): Classroom_v1.Schema.CourseMaterialSet; + newCourseMaterialSet(): Classroom.Schema.CourseMaterialSet; // Create a new instance of CourseRosterChangesInfo - newCourseRosterChangesInfo(): Classroom_v1.Schema.CourseRosterChangesInfo; + newCourseRosterChangesInfo(): Classroom.Schema.CourseRosterChangesInfo; // Create a new instance of CourseWork - newCourseWork(): Classroom_v1.Schema.CourseWork; + newCourseWork(): Classroom.Schema.CourseWork; // Create a new instance of CourseWorkChangesInfo - newCourseWorkChangesInfo(): Classroom_v1.Schema.CourseWorkChangesInfo; + newCourseWorkChangesInfo(): Classroom.Schema.CourseWorkChangesInfo; // Create a new instance of Date - newDate(): Classroom_v1.Schema.Date; + newDate(): Classroom.Schema.Date; // Create a new instance of DriveFile - newDriveFile(): Classroom_v1.Schema.DriveFile; + newDriveFile(): Classroom.Schema.DriveFile; // Create a new instance of DriveFolder - newDriveFolder(): Classroom_v1.Schema.DriveFolder; + newDriveFolder(): Classroom.Schema.DriveFolder; // Create a new instance of Feed - newFeed(): Classroom_v1.Schema.Feed; + newFeed(): Classroom.Schema.Feed; // Create a new instance of Form - newForm(): Classroom_v1.Schema.Form; + newForm(): Classroom.Schema.Form; // Create a new instance of GlobalPermission - newGlobalPermission(): Classroom_v1.Schema.GlobalPermission; + newGlobalPermission(): Classroom.Schema.GlobalPermission; // Create a new instance of GradeHistory - newGradeHistory(): Classroom_v1.Schema.GradeHistory; + newGradeHistory(): Classroom.Schema.GradeHistory; // Create a new instance of GuardianInvitation - newGuardianInvitation(): Classroom_v1.Schema.GuardianInvitation; + newGuardianInvitation(): Classroom.Schema.GuardianInvitation; // Create a new instance of IndividualStudentsOptions - newIndividualStudentsOptions(): Classroom_v1.Schema.IndividualStudentsOptions; + newIndividualStudentsOptions(): Classroom.Schema.IndividualStudentsOptions; // Create a new instance of Invitation - newInvitation(): Classroom_v1.Schema.Invitation; + newInvitation(): Classroom.Schema.Invitation; // Create a new instance of Link - newLink(): Classroom_v1.Schema.Link; + newLink(): Classroom.Schema.Link; // Create a new instance of Material - newMaterial(): Classroom_v1.Schema.Material; + newMaterial(): Classroom.Schema.Material; // Create a new instance of ModifyAnnouncementAssigneesRequest - newModifyAnnouncementAssigneesRequest(): Classroom_v1.Schema.ModifyAnnouncementAssigneesRequest; + newModifyAnnouncementAssigneesRequest(): Classroom.Schema.ModifyAnnouncementAssigneesRequest; // Create a new instance of ModifyAttachmentsRequest - newModifyAttachmentsRequest(): Classroom_v1.Schema.ModifyAttachmentsRequest; + newModifyAttachmentsRequest(): Classroom.Schema.ModifyAttachmentsRequest; // Create a new instance of ModifyCourseWorkAssigneesRequest - newModifyCourseWorkAssigneesRequest(): Classroom_v1.Schema.ModifyCourseWorkAssigneesRequest; + newModifyCourseWorkAssigneesRequest(): Classroom.Schema.ModifyCourseWorkAssigneesRequest; // Create a new instance of ModifyIndividualStudentsOptions - newModifyIndividualStudentsOptions(): Classroom_v1.Schema.ModifyIndividualStudentsOptions; + newModifyIndividualStudentsOptions(): Classroom.Schema.ModifyIndividualStudentsOptions; // Create a new instance of MultipleChoiceQuestion - newMultipleChoiceQuestion(): Classroom_v1.Schema.MultipleChoiceQuestion; + newMultipleChoiceQuestion(): Classroom.Schema.MultipleChoiceQuestion; // Create a new instance of MultipleChoiceSubmission - newMultipleChoiceSubmission(): Classroom_v1.Schema.MultipleChoiceSubmission; + newMultipleChoiceSubmission(): Classroom.Schema.MultipleChoiceSubmission; // Create a new instance of Name - newName(): Classroom_v1.Schema.Name; + newName(): Classroom.Schema.Name; // Create a new instance of ReclaimStudentSubmissionRequest newReclaimStudentSubmissionRequest(): any; // Create a new instance of Registration - newRegistration(): Classroom_v1.Schema.Registration; + newRegistration(): Classroom.Schema.Registration; // Create a new instance of ReturnStudentSubmissionRequest newReturnStudentSubmissionRequest(): any; // Create a new instance of SharedDriveFile - newSharedDriveFile(): Classroom_v1.Schema.SharedDriveFile; + newSharedDriveFile(): Classroom.Schema.SharedDriveFile; // Create a new instance of ShortAnswerSubmission - newShortAnswerSubmission(): Classroom_v1.Schema.ShortAnswerSubmission; + newShortAnswerSubmission(): Classroom.Schema.ShortAnswerSubmission; // Create a new instance of StateHistory - newStateHistory(): Classroom_v1.Schema.StateHistory; + newStateHistory(): Classroom.Schema.StateHistory; // Create a new instance of Student - newStudent(): Classroom_v1.Schema.Student; + newStudent(): Classroom.Schema.Student; // Create a new instance of StudentSubmission - newStudentSubmission(): Classroom_v1.Schema.StudentSubmission; + newStudentSubmission(): Classroom.Schema.StudentSubmission; // Create a new instance of SubmissionHistory - newSubmissionHistory(): Classroom_v1.Schema.SubmissionHistory; + newSubmissionHistory(): Classroom.Schema.SubmissionHistory; // Create a new instance of Teacher - newTeacher(): Classroom_v1.Schema.Teacher; + newTeacher(): Classroom.Schema.Teacher; // Create a new instance of TimeOfDay - newTimeOfDay(): Classroom_v1.Schema.TimeOfDay; + newTimeOfDay(): Classroom.Schema.TimeOfDay; // Create a new instance of TurnInStudentSubmissionRequest newTurnInStudentSubmissionRequest(): any; // Create a new instance of UserProfile - newUserProfile(): Classroom_v1.Schema.UserProfile; + newUserProfile(): Classroom.Schema.UserProfile; // Create a new instance of YouTubeVideo - newYouTubeVideo(): Classroom_v1.Schema.YouTubeVideo; + newYouTubeVideo(): Classroom.Schema.YouTubeVideo; } } -declare var Classroom_v1: GoogleAppsScript.Classroom_v1; \ No newline at end of file +declare var Classroom: GoogleAppsScript.Classroom; diff --git a/types/google-apps-script/apis/content_v2.d.ts b/types/google-apps-script/apis/content_v2.d.ts index 8cf4129511..4fb398007a 100644 --- a/types/google-apps-script/apis/content_v2.d.ts +++ b/types/google-apps-script/apis/content_v2.d.ts @@ -5,290 +5,290 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Content_v2 { + namespace Content { namespace Collection { export interface AccountsCollection { // Returns information about the authenticated user. - authinfo(): Content_v2.Schema.AccountsAuthInfoResponse; + authinfo(): Content.Schema.AccountsAuthInfoResponse; // Claims the website of a Merchant Center sub-account. - claimwebsite(merchantId: string, accountId: string): Content_v2.Schema.AccountsClaimWebsiteResponse; + claimwebsite(merchantId: string, accountId: string): Content.Schema.AccountsClaimWebsiteResponse; // Claims the website of a Merchant Center sub-account. - claimwebsite(merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.AccountsClaimWebsiteResponse; + claimwebsite(merchantId: string, accountId: string, optionalArgs: object): Content.Schema.AccountsClaimWebsiteResponse; // Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. - custombatch(resource: Schema.AccountsCustomBatchRequest): Content_v2.Schema.AccountsCustomBatchResponse; + custombatch(resource: Schema.AccountsCustomBatchRequest): Content.Schema.AccountsCustomBatchResponse; // Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request. - custombatch(resource: Schema.AccountsCustomBatchRequest, optionalArgs: object): Content_v2.Schema.AccountsCustomBatchResponse; + custombatch(resource: Schema.AccountsCustomBatchRequest, optionalArgs: object): Content.Schema.AccountsCustomBatchResponse; // Retrieves a Merchant Center account. - get(merchantId: string, accountId: string): Content_v2.Schema.Account; + get(merchantId: string, accountId: string): Content.Schema.Account; // Creates a Merchant Center sub-account. - insert(resource: Schema.Account, merchantId: string): Content_v2.Schema.Account; + insert(resource: Schema.Account, merchantId: string): Content.Schema.Account; // Creates a Merchant Center sub-account. - insert(resource: Schema.Account, merchantId: string, optionalArgs: object): Content_v2.Schema.Account; + insert(resource: Schema.Account, merchantId: string, optionalArgs: object): Content.Schema.Account; // Performs an action on a link between a Merchant Center account and another account. - link(resource: Schema.AccountsLinkRequest, merchantId: string, accountId: string): Content_v2.Schema.AccountsLinkResponse; + link(resource: Schema.AccountsLinkRequest, merchantId: string, accountId: string): Content.Schema.AccountsLinkResponse; // Lists the sub-accounts in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.AccountsListResponse; + list(merchantId: string): Content.Schema.AccountsListResponse; // Lists the sub-accounts in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.AccountsListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.AccountsListResponse; // Updates a Merchant Center account. This method supports patch semantics. - patch(resource: Schema.Account, merchantId: string, accountId: string): Content_v2.Schema.Account; + patch(resource: Schema.Account, merchantId: string, accountId: string): Content.Schema.Account; // Updates a Merchant Center account. This method supports patch semantics. - patch(resource: Schema.Account, merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.Account; + patch(resource: Schema.Account, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.Account; // Deletes a Merchant Center sub-account. remove(merchantId: string, accountId: string): void; // Deletes a Merchant Center sub-account. remove(merchantId: string, accountId: string, optionalArgs: object): void; // Updates a Merchant Center account. - update(resource: Schema.Account, merchantId: string, accountId: string): Content_v2.Schema.Account; + update(resource: Schema.Account, merchantId: string, accountId: string): Content.Schema.Account; // Updates a Merchant Center account. - update(resource: Schema.Account, merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.Account; + update(resource: Schema.Account, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.Account; } export interface AccountstatusesCollection { // Retrieves multiple Merchant Center account statuses in a single request. - custombatch(resource: Schema.AccountstatusesCustomBatchRequest): Content_v2.Schema.AccountstatusesCustomBatchResponse; + custombatch(resource: Schema.AccountstatusesCustomBatchRequest): Content.Schema.AccountstatusesCustomBatchResponse; // Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts. - get(merchantId: string, accountId: string): Content_v2.Schema.AccountStatus; + get(merchantId: string, accountId: string): Content.Schema.AccountStatus; // Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts. - get(merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.AccountStatus; + get(merchantId: string, accountId: string, optionalArgs: object): Content.Schema.AccountStatus; // Lists the statuses of the sub-accounts in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.AccountstatusesListResponse; + list(merchantId: string): Content.Schema.AccountstatusesListResponse; // Lists the statuses of the sub-accounts in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.AccountstatusesListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.AccountstatusesListResponse; } export interface AccounttaxCollection { // Retrieves and updates tax settings of multiple accounts in a single request. - custombatch(resource: Schema.AccounttaxCustomBatchRequest): Content_v2.Schema.AccounttaxCustomBatchResponse; + custombatch(resource: Schema.AccounttaxCustomBatchRequest): Content.Schema.AccounttaxCustomBatchResponse; // Retrieves and updates tax settings of multiple accounts in a single request. - custombatch(resource: Schema.AccounttaxCustomBatchRequest, optionalArgs: object): Content_v2.Schema.AccounttaxCustomBatchResponse; + custombatch(resource: Schema.AccounttaxCustomBatchRequest, optionalArgs: object): Content.Schema.AccounttaxCustomBatchResponse; // Retrieves the tax settings of the account. - get(merchantId: string, accountId: string): Content_v2.Schema.AccountTax; + get(merchantId: string, accountId: string): Content.Schema.AccountTax; // Lists the tax settings of the sub-accounts in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.AccounttaxListResponse; + list(merchantId: string): Content.Schema.AccounttaxListResponse; // Lists the tax settings of the sub-accounts in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.AccounttaxListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.AccounttaxListResponse; // Updates the tax settings of the account. This method supports patch semantics. - patch(resource: Schema.AccountTax, merchantId: string, accountId: string): Content_v2.Schema.AccountTax; + patch(resource: Schema.AccountTax, merchantId: string, accountId: string): Content.Schema.AccountTax; // Updates the tax settings of the account. This method supports patch semantics. - patch(resource: Schema.AccountTax, merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.AccountTax; + patch(resource: Schema.AccountTax, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.AccountTax; // Updates the tax settings of the account. - update(resource: Schema.AccountTax, merchantId: string, accountId: string): Content_v2.Schema.AccountTax; + update(resource: Schema.AccountTax, merchantId: string, accountId: string): Content.Schema.AccountTax; // Updates the tax settings of the account. - update(resource: Schema.AccountTax, merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.AccountTax; + update(resource: Schema.AccountTax, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.AccountTax; } export interface DatafeedsCollection { // Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request. - custombatch(resource: Schema.DatafeedsCustomBatchRequest): Content_v2.Schema.DatafeedsCustomBatchResponse; + custombatch(resource: Schema.DatafeedsCustomBatchRequest): Content.Schema.DatafeedsCustomBatchResponse; // Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request. - custombatch(resource: Schema.DatafeedsCustomBatchRequest, optionalArgs: object): Content_v2.Schema.DatafeedsCustomBatchResponse; + custombatch(resource: Schema.DatafeedsCustomBatchRequest, optionalArgs: object): Content.Schema.DatafeedsCustomBatchResponse; // Invokes a fetch for the datafeed in your Merchant Center account. - fetchnow(merchantId: string, datafeedId: string): Content_v2.Schema.DatafeedsFetchNowResponse; + fetchnow(merchantId: string, datafeedId: string): Content.Schema.DatafeedsFetchNowResponse; // Invokes a fetch for the datafeed in your Merchant Center account. - fetchnow(merchantId: string, datafeedId: string, optionalArgs: object): Content_v2.Schema.DatafeedsFetchNowResponse; + fetchnow(merchantId: string, datafeedId: string, optionalArgs: object): Content.Schema.DatafeedsFetchNowResponse; // Retrieves a datafeed configuration from your Merchant Center account. - get(merchantId: string, datafeedId: string): Content_v2.Schema.Datafeed; + get(merchantId: string, datafeedId: string): Content.Schema.Datafeed; // Registers a datafeed configuration with your Merchant Center account. - insert(resource: Schema.Datafeed, merchantId: string): Content_v2.Schema.Datafeed; + insert(resource: Schema.Datafeed, merchantId: string): Content.Schema.Datafeed; // Registers a datafeed configuration with your Merchant Center account. - insert(resource: Schema.Datafeed, merchantId: string, optionalArgs: object): Content_v2.Schema.Datafeed; + insert(resource: Schema.Datafeed, merchantId: string, optionalArgs: object): Content.Schema.Datafeed; // Lists the configurations for datafeeds in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.DatafeedsListResponse; + list(merchantId: string): Content.Schema.DatafeedsListResponse; // Lists the configurations for datafeeds in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.DatafeedsListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.DatafeedsListResponse; // Updates a datafeed configuration of your Merchant Center account. This method supports patch semantics. - patch(resource: Schema.Datafeed, merchantId: string, datafeedId: string): Content_v2.Schema.Datafeed; + patch(resource: Schema.Datafeed, merchantId: string, datafeedId: string): Content.Schema.Datafeed; // Updates a datafeed configuration of your Merchant Center account. This method supports patch semantics. - patch(resource: Schema.Datafeed, merchantId: string, datafeedId: string, optionalArgs: object): Content_v2.Schema.Datafeed; + patch(resource: Schema.Datafeed, merchantId: string, datafeedId: string, optionalArgs: object): Content.Schema.Datafeed; // Deletes a datafeed configuration from your Merchant Center account. remove(merchantId: string, datafeedId: string): void; // Deletes a datafeed configuration from your Merchant Center account. remove(merchantId: string, datafeedId: string, optionalArgs: object): void; // Updates a datafeed configuration of your Merchant Center account. - update(resource: Schema.Datafeed, merchantId: string, datafeedId: string): Content_v2.Schema.Datafeed; + update(resource: Schema.Datafeed, merchantId: string, datafeedId: string): Content.Schema.Datafeed; // Updates a datafeed configuration of your Merchant Center account. - update(resource: Schema.Datafeed, merchantId: string, datafeedId: string, optionalArgs: object): Content_v2.Schema.Datafeed; + update(resource: Schema.Datafeed, merchantId: string, datafeedId: string, optionalArgs: object): Content.Schema.Datafeed; } export interface DatafeedstatusesCollection { // Gets multiple Merchant Center datafeed statuses in a single request. - custombatch(resource: Schema.DatafeedstatusesCustomBatchRequest): Content_v2.Schema.DatafeedstatusesCustomBatchResponse; + custombatch(resource: Schema.DatafeedstatusesCustomBatchRequest): Content.Schema.DatafeedstatusesCustomBatchResponse; // Retrieves the status of a datafeed from your Merchant Center account. - get(merchantId: string, datafeedId: string): Content_v2.Schema.DatafeedStatus; + get(merchantId: string, datafeedId: string): Content.Schema.DatafeedStatus; // Retrieves the status of a datafeed from your Merchant Center account. - get(merchantId: string, datafeedId: string, optionalArgs: object): Content_v2.Schema.DatafeedStatus; + get(merchantId: string, datafeedId: string, optionalArgs: object): Content.Schema.DatafeedStatus; // Lists the statuses of the datafeeds in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.DatafeedstatusesListResponse; + list(merchantId: string): Content.Schema.DatafeedstatusesListResponse; // Lists the statuses of the datafeeds in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.DatafeedstatusesListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.DatafeedstatusesListResponse; } export interface InventoryCollection { // Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. - custombatch(resource: Schema.InventoryCustomBatchRequest): Content_v2.Schema.InventoryCustomBatchResponse; + custombatch(resource: Schema.InventoryCustomBatchRequest): Content.Schema.InventoryCustomBatchResponse; // Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products. - custombatch(resource: Schema.InventoryCustomBatchRequest, optionalArgs: object): Content_v2.Schema.InventoryCustomBatchResponse; + custombatch(resource: Schema.InventoryCustomBatchRequest, optionalArgs: object): Content.Schema.InventoryCustomBatchResponse; // Updates price and availability of a product in your Merchant Center account. - set(resource: Schema.InventorySetRequest, merchantId: string, storeCode: string, productId: string): Content_v2.Schema.InventorySetResponse; + set(resource: Schema.InventorySetRequest, merchantId: string, storeCode: string, productId: string): Content.Schema.InventorySetResponse; // Updates price and availability of a product in your Merchant Center account. - set(resource: Schema.InventorySetRequest, merchantId: string, storeCode: string, productId: string, optionalArgs: object): Content_v2.Schema.InventorySetResponse; + set(resource: Schema.InventorySetRequest, merchantId: string, storeCode: string, productId: string, optionalArgs: object): Content.Schema.InventorySetResponse; } export interface LiasettingsCollection { // Retrieves and/or updates the LIA settings of multiple accounts in a single request. - custombatch(resource: Schema.LiasettingsCustomBatchRequest): Content_v2.Schema.LiasettingsCustomBatchResponse; + custombatch(resource: Schema.LiasettingsCustomBatchRequest): Content.Schema.LiasettingsCustomBatchResponse; // Retrieves and/or updates the LIA settings of multiple accounts in a single request. - custombatch(resource: Schema.LiasettingsCustomBatchRequest, optionalArgs: object): Content_v2.Schema.LiasettingsCustomBatchResponse; + custombatch(resource: Schema.LiasettingsCustomBatchRequest, optionalArgs: object): Content.Schema.LiasettingsCustomBatchResponse; // Retrieves the LIA settings of the account. - get(merchantId: string, accountId: string): Content_v2.Schema.LiaSettings; + get(merchantId: string, accountId: string): Content.Schema.LiaSettings; // Retrieves the list of accessible Google My Business accounts. - getaccessiblegmbaccounts(merchantId: string, accountId: string): Content_v2.Schema.LiasettingsGetAccessibleGmbAccountsResponse; + getaccessiblegmbaccounts(merchantId: string, accountId: string): Content.Schema.LiasettingsGetAccessibleGmbAccountsResponse; // Lists the LIA settings of the sub-accounts in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.LiasettingsListResponse; + list(merchantId: string): Content.Schema.LiasettingsListResponse; // Lists the LIA settings of the sub-accounts in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.LiasettingsListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.LiasettingsListResponse; // Retrieves the list of POS data providers that have active settings for the all eiligible countries. - listposdataproviders(): Content_v2.Schema.LiasettingsListPosDataProvidersResponse; + listposdataproviders(): Content.Schema.LiasettingsListPosDataProvidersResponse; // Updates the LIA settings of the account. This method supports patch semantics. - patch(resource: Schema.LiaSettings, merchantId: string, accountId: string): Content_v2.Schema.LiaSettings; + patch(resource: Schema.LiaSettings, merchantId: string, accountId: string): Content.Schema.LiaSettings; // Updates the LIA settings of the account. This method supports patch semantics. - patch(resource: Schema.LiaSettings, merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.LiaSettings; + patch(resource: Schema.LiaSettings, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.LiaSettings; // Requests access to a specified Google My Business account. - requestgmbaccess(merchantId: string, accountId: string, gmbEmail: string): Content_v2.Schema.LiasettingsRequestGmbAccessResponse; + requestgmbaccess(merchantId: string, accountId: string, gmbEmail: string): Content.Schema.LiasettingsRequestGmbAccessResponse; // Requests inventory validation for the specified country. - requestinventoryverification(merchantId: string, accountId: string, country: string): Content_v2.Schema.LiasettingsRequestInventoryVerificationResponse; + requestinventoryverification(merchantId: string, accountId: string, country: string): Content.Schema.LiasettingsRequestInventoryVerificationResponse; // Sets the inventory verification contract for the specified country. - setinventoryverificationcontact(merchantId: string, accountId: string, contactEmail: string, contactName: string, country: string, language: string): Content_v2.Schema.LiasettingsSetInventoryVerificationContactResponse; + setinventoryverificationcontact(merchantId: string, accountId: string, contactEmail: string, contactName: string, country: string, language: string): Content.Schema.LiasettingsSetInventoryVerificationContactResponse; // Sets the POS data provider for the specified country. - setposdataprovider(merchantId: string, accountId: string, country: string): Content_v2.Schema.LiasettingsSetPosDataProviderResponse; + setposdataprovider(merchantId: string, accountId: string, country: string): Content.Schema.LiasettingsSetPosDataProviderResponse; // Sets the POS data provider for the specified country. - setposdataprovider(merchantId: string, accountId: string, country: string, optionalArgs: object): Content_v2.Schema.LiasettingsSetPosDataProviderResponse; + setposdataprovider(merchantId: string, accountId: string, country: string, optionalArgs: object): Content.Schema.LiasettingsSetPosDataProviderResponse; // Updates the LIA settings of the account. - update(resource: Schema.LiaSettings, merchantId: string, accountId: string): Content_v2.Schema.LiaSettings; + update(resource: Schema.LiaSettings, merchantId: string, accountId: string): Content.Schema.LiaSettings; // Updates the LIA settings of the account. - update(resource: Schema.LiaSettings, merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.LiaSettings; + update(resource: Schema.LiaSettings, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.LiaSettings; } export interface OrderinvoicesCollection { // Creates a charge invoice for a shipment group, and triggers a charge capture for non-facilitated payment orders. - createchargeinvoice(resource: Schema.OrderinvoicesCreateChargeInvoiceRequest, merchantId: string, orderId: string): Content_v2.Schema.OrderinvoicesCreateChargeInvoiceResponse; + createchargeinvoice(resource: Schema.OrderinvoicesCreateChargeInvoiceRequest, merchantId: string, orderId: string): Content.Schema.OrderinvoicesCreateChargeInvoiceResponse; // Creates a refund invoice for one or more shipment groups, and triggers a refund for non-facilitated payment orders. This can only be used for line items that have previously been charged using createChargeInvoice. All amounts (except for the summary) are incremental with respect to the previous invoice. - createrefundinvoice(resource: Schema.OrderinvoicesCreateRefundInvoiceRequest, merchantId: string, orderId: string): Content_v2.Schema.OrderinvoicesCreateRefundInvoiceResponse; + createrefundinvoice(resource: Schema.OrderinvoicesCreateRefundInvoiceRequest, merchantId: string, orderId: string): Content.Schema.OrderinvoicesCreateRefundInvoiceResponse; } export interface OrderpaymentsCollection { // Notify about successfully authorizing user's payment method for a given amount. - notifyauthapproved(resource: Schema.OrderpaymentsNotifyAuthApprovedRequest, merchantId: string, orderId: string): Content_v2.Schema.OrderpaymentsNotifyAuthApprovedResponse; + notifyauthapproved(resource: Schema.OrderpaymentsNotifyAuthApprovedRequest, merchantId: string, orderId: string): Content.Schema.OrderpaymentsNotifyAuthApprovedResponse; // Notify about failure to authorize user's payment method. - notifyauthdeclined(resource: Schema.OrderpaymentsNotifyAuthDeclinedRequest, merchantId: string, orderId: string): Content_v2.Schema.OrderpaymentsNotifyAuthDeclinedResponse; + notifyauthdeclined(resource: Schema.OrderpaymentsNotifyAuthDeclinedRequest, merchantId: string, orderId: string): Content.Schema.OrderpaymentsNotifyAuthDeclinedResponse; // Notify about charge on user's selected payments method. - notifycharge(resource: Schema.OrderpaymentsNotifyChargeRequest, merchantId: string, orderId: string): Content_v2.Schema.OrderpaymentsNotifyChargeResponse; + notifycharge(resource: Schema.OrderpaymentsNotifyChargeRequest, merchantId: string, orderId: string): Content.Schema.OrderpaymentsNotifyChargeResponse; // Notify about refund on user's selected payments method. - notifyrefund(resource: Schema.OrderpaymentsNotifyRefundRequest, merchantId: string, orderId: string): Content_v2.Schema.OrderpaymentsNotifyRefundResponse; + notifyrefund(resource: Schema.OrderpaymentsNotifyRefundRequest, merchantId: string, orderId: string): Content.Schema.OrderpaymentsNotifyRefundResponse; } export interface OrderreportsCollection { // Retrieves a report for disbursements from your Merchant Center account. - listdisbursements(merchantId: string, disbursementStartDate: string): Content_v2.Schema.OrderreportsListDisbursementsResponse; + listdisbursements(merchantId: string, disbursementStartDate: string): Content.Schema.OrderreportsListDisbursementsResponse; // Retrieves a report for disbursements from your Merchant Center account. - listdisbursements(merchantId: string, disbursementStartDate: string, optionalArgs: object): Content_v2.Schema.OrderreportsListDisbursementsResponse; + listdisbursements(merchantId: string, disbursementStartDate: string, optionalArgs: object): Content.Schema.OrderreportsListDisbursementsResponse; // Retrieves a list of transactions for a disbursement from your Merchant Center account. - listtransactions(merchantId: string, disbursementId: string, transactionStartDate: string): Content_v2.Schema.OrderreportsListTransactionsResponse; + listtransactions(merchantId: string, disbursementId: string, transactionStartDate: string): Content.Schema.OrderreportsListTransactionsResponse; // Retrieves a list of transactions for a disbursement from your Merchant Center account. - listtransactions(merchantId: string, disbursementId: string, transactionStartDate: string, optionalArgs: object): Content_v2.Schema.OrderreportsListTransactionsResponse; + listtransactions(merchantId: string, disbursementId: string, transactionStartDate: string, optionalArgs: object): Content.Schema.OrderreportsListTransactionsResponse; } export interface OrderreturnsCollection { // Retrieves an order return from your Merchant Center account. - get(merchantId: string, returnId: string): Content_v2.Schema.MerchantOrderReturn; + get(merchantId: string, returnId: string): Content.Schema.MerchantOrderReturn; // Lists order returns in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.OrderreturnsListResponse; + list(merchantId: string): Content.Schema.OrderreturnsListResponse; // Lists order returns in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.OrderreturnsListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.OrderreturnsListResponse; } export interface OrdersCollection { // Marks an order as acknowledged. - acknowledge(resource: Schema.OrdersAcknowledgeRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersAcknowledgeResponse; + acknowledge(resource: Schema.OrdersAcknowledgeRequest, merchantId: string, orderId: string): Content.Schema.OrdersAcknowledgeResponse; // Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". - advancetestorder(merchantId: string, orderId: string): Content_v2.Schema.OrdersAdvanceTestOrderResponse; + advancetestorder(merchantId: string, orderId: string): Content.Schema.OrdersAdvanceTestOrderResponse; // Cancels all line items in an order, making a full refund. - cancel(resource: Schema.OrdersCancelRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersCancelResponse; + cancel(resource: Schema.OrdersCancelRequest, merchantId: string, orderId: string): Content.Schema.OrdersCancelResponse; // Cancels a line item, making a full refund. - cancellineitem(resource: Schema.OrdersCancelLineItemRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersCancelLineItemResponse; + cancellineitem(resource: Schema.OrdersCancelLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersCancelLineItemResponse; // Sandbox only. Cancels a test order for customer-initiated cancellation. - canceltestorderbycustomer(resource: Schema.OrdersCancelTestOrderByCustomerRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersCancelTestOrderByCustomerResponse; + canceltestorderbycustomer(resource: Schema.OrdersCancelTestOrderByCustomerRequest, merchantId: string, orderId: string): Content.Schema.OrdersCancelTestOrderByCustomerResponse; // Sandbox only. Creates a test order. - createtestorder(resource: Schema.OrdersCreateTestOrderRequest, merchantId: string): Content_v2.Schema.OrdersCreateTestOrderResponse; + createtestorder(resource: Schema.OrdersCreateTestOrderRequest, merchantId: string): Content.Schema.OrdersCreateTestOrderResponse; // Sandbox only. Creates a test return. - createtestreturn(resource: Schema.OrdersCreateTestReturnRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersCreateTestReturnResponse; + createtestreturn(resource: Schema.OrdersCreateTestReturnRequest, merchantId: string, orderId: string): Content.Schema.OrdersCreateTestReturnResponse; // Retrieves or modifies multiple orders in a single request. - custombatch(resource: Schema.OrdersCustomBatchRequest): Content_v2.Schema.OrdersCustomBatchResponse; + custombatch(resource: Schema.OrdersCustomBatchRequest): Content.Schema.OrdersCustomBatchResponse; // Retrieves an order from your Merchant Center account. - get(merchantId: string, orderId: string): Content_v2.Schema.Order; + get(merchantId: string, orderId: string): Content.Schema.Order; // Retrieves an order using merchant order ID. - getbymerchantorderid(merchantId: string, merchantOrderId: string): Content_v2.Schema.OrdersGetByMerchantOrderIdResponse; + getbymerchantorderid(merchantId: string, merchantOrderId: string): Content.Schema.OrdersGetByMerchantOrderIdResponse; // Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. - gettestordertemplate(merchantId: string, templateName: string): Content_v2.Schema.OrdersGetTestOrderTemplateResponse; + gettestordertemplate(merchantId: string, templateName: string): Content.Schema.OrdersGetTestOrderTemplateResponse; // Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. - gettestordertemplate(merchantId: string, templateName: string, optionalArgs: object): Content_v2.Schema.OrdersGetTestOrderTemplateResponse; + gettestordertemplate(merchantId: string, templateName: string, optionalArgs: object): Content.Schema.OrdersGetTestOrderTemplateResponse; // Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). // Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return. - instorerefundlineitem(resource: Schema.OrdersInStoreRefundLineItemRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersInStoreRefundLineItemResponse; + instorerefundlineitem(resource: Schema.OrdersInStoreRefundLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersInStoreRefundLineItemResponse; // Lists the orders in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.OrdersListResponse; + list(merchantId: string): Content.Schema.OrdersListResponse; // Lists the orders in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.OrdersListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.OrdersListResponse; // Deprecated, please use returnRefundLineItem instead. - refund(resource: Schema.OrdersRefundRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersRefundResponse; + refund(resource: Schema.OrdersRefundRequest, merchantId: string, orderId: string): Content.Schema.OrdersRefundResponse; // Rejects return on an line item. - rejectreturnlineitem(resource: Schema.OrdersRejectReturnLineItemRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersRejectReturnLineItemResponse; + rejectreturnlineitem(resource: Schema.OrdersRejectReturnLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersRejectReturnLineItemResponse; // Returns a line item. - returnlineitem(resource: Schema.OrdersReturnLineItemRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersReturnLineItemResponse; + returnlineitem(resource: Schema.OrdersReturnLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersReturnLineItemResponse; // Returns and refunds a line item. Note that this method can only be called on fully shipped orders. - returnrefundlineitem(resource: Schema.OrdersReturnRefundLineItemRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersReturnRefundLineItemResponse; + returnrefundlineitem(resource: Schema.OrdersReturnRefundLineItemRequest, merchantId: string, orderId: string): Content.Schema.OrdersReturnRefundLineItemResponse; // Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource. - setlineitemmetadata(resource: Schema.OrdersSetLineItemMetadataRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersSetLineItemMetadataResponse; + setlineitemmetadata(resource: Schema.OrdersSetLineItemMetadataRequest, merchantId: string, orderId: string): Content.Schema.OrdersSetLineItemMetadataResponse; // Marks line item(s) as shipped. - shiplineitems(resource: Schema.OrdersShipLineItemsRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersShipLineItemsResponse; + shiplineitems(resource: Schema.OrdersShipLineItemsRequest, merchantId: string, orderId: string): Content.Schema.OrdersShipLineItemsResponse; // Updates ship by and delivery by dates for a line item. - updatelineitemshippingdetails(resource: Schema.OrdersUpdateLineItemShippingDetailsRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersUpdateLineItemShippingDetailsResponse; + updatelineitemshippingdetails(resource: Schema.OrdersUpdateLineItemShippingDetailsRequest, merchantId: string, orderId: string): Content.Schema.OrdersUpdateLineItemShippingDetailsResponse; // Updates the merchant order ID for a given order. - updatemerchantorderid(resource: Schema.OrdersUpdateMerchantOrderIdRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersUpdateMerchantOrderIdResponse; + updatemerchantorderid(resource: Schema.OrdersUpdateMerchantOrderIdRequest, merchantId: string, orderId: string): Content.Schema.OrdersUpdateMerchantOrderIdResponse; // Updates a shipment's status, carrier, and/or tracking ID. - updateshipment(resource: Schema.OrdersUpdateShipmentRequest, merchantId: string, orderId: string): Content_v2.Schema.OrdersUpdateShipmentResponse; + updateshipment(resource: Schema.OrdersUpdateShipmentRequest, merchantId: string, orderId: string): Content.Schema.OrdersUpdateShipmentResponse; } export interface PosCollection { // Batches multiple POS-related calls in a single request. - custombatch(resource: Schema.PosCustomBatchRequest): Content_v2.Schema.PosCustomBatchResponse; + custombatch(resource: Schema.PosCustomBatchRequest): Content.Schema.PosCustomBatchResponse; // Batches multiple POS-related calls in a single request. - custombatch(resource: Schema.PosCustomBatchRequest, optionalArgs: object): Content_v2.Schema.PosCustomBatchResponse; + custombatch(resource: Schema.PosCustomBatchRequest, optionalArgs: object): Content.Schema.PosCustomBatchResponse; // Retrieves information about the given store. - get(merchantId: string, targetMerchantId: string, storeCode: string): Content_v2.Schema.PosStore; + get(merchantId: string, targetMerchantId: string, storeCode: string): Content.Schema.PosStore; // Creates a store for the given merchant. - insert(resource: Schema.PosStore, merchantId: string, targetMerchantId: string): Content_v2.Schema.PosStore; + insert(resource: Schema.PosStore, merchantId: string, targetMerchantId: string): Content.Schema.PosStore; // Creates a store for the given merchant. - insert(resource: Schema.PosStore, merchantId: string, targetMerchantId: string, optionalArgs: object): Content_v2.Schema.PosStore; + insert(resource: Schema.PosStore, merchantId: string, targetMerchantId: string, optionalArgs: object): Content.Schema.PosStore; // Submit inventory for the given merchant. - inventory(resource: Schema.PosInventoryRequest, merchantId: string, targetMerchantId: string): Content_v2.Schema.PosInventoryResponse; + inventory(resource: Schema.PosInventoryRequest, merchantId: string, targetMerchantId: string): Content.Schema.PosInventoryResponse; // Submit inventory for the given merchant. - inventory(resource: Schema.PosInventoryRequest, merchantId: string, targetMerchantId: string, optionalArgs: object): Content_v2.Schema.PosInventoryResponse; + inventory(resource: Schema.PosInventoryRequest, merchantId: string, targetMerchantId: string, optionalArgs: object): Content.Schema.PosInventoryResponse; // Lists the stores of the target merchant. - list(merchantId: string, targetMerchantId: string): Content_v2.Schema.PosListResponse; + list(merchantId: string, targetMerchantId: string): Content.Schema.PosListResponse; // Deletes a store for the given merchant. remove(merchantId: string, targetMerchantId: string, storeCode: string): void; // Deletes a store for the given merchant. remove(merchantId: string, targetMerchantId: string, storeCode: string, optionalArgs: object): void; // Submit a sale event for the given merchant. - sale(resource: Schema.PosSaleRequest, merchantId: string, targetMerchantId: string): Content_v2.Schema.PosSaleResponse; + sale(resource: Schema.PosSaleRequest, merchantId: string, targetMerchantId: string): Content.Schema.PosSaleResponse; // Submit a sale event for the given merchant. - sale(resource: Schema.PosSaleRequest, merchantId: string, targetMerchantId: string, optionalArgs: object): Content_v2.Schema.PosSaleResponse; + sale(resource: Schema.PosSaleRequest, merchantId: string, targetMerchantId: string, optionalArgs: object): Content.Schema.PosSaleResponse; } export interface ProductsCollection { // Retrieves, inserts, and deletes multiple products in a single request. - custombatch(resource: Schema.ProductsCustomBatchRequest): Content_v2.Schema.ProductsCustomBatchResponse; + custombatch(resource: Schema.ProductsCustomBatchRequest): Content.Schema.ProductsCustomBatchResponse; // Retrieves, inserts, and deletes multiple products in a single request. - custombatch(resource: Schema.ProductsCustomBatchRequest, optionalArgs: object): Content_v2.Schema.ProductsCustomBatchResponse; + custombatch(resource: Schema.ProductsCustomBatchRequest, optionalArgs: object): Content.Schema.ProductsCustomBatchResponse; // Retrieves a product from your Merchant Center account. - get(merchantId: string, productId: string): Content_v2.Schema.Product; + get(merchantId: string, productId: string): Content.Schema.Product; // Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry. - insert(resource: Schema.Product, merchantId: string): Content_v2.Schema.Product; + insert(resource: Schema.Product, merchantId: string): Content.Schema.Product; // Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry. - insert(resource: Schema.Product, merchantId: string, optionalArgs: object): Content_v2.Schema.Product; + insert(resource: Schema.Product, merchantId: string, optionalArgs: object): Content.Schema.Product; // Lists the products in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.ProductsListResponse; + list(merchantId: string): Content.Schema.ProductsListResponse; // Lists the products in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.ProductsListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.ProductsListResponse; // Deletes a product from your Merchant Center account. remove(merchantId: string, productId: string): void; // Deletes a product from your Merchant Center account. @@ -296,57 +296,57 @@ declare namespace GoogleAppsScript { } export interface ProductstatusesCollection { // Gets the statuses of multiple products in a single request. - custombatch(resource: Schema.ProductstatusesCustomBatchRequest): Content_v2.Schema.ProductstatusesCustomBatchResponse; + custombatch(resource: Schema.ProductstatusesCustomBatchRequest): Content.Schema.ProductstatusesCustomBatchResponse; // Gets the statuses of multiple products in a single request. - custombatch(resource: Schema.ProductstatusesCustomBatchRequest, optionalArgs: object): Content_v2.Schema.ProductstatusesCustomBatchResponse; + custombatch(resource: Schema.ProductstatusesCustomBatchRequest, optionalArgs: object): Content.Schema.ProductstatusesCustomBatchResponse; // Gets the status of a product from your Merchant Center account. - get(merchantId: string, productId: string): Content_v2.Schema.ProductStatus; + get(merchantId: string, productId: string): Content.Schema.ProductStatus; // Gets the status of a product from your Merchant Center account. - get(merchantId: string, productId: string, optionalArgs: object): Content_v2.Schema.ProductStatus; + get(merchantId: string, productId: string, optionalArgs: object): Content.Schema.ProductStatus; // Lists the statuses of the products in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.ProductstatusesListResponse; + list(merchantId: string): Content.Schema.ProductstatusesListResponse; // Lists the statuses of the products in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.ProductstatusesListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.ProductstatusesListResponse; } export interface ShippingsettingsCollection { // Retrieves and updates the shipping settings of multiple accounts in a single request. - custombatch(resource: Schema.ShippingsettingsCustomBatchRequest): Content_v2.Schema.ShippingsettingsCustomBatchResponse; + custombatch(resource: Schema.ShippingsettingsCustomBatchRequest): Content.Schema.ShippingsettingsCustomBatchResponse; // Retrieves and updates the shipping settings of multiple accounts in a single request. - custombatch(resource: Schema.ShippingsettingsCustomBatchRequest, optionalArgs: object): Content_v2.Schema.ShippingsettingsCustomBatchResponse; + custombatch(resource: Schema.ShippingsettingsCustomBatchRequest, optionalArgs: object): Content.Schema.ShippingsettingsCustomBatchResponse; // Retrieves the shipping settings of the account. - get(merchantId: string, accountId: string): Content_v2.Schema.ShippingSettings; + get(merchantId: string, accountId: string): Content.Schema.ShippingSettings; // Retrieves supported carriers and carrier services for an account. - getsupportedcarriers(merchantId: string): Content_v2.Schema.ShippingsettingsGetSupportedCarriersResponse; + getsupportedcarriers(merchantId: string): Content.Schema.ShippingsettingsGetSupportedCarriersResponse; // Retrieves supported holidays for an account. - getsupportedholidays(merchantId: string): Content_v2.Schema.ShippingsettingsGetSupportedHolidaysResponse; + getsupportedholidays(merchantId: string): Content.Schema.ShippingsettingsGetSupportedHolidaysResponse; // Lists the shipping settings of the sub-accounts in your Merchant Center account. - list(merchantId: string): Content_v2.Schema.ShippingsettingsListResponse; + list(merchantId: string): Content.Schema.ShippingsettingsListResponse; // Lists the shipping settings of the sub-accounts in your Merchant Center account. - list(merchantId: string, optionalArgs: object): Content_v2.Schema.ShippingsettingsListResponse; + list(merchantId: string, optionalArgs: object): Content.Schema.ShippingsettingsListResponse; // Updates the shipping settings of the account. This method supports patch semantics. - patch(resource: Schema.ShippingSettings, merchantId: string, accountId: string): Content_v2.Schema.ShippingSettings; + patch(resource: Schema.ShippingSettings, merchantId: string, accountId: string): Content.Schema.ShippingSettings; // Updates the shipping settings of the account. This method supports patch semantics. - patch(resource: Schema.ShippingSettings, merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.ShippingSettings; + patch(resource: Schema.ShippingSettings, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.ShippingSettings; // Updates the shipping settings of the account. - update(resource: Schema.ShippingSettings, merchantId: string, accountId: string): Content_v2.Schema.ShippingSettings; + update(resource: Schema.ShippingSettings, merchantId: string, accountId: string): Content.Schema.ShippingSettings; // Updates the shipping settings of the account. - update(resource: Schema.ShippingSettings, merchantId: string, accountId: string, optionalArgs: object): Content_v2.Schema.ShippingSettings; + update(resource: Schema.ShippingSettings, merchantId: string, accountId: string, optionalArgs: object): Content.Schema.ShippingSettings; } } namespace Schema { export interface Account { adultContent?: boolean; - adwordsLinks?: Content_v2.Schema.AccountAdwordsLink[]; - businessInformation?: Content_v2.Schema.AccountBusinessInformation; - googleMyBusinessLink?: Content_v2.Schema.AccountGoogleMyBusinessLink; + adwordsLinks?: Content.Schema.AccountAdwordsLink[]; + businessInformation?: Content.Schema.AccountBusinessInformation; + googleMyBusinessLink?: Content.Schema.AccountGoogleMyBusinessLink; id?: string; kind?: string; name?: string; reviewsUrl?: string; sellerId?: string; - users?: Content_v2.Schema.AccountUser[]; + users?: Content.Schema.AccountUser[]; websiteUrl?: string; - youtubeChannelLinks?: Content_v2.Schema.AccountYouTubeChannelLink[]; + youtubeChannelLinks?: Content.Schema.AccountYouTubeChannelLink[]; } export interface AccountAddress { country?: string; @@ -360,8 +360,8 @@ declare namespace GoogleAppsScript { status?: string; } export interface AccountBusinessInformation { - address?: Content_v2.Schema.AccountAddress; - customerService?: Content_v2.Schema.AccountCustomerService; + address?: Content.Schema.AccountAddress; + customerService?: Content.Schema.AccountCustomerService; phoneNumber?: string; } export interface AccountCustomerService { @@ -379,10 +379,10 @@ declare namespace GoogleAppsScript { } export interface AccountStatus { accountId?: string; - accountLevelIssues?: Content_v2.Schema.AccountStatusAccountLevelIssue[]; - dataQualityIssues?: Content_v2.Schema.AccountStatusDataQualityIssue[]; + accountLevelIssues?: Content.Schema.AccountStatusAccountLevelIssue[]; + dataQualityIssues?: Content.Schema.AccountStatusDataQualityIssue[]; kind?: string; - products?: Content_v2.Schema.AccountStatusProducts[]; + products?: Content.Schema.AccountStatusProducts[]; websiteClaimed?: boolean; } export interface AccountStatusAccountLevelIssue { @@ -399,7 +399,7 @@ declare namespace GoogleAppsScript { destination?: string; detail?: string; displayedValue?: string; - exampleItems?: Content_v2.Schema.AccountStatusExampleItem[]; + exampleItems?: Content.Schema.AccountStatusExampleItem[]; id?: string; lastChecked?: string; location?: string; @@ -428,8 +428,8 @@ declare namespace GoogleAppsScript { channel?: string; country?: string; destination?: string; - itemLevelIssues?: Content_v2.Schema.AccountStatusItemLevelIssue[]; - statistics?: Content_v2.Schema.AccountStatusStatistics; + itemLevelIssues?: Content.Schema.AccountStatusItemLevelIssue[]; + statistics?: Content.Schema.AccountStatusStatistics; } export interface AccountStatusStatistics { active?: string; @@ -440,7 +440,7 @@ declare namespace GoogleAppsScript { export interface AccountTax { accountId?: string; kind?: string; - rules?: Content_v2.Schema.AccountTaxTaxRule[]; + rules?: Content.Schema.AccountTaxTaxRule[]; } export interface AccountTaxTaxRule { country?: string; @@ -461,21 +461,21 @@ declare namespace GoogleAppsScript { status?: string; } export interface AccountsAuthInfoResponse { - accountIdentifiers?: Content_v2.Schema.AccountIdentifier[]; + accountIdentifiers?: Content.Schema.AccountIdentifier[]; kind?: string; } export interface AccountsClaimWebsiteResponse { kind?: string; } export interface AccountsCustomBatchRequest { - entries?: Content_v2.Schema.AccountsCustomBatchRequestEntry[]; + entries?: Content.Schema.AccountsCustomBatchRequestEntry[]; } export interface AccountsCustomBatchRequestEntry { - account?: Content_v2.Schema.Account; + account?: Content.Schema.Account; accountId?: string; batchId?: number; force?: boolean; - linkRequest?: Content_v2.Schema.AccountsCustomBatchRequestEntryLinkRequest; + linkRequest?: Content.Schema.AccountsCustomBatchRequestEntryLinkRequest; merchantId?: string; method?: string; overwrite?: boolean; @@ -486,13 +486,13 @@ declare namespace GoogleAppsScript { linkedAccountId?: string; } export interface AccountsCustomBatchResponse { - entries?: Content_v2.Schema.AccountsCustomBatchResponseEntry[]; + entries?: Content.Schema.AccountsCustomBatchResponseEntry[]; kind?: string; } export interface AccountsCustomBatchResponseEntry { - account?: Content_v2.Schema.Account; + account?: Content.Schema.Account; batchId?: number; - errors?: Content_v2.Schema.Errors; + errors?: Content.Schema.Errors; kind?: string; linkStatus?: string; } @@ -507,10 +507,10 @@ declare namespace GoogleAppsScript { export interface AccountsListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.Account[]; + resources?: Content.Schema.Account[]; } export interface AccountstatusesCustomBatchRequest { - entries?: Content_v2.Schema.AccountstatusesCustomBatchRequestEntry[]; + entries?: Content.Schema.AccountstatusesCustomBatchRequestEntry[]; } export interface AccountstatusesCustomBatchRequestEntry { accountId?: string; @@ -520,52 +520,52 @@ declare namespace GoogleAppsScript { method?: string; } export interface AccountstatusesCustomBatchResponse { - entries?: Content_v2.Schema.AccountstatusesCustomBatchResponseEntry[]; + entries?: Content.Schema.AccountstatusesCustomBatchResponseEntry[]; kind?: string; } export interface AccountstatusesCustomBatchResponseEntry { - accountStatus?: Content_v2.Schema.AccountStatus; + accountStatus?: Content.Schema.AccountStatus; batchId?: number; - errors?: Content_v2.Schema.Errors; + errors?: Content.Schema.Errors; } export interface AccountstatusesListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.AccountStatus[]; + resources?: Content.Schema.AccountStatus[]; } export interface AccounttaxCustomBatchRequest { - entries?: Content_v2.Schema.AccounttaxCustomBatchRequestEntry[]; + entries?: Content.Schema.AccounttaxCustomBatchRequestEntry[]; } export interface AccounttaxCustomBatchRequestEntry { accountId?: string; - accountTax?: Content_v2.Schema.AccountTax; + accountTax?: Content.Schema.AccountTax; batchId?: number; merchantId?: string; method?: string; } export interface AccounttaxCustomBatchResponse { - entries?: Content_v2.Schema.AccounttaxCustomBatchResponseEntry[]; + entries?: Content.Schema.AccounttaxCustomBatchResponseEntry[]; kind?: string; } export interface AccounttaxCustomBatchResponseEntry { - accountTax?: Content_v2.Schema.AccountTax; + accountTax?: Content.Schema.AccountTax; batchId?: number; - errors?: Content_v2.Schema.Errors; + errors?: Content.Schema.Errors; kind?: string; } export interface AccounttaxListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.AccountTax[]; + resources?: Content.Schema.AccountTax[]; } export interface Amount { - pretax?: Content_v2.Schema.Price; - tax?: Content_v2.Schema.Price; + pretax?: Content.Schema.Price; + tax?: Content.Schema.Price; } export interface CarrierRate { carrierName?: string; carrierService?: string; - flatAdjustment?: Content_v2.Schema.Price; + flatAdjustment?: Content.Schema.Price; name?: string; originPostalCode?: string; percentageAdjustment?: string; @@ -582,7 +582,7 @@ declare namespace GoogleAppsScript { value?: string; } export interface CustomGroup { - attributes?: Content_v2.Schema.CustomAttribute[]; + attributes?: Content.Schema.CustomAttribute[]; name?: string; } export interface CustomerReturnReason { @@ -598,15 +598,15 @@ declare namespace GoogleAppsScript { attributeLanguage?: string; contentLanguage?: string; contentType?: string; - fetchSchedule?: Content_v2.Schema.DatafeedFetchSchedule; + fetchSchedule?: Content.Schema.DatafeedFetchSchedule; fileName?: string; - format?: Content_v2.Schema.DatafeedFormat; + format?: Content.Schema.DatafeedFormat; id?: string; intendedDestinations?: string[]; kind?: string; name?: string; targetCountry?: string; - targets?: Content_v2.Schema.DatafeedTarget[]; + targets?: Content.Schema.DatafeedTarget[]; } export interface DatafeedFetchSchedule { dayOfMonth?: number; @@ -627,19 +627,19 @@ declare namespace GoogleAppsScript { export interface DatafeedStatus { country?: string; datafeedId?: string; - errors?: Content_v2.Schema.DatafeedStatusError[]; + errors?: Content.Schema.DatafeedStatusError[]; itemsTotal?: string; itemsValid?: string; kind?: string; language?: string; lastUploadDate?: string; processingStatus?: string; - warnings?: Content_v2.Schema.DatafeedStatusError[]; + warnings?: Content.Schema.DatafeedStatusError[]; } export interface DatafeedStatusError { code?: string; count?: string; - examples?: Content_v2.Schema.DatafeedStatusExample[]; + examples?: Content.Schema.DatafeedStatusExample[]; message?: string; } export interface DatafeedStatusExample { @@ -654,23 +654,23 @@ declare namespace GoogleAppsScript { language?: string; } export interface DatafeedsCustomBatchRequest { - entries?: Content_v2.Schema.DatafeedsCustomBatchRequestEntry[]; + entries?: Content.Schema.DatafeedsCustomBatchRequestEntry[]; } export interface DatafeedsCustomBatchRequestEntry { batchId?: number; - datafeed?: Content_v2.Schema.Datafeed; + datafeed?: Content.Schema.Datafeed; datafeedId?: string; merchantId?: string; method?: string; } export interface DatafeedsCustomBatchResponse { - entries?: Content_v2.Schema.DatafeedsCustomBatchResponseEntry[]; + entries?: Content.Schema.DatafeedsCustomBatchResponseEntry[]; kind?: string; } export interface DatafeedsCustomBatchResponseEntry { batchId?: number; - datafeed?: Content_v2.Schema.Datafeed; - errors?: Content_v2.Schema.Errors; + datafeed?: Content.Schema.Datafeed; + errors?: Content.Schema.Errors; } export interface DatafeedsFetchNowResponse { kind?: string; @@ -678,10 +678,10 @@ declare namespace GoogleAppsScript { export interface DatafeedsListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.Datafeed[]; + resources?: Content.Schema.Datafeed[]; } export interface DatafeedstatusesCustomBatchRequest { - entries?: Content_v2.Schema.DatafeedstatusesCustomBatchRequestEntry[]; + entries?: Content.Schema.DatafeedstatusesCustomBatchRequestEntry[]; } export interface DatafeedstatusesCustomBatchRequestEntry { batchId?: number; @@ -692,27 +692,27 @@ declare namespace GoogleAppsScript { method?: string; } export interface DatafeedstatusesCustomBatchResponse { - entries?: Content_v2.Schema.DatafeedstatusesCustomBatchResponseEntry[]; + entries?: Content.Schema.DatafeedstatusesCustomBatchResponseEntry[]; kind?: string; } export interface DatafeedstatusesCustomBatchResponseEntry { batchId?: number; - datafeedStatus?: Content_v2.Schema.DatafeedStatus; - errors?: Content_v2.Schema.Errors; + datafeedStatus?: Content.Schema.DatafeedStatus; + errors?: Content.Schema.Errors; } export interface DatafeedstatusesListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.DatafeedStatus[]; + resources?: Content.Schema.DatafeedStatus[]; } export interface DeliveryTime { - cutoffTime?: Content_v2.Schema.CutoffTime; - holidayCutoffs?: Content_v2.Schema.HolidayCutoff[]; + cutoffTime?: Content.Schema.CutoffTime; + holidayCutoffs?: Content.Schema.HolidayCutoff[]; maxHandlingTimeInDays?: number; maxTransitTimeInDays?: number; minHandlingTimeInDays?: number; minTransitTimeInDays?: number; - transitTimeTable?: Content_v2.Schema.TransitTable; + transitTimeTable?: Content.Schema.TransitTable; } export interface Error { domain?: string; @@ -721,12 +721,12 @@ declare namespace GoogleAppsScript { } export interface Errors { code?: number; - errors?: Content_v2.Schema.Error[]; + errors?: Content.Schema.Error[]; message?: string; } export interface GmbAccounts { accountId?: string; - gmbAccounts?: Content_v2.Schema.GmbAccountsGmbAccount[]; + gmbAccounts?: Content.Schema.GmbAccountsGmbAccount[]; } export interface GmbAccountsGmbAccount { email?: string; @@ -735,11 +735,11 @@ declare namespace GoogleAppsScript { type?: string; } export interface Headers { - locations?: Content_v2.Schema.LocationIdSet[]; + locations?: Content.Schema.LocationIdSet[]; numberOfItems?: string[]; postalCodeGroupNames?: string[]; - prices?: Content_v2.Schema.Price[]; - weights?: Content_v2.Schema.Weight[]; + prices?: Content.Schema.Price[]; + weights?: Content.Schema.Weight[]; } export interface HolidayCutoff { deadlineDate?: string; @@ -757,7 +757,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface Installment { - amount?: Content_v2.Schema.Price; + amount?: Content.Schema.Price; months?: string; } export interface Inventory { @@ -767,34 +767,34 @@ declare namespace GoogleAppsScript { customLabel2?: string; customLabel3?: string; customLabel4?: string; - installment?: Content_v2.Schema.Installment; + installment?: Content.Schema.Installment; instoreProductLocation?: string; kind?: string; - loyaltyPoints?: Content_v2.Schema.LoyaltyPoints; - pickup?: Content_v2.Schema.InventoryPickup; - price?: Content_v2.Schema.Price; + loyaltyPoints?: Content.Schema.LoyaltyPoints; + pickup?: Content.Schema.InventoryPickup; + price?: Content.Schema.Price; quantity?: number; - salePrice?: Content_v2.Schema.Price; + salePrice?: Content.Schema.Price; salePriceEffectiveDate?: string; sellOnGoogleQuantity?: number; } export interface InventoryCustomBatchRequest { - entries?: Content_v2.Schema.InventoryCustomBatchRequestEntry[]; + entries?: Content.Schema.InventoryCustomBatchRequestEntry[]; } export interface InventoryCustomBatchRequestEntry { batchId?: number; - inventory?: Content_v2.Schema.Inventory; + inventory?: Content.Schema.Inventory; merchantId?: string; productId?: string; storeCode?: string; } export interface InventoryCustomBatchResponse { - entries?: Content_v2.Schema.InventoryCustomBatchResponseEntry[]; + entries?: Content.Schema.InventoryCustomBatchResponseEntry[]; kind?: string; } export interface InventoryCustomBatchResponseEntry { batchId?: number; - errors?: Content_v2.Schema.Errors; + errors?: Content.Schema.Errors; kind?: string; } export interface InventoryPickup { @@ -808,13 +808,13 @@ declare namespace GoogleAppsScript { customLabel2?: string; customLabel3?: string; customLabel4?: string; - installment?: Content_v2.Schema.Installment; + installment?: Content.Schema.Installment; instoreProductLocation?: string; - loyaltyPoints?: Content_v2.Schema.LoyaltyPoints; - pickup?: Content_v2.Schema.InventoryPickup; - price?: Content_v2.Schema.Price; + loyaltyPoints?: Content.Schema.LoyaltyPoints; + pickup?: Content.Schema.InventoryPickup; + price?: Content.Schema.Price; quantity?: number; - salePrice?: Content_v2.Schema.Price; + salePrice?: Content.Schema.Price; salePriceEffectiveDate?: string; sellOnGoogleQuantity?: number; } @@ -822,15 +822,15 @@ declare namespace GoogleAppsScript { kind?: string; } export interface InvoiceSummary { - additionalChargeSummaries?: Content_v2.Schema.InvoiceSummaryAdditionalChargeSummary[]; - customerBalance?: Content_v2.Schema.Amount; - googleBalance?: Content_v2.Schema.Amount; - merchantBalance?: Content_v2.Schema.Amount; - productTotal?: Content_v2.Schema.Amount; - promotionSummaries?: Content_v2.Schema.Promotion[]; + additionalChargeSummaries?: Content.Schema.InvoiceSummaryAdditionalChargeSummary[]; + customerBalance?: Content.Schema.Amount; + googleBalance?: Content.Schema.Amount; + merchantBalance?: Content.Schema.Amount; + productTotal?: Content.Schema.Amount; + promotionSummaries?: Content.Schema.Promotion[]; } export interface InvoiceSummaryAdditionalChargeSummary { - totalAmount?: Content_v2.Schema.Amount; + totalAmount?: Content.Schema.Amount; type?: string; } export interface LiaAboutPageSettings { @@ -838,12 +838,12 @@ declare namespace GoogleAppsScript { url?: string; } export interface LiaCountrySettings { - about?: Content_v2.Schema.LiaAboutPageSettings; + about?: Content.Schema.LiaAboutPageSettings; country?: string; hostedLocalStorefrontActive?: boolean; - inventory?: Content_v2.Schema.LiaInventorySettings; - onDisplayToOrder?: Content_v2.Schema.LiaOnDisplayToOrderSettings; - posDataProvider?: Content_v2.Schema.LiaPosDataProvider; + inventory?: Content.Schema.LiaInventorySettings; + onDisplayToOrder?: Content.Schema.LiaOnDisplayToOrderSettings; + posDataProvider?: Content.Schema.LiaPosDataProvider; storePickupActive?: boolean; } export interface LiaInventorySettings { @@ -862,11 +862,11 @@ declare namespace GoogleAppsScript { } export interface LiaSettings { accountId?: string; - countrySettings?: Content_v2.Schema.LiaCountrySettings[]; + countrySettings?: Content.Schema.LiaCountrySettings[]; kind?: string; } export interface LiasettingsCustomBatchRequest { - entries?: Content_v2.Schema.LiasettingsCustomBatchRequestEntry[]; + entries?: Content.Schema.LiasettingsCustomBatchRequestEntry[]; } export interface LiasettingsCustomBatchRequestEntry { accountId?: string; @@ -875,37 +875,37 @@ declare namespace GoogleAppsScript { contactName?: string; country?: string; gmbEmail?: string; - liaSettings?: Content_v2.Schema.LiaSettings; + liaSettings?: Content.Schema.LiaSettings; merchantId?: string; method?: string; posDataProviderId?: string; posExternalAccountId?: string; } export interface LiasettingsCustomBatchResponse { - entries?: Content_v2.Schema.LiasettingsCustomBatchResponseEntry[]; + entries?: Content.Schema.LiasettingsCustomBatchResponseEntry[]; kind?: string; } export interface LiasettingsCustomBatchResponseEntry { batchId?: number; - errors?: Content_v2.Schema.Errors; - gmbAccounts?: Content_v2.Schema.GmbAccounts; + errors?: Content.Schema.Errors; + gmbAccounts?: Content.Schema.GmbAccounts; kind?: string; - liaSettings?: Content_v2.Schema.LiaSettings; - posDataProviders?: Content_v2.Schema.PosDataProviders[]; + liaSettings?: Content.Schema.LiaSettings; + posDataProviders?: Content.Schema.PosDataProviders[]; } export interface LiasettingsGetAccessibleGmbAccountsResponse { accountId?: string; - gmbAccounts?: Content_v2.Schema.GmbAccountsGmbAccount[]; + gmbAccounts?: Content.Schema.GmbAccountsGmbAccount[]; kind?: string; } export interface LiasettingsListPosDataProvidersResponse { kind?: string; - posDataProviders?: Content_v2.Schema.PosDataProviders[]; + posDataProviders?: Content.Schema.PosDataProviders[]; } export interface LiasettingsListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.LiaSettings[]; + resources?: Content.Schema.LiaSettings[]; } export interface LiasettingsRequestGmbAccessResponse { kind?: string; @@ -932,36 +932,36 @@ declare namespace GoogleAppsScript { merchantOrderId?: string; orderId?: string; orderReturnId?: string; - returnItems?: Content_v2.Schema.MerchantOrderReturnItem[]; - returnShipments?: Content_v2.Schema.ReturnShipment[]; + returnItems?: Content.Schema.MerchantOrderReturnItem[]; + returnShipments?: Content.Schema.ReturnShipment[]; } export interface MerchantOrderReturnItem { - customerReturnReason?: Content_v2.Schema.CustomerReturnReason; + customerReturnReason?: Content.Schema.CustomerReturnReason; itemId?: string; - merchantReturnReason?: Content_v2.Schema.RefundReason; - product?: Content_v2.Schema.OrderLineItemProduct; + merchantReturnReason?: Content.Schema.RefundReason; + product?: Content.Schema.OrderLineItemProduct; returnShipmentIds?: string[]; state?: string; } export interface Order { acknowledged?: boolean; channelType?: string; - customer?: Content_v2.Schema.OrderCustomer; - deliveryDetails?: Content_v2.Schema.OrderDeliveryDetails; + customer?: Content.Schema.OrderCustomer; + deliveryDetails?: Content.Schema.OrderDeliveryDetails; id?: string; kind?: string; - lineItems?: Content_v2.Schema.OrderLineItem[]; + lineItems?: Content.Schema.OrderLineItem[]; merchantId?: string; merchantOrderId?: string; - netAmount?: Content_v2.Schema.Price; - paymentMethod?: Content_v2.Schema.OrderPaymentMethod; + netAmount?: Content.Schema.Price; + paymentMethod?: Content.Schema.OrderPaymentMethod; paymentStatus?: string; placedDate?: string; - promotions?: Content_v2.Schema.OrderLegacyPromotion[]; - refunds?: Content_v2.Schema.OrderRefund[]; - shipments?: Content_v2.Schema.OrderShipment[]; - shippingCost?: Content_v2.Schema.Price; - shippingCostTax?: Content_v2.Schema.Price; + promotions?: Content.Schema.OrderLegacyPromotion[]; + refunds?: Content.Schema.OrderRefund[]; + shipments?: Content.Schema.OrderShipment[]; + shippingCost?: Content.Schema.Price; + shippingCostTax?: Content.Schema.Price; shippingOption?: string; status?: string; taxCollector?: string; @@ -987,7 +987,7 @@ declare namespace GoogleAppsScript { email?: string; explicitMarketingPreference?: boolean; fullName?: string; - marketingRightsInfo?: Content_v2.Schema.OrderCustomerMarketingRightsInfo; + marketingRightsInfo?: Content.Schema.OrderCustomerMarketingRightsInfo; } export interface OrderCustomerMarketingRightsInfo { explicitMarketingPreference?: string; @@ -995,11 +995,11 @@ declare namespace GoogleAppsScript { marketingEmailAddress?: string; } export interface OrderDeliveryDetails { - address?: Content_v2.Schema.OrderAddress; + address?: Content.Schema.OrderAddress; phoneNumber?: string; } export interface OrderLegacyPromotion { - benefits?: Content_v2.Schema.OrderLegacyPromotionBenefit[]; + benefits?: Content.Schema.OrderLegacyPromotionBenefit[]; effectiveDates?: string; genericRedemptionCode?: string; id?: string; @@ -1008,49 +1008,49 @@ declare namespace GoogleAppsScript { redemptionChannel?: string; } export interface OrderLegacyPromotionBenefit { - discount?: Content_v2.Schema.Price; + discount?: Content.Schema.Price; offerIds?: string[]; subType?: string; - taxImpact?: Content_v2.Schema.Price; + taxImpact?: Content.Schema.Price; type?: string; } export interface OrderLineItem { - annotations?: Content_v2.Schema.OrderMerchantProvidedAnnotation[]; - cancellations?: Content_v2.Schema.OrderCancellation[]; + annotations?: Content.Schema.OrderMerchantProvidedAnnotation[]; + cancellations?: Content.Schema.OrderCancellation[]; id?: string; - price?: Content_v2.Schema.Price; - product?: Content_v2.Schema.OrderLineItemProduct; + price?: Content.Schema.Price; + product?: Content.Schema.OrderLineItemProduct; quantityCanceled?: number; quantityDelivered?: number; quantityOrdered?: number; quantityPending?: number; quantityReturned?: number; quantityShipped?: number; - returnInfo?: Content_v2.Schema.OrderLineItemReturnInfo; - returns?: Content_v2.Schema.OrderReturn[]; - shippingDetails?: Content_v2.Schema.OrderLineItemShippingDetails; - tax?: Content_v2.Schema.Price; + returnInfo?: Content.Schema.OrderLineItemReturnInfo; + returns?: Content.Schema.OrderReturn[]; + shippingDetails?: Content.Schema.OrderLineItemShippingDetails; + tax?: Content.Schema.Price; } export interface OrderLineItemProduct { brand?: string; channel?: string; condition?: string; contentLanguage?: string; - fees?: Content_v2.Schema.OrderLineItemProductFee[]; + fees?: Content.Schema.OrderLineItemProductFee[]; gtin?: string; id?: string; imageLink?: string; itemGroupId?: string; mpn?: string; offerId?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; shownImage?: string; targetCountry?: string; title?: string; - variantAttributes?: Content_v2.Schema.OrderLineItemProductVariantAttribute[]; + variantAttributes?: Content.Schema.OrderLineItemProductVariantAttribute[]; } export interface OrderLineItemProductFee { - amount?: Content_v2.Schema.Price; + amount?: Content.Schema.Price; name?: string; } export interface OrderLineItemProductVariantAttribute { @@ -1064,7 +1064,7 @@ declare namespace GoogleAppsScript { } export interface OrderLineItemShippingDetails { deliverByDate?: string; - method?: Content_v2.Schema.OrderLineItemShippingDetailsMethod; + method?: Content.Schema.OrderLineItemShippingDetailsMethod; shipByDate?: string; } export interface OrderLineItemShippingDetailsMethod { @@ -1078,7 +1078,7 @@ declare namespace GoogleAppsScript { value?: string; } export interface OrderPaymentMethod { - billingAddress?: Content_v2.Schema.OrderAddress; + billingAddress?: Content.Schema.OrderAddress; expirationMonth?: number; expirationYear?: number; lastFourDigits?: string; @@ -1087,28 +1087,28 @@ declare namespace GoogleAppsScript { } export interface OrderRefund { actor?: string; - amount?: Content_v2.Schema.Price; + amount?: Content.Schema.Price; creationDate?: string; reason?: string; reasonText?: string; } export interface OrderReportDisbursement { - disbursementAmount?: Content_v2.Schema.Price; + disbursementAmount?: Content.Schema.Price; disbursementCreationDate?: string; disbursementDate?: string; disbursementId?: string; merchantId?: string; } export interface OrderReportTransaction { - disbursementAmount?: Content_v2.Schema.Price; + disbursementAmount?: Content.Schema.Price; disbursementCreationDate?: string; disbursementDate?: string; disbursementId?: string; merchantId?: string; merchantOrderId?: string; orderId?: string; - productAmount?: Content_v2.Schema.Amount; - productAmountWithRemittedTax?: Content_v2.Schema.ProductAmount; + productAmount?: Content.Schema.Amount; + productAmountWithRemittedTax?: Content.Schema.ProductAmount; transactionDate?: string; } export interface OrderReturn { @@ -1123,7 +1123,7 @@ declare namespace GoogleAppsScript { creationDate?: string; deliveryDate?: string; id?: string; - lineItems?: Content_v2.Schema.OrderShipmentLineItemShipment[]; + lineItems?: Content.Schema.OrderShipmentLineItemShipment[]; status?: string; trackingId?: string; } @@ -1134,8 +1134,8 @@ declare namespace GoogleAppsScript { } export interface OrderinvoicesCreateChargeInvoiceRequest { invoiceId?: string; - invoiceSummary?: Content_v2.Schema.InvoiceSummary; - lineItemInvoices?: Content_v2.Schema.ShipmentInvoiceLineItemInvoice[]; + invoiceSummary?: Content.Schema.InvoiceSummary; + lineItemInvoices?: Content.Schema.ShipmentInvoiceLineItemInvoice[]; operationId?: string; shipmentGroupId?: string; } @@ -1146,9 +1146,9 @@ declare namespace GoogleAppsScript { export interface OrderinvoicesCreateRefundInvoiceRequest { invoiceId?: string; operationId?: string; - refundOnlyOption?: Content_v2.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption; - returnOption?: Content_v2.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption; - shipmentInvoices?: Content_v2.Schema.ShipmentInvoice[]; + refundOnlyOption?: Content.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption; + returnOption?: Content.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption; + shipmentInvoices?: Content.Schema.ShipmentInvoice[]; } export interface OrderinvoicesCreateRefundInvoiceResponse { executionStatus?: string; @@ -1163,8 +1163,8 @@ declare namespace GoogleAppsScript { reason?: string; } export interface OrderpaymentsNotifyAuthApprovedRequest { - authAmountPretax?: Content_v2.Schema.Price; - authAmountTax?: Content_v2.Schema.Price; + authAmountPretax?: Content.Schema.Price; + authAmountTax?: Content.Schema.Price; } export interface OrderpaymentsNotifyAuthApprovedResponse { executionStatus?: string; @@ -1196,19 +1196,19 @@ declare namespace GoogleAppsScript { kind?: string; } export interface OrderreportsListDisbursementsResponse { - disbursements?: Content_v2.Schema.OrderReportDisbursement[]; + disbursements?: Content.Schema.OrderReportDisbursement[]; kind?: string; nextPageToken?: string; } export interface OrderreportsListTransactionsResponse { kind?: string; nextPageToken?: string; - transactions?: Content_v2.Schema.OrderReportTransaction[]; + transactions?: Content.Schema.OrderReportTransaction[]; } export interface OrderreturnsListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.MerchantOrderReturn[]; + resources?: Content.Schema.MerchantOrderReturn[]; } export interface OrdersAcknowledgeRequest { operationId?: string; @@ -1221,9 +1221,9 @@ declare namespace GoogleAppsScript { kind?: string; } export interface OrdersCancelLineItemRequest { - amount?: Content_v2.Schema.Price; - amountPretax?: Content_v2.Schema.Price; - amountTax?: Content_v2.Schema.Price; + amount?: Content.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; lineItemId?: string; operationId?: string; productId?: string; @@ -1253,49 +1253,49 @@ declare namespace GoogleAppsScript { export interface OrdersCreateTestOrderRequest { country?: string; templateName?: string; - testOrder?: Content_v2.Schema.TestOrder; + testOrder?: Content.Schema.TestOrder; } export interface OrdersCreateTestOrderResponse { kind?: string; orderId?: string; } export interface OrdersCreateTestReturnRequest { - items?: Content_v2.Schema.OrdersCustomBatchRequestEntryCreateTestReturnReturnItem[]; + items?: Content.Schema.OrdersCustomBatchRequestEntryCreateTestReturnReturnItem[]; } export interface OrdersCreateTestReturnResponse { kind?: string; returnId?: string; } export interface OrdersCustomBatchRequest { - entries?: Content_v2.Schema.OrdersCustomBatchRequestEntry[]; + entries?: Content.Schema.OrdersCustomBatchRequestEntry[]; } export interface OrdersCustomBatchRequestEntry { batchId?: number; - cancel?: Content_v2.Schema.OrdersCustomBatchRequestEntryCancel; - cancelLineItem?: Content_v2.Schema.OrdersCustomBatchRequestEntryCancelLineItem; - inStoreRefundLineItem?: Content_v2.Schema.OrdersCustomBatchRequestEntryInStoreRefundLineItem; + cancel?: Content.Schema.OrdersCustomBatchRequestEntryCancel; + cancelLineItem?: Content.Schema.OrdersCustomBatchRequestEntryCancelLineItem; + inStoreRefundLineItem?: Content.Schema.OrdersCustomBatchRequestEntryInStoreRefundLineItem; merchantId?: string; merchantOrderId?: string; method?: string; operationId?: string; orderId?: string; - refund?: Content_v2.Schema.OrdersCustomBatchRequestEntryRefund; - rejectReturnLineItem?: Content_v2.Schema.OrdersCustomBatchRequestEntryRejectReturnLineItem; - returnLineItem?: Content_v2.Schema.OrdersCustomBatchRequestEntryReturnLineItem; - returnRefundLineItem?: Content_v2.Schema.OrdersCustomBatchRequestEntryReturnRefundLineItem; - setLineItemMetadata?: Content_v2.Schema.OrdersCustomBatchRequestEntrySetLineItemMetadata; - shipLineItems?: Content_v2.Schema.OrdersCustomBatchRequestEntryShipLineItems; - updateLineItemShippingDetails?: Content_v2.Schema.OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails; - updateShipment?: Content_v2.Schema.OrdersCustomBatchRequestEntryUpdateShipment; + refund?: Content.Schema.OrdersCustomBatchRequestEntryRefund; + rejectReturnLineItem?: Content.Schema.OrdersCustomBatchRequestEntryRejectReturnLineItem; + returnLineItem?: Content.Schema.OrdersCustomBatchRequestEntryReturnLineItem; + returnRefundLineItem?: Content.Schema.OrdersCustomBatchRequestEntryReturnRefundLineItem; + setLineItemMetadata?: Content.Schema.OrdersCustomBatchRequestEntrySetLineItemMetadata; + shipLineItems?: Content.Schema.OrdersCustomBatchRequestEntryShipLineItems; + updateLineItemShippingDetails?: Content.Schema.OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails; + updateShipment?: Content.Schema.OrdersCustomBatchRequestEntryUpdateShipment; } export interface OrdersCustomBatchRequestEntryCancel { reason?: string; reasonText?: string; } export interface OrdersCustomBatchRequestEntryCancelLineItem { - amount?: Content_v2.Schema.Price; - amountPretax?: Content_v2.Schema.Price; - amountTax?: Content_v2.Schema.Price; + amount?: Content.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; lineItemId?: string; productId?: string; quantity?: number; @@ -1307,8 +1307,8 @@ declare namespace GoogleAppsScript { quantity?: number; } export interface OrdersCustomBatchRequestEntryInStoreRefundLineItem { - amountPretax?: Content_v2.Schema.Price; - amountTax?: Content_v2.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; lineItemId?: string; productId?: string; quantity?: number; @@ -1316,9 +1316,9 @@ declare namespace GoogleAppsScript { reasonText?: string; } export interface OrdersCustomBatchRequestEntryRefund { - amount?: Content_v2.Schema.Price; - amountPretax?: Content_v2.Schema.Price; - amountTax?: Content_v2.Schema.Price; + amount?: Content.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; reason?: string; reasonText?: string; } @@ -1337,8 +1337,8 @@ declare namespace GoogleAppsScript { reasonText?: string; } export interface OrdersCustomBatchRequestEntryReturnRefundLineItem { - amountPretax?: Content_v2.Schema.Price; - amountTax?: Content_v2.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; lineItemId?: string; productId?: string; quantity?: number; @@ -1346,16 +1346,16 @@ declare namespace GoogleAppsScript { reasonText?: string; } export interface OrdersCustomBatchRequestEntrySetLineItemMetadata { - annotations?: Content_v2.Schema.OrderMerchantProvidedAnnotation[]; + annotations?: Content.Schema.OrderMerchantProvidedAnnotation[]; lineItemId?: string; productId?: string; } export interface OrdersCustomBatchRequestEntryShipLineItems { carrier?: string; - lineItems?: Content_v2.Schema.OrderShipmentLineItemShipment[]; + lineItems?: Content.Schema.OrderShipmentLineItemShipment[]; shipmentGroupId?: string; shipmentId?: string; - shipmentInfos?: Content_v2.Schema.OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo[]; + shipmentInfos?: Content.Schema.OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo[]; trackingId?: string; } export interface OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo { @@ -1377,27 +1377,27 @@ declare namespace GoogleAppsScript { trackingId?: string; } export interface OrdersCustomBatchResponse { - entries?: Content_v2.Schema.OrdersCustomBatchResponseEntry[]; + entries?: Content.Schema.OrdersCustomBatchResponseEntry[]; kind?: string; } export interface OrdersCustomBatchResponseEntry { batchId?: number; - errors?: Content_v2.Schema.Errors; + errors?: Content.Schema.Errors; executionStatus?: string; kind?: string; - order?: Content_v2.Schema.Order; + order?: Content.Schema.Order; } export interface OrdersGetByMerchantOrderIdResponse { kind?: string; - order?: Content_v2.Schema.Order; + order?: Content.Schema.Order; } export interface OrdersGetTestOrderTemplateResponse { kind?: string; - template?: Content_v2.Schema.TestOrder; + template?: Content.Schema.TestOrder; } export interface OrdersInStoreRefundLineItemRequest { - amountPretax?: Content_v2.Schema.Price; - amountTax?: Content_v2.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; lineItemId?: string; operationId?: string; productId?: string; @@ -1412,12 +1412,12 @@ declare namespace GoogleAppsScript { export interface OrdersListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.Order[]; + resources?: Content.Schema.Order[]; } export interface OrdersRefundRequest { - amount?: Content_v2.Schema.Price; - amountPretax?: Content_v2.Schema.Price; - amountTax?: Content_v2.Schema.Price; + amount?: Content.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; operationId?: string; reason?: string; reasonText?: string; @@ -1451,8 +1451,8 @@ declare namespace GoogleAppsScript { kind?: string; } export interface OrdersReturnRefundLineItemRequest { - amountPretax?: Content_v2.Schema.Price; - amountTax?: Content_v2.Schema.Price; + amountPretax?: Content.Schema.Price; + amountTax?: Content.Schema.Price; lineItemId?: string; operationId?: string; productId?: string; @@ -1465,7 +1465,7 @@ declare namespace GoogleAppsScript { kind?: string; } export interface OrdersSetLineItemMetadataRequest { - annotations?: Content_v2.Schema.OrderMerchantProvidedAnnotation[]; + annotations?: Content.Schema.OrderMerchantProvidedAnnotation[]; lineItemId?: string; operationId?: string; productId?: string; @@ -1476,11 +1476,11 @@ declare namespace GoogleAppsScript { } export interface OrdersShipLineItemsRequest { carrier?: string; - lineItems?: Content_v2.Schema.OrderShipmentLineItemShipment[]; + lineItems?: Content.Schema.OrderShipmentLineItemShipment[]; operationId?: string; shipmentGroupId?: string; shipmentId?: string; - shipmentInfos?: Content_v2.Schema.OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo[]; + shipmentInfos?: Content.Schema.OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo[]; trackingId?: string; } export interface OrdersShipLineItemsResponse { @@ -1519,33 +1519,33 @@ declare namespace GoogleAppsScript { kind?: string; } export interface PosCustomBatchRequest { - entries?: Content_v2.Schema.PosCustomBatchRequestEntry[]; + entries?: Content.Schema.PosCustomBatchRequestEntry[]; } export interface PosCustomBatchRequestEntry { batchId?: number; - inventory?: Content_v2.Schema.PosInventory; + inventory?: Content.Schema.PosInventory; merchantId?: string; method?: string; - sale?: Content_v2.Schema.PosSale; - store?: Content_v2.Schema.PosStore; + sale?: Content.Schema.PosSale; + store?: Content.Schema.PosStore; storeCode?: string; targetMerchantId?: string; } export interface PosCustomBatchResponse { - entries?: Content_v2.Schema.PosCustomBatchResponseEntry[]; + entries?: Content.Schema.PosCustomBatchResponseEntry[]; kind?: string; } export interface PosCustomBatchResponseEntry { batchId?: number; - errors?: Content_v2.Schema.Errors; - inventory?: Content_v2.Schema.PosInventory; + errors?: Content.Schema.Errors; + inventory?: Content.Schema.PosInventory; kind?: string; - sale?: Content_v2.Schema.PosSale; - store?: Content_v2.Schema.PosStore; + sale?: Content.Schema.PosSale; + store?: Content.Schema.PosStore; } export interface PosDataProviders { country?: string; - posDataProviders?: Content_v2.Schema.PosDataProvidersPosDataProvider[]; + posDataProviders?: Content.Schema.PosDataProvidersPosDataProvider[]; } export interface PosDataProvidersPosDataProvider { displayName?: string; @@ -1557,7 +1557,7 @@ declare namespace GoogleAppsScript { gtin?: string; itemId?: string; kind?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; quantity?: string; storeCode?: string; targetCountry?: string; @@ -1567,7 +1567,7 @@ declare namespace GoogleAppsScript { contentLanguage?: string; gtin?: string; itemId?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; quantity?: string; storeCode?: string; targetCountry?: string; @@ -1578,7 +1578,7 @@ declare namespace GoogleAppsScript { gtin?: string; itemId?: string; kind?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; quantity?: string; storeCode?: string; targetCountry?: string; @@ -1586,14 +1586,14 @@ declare namespace GoogleAppsScript { } export interface PosListResponse { kind?: string; - resources?: Content_v2.Schema.PosStore[]; + resources?: Content.Schema.PosStore[]; } export interface PosSale { contentLanguage?: string; gtin?: string; itemId?: string; kind?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; quantity?: string; saleId?: string; storeCode?: string; @@ -1604,7 +1604,7 @@ declare namespace GoogleAppsScript { contentLanguage?: string; gtin?: string; itemId?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; quantity?: string; saleId?: string; storeCode?: string; @@ -1616,7 +1616,7 @@ declare namespace GoogleAppsScript { gtin?: string; itemId?: string; kind?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; quantity?: string; saleId?: string; storeCode?: string; @@ -1631,7 +1631,7 @@ declare namespace GoogleAppsScript { export interface PostalCodeGroup { country?: string; name?: string; - postalCodeRanges?: Content_v2.Schema.PostalCodeRange[]; + postalCodeRanges?: Content.Schema.PostalCodeRange[]; } export interface PostalCodeRange { postalCodeRangeBegin?: string; @@ -1649,7 +1649,7 @@ declare namespace GoogleAppsScript { adwordsLabels?: string[]; adwordsRedirect?: string; ageGroup?: string; - aspects?: Content_v2.Schema.ProductAspect[]; + aspects?: Content.Schema.ProductAspect[]; availability?: string; availabilityDate?: string; brand?: string; @@ -1657,16 +1657,16 @@ declare namespace GoogleAppsScript { color?: string; condition?: string; contentLanguage?: string; - costOfGoodsSold?: Content_v2.Schema.Price; - customAttributes?: Content_v2.Schema.CustomAttribute[]; - customGroups?: Content_v2.Schema.CustomGroup[]; + costOfGoodsSold?: Content.Schema.Price; + customAttributes?: Content.Schema.CustomAttribute[]; + customGroups?: Content.Schema.CustomGroup[]; customLabel0?: string; customLabel1?: string; customLabel2?: string; customLabel3?: string; customLabel4?: string; description?: string; - destinations?: Content_v2.Schema.ProductDestination[]; + destinations?: Content.Schema.ProductDestination[]; displayAdsId?: string; displayAdsLink?: string; displayAdsSimilarIds?: string[]; @@ -1680,12 +1680,12 @@ declare namespace GoogleAppsScript { id?: string; identifierExists?: boolean; imageLink?: string; - installment?: Content_v2.Schema.Installment; + installment?: Content.Schema.Installment; isBundle?: boolean; itemGroupId?: string; kind?: string; link?: string; - loyaltyPoints?: Content_v2.Schema.LoyaltyPoints; + loyaltyPoints?: Content.Schema.LoyaltyPoints; material?: string; maxEnergyEfficiencyClass?: string; maxHandlingTime?: string; @@ -1697,34 +1697,34 @@ declare namespace GoogleAppsScript { offerId?: string; onlineOnly?: boolean; pattern?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; productType?: string; promotionIds?: string[]; - salePrice?: Content_v2.Schema.Price; + salePrice?: Content.Schema.Price; salePriceEffectiveDate?: string; sellOnGoogleQuantity?: string; - shipping?: Content_v2.Schema.ProductShipping[]; - shippingHeight?: Content_v2.Schema.ProductShippingDimension; + shipping?: Content.Schema.ProductShipping[]; + shippingHeight?: Content.Schema.ProductShippingDimension; shippingLabel?: string; - shippingLength?: Content_v2.Schema.ProductShippingDimension; - shippingWeight?: Content_v2.Schema.ProductShippingWeight; - shippingWidth?: Content_v2.Schema.ProductShippingDimension; + shippingLength?: Content.Schema.ProductShippingDimension; + shippingWeight?: Content.Schema.ProductShippingWeight; + shippingWidth?: Content.Schema.ProductShippingDimension; sizeSystem?: string; sizeType?: string; sizes?: string[]; source?: string; targetCountry?: string; - taxes?: Content_v2.Schema.ProductTax[]; + taxes?: Content.Schema.ProductTax[]; title?: string; - unitPricingBaseMeasure?: Content_v2.Schema.ProductUnitPricingBaseMeasure; - unitPricingMeasure?: Content_v2.Schema.ProductUnitPricingMeasure; + unitPricingBaseMeasure?: Content.Schema.ProductUnitPricingBaseMeasure; + unitPricingMeasure?: Content.Schema.ProductUnitPricingMeasure; validatedDestinations?: string[]; - warnings?: Content_v2.Schema.Error[]; + warnings?: Content.Schema.Error[]; } export interface ProductAmount { - priceAmount?: Content_v2.Schema.Price; - remittedTaxAmount?: Content_v2.Schema.Price; - taxAmount?: Content_v2.Schema.Price; + priceAmount?: Content.Schema.Price; + remittedTaxAmount?: Content.Schema.Price; + taxAmount?: Content.Schema.Price; } export interface ProductAspect { aspectName?: string; @@ -1740,7 +1740,7 @@ declare namespace GoogleAppsScript { locationGroupName?: string; locationId?: string; postalCode?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; region?: string; service?: string; } @@ -1754,14 +1754,14 @@ declare namespace GoogleAppsScript { } export interface ProductStatus { creationDate?: string; - dataQualityIssues?: Content_v2.Schema.ProductStatusDataQualityIssue[]; - destinationStatuses?: Content_v2.Schema.ProductStatusDestinationStatus[]; + dataQualityIssues?: Content.Schema.ProductStatusDataQualityIssue[]; + destinationStatuses?: Content.Schema.ProductStatusDestinationStatus[]; googleExpirationDate?: string; - itemLevelIssues?: Content_v2.Schema.ProductStatusItemLevelIssue[]; + itemLevelIssues?: Content.Schema.ProductStatusItemLevelIssue[]; kind?: string; lastUpdateDate?: string; link?: string; - product?: Content_v2.Schema.Product; + product?: Content.Schema.Product; productId?: string; title?: string; } @@ -1809,32 +1809,32 @@ declare namespace GoogleAppsScript { value?: Number; } export interface ProductsCustomBatchRequest { - entries?: Content_v2.Schema.ProductsCustomBatchRequestEntry[]; + entries?: Content.Schema.ProductsCustomBatchRequestEntry[]; } export interface ProductsCustomBatchRequestEntry { batchId?: number; merchantId?: string; method?: string; - product?: Content_v2.Schema.Product; + product?: Content.Schema.Product; productId?: string; } export interface ProductsCustomBatchResponse { - entries?: Content_v2.Schema.ProductsCustomBatchResponseEntry[]; + entries?: Content.Schema.ProductsCustomBatchResponseEntry[]; kind?: string; } export interface ProductsCustomBatchResponseEntry { batchId?: number; - errors?: Content_v2.Schema.Errors; + errors?: Content.Schema.Errors; kind?: string; - product?: Content_v2.Schema.Product; + product?: Content.Schema.Product; } export interface ProductsListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.Product[]; + resources?: Content.Schema.Product[]; } export interface ProductstatusesCustomBatchRequest { - entries?: Content_v2.Schema.ProductstatusesCustomBatchRequestEntry[]; + entries?: Content.Schema.ProductstatusesCustomBatchRequestEntry[]; } export interface ProductstatusesCustomBatchRequestEntry { batchId?: number; @@ -1845,31 +1845,31 @@ declare namespace GoogleAppsScript { productId?: string; } export interface ProductstatusesCustomBatchResponse { - entries?: Content_v2.Schema.ProductstatusesCustomBatchResponseEntry[]; + entries?: Content.Schema.ProductstatusesCustomBatchResponseEntry[]; kind?: string; } export interface ProductstatusesCustomBatchResponseEntry { batchId?: number; - errors?: Content_v2.Schema.Errors; + errors?: Content.Schema.Errors; kind?: string; - productStatus?: Content_v2.Schema.ProductStatus; + productStatus?: Content.Schema.ProductStatus; } export interface ProductstatusesListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.ProductStatus[]; + resources?: Content.Schema.ProductStatus[]; } export interface Promotion { - promotionAmount?: Content_v2.Schema.Amount; + promotionAmount?: Content.Schema.Amount; promotionId?: string; } export interface RateGroup { applicableShippingLabels?: string[]; - carrierRates?: Content_v2.Schema.CarrierRate[]; - mainTable?: Content_v2.Schema.Table; + carrierRates?: Content.Schema.CarrierRate[]; + mainTable?: Content.Schema.Table; name?: string; - singleValue?: Content_v2.Schema.Value; - subtables?: Content_v2.Schema.Table[]; + singleValue?: Content.Schema.Value; + subtables?: Content.Schema.Table[]; } export interface RefundReason { description?: string; @@ -1880,33 +1880,33 @@ declare namespace GoogleAppsScript { deliveryDate?: string; returnMethodType?: string; shipmentId?: string; - shipmentTrackingInfos?: Content_v2.Schema.ShipmentTrackingInfo[]; + shipmentTrackingInfos?: Content.Schema.ShipmentTrackingInfo[]; shippingDate?: string; state?: string; } export interface Row { - cells?: Content_v2.Schema.Value[]; + cells?: Content.Schema.Value[]; } export interface Service { active?: boolean; currency?: string; deliveryCountry?: string; - deliveryTime?: Content_v2.Schema.DeliveryTime; + deliveryTime?: Content.Schema.DeliveryTime; eligibility?: string; - minimumOrderValue?: Content_v2.Schema.Price; + minimumOrderValue?: Content.Schema.Price; name?: string; - rateGroups?: Content_v2.Schema.RateGroup[]; + rateGroups?: Content.Schema.RateGroup[]; } export interface ShipmentInvoice { - invoiceSummary?: Content_v2.Schema.InvoiceSummary; - lineItemInvoices?: Content_v2.Schema.ShipmentInvoiceLineItemInvoice[]; + invoiceSummary?: Content.Schema.InvoiceSummary; + lineItemInvoices?: Content.Schema.ShipmentInvoiceLineItemInvoice[]; shipmentGroupId?: string; } export interface ShipmentInvoiceLineItemInvoice { lineItemId?: string; productId?: string; shipmentUnitIds?: string[]; - unitInvoice?: Content_v2.Schema.UnitInvoice; + unitInvoice?: Content.Schema.UnitInvoice; } export interface ShipmentTrackingInfo { carrier?: string; @@ -1914,77 +1914,77 @@ declare namespace GoogleAppsScript { } export interface ShippingSettings { accountId?: string; - postalCodeGroups?: Content_v2.Schema.PostalCodeGroup[]; - services?: Content_v2.Schema.Service[]; + postalCodeGroups?: Content.Schema.PostalCodeGroup[]; + services?: Content.Schema.Service[]; } export interface ShippingsettingsCustomBatchRequest { - entries?: Content_v2.Schema.ShippingsettingsCustomBatchRequestEntry[]; + entries?: Content.Schema.ShippingsettingsCustomBatchRequestEntry[]; } export interface ShippingsettingsCustomBatchRequestEntry { accountId?: string; batchId?: number; merchantId?: string; method?: string; - shippingSettings?: Content_v2.Schema.ShippingSettings; + shippingSettings?: Content.Schema.ShippingSettings; } export interface ShippingsettingsCustomBatchResponse { - entries?: Content_v2.Schema.ShippingsettingsCustomBatchResponseEntry[]; + entries?: Content.Schema.ShippingsettingsCustomBatchResponseEntry[]; kind?: string; } export interface ShippingsettingsCustomBatchResponseEntry { batchId?: number; - errors?: Content_v2.Schema.Errors; + errors?: Content.Schema.Errors; kind?: string; - shippingSettings?: Content_v2.Schema.ShippingSettings; + shippingSettings?: Content.Schema.ShippingSettings; } export interface ShippingsettingsGetSupportedCarriersResponse { - carriers?: Content_v2.Schema.CarriersCarrier[]; + carriers?: Content.Schema.CarriersCarrier[]; kind?: string; } export interface ShippingsettingsGetSupportedHolidaysResponse { - holidays?: Content_v2.Schema.HolidaysHoliday[]; + holidays?: Content.Schema.HolidaysHoliday[]; kind?: string; } export interface ShippingsettingsListResponse { kind?: string; nextPageToken?: string; - resources?: Content_v2.Schema.ShippingSettings[]; + resources?: Content.Schema.ShippingSettings[]; } export interface Table { - columnHeaders?: Content_v2.Schema.Headers; + columnHeaders?: Content.Schema.Headers; name?: string; - rowHeaders?: Content_v2.Schema.Headers; - rows?: Content_v2.Schema.Row[]; + rowHeaders?: Content.Schema.Headers; + rows?: Content.Schema.Row[]; } export interface TestOrder { - customer?: Content_v2.Schema.TestOrderCustomer; + customer?: Content.Schema.TestOrderCustomer; enableOrderinvoices?: boolean; kind?: string; - lineItems?: Content_v2.Schema.TestOrderLineItem[]; + lineItems?: Content.Schema.TestOrderLineItem[]; notificationMode?: string; - paymentMethod?: Content_v2.Schema.TestOrderPaymentMethod; + paymentMethod?: Content.Schema.TestOrderPaymentMethod; predefinedDeliveryAddress?: string; - promotions?: Content_v2.Schema.OrderLegacyPromotion[]; - shippingCost?: Content_v2.Schema.Price; - shippingCostTax?: Content_v2.Schema.Price; + promotions?: Content.Schema.OrderLegacyPromotion[]; + shippingCost?: Content.Schema.Price; + shippingCostTax?: Content.Schema.Price; shippingOption?: string; } export interface TestOrderCustomer { email?: string; explicitMarketingPreference?: boolean; fullName?: string; - marketingRightsInfo?: Content_v2.Schema.TestOrderCustomerMarketingRightsInfo; + marketingRightsInfo?: Content.Schema.TestOrderCustomerMarketingRightsInfo; } export interface TestOrderCustomerMarketingRightsInfo { explicitMarketingPreference?: string; lastUpdatedTimestamp?: string; } export interface TestOrderLineItem { - product?: Content_v2.Schema.TestOrderLineItemProduct; + product?: Content.Schema.TestOrderLineItemProduct; quantityOrdered?: number; - returnInfo?: Content_v2.Schema.OrderLineItemReturnInfo; - shippingDetails?: Content_v2.Schema.OrderLineItemShippingDetails; - unitTax?: Content_v2.Schema.Price; + returnInfo?: Content.Schema.OrderLineItemReturnInfo; + shippingDetails?: Content.Schema.OrderLineItemShippingDetails; + unitTax?: Content.Schema.Price; } export interface TestOrderLineItemProduct { brand?: string; @@ -1996,10 +1996,10 @@ declare namespace GoogleAppsScript { itemGroupId?: string; mpn?: string; offerId?: string; - price?: Content_v2.Schema.Price; + price?: Content.Schema.Price; targetCountry?: string; title?: string; - variantAttributes?: Content_v2.Schema.OrderLineItemProductVariantAttribute[]; + variantAttributes?: Content.Schema.OrderLineItemProductVariantAttribute[]; } export interface TestOrderPaymentMethod { expirationMonth?: number; @@ -2010,35 +2010,35 @@ declare namespace GoogleAppsScript { } export interface TransitTable { postalCodeGroupNames?: string[]; - rows?: Content_v2.Schema.TransitTableTransitTimeRow[]; + rows?: Content.Schema.TransitTableTransitTimeRow[]; transitTimeLabels?: string[]; } export interface TransitTableTransitTimeRow { - values?: Content_v2.Schema.TransitTableTransitTimeRowTransitTimeValue[]; + values?: Content.Schema.TransitTableTransitTimeRowTransitTimeValue[]; } export interface TransitTableTransitTimeRowTransitTimeValue { maxTransitTimeInDays?: number; minTransitTimeInDays?: number; } export interface UnitInvoice { - additionalCharges?: Content_v2.Schema.UnitInvoiceAdditionalCharge[]; - promotions?: Content_v2.Schema.Promotion[]; - unitPricePretax?: Content_v2.Schema.Price; - unitPriceTaxes?: Content_v2.Schema.UnitInvoiceTaxLine[]; + additionalCharges?: Content.Schema.UnitInvoiceAdditionalCharge[]; + promotions?: Content.Schema.Promotion[]; + unitPricePretax?: Content.Schema.Price; + unitPriceTaxes?: Content.Schema.UnitInvoiceTaxLine[]; } export interface UnitInvoiceAdditionalCharge { - additionalChargeAmount?: Content_v2.Schema.Amount; - additionalChargePromotions?: Content_v2.Schema.Promotion[]; + additionalChargeAmount?: Content.Schema.Amount; + additionalChargePromotions?: Content.Schema.Promotion[]; type?: string; } export interface UnitInvoiceTaxLine { - taxAmount?: Content_v2.Schema.Price; + taxAmount?: Content.Schema.Price; taxName?: string; taxType?: string; } export interface Value { carrierRateName?: string; - flatRate?: Content_v2.Schema.Price; + flatRate?: Content.Schema.Price; noShipping?: boolean; pricePercentage?: string; subtableName?: string; @@ -2049,318 +2049,318 @@ declare namespace GoogleAppsScript { } } } - export interface Content_v2 { - Accounts?: Content_v2.Collection.AccountsCollection; - Accountstatuses?: Content_v2.Collection.AccountstatusesCollection; - Accounttax?: Content_v2.Collection.AccounttaxCollection; - Datafeeds?: Content_v2.Collection.DatafeedsCollection; - Datafeedstatuses?: Content_v2.Collection.DatafeedstatusesCollection; - Inventory?: Content_v2.Collection.InventoryCollection; - Liasettings?: Content_v2.Collection.LiasettingsCollection; - Orderinvoices?: Content_v2.Collection.OrderinvoicesCollection; - Orderpayments?: Content_v2.Collection.OrderpaymentsCollection; - Orderreports?: Content_v2.Collection.OrderreportsCollection; - Orderreturns?: Content_v2.Collection.OrderreturnsCollection; - Orders?: Content_v2.Collection.OrdersCollection; - Pos?: Content_v2.Collection.PosCollection; - Products?: Content_v2.Collection.ProductsCollection; - Productstatuses?: Content_v2.Collection.ProductstatusesCollection; - Shippingsettings?: Content_v2.Collection.ShippingsettingsCollection; + export interface Content { + Accounts?: Content.Collection.AccountsCollection; + Accountstatuses?: Content.Collection.AccountstatusesCollection; + Accounttax?: Content.Collection.AccounttaxCollection; + Datafeeds?: Content.Collection.DatafeedsCollection; + Datafeedstatuses?: Content.Collection.DatafeedstatusesCollection; + Inventory?: Content.Collection.InventoryCollection; + Liasettings?: Content.Collection.LiasettingsCollection; + Orderinvoices?: Content.Collection.OrderinvoicesCollection; + Orderpayments?: Content.Collection.OrderpaymentsCollection; + Orderreports?: Content.Collection.OrderreportsCollection; + Orderreturns?: Content.Collection.OrderreturnsCollection; + Orders?: Content.Collection.OrdersCollection; + Pos?: Content.Collection.PosCollection; + Products?: Content.Collection.ProductsCollection; + Productstatuses?: Content.Collection.ProductstatusesCollection; + Shippingsettings?: Content.Collection.ShippingsettingsCollection; // Create a new instance of Account - newAccount(): Content_v2.Schema.Account; + newAccount(): Content.Schema.Account; // Create a new instance of AccountAddress - newAccountAddress(): Content_v2.Schema.AccountAddress; + newAccountAddress(): Content.Schema.AccountAddress; // Create a new instance of AccountAdwordsLink - newAccountAdwordsLink(): Content_v2.Schema.AccountAdwordsLink; + newAccountAdwordsLink(): Content.Schema.AccountAdwordsLink; // Create a new instance of AccountBusinessInformation - newAccountBusinessInformation(): Content_v2.Schema.AccountBusinessInformation; + newAccountBusinessInformation(): Content.Schema.AccountBusinessInformation; // Create a new instance of AccountCustomerService - newAccountCustomerService(): Content_v2.Schema.AccountCustomerService; + newAccountCustomerService(): Content.Schema.AccountCustomerService; // Create a new instance of AccountGoogleMyBusinessLink - newAccountGoogleMyBusinessLink(): Content_v2.Schema.AccountGoogleMyBusinessLink; + newAccountGoogleMyBusinessLink(): Content.Schema.AccountGoogleMyBusinessLink; // Create a new instance of AccountTax - newAccountTax(): Content_v2.Schema.AccountTax; + newAccountTax(): Content.Schema.AccountTax; // Create a new instance of AccountTaxTaxRule - newAccountTaxTaxRule(): Content_v2.Schema.AccountTaxTaxRule; + newAccountTaxTaxRule(): Content.Schema.AccountTaxTaxRule; // Create a new instance of AccountUser - newAccountUser(): Content_v2.Schema.AccountUser; + newAccountUser(): Content.Schema.AccountUser; // Create a new instance of AccountYouTubeChannelLink - newAccountYouTubeChannelLink(): Content_v2.Schema.AccountYouTubeChannelLink; + newAccountYouTubeChannelLink(): Content.Schema.AccountYouTubeChannelLink; // Create a new instance of AccountsCustomBatchRequest - newAccountsCustomBatchRequest(): Content_v2.Schema.AccountsCustomBatchRequest; + newAccountsCustomBatchRequest(): Content.Schema.AccountsCustomBatchRequest; // Create a new instance of AccountsCustomBatchRequestEntry - newAccountsCustomBatchRequestEntry(): Content_v2.Schema.AccountsCustomBatchRequestEntry; + newAccountsCustomBatchRequestEntry(): Content.Schema.AccountsCustomBatchRequestEntry; // Create a new instance of AccountsCustomBatchRequestEntryLinkRequest - newAccountsCustomBatchRequestEntryLinkRequest(): Content_v2.Schema.AccountsCustomBatchRequestEntryLinkRequest; + newAccountsCustomBatchRequestEntryLinkRequest(): Content.Schema.AccountsCustomBatchRequestEntryLinkRequest; // Create a new instance of AccountsLinkRequest - newAccountsLinkRequest(): Content_v2.Schema.AccountsLinkRequest; + newAccountsLinkRequest(): Content.Schema.AccountsLinkRequest; // Create a new instance of AccountstatusesCustomBatchRequest - newAccountstatusesCustomBatchRequest(): Content_v2.Schema.AccountstatusesCustomBatchRequest; + newAccountstatusesCustomBatchRequest(): Content.Schema.AccountstatusesCustomBatchRequest; // Create a new instance of AccountstatusesCustomBatchRequestEntry - newAccountstatusesCustomBatchRequestEntry(): Content_v2.Schema.AccountstatusesCustomBatchRequestEntry; + newAccountstatusesCustomBatchRequestEntry(): Content.Schema.AccountstatusesCustomBatchRequestEntry; // Create a new instance of AccounttaxCustomBatchRequest - newAccounttaxCustomBatchRequest(): Content_v2.Schema.AccounttaxCustomBatchRequest; + newAccounttaxCustomBatchRequest(): Content.Schema.AccounttaxCustomBatchRequest; // Create a new instance of AccounttaxCustomBatchRequestEntry - newAccounttaxCustomBatchRequestEntry(): Content_v2.Schema.AccounttaxCustomBatchRequestEntry; + newAccounttaxCustomBatchRequestEntry(): Content.Schema.AccounttaxCustomBatchRequestEntry; // Create a new instance of Amount - newAmount(): Content_v2.Schema.Amount; + newAmount(): Content.Schema.Amount; // Create a new instance of CarrierRate - newCarrierRate(): Content_v2.Schema.CarrierRate; + newCarrierRate(): Content.Schema.CarrierRate; // Create a new instance of CustomAttribute - newCustomAttribute(): Content_v2.Schema.CustomAttribute; + newCustomAttribute(): Content.Schema.CustomAttribute; // Create a new instance of CustomGroup - newCustomGroup(): Content_v2.Schema.CustomGroup; + newCustomGroup(): Content.Schema.CustomGroup; // Create a new instance of CutoffTime - newCutoffTime(): Content_v2.Schema.CutoffTime; + newCutoffTime(): Content.Schema.CutoffTime; // Create a new instance of Datafeed - newDatafeed(): Content_v2.Schema.Datafeed; + newDatafeed(): Content.Schema.Datafeed; // Create a new instance of DatafeedFetchSchedule - newDatafeedFetchSchedule(): Content_v2.Schema.DatafeedFetchSchedule; + newDatafeedFetchSchedule(): Content.Schema.DatafeedFetchSchedule; // Create a new instance of DatafeedFormat - newDatafeedFormat(): Content_v2.Schema.DatafeedFormat; + newDatafeedFormat(): Content.Schema.DatafeedFormat; // Create a new instance of DatafeedTarget - newDatafeedTarget(): Content_v2.Schema.DatafeedTarget; + newDatafeedTarget(): Content.Schema.DatafeedTarget; // Create a new instance of DatafeedsCustomBatchRequest - newDatafeedsCustomBatchRequest(): Content_v2.Schema.DatafeedsCustomBatchRequest; + newDatafeedsCustomBatchRequest(): Content.Schema.DatafeedsCustomBatchRequest; // Create a new instance of DatafeedsCustomBatchRequestEntry - newDatafeedsCustomBatchRequestEntry(): Content_v2.Schema.DatafeedsCustomBatchRequestEntry; + newDatafeedsCustomBatchRequestEntry(): Content.Schema.DatafeedsCustomBatchRequestEntry; // Create a new instance of DatafeedstatusesCustomBatchRequest - newDatafeedstatusesCustomBatchRequest(): Content_v2.Schema.DatafeedstatusesCustomBatchRequest; + newDatafeedstatusesCustomBatchRequest(): Content.Schema.DatafeedstatusesCustomBatchRequest; // Create a new instance of DatafeedstatusesCustomBatchRequestEntry - newDatafeedstatusesCustomBatchRequestEntry(): Content_v2.Schema.DatafeedstatusesCustomBatchRequestEntry; + newDatafeedstatusesCustomBatchRequestEntry(): Content.Schema.DatafeedstatusesCustomBatchRequestEntry; // Create a new instance of DeliveryTime - newDeliveryTime(): Content_v2.Schema.DeliveryTime; + newDeliveryTime(): Content.Schema.DeliveryTime; // Create a new instance of Error - newError(): Content_v2.Schema.Error; + newError(): Content.Schema.Error; // Create a new instance of Headers - newHeaders(): Content_v2.Schema.Headers; + newHeaders(): Content.Schema.Headers; // Create a new instance of HolidayCutoff - newHolidayCutoff(): Content_v2.Schema.HolidayCutoff; + newHolidayCutoff(): Content.Schema.HolidayCutoff; // Create a new instance of Installment - newInstallment(): Content_v2.Schema.Installment; + newInstallment(): Content.Schema.Installment; // Create a new instance of Inventory - newInventory(): Content_v2.Schema.Inventory; + newInventory(): Content.Schema.Inventory; // Create a new instance of InventoryCustomBatchRequest - newInventoryCustomBatchRequest(): Content_v2.Schema.InventoryCustomBatchRequest; + newInventoryCustomBatchRequest(): Content.Schema.InventoryCustomBatchRequest; // Create a new instance of InventoryCustomBatchRequestEntry - newInventoryCustomBatchRequestEntry(): Content_v2.Schema.InventoryCustomBatchRequestEntry; + newInventoryCustomBatchRequestEntry(): Content.Schema.InventoryCustomBatchRequestEntry; // Create a new instance of InventoryPickup - newInventoryPickup(): Content_v2.Schema.InventoryPickup; + newInventoryPickup(): Content.Schema.InventoryPickup; // Create a new instance of InventorySetRequest - newInventorySetRequest(): Content_v2.Schema.InventorySetRequest; + newInventorySetRequest(): Content.Schema.InventorySetRequest; // Create a new instance of InvoiceSummary - newInvoiceSummary(): Content_v2.Schema.InvoiceSummary; + newInvoiceSummary(): Content.Schema.InvoiceSummary; // Create a new instance of InvoiceSummaryAdditionalChargeSummary - newInvoiceSummaryAdditionalChargeSummary(): Content_v2.Schema.InvoiceSummaryAdditionalChargeSummary; + newInvoiceSummaryAdditionalChargeSummary(): Content.Schema.InvoiceSummaryAdditionalChargeSummary; // Create a new instance of LiaAboutPageSettings - newLiaAboutPageSettings(): Content_v2.Schema.LiaAboutPageSettings; + newLiaAboutPageSettings(): Content.Schema.LiaAboutPageSettings; // Create a new instance of LiaCountrySettings - newLiaCountrySettings(): Content_v2.Schema.LiaCountrySettings; + newLiaCountrySettings(): Content.Schema.LiaCountrySettings; // Create a new instance of LiaInventorySettings - newLiaInventorySettings(): Content_v2.Schema.LiaInventorySettings; + newLiaInventorySettings(): Content.Schema.LiaInventorySettings; // Create a new instance of LiaOnDisplayToOrderSettings - newLiaOnDisplayToOrderSettings(): Content_v2.Schema.LiaOnDisplayToOrderSettings; + newLiaOnDisplayToOrderSettings(): Content.Schema.LiaOnDisplayToOrderSettings; // Create a new instance of LiaPosDataProvider - newLiaPosDataProvider(): Content_v2.Schema.LiaPosDataProvider; + newLiaPosDataProvider(): Content.Schema.LiaPosDataProvider; // Create a new instance of LiaSettings - newLiaSettings(): Content_v2.Schema.LiaSettings; + newLiaSettings(): Content.Schema.LiaSettings; // Create a new instance of LiasettingsCustomBatchRequest - newLiasettingsCustomBatchRequest(): Content_v2.Schema.LiasettingsCustomBatchRequest; + newLiasettingsCustomBatchRequest(): Content.Schema.LiasettingsCustomBatchRequest; // Create a new instance of LiasettingsCustomBatchRequestEntry - newLiasettingsCustomBatchRequestEntry(): Content_v2.Schema.LiasettingsCustomBatchRequestEntry; + newLiasettingsCustomBatchRequestEntry(): Content.Schema.LiasettingsCustomBatchRequestEntry; // Create a new instance of LocationIdSet - newLocationIdSet(): Content_v2.Schema.LocationIdSet; + newLocationIdSet(): Content.Schema.LocationIdSet; // Create a new instance of LoyaltyPoints - newLoyaltyPoints(): Content_v2.Schema.LoyaltyPoints; + newLoyaltyPoints(): Content.Schema.LoyaltyPoints; // Create a new instance of OrderLegacyPromotion - newOrderLegacyPromotion(): Content_v2.Schema.OrderLegacyPromotion; + newOrderLegacyPromotion(): Content.Schema.OrderLegacyPromotion; // Create a new instance of OrderLegacyPromotionBenefit - newOrderLegacyPromotionBenefit(): Content_v2.Schema.OrderLegacyPromotionBenefit; + newOrderLegacyPromotionBenefit(): Content.Schema.OrderLegacyPromotionBenefit; // Create a new instance of OrderLineItemProductVariantAttribute - newOrderLineItemProductVariantAttribute(): Content_v2.Schema.OrderLineItemProductVariantAttribute; + newOrderLineItemProductVariantAttribute(): Content.Schema.OrderLineItemProductVariantAttribute; // Create a new instance of OrderLineItemReturnInfo - newOrderLineItemReturnInfo(): Content_v2.Schema.OrderLineItemReturnInfo; + newOrderLineItemReturnInfo(): Content.Schema.OrderLineItemReturnInfo; // Create a new instance of OrderLineItemShippingDetails - newOrderLineItemShippingDetails(): Content_v2.Schema.OrderLineItemShippingDetails; + newOrderLineItemShippingDetails(): Content.Schema.OrderLineItemShippingDetails; // Create a new instance of OrderLineItemShippingDetailsMethod - newOrderLineItemShippingDetailsMethod(): Content_v2.Schema.OrderLineItemShippingDetailsMethod; + newOrderLineItemShippingDetailsMethod(): Content.Schema.OrderLineItemShippingDetailsMethod; // Create a new instance of OrderMerchantProvidedAnnotation - newOrderMerchantProvidedAnnotation(): Content_v2.Schema.OrderMerchantProvidedAnnotation; + newOrderMerchantProvidedAnnotation(): Content.Schema.OrderMerchantProvidedAnnotation; // Create a new instance of OrderShipmentLineItemShipment - newOrderShipmentLineItemShipment(): Content_v2.Schema.OrderShipmentLineItemShipment; + newOrderShipmentLineItemShipment(): Content.Schema.OrderShipmentLineItemShipment; // Create a new instance of OrderinvoicesCreateChargeInvoiceRequest - newOrderinvoicesCreateChargeInvoiceRequest(): Content_v2.Schema.OrderinvoicesCreateChargeInvoiceRequest; + newOrderinvoicesCreateChargeInvoiceRequest(): Content.Schema.OrderinvoicesCreateChargeInvoiceRequest; // Create a new instance of OrderinvoicesCreateRefundInvoiceRequest - newOrderinvoicesCreateRefundInvoiceRequest(): Content_v2.Schema.OrderinvoicesCreateRefundInvoiceRequest; + newOrderinvoicesCreateRefundInvoiceRequest(): Content.Schema.OrderinvoicesCreateRefundInvoiceRequest; // Create a new instance of OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption - newOrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption(): Content_v2.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption; + newOrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption(): Content.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption; // Create a new instance of OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption - newOrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption(): Content_v2.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption; + newOrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption(): Content.Schema.OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption; // Create a new instance of OrderpaymentsNotifyAuthApprovedRequest - newOrderpaymentsNotifyAuthApprovedRequest(): Content_v2.Schema.OrderpaymentsNotifyAuthApprovedRequest; + newOrderpaymentsNotifyAuthApprovedRequest(): Content.Schema.OrderpaymentsNotifyAuthApprovedRequest; // Create a new instance of OrderpaymentsNotifyAuthDeclinedRequest - newOrderpaymentsNotifyAuthDeclinedRequest(): Content_v2.Schema.OrderpaymentsNotifyAuthDeclinedRequest; + newOrderpaymentsNotifyAuthDeclinedRequest(): Content.Schema.OrderpaymentsNotifyAuthDeclinedRequest; // Create a new instance of OrderpaymentsNotifyChargeRequest - newOrderpaymentsNotifyChargeRequest(): Content_v2.Schema.OrderpaymentsNotifyChargeRequest; + newOrderpaymentsNotifyChargeRequest(): Content.Schema.OrderpaymentsNotifyChargeRequest; // Create a new instance of OrderpaymentsNotifyRefundRequest - newOrderpaymentsNotifyRefundRequest(): Content_v2.Schema.OrderpaymentsNotifyRefundRequest; + newOrderpaymentsNotifyRefundRequest(): Content.Schema.OrderpaymentsNotifyRefundRequest; // Create a new instance of OrdersAcknowledgeRequest - newOrdersAcknowledgeRequest(): Content_v2.Schema.OrdersAcknowledgeRequest; + newOrdersAcknowledgeRequest(): Content.Schema.OrdersAcknowledgeRequest; // Create a new instance of OrdersCancelLineItemRequest - newOrdersCancelLineItemRequest(): Content_v2.Schema.OrdersCancelLineItemRequest; + newOrdersCancelLineItemRequest(): Content.Schema.OrdersCancelLineItemRequest; // Create a new instance of OrdersCancelRequest - newOrdersCancelRequest(): Content_v2.Schema.OrdersCancelRequest; + newOrdersCancelRequest(): Content.Schema.OrdersCancelRequest; // Create a new instance of OrdersCancelTestOrderByCustomerRequest - newOrdersCancelTestOrderByCustomerRequest(): Content_v2.Schema.OrdersCancelTestOrderByCustomerRequest; + newOrdersCancelTestOrderByCustomerRequest(): Content.Schema.OrdersCancelTestOrderByCustomerRequest; // Create a new instance of OrdersCreateTestOrderRequest - newOrdersCreateTestOrderRequest(): Content_v2.Schema.OrdersCreateTestOrderRequest; + newOrdersCreateTestOrderRequest(): Content.Schema.OrdersCreateTestOrderRequest; // Create a new instance of OrdersCreateTestReturnRequest - newOrdersCreateTestReturnRequest(): Content_v2.Schema.OrdersCreateTestReturnRequest; + newOrdersCreateTestReturnRequest(): Content.Schema.OrdersCreateTestReturnRequest; // Create a new instance of OrdersCustomBatchRequest - newOrdersCustomBatchRequest(): Content_v2.Schema.OrdersCustomBatchRequest; + newOrdersCustomBatchRequest(): Content.Schema.OrdersCustomBatchRequest; // Create a new instance of OrdersCustomBatchRequestEntry - newOrdersCustomBatchRequestEntry(): Content_v2.Schema.OrdersCustomBatchRequestEntry; + newOrdersCustomBatchRequestEntry(): Content.Schema.OrdersCustomBatchRequestEntry; // Create a new instance of OrdersCustomBatchRequestEntryCancel - newOrdersCustomBatchRequestEntryCancel(): Content_v2.Schema.OrdersCustomBatchRequestEntryCancel; + newOrdersCustomBatchRequestEntryCancel(): Content.Schema.OrdersCustomBatchRequestEntryCancel; // Create a new instance of OrdersCustomBatchRequestEntryCancelLineItem - newOrdersCustomBatchRequestEntryCancelLineItem(): Content_v2.Schema.OrdersCustomBatchRequestEntryCancelLineItem; + newOrdersCustomBatchRequestEntryCancelLineItem(): Content.Schema.OrdersCustomBatchRequestEntryCancelLineItem; // Create a new instance of OrdersCustomBatchRequestEntryCreateTestReturnReturnItem - newOrdersCustomBatchRequestEntryCreateTestReturnReturnItem(): Content_v2.Schema.OrdersCustomBatchRequestEntryCreateTestReturnReturnItem; + newOrdersCustomBatchRequestEntryCreateTestReturnReturnItem(): Content.Schema.OrdersCustomBatchRequestEntryCreateTestReturnReturnItem; // Create a new instance of OrdersCustomBatchRequestEntryInStoreRefundLineItem - newOrdersCustomBatchRequestEntryInStoreRefundLineItem(): Content_v2.Schema.OrdersCustomBatchRequestEntryInStoreRefundLineItem; + newOrdersCustomBatchRequestEntryInStoreRefundLineItem(): Content.Schema.OrdersCustomBatchRequestEntryInStoreRefundLineItem; // Create a new instance of OrdersCustomBatchRequestEntryRefund - newOrdersCustomBatchRequestEntryRefund(): Content_v2.Schema.OrdersCustomBatchRequestEntryRefund; + newOrdersCustomBatchRequestEntryRefund(): Content.Schema.OrdersCustomBatchRequestEntryRefund; // Create a new instance of OrdersCustomBatchRequestEntryRejectReturnLineItem - newOrdersCustomBatchRequestEntryRejectReturnLineItem(): Content_v2.Schema.OrdersCustomBatchRequestEntryRejectReturnLineItem; + newOrdersCustomBatchRequestEntryRejectReturnLineItem(): Content.Schema.OrdersCustomBatchRequestEntryRejectReturnLineItem; // Create a new instance of OrdersCustomBatchRequestEntryReturnLineItem - newOrdersCustomBatchRequestEntryReturnLineItem(): Content_v2.Schema.OrdersCustomBatchRequestEntryReturnLineItem; + newOrdersCustomBatchRequestEntryReturnLineItem(): Content.Schema.OrdersCustomBatchRequestEntryReturnLineItem; // Create a new instance of OrdersCustomBatchRequestEntryReturnRefundLineItem - newOrdersCustomBatchRequestEntryReturnRefundLineItem(): Content_v2.Schema.OrdersCustomBatchRequestEntryReturnRefundLineItem; + newOrdersCustomBatchRequestEntryReturnRefundLineItem(): Content.Schema.OrdersCustomBatchRequestEntryReturnRefundLineItem; // Create a new instance of OrdersCustomBatchRequestEntrySetLineItemMetadata - newOrdersCustomBatchRequestEntrySetLineItemMetadata(): Content_v2.Schema.OrdersCustomBatchRequestEntrySetLineItemMetadata; + newOrdersCustomBatchRequestEntrySetLineItemMetadata(): Content.Schema.OrdersCustomBatchRequestEntrySetLineItemMetadata; // Create a new instance of OrdersCustomBatchRequestEntryShipLineItems - newOrdersCustomBatchRequestEntryShipLineItems(): Content_v2.Schema.OrdersCustomBatchRequestEntryShipLineItems; + newOrdersCustomBatchRequestEntryShipLineItems(): Content.Schema.OrdersCustomBatchRequestEntryShipLineItems; // Create a new instance of OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo - newOrdersCustomBatchRequestEntryShipLineItemsShipmentInfo(): Content_v2.Schema.OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo; + newOrdersCustomBatchRequestEntryShipLineItemsShipmentInfo(): Content.Schema.OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo; // Create a new instance of OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails - newOrdersCustomBatchRequestEntryUpdateLineItemShippingDetails(): Content_v2.Schema.OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails; + newOrdersCustomBatchRequestEntryUpdateLineItemShippingDetails(): Content.Schema.OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails; // Create a new instance of OrdersCustomBatchRequestEntryUpdateShipment - newOrdersCustomBatchRequestEntryUpdateShipment(): Content_v2.Schema.OrdersCustomBatchRequestEntryUpdateShipment; + newOrdersCustomBatchRequestEntryUpdateShipment(): Content.Schema.OrdersCustomBatchRequestEntryUpdateShipment; // Create a new instance of OrdersInStoreRefundLineItemRequest - newOrdersInStoreRefundLineItemRequest(): Content_v2.Schema.OrdersInStoreRefundLineItemRequest; + newOrdersInStoreRefundLineItemRequest(): Content.Schema.OrdersInStoreRefundLineItemRequest; // Create a new instance of OrdersRefundRequest - newOrdersRefundRequest(): Content_v2.Schema.OrdersRefundRequest; + newOrdersRefundRequest(): Content.Schema.OrdersRefundRequest; // Create a new instance of OrdersRejectReturnLineItemRequest - newOrdersRejectReturnLineItemRequest(): Content_v2.Schema.OrdersRejectReturnLineItemRequest; + newOrdersRejectReturnLineItemRequest(): Content.Schema.OrdersRejectReturnLineItemRequest; // Create a new instance of OrdersReturnLineItemRequest - newOrdersReturnLineItemRequest(): Content_v2.Schema.OrdersReturnLineItemRequest; + newOrdersReturnLineItemRequest(): Content.Schema.OrdersReturnLineItemRequest; // Create a new instance of OrdersReturnRefundLineItemRequest - newOrdersReturnRefundLineItemRequest(): Content_v2.Schema.OrdersReturnRefundLineItemRequest; + newOrdersReturnRefundLineItemRequest(): Content.Schema.OrdersReturnRefundLineItemRequest; // Create a new instance of OrdersSetLineItemMetadataRequest - newOrdersSetLineItemMetadataRequest(): Content_v2.Schema.OrdersSetLineItemMetadataRequest; + newOrdersSetLineItemMetadataRequest(): Content.Schema.OrdersSetLineItemMetadataRequest; // Create a new instance of OrdersShipLineItemsRequest - newOrdersShipLineItemsRequest(): Content_v2.Schema.OrdersShipLineItemsRequest; + newOrdersShipLineItemsRequest(): Content.Schema.OrdersShipLineItemsRequest; // Create a new instance of OrdersUpdateLineItemShippingDetailsRequest - newOrdersUpdateLineItemShippingDetailsRequest(): Content_v2.Schema.OrdersUpdateLineItemShippingDetailsRequest; + newOrdersUpdateLineItemShippingDetailsRequest(): Content.Schema.OrdersUpdateLineItemShippingDetailsRequest; // Create a new instance of OrdersUpdateMerchantOrderIdRequest - newOrdersUpdateMerchantOrderIdRequest(): Content_v2.Schema.OrdersUpdateMerchantOrderIdRequest; + newOrdersUpdateMerchantOrderIdRequest(): Content.Schema.OrdersUpdateMerchantOrderIdRequest; // Create a new instance of OrdersUpdateShipmentRequest - newOrdersUpdateShipmentRequest(): Content_v2.Schema.OrdersUpdateShipmentRequest; + newOrdersUpdateShipmentRequest(): Content.Schema.OrdersUpdateShipmentRequest; // Create a new instance of PosCustomBatchRequest - newPosCustomBatchRequest(): Content_v2.Schema.PosCustomBatchRequest; + newPosCustomBatchRequest(): Content.Schema.PosCustomBatchRequest; // Create a new instance of PosCustomBatchRequestEntry - newPosCustomBatchRequestEntry(): Content_v2.Schema.PosCustomBatchRequestEntry; + newPosCustomBatchRequestEntry(): Content.Schema.PosCustomBatchRequestEntry; // Create a new instance of PosInventory - newPosInventory(): Content_v2.Schema.PosInventory; + newPosInventory(): Content.Schema.PosInventory; // Create a new instance of PosInventoryRequest - newPosInventoryRequest(): Content_v2.Schema.PosInventoryRequest; + newPosInventoryRequest(): Content.Schema.PosInventoryRequest; // Create a new instance of PosSale - newPosSale(): Content_v2.Schema.PosSale; + newPosSale(): Content.Schema.PosSale; // Create a new instance of PosSaleRequest - newPosSaleRequest(): Content_v2.Schema.PosSaleRequest; + newPosSaleRequest(): Content.Schema.PosSaleRequest; // Create a new instance of PosStore - newPosStore(): Content_v2.Schema.PosStore; + newPosStore(): Content.Schema.PosStore; // Create a new instance of PostalCodeGroup - newPostalCodeGroup(): Content_v2.Schema.PostalCodeGroup; + newPostalCodeGroup(): Content.Schema.PostalCodeGroup; // Create a new instance of PostalCodeRange - newPostalCodeRange(): Content_v2.Schema.PostalCodeRange; + newPostalCodeRange(): Content.Schema.PostalCodeRange; // Create a new instance of Price - newPrice(): Content_v2.Schema.Price; + newPrice(): Content.Schema.Price; // Create a new instance of Product - newProduct(): Content_v2.Schema.Product; + newProduct(): Content.Schema.Product; // Create a new instance of ProductAspect - newProductAspect(): Content_v2.Schema.ProductAspect; + newProductAspect(): Content.Schema.ProductAspect; // Create a new instance of ProductDestination - newProductDestination(): Content_v2.Schema.ProductDestination; + newProductDestination(): Content.Schema.ProductDestination; // Create a new instance of ProductShipping - newProductShipping(): Content_v2.Schema.ProductShipping; + newProductShipping(): Content.Schema.ProductShipping; // Create a new instance of ProductShippingDimension - newProductShippingDimension(): Content_v2.Schema.ProductShippingDimension; + newProductShippingDimension(): Content.Schema.ProductShippingDimension; // Create a new instance of ProductShippingWeight - newProductShippingWeight(): Content_v2.Schema.ProductShippingWeight; + newProductShippingWeight(): Content.Schema.ProductShippingWeight; // Create a new instance of ProductTax - newProductTax(): Content_v2.Schema.ProductTax; + newProductTax(): Content.Schema.ProductTax; // Create a new instance of ProductUnitPricingBaseMeasure - newProductUnitPricingBaseMeasure(): Content_v2.Schema.ProductUnitPricingBaseMeasure; + newProductUnitPricingBaseMeasure(): Content.Schema.ProductUnitPricingBaseMeasure; // Create a new instance of ProductUnitPricingMeasure - newProductUnitPricingMeasure(): Content_v2.Schema.ProductUnitPricingMeasure; + newProductUnitPricingMeasure(): Content.Schema.ProductUnitPricingMeasure; // Create a new instance of ProductsCustomBatchRequest - newProductsCustomBatchRequest(): Content_v2.Schema.ProductsCustomBatchRequest; + newProductsCustomBatchRequest(): Content.Schema.ProductsCustomBatchRequest; // Create a new instance of ProductsCustomBatchRequestEntry - newProductsCustomBatchRequestEntry(): Content_v2.Schema.ProductsCustomBatchRequestEntry; + newProductsCustomBatchRequestEntry(): Content.Schema.ProductsCustomBatchRequestEntry; // Create a new instance of ProductstatusesCustomBatchRequest - newProductstatusesCustomBatchRequest(): Content_v2.Schema.ProductstatusesCustomBatchRequest; + newProductstatusesCustomBatchRequest(): Content.Schema.ProductstatusesCustomBatchRequest; // Create a new instance of ProductstatusesCustomBatchRequestEntry - newProductstatusesCustomBatchRequestEntry(): Content_v2.Schema.ProductstatusesCustomBatchRequestEntry; + newProductstatusesCustomBatchRequestEntry(): Content.Schema.ProductstatusesCustomBatchRequestEntry; // Create a new instance of Promotion - newPromotion(): Content_v2.Schema.Promotion; + newPromotion(): Content.Schema.Promotion; // Create a new instance of RateGroup - newRateGroup(): Content_v2.Schema.RateGroup; + newRateGroup(): Content.Schema.RateGroup; // Create a new instance of Row - newRow(): Content_v2.Schema.Row; + newRow(): Content.Schema.Row; // Create a new instance of Service - newService(): Content_v2.Schema.Service; + newService(): Content.Schema.Service; // Create a new instance of ShipmentInvoice - newShipmentInvoice(): Content_v2.Schema.ShipmentInvoice; + newShipmentInvoice(): Content.Schema.ShipmentInvoice; // Create a new instance of ShipmentInvoiceLineItemInvoice - newShipmentInvoiceLineItemInvoice(): Content_v2.Schema.ShipmentInvoiceLineItemInvoice; + newShipmentInvoiceLineItemInvoice(): Content.Schema.ShipmentInvoiceLineItemInvoice; // Create a new instance of ShippingSettings - newShippingSettings(): Content_v2.Schema.ShippingSettings; + newShippingSettings(): Content.Schema.ShippingSettings; // Create a new instance of ShippingsettingsCustomBatchRequest - newShippingsettingsCustomBatchRequest(): Content_v2.Schema.ShippingsettingsCustomBatchRequest; + newShippingsettingsCustomBatchRequest(): Content.Schema.ShippingsettingsCustomBatchRequest; // Create a new instance of ShippingsettingsCustomBatchRequestEntry - newShippingsettingsCustomBatchRequestEntry(): Content_v2.Schema.ShippingsettingsCustomBatchRequestEntry; + newShippingsettingsCustomBatchRequestEntry(): Content.Schema.ShippingsettingsCustomBatchRequestEntry; // Create a new instance of Table - newTable(): Content_v2.Schema.Table; + newTable(): Content.Schema.Table; // Create a new instance of TestOrder - newTestOrder(): Content_v2.Schema.TestOrder; + newTestOrder(): Content.Schema.TestOrder; // Create a new instance of TestOrderCustomer - newTestOrderCustomer(): Content_v2.Schema.TestOrderCustomer; + newTestOrderCustomer(): Content.Schema.TestOrderCustomer; // Create a new instance of TestOrderCustomerMarketingRightsInfo - newTestOrderCustomerMarketingRightsInfo(): Content_v2.Schema.TestOrderCustomerMarketingRightsInfo; + newTestOrderCustomerMarketingRightsInfo(): Content.Schema.TestOrderCustomerMarketingRightsInfo; // Create a new instance of TestOrderLineItem - newTestOrderLineItem(): Content_v2.Schema.TestOrderLineItem; + newTestOrderLineItem(): Content.Schema.TestOrderLineItem; // Create a new instance of TestOrderLineItemProduct - newTestOrderLineItemProduct(): Content_v2.Schema.TestOrderLineItemProduct; + newTestOrderLineItemProduct(): Content.Schema.TestOrderLineItemProduct; // Create a new instance of TestOrderPaymentMethod - newTestOrderPaymentMethod(): Content_v2.Schema.TestOrderPaymentMethod; + newTestOrderPaymentMethod(): Content.Schema.TestOrderPaymentMethod; // Create a new instance of TransitTable - newTransitTable(): Content_v2.Schema.TransitTable; + newTransitTable(): Content.Schema.TransitTable; // Create a new instance of TransitTableTransitTimeRow - newTransitTableTransitTimeRow(): Content_v2.Schema.TransitTableTransitTimeRow; + newTransitTableTransitTimeRow(): Content.Schema.TransitTableTransitTimeRow; // Create a new instance of TransitTableTransitTimeRowTransitTimeValue - newTransitTableTransitTimeRowTransitTimeValue(): Content_v2.Schema.TransitTableTransitTimeRowTransitTimeValue; + newTransitTableTransitTimeRowTransitTimeValue(): Content.Schema.TransitTableTransitTimeRowTransitTimeValue; // Create a new instance of UnitInvoice - newUnitInvoice(): Content_v2.Schema.UnitInvoice; + newUnitInvoice(): Content.Schema.UnitInvoice; // Create a new instance of UnitInvoiceAdditionalCharge - newUnitInvoiceAdditionalCharge(): Content_v2.Schema.UnitInvoiceAdditionalCharge; + newUnitInvoiceAdditionalCharge(): Content.Schema.UnitInvoiceAdditionalCharge; // Create a new instance of UnitInvoiceTaxLine - newUnitInvoiceTaxLine(): Content_v2.Schema.UnitInvoiceTaxLine; + newUnitInvoiceTaxLine(): Content.Schema.UnitInvoiceTaxLine; // Create a new instance of Value - newValue(): Content_v2.Schema.Value; + newValue(): Content.Schema.Value; // Create a new instance of Weight - newWeight(): Content_v2.Schema.Weight; + newWeight(): Content.Schema.Weight; } } -declare var Content_v2: GoogleAppsScript.Content_v2; \ No newline at end of file +declare var Content: GoogleAppsScript.Content; diff --git a/types/google-apps-script/apis/dfareporting_v3_3.d.ts b/types/google-apps-script/apis/dfareporting_v3_3.d.ts index b1f464973f..9461c1483f 100644 --- a/types/google-apps-script/apis/dfareporting_v3_3.d.ts +++ b/types/google-apps-script/apis/dfareporting_v3_3.d.ts @@ -5,633 +5,633 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Dfareporting_v3_3 { + namespace Dfareporting { namespace Collection { namespace Reports { export interface CompatibleFieldsCollection { // Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions. - query(resource: Schema.Report, profileId: string): Dfareporting_v3_3.Schema.CompatibleFields; + query(resource: Schema.Report, profileId: string): Dfareporting.Schema.CompatibleFields; } export interface FilesCollection { // Retrieves a report file. This method supports media download. - get(profileId: string, reportId: string, fileId: string): Dfareporting_v3_3.Schema.File; + get(profileId: string, reportId: string, fileId: string): Dfareporting.Schema.File; // Lists files for a report. - list(profileId: string, reportId: string): Dfareporting_v3_3.Schema.FileList; + list(profileId: string, reportId: string): Dfareporting.Schema.FileList; // Lists files for a report. - list(profileId: string, reportId: string, optionalArgs: object): Dfareporting_v3_3.Schema.FileList; + list(profileId: string, reportId: string, optionalArgs: object): Dfareporting.Schema.FileList; } } export interface AccountActiveAdSummariesCollection { // Gets the account's active ad summary by account ID. - get(profileId: string, summaryAccountId: string): Dfareporting_v3_3.Schema.AccountActiveAdSummary; + get(profileId: string, summaryAccountId: string): Dfareporting.Schema.AccountActiveAdSummary; } export interface AccountPermissionGroupsCollection { // Gets one account permission group by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.AccountPermissionGroup; + get(profileId: string, id: string): Dfareporting.Schema.AccountPermissionGroup; // Retrieves the list of account permission groups. - list(profileId: string): Dfareporting_v3_3.Schema.AccountPermissionGroupsListResponse; + list(profileId: string): Dfareporting.Schema.AccountPermissionGroupsListResponse; } export interface AccountPermissionsCollection { // Gets one account permission by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.AccountPermission; + get(profileId: string, id: string): Dfareporting.Schema.AccountPermission; // Retrieves the list of account permissions. - list(profileId: string): Dfareporting_v3_3.Schema.AccountPermissionsListResponse; + list(profileId: string): Dfareporting.Schema.AccountPermissionsListResponse; } export interface AccountUserProfilesCollection { // Gets one account user profile by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.AccountUserProfile; + get(profileId: string, id: string): Dfareporting.Schema.AccountUserProfile; // Inserts a new account user profile. - insert(resource: Schema.AccountUserProfile, profileId: string): Dfareporting_v3_3.Schema.AccountUserProfile; + insert(resource: Schema.AccountUserProfile, profileId: string): Dfareporting.Schema.AccountUserProfile; // Retrieves a list of account user profiles, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.AccountUserProfilesListResponse; + list(profileId: string): Dfareporting.Schema.AccountUserProfilesListResponse; // Retrieves a list of account user profiles, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.AccountUserProfilesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AccountUserProfilesListResponse; // Updates an existing account user profile. This method supports patch semantics. - patch(resource: Schema.AccountUserProfile, profileId: string, id: string): Dfareporting_v3_3.Schema.AccountUserProfile; + patch(resource: Schema.AccountUserProfile, profileId: string, id: string): Dfareporting.Schema.AccountUserProfile; // Updates an existing account user profile. - update(resource: Schema.AccountUserProfile, profileId: string): Dfareporting_v3_3.Schema.AccountUserProfile; + update(resource: Schema.AccountUserProfile, profileId: string): Dfareporting.Schema.AccountUserProfile; } export interface AccountsCollection { // Gets one account by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Account; + get(profileId: string, id: string): Dfareporting.Schema.Account; // Retrieves the list of accounts, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.AccountsListResponse; + list(profileId: string): Dfareporting.Schema.AccountsListResponse; // Retrieves the list of accounts, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.AccountsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AccountsListResponse; // Updates an existing account. This method supports patch semantics. - patch(resource: Schema.Account, profileId: string, id: string): Dfareporting_v3_3.Schema.Account; + patch(resource: Schema.Account, profileId: string, id: string): Dfareporting.Schema.Account; // Updates an existing account. - update(resource: Schema.Account, profileId: string): Dfareporting_v3_3.Schema.Account; + update(resource: Schema.Account, profileId: string): Dfareporting.Schema.Account; } export interface AdsCollection { // Gets one ad by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Ad; + get(profileId: string, id: string): Dfareporting.Schema.Ad; // Inserts a new ad. - insert(resource: Schema.Ad, profileId: string): Dfareporting_v3_3.Schema.Ad; + insert(resource: Schema.Ad, profileId: string): Dfareporting.Schema.Ad; // Retrieves a list of ads, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.AdsListResponse; + list(profileId: string): Dfareporting.Schema.AdsListResponse; // Retrieves a list of ads, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.AdsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AdsListResponse; // Updates an existing ad. This method supports patch semantics. - patch(resource: Schema.Ad, profileId: string, id: string): Dfareporting_v3_3.Schema.Ad; + patch(resource: Schema.Ad, profileId: string, id: string): Dfareporting.Schema.Ad; // Updates an existing ad. - update(resource: Schema.Ad, profileId: string): Dfareporting_v3_3.Schema.Ad; + update(resource: Schema.Ad, profileId: string): Dfareporting.Schema.Ad; } export interface AdvertiserGroupsCollection { // Gets one advertiser group by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.AdvertiserGroup; + get(profileId: string, id: string): Dfareporting.Schema.AdvertiserGroup; // Inserts a new advertiser group. - insert(resource: Schema.AdvertiserGroup, profileId: string): Dfareporting_v3_3.Schema.AdvertiserGroup; + insert(resource: Schema.AdvertiserGroup, profileId: string): Dfareporting.Schema.AdvertiserGroup; // Retrieves a list of advertiser groups, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.AdvertiserGroupsListResponse; + list(profileId: string): Dfareporting.Schema.AdvertiserGroupsListResponse; // Retrieves a list of advertiser groups, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.AdvertiserGroupsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AdvertiserGroupsListResponse; // Updates an existing advertiser group. This method supports patch semantics. - patch(resource: Schema.AdvertiserGroup, profileId: string, id: string): Dfareporting_v3_3.Schema.AdvertiserGroup; + patch(resource: Schema.AdvertiserGroup, profileId: string, id: string): Dfareporting.Schema.AdvertiserGroup; // Deletes an existing advertiser group. remove(profileId: string, id: string): void; // Updates an existing advertiser group. - update(resource: Schema.AdvertiserGroup, profileId: string): Dfareporting_v3_3.Schema.AdvertiserGroup; + update(resource: Schema.AdvertiserGroup, profileId: string): Dfareporting.Schema.AdvertiserGroup; } export interface AdvertiserLandingPagesCollection { // Gets one landing page by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.LandingPage; + get(profileId: string, id: string): Dfareporting.Schema.LandingPage; // Inserts a new landing page. - insert(resource: Schema.LandingPage, profileId: string): Dfareporting_v3_3.Schema.LandingPage; + insert(resource: Schema.LandingPage, profileId: string): Dfareporting.Schema.LandingPage; // Retrieves a list of landing pages. - list(profileId: string): Dfareporting_v3_3.Schema.AdvertiserLandingPagesListResponse; + list(profileId: string): Dfareporting.Schema.AdvertiserLandingPagesListResponse; // Retrieves a list of landing pages. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.AdvertiserLandingPagesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AdvertiserLandingPagesListResponse; // Updates an existing landing page. This method supports patch semantics. - patch(resource: Schema.LandingPage, profileId: string, id: string): Dfareporting_v3_3.Schema.LandingPage; + patch(resource: Schema.LandingPage, profileId: string, id: string): Dfareporting.Schema.LandingPage; // Updates an existing landing page. - update(resource: Schema.LandingPage, profileId: string): Dfareporting_v3_3.Schema.LandingPage; + update(resource: Schema.LandingPage, profileId: string): Dfareporting.Schema.LandingPage; } export interface AdvertisersCollection { // Gets one advertiser by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Advertiser; + get(profileId: string, id: string): Dfareporting.Schema.Advertiser; // Inserts a new advertiser. - insert(resource: Schema.Advertiser, profileId: string): Dfareporting_v3_3.Schema.Advertiser; + insert(resource: Schema.Advertiser, profileId: string): Dfareporting.Schema.Advertiser; // Retrieves a list of advertisers, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.AdvertisersListResponse; + list(profileId: string): Dfareporting.Schema.AdvertisersListResponse; // Retrieves a list of advertisers, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.AdvertisersListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.AdvertisersListResponse; // Updates an existing advertiser. This method supports patch semantics. - patch(resource: Schema.Advertiser, profileId: string, id: string): Dfareporting_v3_3.Schema.Advertiser; + patch(resource: Schema.Advertiser, profileId: string, id: string): Dfareporting.Schema.Advertiser; // Updates an existing advertiser. - update(resource: Schema.Advertiser, profileId: string): Dfareporting_v3_3.Schema.Advertiser; + update(resource: Schema.Advertiser, profileId: string): Dfareporting.Schema.Advertiser; } export interface BrowsersCollection { // Retrieves a list of browsers. - list(profileId: string): Dfareporting_v3_3.Schema.BrowsersListResponse; + list(profileId: string): Dfareporting.Schema.BrowsersListResponse; } export interface CampaignCreativeAssociationsCollection { // Associates a creative with the specified campaign. This method creates a default ad with dimensions matching the creative in the campaign if such a default ad does not exist already. - insert(resource: Schema.CampaignCreativeAssociation, profileId: string, campaignId: string): Dfareporting_v3_3.Schema.CampaignCreativeAssociation; + insert(resource: Schema.CampaignCreativeAssociation, profileId: string, campaignId: string): Dfareporting.Schema.CampaignCreativeAssociation; // Retrieves the list of creative IDs associated with the specified campaign. This method supports paging. - list(profileId: string, campaignId: string): Dfareporting_v3_3.Schema.CampaignCreativeAssociationsListResponse; + list(profileId: string, campaignId: string): Dfareporting.Schema.CampaignCreativeAssociationsListResponse; // Retrieves the list of creative IDs associated with the specified campaign. This method supports paging. - list(profileId: string, campaignId: string, optionalArgs: object): Dfareporting_v3_3.Schema.CampaignCreativeAssociationsListResponse; + list(profileId: string, campaignId: string, optionalArgs: object): Dfareporting.Schema.CampaignCreativeAssociationsListResponse; } export interface CampaignsCollection { // Gets one campaign by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Campaign; + get(profileId: string, id: string): Dfareporting.Schema.Campaign; // Inserts a new campaign. - insert(resource: Schema.Campaign, profileId: string): Dfareporting_v3_3.Schema.Campaign; + insert(resource: Schema.Campaign, profileId: string): Dfareporting.Schema.Campaign; // Retrieves a list of campaigns, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.CampaignsListResponse; + list(profileId: string): Dfareporting.Schema.CampaignsListResponse; // Retrieves a list of campaigns, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.CampaignsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CampaignsListResponse; // Updates an existing campaign. This method supports patch semantics. - patch(resource: Schema.Campaign, profileId: string, id: string): Dfareporting_v3_3.Schema.Campaign; + patch(resource: Schema.Campaign, profileId: string, id: string): Dfareporting.Schema.Campaign; // Updates an existing campaign. - update(resource: Schema.Campaign, profileId: string): Dfareporting_v3_3.Schema.Campaign; + update(resource: Schema.Campaign, profileId: string): Dfareporting.Schema.Campaign; } export interface ChangeLogsCollection { // Gets one change log by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.ChangeLog; + get(profileId: string, id: string): Dfareporting.Schema.ChangeLog; // Retrieves a list of change logs. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.ChangeLogsListResponse; + list(profileId: string): Dfareporting.Schema.ChangeLogsListResponse; // Retrieves a list of change logs. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.ChangeLogsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.ChangeLogsListResponse; } export interface CitiesCollection { // Retrieves a list of cities, possibly filtered. - list(profileId: string): Dfareporting_v3_3.Schema.CitiesListResponse; + list(profileId: string): Dfareporting.Schema.CitiesListResponse; // Retrieves a list of cities, possibly filtered. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.CitiesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CitiesListResponse; } export interface ConnectionTypesCollection { // Gets one connection type by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.ConnectionType; + get(profileId: string, id: string): Dfareporting.Schema.ConnectionType; // Retrieves a list of connection types. - list(profileId: string): Dfareporting_v3_3.Schema.ConnectionTypesListResponse; + list(profileId: string): Dfareporting.Schema.ConnectionTypesListResponse; } export interface ContentCategoriesCollection { // Gets one content category by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.ContentCategory; + get(profileId: string, id: string): Dfareporting.Schema.ContentCategory; // Inserts a new content category. - insert(resource: Schema.ContentCategory, profileId: string): Dfareporting_v3_3.Schema.ContentCategory; + insert(resource: Schema.ContentCategory, profileId: string): Dfareporting.Schema.ContentCategory; // Retrieves a list of content categories, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.ContentCategoriesListResponse; + list(profileId: string): Dfareporting.Schema.ContentCategoriesListResponse; // Retrieves a list of content categories, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.ContentCategoriesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.ContentCategoriesListResponse; // Updates an existing content category. This method supports patch semantics. - patch(resource: Schema.ContentCategory, profileId: string, id: string): Dfareporting_v3_3.Schema.ContentCategory; + patch(resource: Schema.ContentCategory, profileId: string, id: string): Dfareporting.Schema.ContentCategory; // Deletes an existing content category. remove(profileId: string, id: string): void; // Updates an existing content category. - update(resource: Schema.ContentCategory, profileId: string): Dfareporting_v3_3.Schema.ContentCategory; + update(resource: Schema.ContentCategory, profileId: string): Dfareporting.Schema.ContentCategory; } export interface ConversionsCollection { // Inserts conversions. - batchinsert(resource: Schema.ConversionsBatchInsertRequest, profileId: string): Dfareporting_v3_3.Schema.ConversionsBatchInsertResponse; + batchinsert(resource: Schema.ConversionsBatchInsertRequest, profileId: string): Dfareporting.Schema.ConversionsBatchInsertResponse; // Updates existing conversions. - batchupdate(resource: Schema.ConversionsBatchUpdateRequest, profileId: string): Dfareporting_v3_3.Schema.ConversionsBatchUpdateResponse; + batchupdate(resource: Schema.ConversionsBatchUpdateRequest, profileId: string): Dfareporting.Schema.ConversionsBatchUpdateResponse; } export interface CountriesCollection { // Gets one country by ID. - get(profileId: string, dartId: string): Dfareporting_v3_3.Schema.Country; + get(profileId: string, dartId: string): Dfareporting.Schema.Country; // Retrieves a list of countries. - list(profileId: string): Dfareporting_v3_3.Schema.CountriesListResponse; + list(profileId: string): Dfareporting.Schema.CountriesListResponse; } export interface CreativeAssetsCollection { // Inserts a new creative asset. - insert(resource: Schema.CreativeAssetMetadata, profileId: string, advertiserId: string): Dfareporting_v3_3.Schema.CreativeAssetMetadata; + insert(resource: Schema.CreativeAssetMetadata, profileId: string, advertiserId: string): Dfareporting.Schema.CreativeAssetMetadata; // Inserts a new creative asset. - insert(resource: Schema.CreativeAssetMetadata, profileId: string, advertiserId: string, mediaData: any): Dfareporting_v3_3.Schema.CreativeAssetMetadata; + insert(resource: Schema.CreativeAssetMetadata, profileId: string, advertiserId: string, mediaData: any): Dfareporting.Schema.CreativeAssetMetadata; } export interface CreativeFieldValuesCollection { // Gets one creative field value by ID. - get(profileId: string, creativeFieldId: string, id: string): Dfareporting_v3_3.Schema.CreativeFieldValue; + get(profileId: string, creativeFieldId: string, id: string): Dfareporting.Schema.CreativeFieldValue; // Inserts a new creative field value. - insert(resource: Schema.CreativeFieldValue, profileId: string, creativeFieldId: string): Dfareporting_v3_3.Schema.CreativeFieldValue; + insert(resource: Schema.CreativeFieldValue, profileId: string, creativeFieldId: string): Dfareporting.Schema.CreativeFieldValue; // Retrieves a list of creative field values, possibly filtered. This method supports paging. - list(profileId: string, creativeFieldId: string): Dfareporting_v3_3.Schema.CreativeFieldValuesListResponse; + list(profileId: string, creativeFieldId: string): Dfareporting.Schema.CreativeFieldValuesListResponse; // Retrieves a list of creative field values, possibly filtered. This method supports paging. - list(profileId: string, creativeFieldId: string, optionalArgs: object): Dfareporting_v3_3.Schema.CreativeFieldValuesListResponse; + list(profileId: string, creativeFieldId: string, optionalArgs: object): Dfareporting.Schema.CreativeFieldValuesListResponse; // Updates an existing creative field value. This method supports patch semantics. - patch(resource: Schema.CreativeFieldValue, profileId: string, creativeFieldId: string, id: string): Dfareporting_v3_3.Schema.CreativeFieldValue; + patch(resource: Schema.CreativeFieldValue, profileId: string, creativeFieldId: string, id: string): Dfareporting.Schema.CreativeFieldValue; // Deletes an existing creative field value. remove(profileId: string, creativeFieldId: string, id: string): void; // Updates an existing creative field value. - update(resource: Schema.CreativeFieldValue, profileId: string, creativeFieldId: string): Dfareporting_v3_3.Schema.CreativeFieldValue; + update(resource: Schema.CreativeFieldValue, profileId: string, creativeFieldId: string): Dfareporting.Schema.CreativeFieldValue; } export interface CreativeFieldsCollection { // Gets one creative field by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.CreativeField; + get(profileId: string, id: string): Dfareporting.Schema.CreativeField; // Inserts a new creative field. - insert(resource: Schema.CreativeField, profileId: string): Dfareporting_v3_3.Schema.CreativeField; + insert(resource: Schema.CreativeField, profileId: string): Dfareporting.Schema.CreativeField; // Retrieves a list of creative fields, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.CreativeFieldsListResponse; + list(profileId: string): Dfareporting.Schema.CreativeFieldsListResponse; // Retrieves a list of creative fields, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.CreativeFieldsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CreativeFieldsListResponse; // Updates an existing creative field. This method supports patch semantics. - patch(resource: Schema.CreativeField, profileId: string, id: string): Dfareporting_v3_3.Schema.CreativeField; + patch(resource: Schema.CreativeField, profileId: string, id: string): Dfareporting.Schema.CreativeField; // Deletes an existing creative field. remove(profileId: string, id: string): void; // Updates an existing creative field. - update(resource: Schema.CreativeField, profileId: string): Dfareporting_v3_3.Schema.CreativeField; + update(resource: Schema.CreativeField, profileId: string): Dfareporting.Schema.CreativeField; } export interface CreativeGroupsCollection { // Gets one creative group by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.CreativeGroup; + get(profileId: string, id: string): Dfareporting.Schema.CreativeGroup; // Inserts a new creative group. - insert(resource: Schema.CreativeGroup, profileId: string): Dfareporting_v3_3.Schema.CreativeGroup; + insert(resource: Schema.CreativeGroup, profileId: string): Dfareporting.Schema.CreativeGroup; // Retrieves a list of creative groups, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.CreativeGroupsListResponse; + list(profileId: string): Dfareporting.Schema.CreativeGroupsListResponse; // Retrieves a list of creative groups, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.CreativeGroupsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CreativeGroupsListResponse; // Updates an existing creative group. This method supports patch semantics. - patch(resource: Schema.CreativeGroup, profileId: string, id: string): Dfareporting_v3_3.Schema.CreativeGroup; + patch(resource: Schema.CreativeGroup, profileId: string, id: string): Dfareporting.Schema.CreativeGroup; // Updates an existing creative group. - update(resource: Schema.CreativeGroup, profileId: string): Dfareporting_v3_3.Schema.CreativeGroup; + update(resource: Schema.CreativeGroup, profileId: string): Dfareporting.Schema.CreativeGroup; } export interface CreativesCollection { // Gets one creative by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Creative; + get(profileId: string, id: string): Dfareporting.Schema.Creative; // Inserts a new creative. - insert(resource: Schema.Creative, profileId: string): Dfareporting_v3_3.Schema.Creative; + insert(resource: Schema.Creative, profileId: string): Dfareporting.Schema.Creative; // Retrieves a list of creatives, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.CreativesListResponse; + list(profileId: string): Dfareporting.Schema.CreativesListResponse; // Retrieves a list of creatives, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.CreativesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.CreativesListResponse; // Updates an existing creative. This method supports patch semantics. - patch(resource: Schema.Creative, profileId: string, id: string): Dfareporting_v3_3.Schema.Creative; + patch(resource: Schema.Creative, profileId: string, id: string): Dfareporting.Schema.Creative; // Updates an existing creative. - update(resource: Schema.Creative, profileId: string): Dfareporting_v3_3.Schema.Creative; + update(resource: Schema.Creative, profileId: string): Dfareporting.Schema.Creative; } export interface DimensionValuesCollection { // Retrieves list of report dimension values for a list of filters. - query(resource: Schema.DimensionValueRequest, profileId: string): Dfareporting_v3_3.Schema.DimensionValueList; + query(resource: Schema.DimensionValueRequest, profileId: string): Dfareporting.Schema.DimensionValueList; // Retrieves list of report dimension values for a list of filters. - query(resource: Schema.DimensionValueRequest, profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.DimensionValueList; + query(resource: Schema.DimensionValueRequest, profileId: string, optionalArgs: object): Dfareporting.Schema.DimensionValueList; } export interface DirectorySitesCollection { // Gets one directory site by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.DirectorySite; + get(profileId: string, id: string): Dfareporting.Schema.DirectorySite; // Inserts a new directory site. - insert(resource: Schema.DirectorySite, profileId: string): Dfareporting_v3_3.Schema.DirectorySite; + insert(resource: Schema.DirectorySite, profileId: string): Dfareporting.Schema.DirectorySite; // Retrieves a list of directory sites, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.DirectorySitesListResponse; + list(profileId: string): Dfareporting.Schema.DirectorySitesListResponse; // Retrieves a list of directory sites, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.DirectorySitesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.DirectorySitesListResponse; } export interface DynamicTargetingKeysCollection { // Inserts a new dynamic targeting key. Keys must be created at the advertiser level before being assigned to the advertiser's ads, creatives, or placements. There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 keys can be assigned per ad, creative, or placement. - insert(resource: Schema.DynamicTargetingKey, profileId: string): Dfareporting_v3_3.Schema.DynamicTargetingKey; + insert(resource: Schema.DynamicTargetingKey, profileId: string): Dfareporting.Schema.DynamicTargetingKey; // Retrieves a list of dynamic targeting keys. - list(profileId: string): Dfareporting_v3_3.Schema.DynamicTargetingKeysListResponse; + list(profileId: string): Dfareporting.Schema.DynamicTargetingKeysListResponse; // Retrieves a list of dynamic targeting keys. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.DynamicTargetingKeysListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.DynamicTargetingKeysListResponse; // Deletes an existing dynamic targeting key. remove(profileId: string, objectId: string, name: string, objectType: string): void; } export interface EventTagsCollection { // Gets one event tag by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.EventTag; + get(profileId: string, id: string): Dfareporting.Schema.EventTag; // Inserts a new event tag. - insert(resource: Schema.EventTag, profileId: string): Dfareporting_v3_3.Schema.EventTag; + insert(resource: Schema.EventTag, profileId: string): Dfareporting.Schema.EventTag; // Retrieves a list of event tags, possibly filtered. - list(profileId: string): Dfareporting_v3_3.Schema.EventTagsListResponse; + list(profileId: string): Dfareporting.Schema.EventTagsListResponse; // Retrieves a list of event tags, possibly filtered. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.EventTagsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.EventTagsListResponse; // Updates an existing event tag. This method supports patch semantics. - patch(resource: Schema.EventTag, profileId: string, id: string): Dfareporting_v3_3.Schema.EventTag; + patch(resource: Schema.EventTag, profileId: string, id: string): Dfareporting.Schema.EventTag; // Deletes an existing event tag. remove(profileId: string, id: string): void; // Updates an existing event tag. - update(resource: Schema.EventTag, profileId: string): Dfareporting_v3_3.Schema.EventTag; + update(resource: Schema.EventTag, profileId: string): Dfareporting.Schema.EventTag; } export interface FilesCollection { // Retrieves a report file by its report ID and file ID. This method supports media download. - get(reportId: string, fileId: string): Dfareporting_v3_3.Schema.File; + get(reportId: string, fileId: string): Dfareporting.Schema.File; // Lists files for a user profile. - list(profileId: string): Dfareporting_v3_3.Schema.FileList; + list(profileId: string): Dfareporting.Schema.FileList; // Lists files for a user profile. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.FileList; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.FileList; } export interface FloodlightActivitiesCollection { // Generates a tag for a floodlight activity. - generatetag(profileId: string): Dfareporting_v3_3.Schema.FloodlightActivitiesGenerateTagResponse; + generatetag(profileId: string): Dfareporting.Schema.FloodlightActivitiesGenerateTagResponse; // Generates a tag for a floodlight activity. - generatetag(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.FloodlightActivitiesGenerateTagResponse; + generatetag(profileId: string, optionalArgs: object): Dfareporting.Schema.FloodlightActivitiesGenerateTagResponse; // Gets one floodlight activity by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.FloodlightActivity; + get(profileId: string, id: string): Dfareporting.Schema.FloodlightActivity; // Inserts a new floodlight activity. - insert(resource: Schema.FloodlightActivity, profileId: string): Dfareporting_v3_3.Schema.FloodlightActivity; + insert(resource: Schema.FloodlightActivity, profileId: string): Dfareporting.Schema.FloodlightActivity; // Retrieves a list of floodlight activities, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.FloodlightActivitiesListResponse; + list(profileId: string): Dfareporting.Schema.FloodlightActivitiesListResponse; // Retrieves a list of floodlight activities, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.FloodlightActivitiesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.FloodlightActivitiesListResponse; // Updates an existing floodlight activity. This method supports patch semantics. - patch(resource: Schema.FloodlightActivity, profileId: string, id: string): Dfareporting_v3_3.Schema.FloodlightActivity; + patch(resource: Schema.FloodlightActivity, profileId: string, id: string): Dfareporting.Schema.FloodlightActivity; // Deletes an existing floodlight activity. remove(profileId: string, id: string): void; // Updates an existing floodlight activity. - update(resource: Schema.FloodlightActivity, profileId: string): Dfareporting_v3_3.Schema.FloodlightActivity; + update(resource: Schema.FloodlightActivity, profileId: string): Dfareporting.Schema.FloodlightActivity; } export interface FloodlightActivityGroupsCollection { // Gets one floodlight activity group by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.FloodlightActivityGroup; + get(profileId: string, id: string): Dfareporting.Schema.FloodlightActivityGroup; // Inserts a new floodlight activity group. - insert(resource: Schema.FloodlightActivityGroup, profileId: string): Dfareporting_v3_3.Schema.FloodlightActivityGroup; + insert(resource: Schema.FloodlightActivityGroup, profileId: string): Dfareporting.Schema.FloodlightActivityGroup; // Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.FloodlightActivityGroupsListResponse; + list(profileId: string): Dfareporting.Schema.FloodlightActivityGroupsListResponse; // Retrieves a list of floodlight activity groups, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.FloodlightActivityGroupsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.FloodlightActivityGroupsListResponse; // Updates an existing floodlight activity group. This method supports patch semantics. - patch(resource: Schema.FloodlightActivityGroup, profileId: string, id: string): Dfareporting_v3_3.Schema.FloodlightActivityGroup; + patch(resource: Schema.FloodlightActivityGroup, profileId: string, id: string): Dfareporting.Schema.FloodlightActivityGroup; // Updates an existing floodlight activity group. - update(resource: Schema.FloodlightActivityGroup, profileId: string): Dfareporting_v3_3.Schema.FloodlightActivityGroup; + update(resource: Schema.FloodlightActivityGroup, profileId: string): Dfareporting.Schema.FloodlightActivityGroup; } export interface FloodlightConfigurationsCollection { // Gets one floodlight configuration by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.FloodlightConfiguration; + get(profileId: string, id: string): Dfareporting.Schema.FloodlightConfiguration; // Retrieves a list of floodlight configurations, possibly filtered. - list(profileId: string): Dfareporting_v3_3.Schema.FloodlightConfigurationsListResponse; + list(profileId: string): Dfareporting.Schema.FloodlightConfigurationsListResponse; // Retrieves a list of floodlight configurations, possibly filtered. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.FloodlightConfigurationsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.FloodlightConfigurationsListResponse; // Updates an existing floodlight configuration. This method supports patch semantics. - patch(resource: Schema.FloodlightConfiguration, profileId: string, id: string): Dfareporting_v3_3.Schema.FloodlightConfiguration; + patch(resource: Schema.FloodlightConfiguration, profileId: string, id: string): Dfareporting.Schema.FloodlightConfiguration; // Updates an existing floodlight configuration. - update(resource: Schema.FloodlightConfiguration, profileId: string): Dfareporting_v3_3.Schema.FloodlightConfiguration; + update(resource: Schema.FloodlightConfiguration, profileId: string): Dfareporting.Schema.FloodlightConfiguration; } export interface InventoryItemsCollection { // Gets one inventory item by ID. - get(profileId: string, projectId: string, id: string): Dfareporting_v3_3.Schema.InventoryItem; + get(profileId: string, projectId: string, id: string): Dfareporting.Schema.InventoryItem; // Retrieves a list of inventory items, possibly filtered. This method supports paging. - list(profileId: string, projectId: string): Dfareporting_v3_3.Schema.InventoryItemsListResponse; + list(profileId: string, projectId: string): Dfareporting.Schema.InventoryItemsListResponse; // Retrieves a list of inventory items, possibly filtered. This method supports paging. - list(profileId: string, projectId: string, optionalArgs: object): Dfareporting_v3_3.Schema.InventoryItemsListResponse; + list(profileId: string, projectId: string, optionalArgs: object): Dfareporting.Schema.InventoryItemsListResponse; } export interface LanguagesCollection { // Retrieves a list of languages. - list(profileId: string): Dfareporting_v3_3.Schema.LanguagesListResponse; + list(profileId: string): Dfareporting.Schema.LanguagesListResponse; } export interface MetrosCollection { // Retrieves a list of metros. - list(profileId: string): Dfareporting_v3_3.Schema.MetrosListResponse; + list(profileId: string): Dfareporting.Schema.MetrosListResponse; } export interface MobileAppsCollection { // Gets one mobile app by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.MobileApp; + get(profileId: string, id: string): Dfareporting.Schema.MobileApp; // Retrieves list of available mobile apps. - list(profileId: string): Dfareporting_v3_3.Schema.MobileAppsListResponse; + list(profileId: string): Dfareporting.Schema.MobileAppsListResponse; // Retrieves list of available mobile apps. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.MobileAppsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.MobileAppsListResponse; } export interface MobileCarriersCollection { // Gets one mobile carrier by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.MobileCarrier; + get(profileId: string, id: string): Dfareporting.Schema.MobileCarrier; // Retrieves a list of mobile carriers. - list(profileId: string): Dfareporting_v3_3.Schema.MobileCarriersListResponse; + list(profileId: string): Dfareporting.Schema.MobileCarriersListResponse; } export interface OperatingSystemVersionsCollection { // Gets one operating system version by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.OperatingSystemVersion; + get(profileId: string, id: string): Dfareporting.Schema.OperatingSystemVersion; // Retrieves a list of operating system versions. - list(profileId: string): Dfareporting_v3_3.Schema.OperatingSystemVersionsListResponse; + list(profileId: string): Dfareporting.Schema.OperatingSystemVersionsListResponse; } export interface OperatingSystemsCollection { // Gets one operating system by DART ID. - get(profileId: string, dartId: string): Dfareporting_v3_3.Schema.OperatingSystem; + get(profileId: string, dartId: string): Dfareporting.Schema.OperatingSystem; // Retrieves a list of operating systems. - list(profileId: string): Dfareporting_v3_3.Schema.OperatingSystemsListResponse; + list(profileId: string): Dfareporting.Schema.OperatingSystemsListResponse; } export interface OrderDocumentsCollection { // Gets one order document by ID. - get(profileId: string, projectId: string, id: string): Dfareporting_v3_3.Schema.OrderDocument; + get(profileId: string, projectId: string, id: string): Dfareporting.Schema.OrderDocument; // Retrieves a list of order documents, possibly filtered. This method supports paging. - list(profileId: string, projectId: string): Dfareporting_v3_3.Schema.OrderDocumentsListResponse; + list(profileId: string, projectId: string): Dfareporting.Schema.OrderDocumentsListResponse; // Retrieves a list of order documents, possibly filtered. This method supports paging. - list(profileId: string, projectId: string, optionalArgs: object): Dfareporting_v3_3.Schema.OrderDocumentsListResponse; + list(profileId: string, projectId: string, optionalArgs: object): Dfareporting.Schema.OrderDocumentsListResponse; } export interface OrdersCollection { // Gets one order by ID. - get(profileId: string, projectId: string, id: string): Dfareporting_v3_3.Schema.Order; + get(profileId: string, projectId: string, id: string): Dfareporting.Schema.Order; // Retrieves a list of orders, possibly filtered. This method supports paging. - list(profileId: string, projectId: string): Dfareporting_v3_3.Schema.OrdersListResponse; + list(profileId: string, projectId: string): Dfareporting.Schema.OrdersListResponse; // Retrieves a list of orders, possibly filtered. This method supports paging. - list(profileId: string, projectId: string, optionalArgs: object): Dfareporting_v3_3.Schema.OrdersListResponse; + list(profileId: string, projectId: string, optionalArgs: object): Dfareporting.Schema.OrdersListResponse; } export interface PlacementGroupsCollection { // Gets one placement group by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.PlacementGroup; + get(profileId: string, id: string): Dfareporting.Schema.PlacementGroup; // Inserts a new placement group. - insert(resource: Schema.PlacementGroup, profileId: string): Dfareporting_v3_3.Schema.PlacementGroup; + insert(resource: Schema.PlacementGroup, profileId: string): Dfareporting.Schema.PlacementGroup; // Retrieves a list of placement groups, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.PlacementGroupsListResponse; + list(profileId: string): Dfareporting.Schema.PlacementGroupsListResponse; // Retrieves a list of placement groups, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.PlacementGroupsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.PlacementGroupsListResponse; // Updates an existing placement group. This method supports patch semantics. - patch(resource: Schema.PlacementGroup, profileId: string, id: string): Dfareporting_v3_3.Schema.PlacementGroup; + patch(resource: Schema.PlacementGroup, profileId: string, id: string): Dfareporting.Schema.PlacementGroup; // Updates an existing placement group. - update(resource: Schema.PlacementGroup, profileId: string): Dfareporting_v3_3.Schema.PlacementGroup; + update(resource: Schema.PlacementGroup, profileId: string): Dfareporting.Schema.PlacementGroup; } export interface PlacementStrategiesCollection { // Gets one placement strategy by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.PlacementStrategy; + get(profileId: string, id: string): Dfareporting.Schema.PlacementStrategy; // Inserts a new placement strategy. - insert(resource: Schema.PlacementStrategy, profileId: string): Dfareporting_v3_3.Schema.PlacementStrategy; + insert(resource: Schema.PlacementStrategy, profileId: string): Dfareporting.Schema.PlacementStrategy; // Retrieves a list of placement strategies, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.PlacementStrategiesListResponse; + list(profileId: string): Dfareporting.Schema.PlacementStrategiesListResponse; // Retrieves a list of placement strategies, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.PlacementStrategiesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.PlacementStrategiesListResponse; // Updates an existing placement strategy. This method supports patch semantics. - patch(resource: Schema.PlacementStrategy, profileId: string, id: string): Dfareporting_v3_3.Schema.PlacementStrategy; + patch(resource: Schema.PlacementStrategy, profileId: string, id: string): Dfareporting.Schema.PlacementStrategy; // Deletes an existing placement strategy. remove(profileId: string, id: string): void; // Updates an existing placement strategy. - update(resource: Schema.PlacementStrategy, profileId: string): Dfareporting_v3_3.Schema.PlacementStrategy; + update(resource: Schema.PlacementStrategy, profileId: string): Dfareporting.Schema.PlacementStrategy; } export interface PlacementsCollection { // Generates tags for a placement. - generatetags(profileId: string): Dfareporting_v3_3.Schema.PlacementsGenerateTagsResponse; + generatetags(profileId: string): Dfareporting.Schema.PlacementsGenerateTagsResponse; // Generates tags for a placement. - generatetags(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.PlacementsGenerateTagsResponse; + generatetags(profileId: string, optionalArgs: object): Dfareporting.Schema.PlacementsGenerateTagsResponse; // Gets one placement by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Placement; + get(profileId: string, id: string): Dfareporting.Schema.Placement; // Inserts a new placement. - insert(resource: Schema.Placement, profileId: string): Dfareporting_v3_3.Schema.Placement; + insert(resource: Schema.Placement, profileId: string): Dfareporting.Schema.Placement; // Retrieves a list of placements, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.PlacementsListResponse; + list(profileId: string): Dfareporting.Schema.PlacementsListResponse; // Retrieves a list of placements, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.PlacementsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.PlacementsListResponse; // Updates an existing placement. This method supports patch semantics. - patch(resource: Schema.Placement, profileId: string, id: string): Dfareporting_v3_3.Schema.Placement; + patch(resource: Schema.Placement, profileId: string, id: string): Dfareporting.Schema.Placement; // Updates an existing placement. - update(resource: Schema.Placement, profileId: string): Dfareporting_v3_3.Schema.Placement; + update(resource: Schema.Placement, profileId: string): Dfareporting.Schema.Placement; } export interface PlatformTypesCollection { // Gets one platform type by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.PlatformType; + get(profileId: string, id: string): Dfareporting.Schema.PlatformType; // Retrieves a list of platform types. - list(profileId: string): Dfareporting_v3_3.Schema.PlatformTypesListResponse; + list(profileId: string): Dfareporting.Schema.PlatformTypesListResponse; } export interface PostalCodesCollection { // Gets one postal code by ID. - get(profileId: string, code: string): Dfareporting_v3_3.Schema.PostalCode; + get(profileId: string, code: string): Dfareporting.Schema.PostalCode; // Retrieves a list of postal codes. - list(profileId: string): Dfareporting_v3_3.Schema.PostalCodesListResponse; + list(profileId: string): Dfareporting.Schema.PostalCodesListResponse; } export interface ProjectsCollection { // Gets one project by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Project; + get(profileId: string, id: string): Dfareporting.Schema.Project; // Retrieves a list of projects, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.ProjectsListResponse; + list(profileId: string): Dfareporting.Schema.ProjectsListResponse; // Retrieves a list of projects, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.ProjectsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.ProjectsListResponse; } export interface RegionsCollection { // Retrieves a list of regions. - list(profileId: string): Dfareporting_v3_3.Schema.RegionsListResponse; + list(profileId: string): Dfareporting.Schema.RegionsListResponse; } export interface RemarketingListSharesCollection { // Gets one remarketing list share by remarketing list ID. - get(profileId: string, remarketingListId: string): Dfareporting_v3_3.Schema.RemarketingListShare; + get(profileId: string, remarketingListId: string): Dfareporting.Schema.RemarketingListShare; // Updates an existing remarketing list share. This method supports patch semantics. - patch(resource: Schema.RemarketingListShare, profileId: string, remarketingListId: string): Dfareporting_v3_3.Schema.RemarketingListShare; + patch(resource: Schema.RemarketingListShare, profileId: string, remarketingListId: string): Dfareporting.Schema.RemarketingListShare; // Updates an existing remarketing list share. - update(resource: Schema.RemarketingListShare, profileId: string): Dfareporting_v3_3.Schema.RemarketingListShare; + update(resource: Schema.RemarketingListShare, profileId: string): Dfareporting.Schema.RemarketingListShare; } export interface RemarketingListsCollection { // Gets one remarketing list by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.RemarketingList; + get(profileId: string, id: string): Dfareporting.Schema.RemarketingList; // Inserts a new remarketing list. - insert(resource: Schema.RemarketingList, profileId: string): Dfareporting_v3_3.Schema.RemarketingList; + insert(resource: Schema.RemarketingList, profileId: string): Dfareporting.Schema.RemarketingList; // Retrieves a list of remarketing lists, possibly filtered. This method supports paging. - list(profileId: string, advertiserId: string): Dfareporting_v3_3.Schema.RemarketingListsListResponse; + list(profileId: string, advertiserId: string): Dfareporting.Schema.RemarketingListsListResponse; // Retrieves a list of remarketing lists, possibly filtered. This method supports paging. - list(profileId: string, advertiserId: string, optionalArgs: object): Dfareporting_v3_3.Schema.RemarketingListsListResponse; + list(profileId: string, advertiserId: string, optionalArgs: object): Dfareporting.Schema.RemarketingListsListResponse; // Updates an existing remarketing list. This method supports patch semantics. - patch(resource: Schema.RemarketingList, profileId: string, id: string): Dfareporting_v3_3.Schema.RemarketingList; + patch(resource: Schema.RemarketingList, profileId: string, id: string): Dfareporting.Schema.RemarketingList; // Updates an existing remarketing list. - update(resource: Schema.RemarketingList, profileId: string): Dfareporting_v3_3.Schema.RemarketingList; + update(resource: Schema.RemarketingList, profileId: string): Dfareporting.Schema.RemarketingList; } export interface ReportsCollection { - CompatibleFields?: Dfareporting_v3_3.Collection.Reports.CompatibleFieldsCollection; - Files?: Dfareporting_v3_3.Collection.Reports.FilesCollection; + CompatibleFields?: Dfareporting.Collection.Reports.CompatibleFieldsCollection; + Files?: Dfareporting.Collection.Reports.FilesCollection; // Retrieves a report by its ID. - get(profileId: string, reportId: string): Dfareporting_v3_3.Schema.Report; + get(profileId: string, reportId: string): Dfareporting.Schema.Report; // Creates a report. - insert(resource: Schema.Report, profileId: string): Dfareporting_v3_3.Schema.Report; + insert(resource: Schema.Report, profileId: string): Dfareporting.Schema.Report; // Retrieves list of reports. - list(profileId: string): Dfareporting_v3_3.Schema.ReportList; + list(profileId: string): Dfareporting.Schema.ReportList; // Retrieves list of reports. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.ReportList; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.ReportList; // Updates a report. This method supports patch semantics. - patch(resource: Schema.Report, profileId: string, reportId: string): Dfareporting_v3_3.Schema.Report; + patch(resource: Schema.Report, profileId: string, reportId: string): Dfareporting.Schema.Report; // Deletes a report by its ID. remove(profileId: string, reportId: string): void; // Runs a report. - run(profileId: string, reportId: string): Dfareporting_v3_3.Schema.File; + run(profileId: string, reportId: string): Dfareporting.Schema.File; // Runs a report. - run(profileId: string, reportId: string, optionalArgs: object): Dfareporting_v3_3.Schema.File; + run(profileId: string, reportId: string, optionalArgs: object): Dfareporting.Schema.File; // Updates a report. - update(resource: Schema.Report, profileId: string, reportId: string): Dfareporting_v3_3.Schema.Report; + update(resource: Schema.Report, profileId: string, reportId: string): Dfareporting.Schema.Report; } export interface SitesCollection { // Gets one site by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Site; + get(profileId: string, id: string): Dfareporting.Schema.Site; // Inserts a new site. - insert(resource: Schema.Site, profileId: string): Dfareporting_v3_3.Schema.Site; + insert(resource: Schema.Site, profileId: string): Dfareporting.Schema.Site; // Retrieves a list of sites, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.SitesListResponse; + list(profileId: string): Dfareporting.Schema.SitesListResponse; // Retrieves a list of sites, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.SitesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.SitesListResponse; // Updates an existing site. This method supports patch semantics. - patch(resource: Schema.Site, profileId: string, id: string): Dfareporting_v3_3.Schema.Site; + patch(resource: Schema.Site, profileId: string, id: string): Dfareporting.Schema.Site; // Updates an existing site. - update(resource: Schema.Site, profileId: string): Dfareporting_v3_3.Schema.Site; + update(resource: Schema.Site, profileId: string): Dfareporting.Schema.Site; } export interface SizesCollection { // Gets one size by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Size; + get(profileId: string, id: string): Dfareporting.Schema.Size; // Inserts a new size. - insert(resource: Schema.Size, profileId: string): Dfareporting_v3_3.Schema.Size; + insert(resource: Schema.Size, profileId: string): Dfareporting.Schema.Size; // Retrieves a list of sizes, possibly filtered. Retrieved sizes are globally unique and may include values not currently in use by your account. Due to this, the list of sizes returned by this method may differ from the list seen in the Trafficking UI. - list(profileId: string): Dfareporting_v3_3.Schema.SizesListResponse; + list(profileId: string): Dfareporting.Schema.SizesListResponse; // Retrieves a list of sizes, possibly filtered. Retrieved sizes are globally unique and may include values not currently in use by your account. Due to this, the list of sizes returned by this method may differ from the list seen in the Trafficking UI. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.SizesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.SizesListResponse; } export interface SubaccountsCollection { // Gets one subaccount by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.Subaccount; + get(profileId: string, id: string): Dfareporting.Schema.Subaccount; // Inserts a new subaccount. - insert(resource: Schema.Subaccount, profileId: string): Dfareporting_v3_3.Schema.Subaccount; + insert(resource: Schema.Subaccount, profileId: string): Dfareporting.Schema.Subaccount; // Gets a list of subaccounts, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.SubaccountsListResponse; + list(profileId: string): Dfareporting.Schema.SubaccountsListResponse; // Gets a list of subaccounts, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.SubaccountsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.SubaccountsListResponse; // Updates an existing subaccount. This method supports patch semantics. - patch(resource: Schema.Subaccount, profileId: string, id: string): Dfareporting_v3_3.Schema.Subaccount; + patch(resource: Schema.Subaccount, profileId: string, id: string): Dfareporting.Schema.Subaccount; // Updates an existing subaccount. - update(resource: Schema.Subaccount, profileId: string): Dfareporting_v3_3.Schema.Subaccount; + update(resource: Schema.Subaccount, profileId: string): Dfareporting.Schema.Subaccount; } export interface TargetableRemarketingListsCollection { // Gets one remarketing list by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.TargetableRemarketingList; + get(profileId: string, id: string): Dfareporting.Schema.TargetableRemarketingList; // Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging. - list(profileId: string, advertiserId: string): Dfareporting_v3_3.Schema.TargetableRemarketingListsListResponse; + list(profileId: string, advertiserId: string): Dfareporting.Schema.TargetableRemarketingListsListResponse; // Retrieves a list of targetable remarketing lists, possibly filtered. This method supports paging. - list(profileId: string, advertiserId: string, optionalArgs: object): Dfareporting_v3_3.Schema.TargetableRemarketingListsListResponse; + list(profileId: string, advertiserId: string, optionalArgs: object): Dfareporting.Schema.TargetableRemarketingListsListResponse; } export interface TargetingTemplatesCollection { // Gets one targeting template by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.TargetingTemplate; + get(profileId: string, id: string): Dfareporting.Schema.TargetingTemplate; // Inserts a new targeting template. - insert(resource: Schema.TargetingTemplate, profileId: string): Dfareporting_v3_3.Schema.TargetingTemplate; + insert(resource: Schema.TargetingTemplate, profileId: string): Dfareporting.Schema.TargetingTemplate; // Retrieves a list of targeting templates, optionally filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.TargetingTemplatesListResponse; + list(profileId: string): Dfareporting.Schema.TargetingTemplatesListResponse; // Retrieves a list of targeting templates, optionally filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.TargetingTemplatesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.TargetingTemplatesListResponse; // Updates an existing targeting template. This method supports patch semantics. - patch(resource: Schema.TargetingTemplate, profileId: string, id: string): Dfareporting_v3_3.Schema.TargetingTemplate; + patch(resource: Schema.TargetingTemplate, profileId: string, id: string): Dfareporting.Schema.TargetingTemplate; // Updates an existing targeting template. - update(resource: Schema.TargetingTemplate, profileId: string): Dfareporting_v3_3.Schema.TargetingTemplate; + update(resource: Schema.TargetingTemplate, profileId: string): Dfareporting.Schema.TargetingTemplate; } export interface UserProfilesCollection { // Gets one user profile by ID. - get(profileId: string): Dfareporting_v3_3.Schema.UserProfile; + get(profileId: string): Dfareporting.Schema.UserProfile; // Retrieves list of user profiles for a user. - list(): Dfareporting_v3_3.Schema.UserProfileList; + list(): Dfareporting.Schema.UserProfileList; } export interface UserRolePermissionGroupsCollection { // Gets one user role permission group by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.UserRolePermissionGroup; + get(profileId: string, id: string): Dfareporting.Schema.UserRolePermissionGroup; // Gets a list of all supported user role permission groups. - list(profileId: string): Dfareporting_v3_3.Schema.UserRolePermissionGroupsListResponse; + list(profileId: string): Dfareporting.Schema.UserRolePermissionGroupsListResponse; } export interface UserRolePermissionsCollection { // Gets one user role permission by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.UserRolePermission; + get(profileId: string, id: string): Dfareporting.Schema.UserRolePermission; // Gets a list of user role permissions, possibly filtered. - list(profileId: string): Dfareporting_v3_3.Schema.UserRolePermissionsListResponse; + list(profileId: string): Dfareporting.Schema.UserRolePermissionsListResponse; // Gets a list of user role permissions, possibly filtered. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.UserRolePermissionsListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.UserRolePermissionsListResponse; } export interface UserRolesCollection { // Gets one user role by ID. - get(profileId: string, id: string): Dfareporting_v3_3.Schema.UserRole; + get(profileId: string, id: string): Dfareporting.Schema.UserRole; // Inserts a new user role. - insert(resource: Schema.UserRole, profileId: string): Dfareporting_v3_3.Schema.UserRole; + insert(resource: Schema.UserRole, profileId: string): Dfareporting.Schema.UserRole; // Retrieves a list of user roles, possibly filtered. This method supports paging. - list(profileId: string): Dfareporting_v3_3.Schema.UserRolesListResponse; + list(profileId: string): Dfareporting.Schema.UserRolesListResponse; // Retrieves a list of user roles, possibly filtered. This method supports paging. - list(profileId: string, optionalArgs: object): Dfareporting_v3_3.Schema.UserRolesListResponse; + list(profileId: string, optionalArgs: object): Dfareporting.Schema.UserRolesListResponse; // Updates an existing user role. This method supports patch semantics. - patch(resource: Schema.UserRole, profileId: string, id: string): Dfareporting_v3_3.Schema.UserRole; + patch(resource: Schema.UserRole, profileId: string, id: string): Dfareporting.Schema.UserRole; // Deletes an existing user role. remove(profileId: string, id: string): void; // Updates an existing user role. - update(resource: Schema.UserRole, profileId: string): Dfareporting_v3_3.Schema.UserRole; + update(resource: Schema.UserRole, profileId: string): Dfareporting.Schema.UserRole; } export interface VideoFormatsCollection { // Gets one video format by ID. - get(profileId: string, id: number): Dfareporting_v3_3.Schema.VideoFormat; + get(profileId: string, id: number): Dfareporting.Schema.VideoFormat; // Lists available video formats. - list(profileId: string): Dfareporting_v3_3.Schema.VideoFormatsListResponse; + list(profileId: string): Dfareporting.Schema.VideoFormatsListResponse; } } namespace Schema { @@ -652,7 +652,7 @@ declare namespace GoogleAppsScript { maximumImageSize?: string; name?: string; nielsenOcrEnabled?: boolean; - reportsConfiguration?: Dfareporting_v3_3.Schema.ReportsConfiguration; + reportsConfiguration?: Dfareporting.Schema.ReportsConfiguration; shareReportsWithTwitter?: boolean; teaserSizeLimit?: string; } @@ -677,43 +677,43 @@ declare namespace GoogleAppsScript { name?: string; } export interface AccountPermissionGroupsListResponse { - accountPermissionGroups?: Dfareporting_v3_3.Schema.AccountPermissionGroup[]; + accountPermissionGroups?: Dfareporting.Schema.AccountPermissionGroup[]; kind?: string; } export interface AccountPermissionsListResponse { - accountPermissions?: Dfareporting_v3_3.Schema.AccountPermission[]; + accountPermissions?: Dfareporting.Schema.AccountPermission[]; kind?: string; } export interface AccountUserProfile { accountId?: string; active?: boolean; - advertiserFilter?: Dfareporting_v3_3.Schema.ObjectFilter; - campaignFilter?: Dfareporting_v3_3.Schema.ObjectFilter; + advertiserFilter?: Dfareporting.Schema.ObjectFilter; + campaignFilter?: Dfareporting.Schema.ObjectFilter; comments?: string; email?: string; id?: string; kind?: string; locale?: string; name?: string; - siteFilter?: Dfareporting_v3_3.Schema.ObjectFilter; + siteFilter?: Dfareporting.Schema.ObjectFilter; subaccountId?: string; traffickerType?: string; userAccessType?: string; - userRoleFilter?: Dfareporting_v3_3.Schema.ObjectFilter; + userRoleFilter?: Dfareporting.Schema.ObjectFilter; userRoleId?: string; } export interface AccountUserProfilesListResponse { - accountUserProfiles?: Dfareporting_v3_3.Schema.AccountUserProfile[]; + accountUserProfiles?: Dfareporting.Schema.AccountUserProfile[]; kind?: string; nextPageToken?: string; } export interface AccountsListResponse { - accounts?: Dfareporting_v3_3.Schema.Account[]; + accounts?: Dfareporting.Schema.Account[]; kind?: string; nextPageToken?: string; } export interface Activities { - filters?: Dfareporting_v3_3.Schema.DimensionValue[]; + filters?: Dfareporting.Schema.DimensionValue[]; kind?: string; metricNames?: string[]; } @@ -721,41 +721,41 @@ declare namespace GoogleAppsScript { accountId?: string; active?: boolean; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; archived?: boolean; audienceSegmentId?: string; campaignId?: string; - campaignIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; - clickThroughUrl?: Dfareporting_v3_3.Schema.ClickThroughUrl; - clickThroughUrlSuffixProperties?: Dfareporting_v3_3.Schema.ClickThroughUrlSuffixProperties; + campaignIdDimensionValue?: Dfareporting.Schema.DimensionValue; + clickThroughUrl?: Dfareporting.Schema.ClickThroughUrl; + clickThroughUrlSuffixProperties?: Dfareporting.Schema.ClickThroughUrlSuffixProperties; comments?: string; compatibility?: string; - createInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; - creativeGroupAssignments?: Dfareporting_v3_3.Schema.CreativeGroupAssignment[]; - creativeRotation?: Dfareporting_v3_3.Schema.CreativeRotation; - dayPartTargeting?: Dfareporting_v3_3.Schema.DayPartTargeting; - defaultClickThroughEventTagProperties?: Dfareporting_v3_3.Schema.DefaultClickThroughEventTagProperties; - deliverySchedule?: Dfareporting_v3_3.Schema.DeliverySchedule; + createInfo?: Dfareporting.Schema.LastModifiedInfo; + creativeGroupAssignments?: Dfareporting.Schema.CreativeGroupAssignment[]; + creativeRotation?: Dfareporting.Schema.CreativeRotation; + dayPartTargeting?: Dfareporting.Schema.DayPartTargeting; + defaultClickThroughEventTagProperties?: Dfareporting.Schema.DefaultClickThroughEventTagProperties; + deliverySchedule?: Dfareporting.Schema.DeliverySchedule; dynamicClickTracker?: boolean; endTime?: string; - eventTagOverrides?: Dfareporting_v3_3.Schema.EventTagOverride[]; - geoTargeting?: Dfareporting_v3_3.Schema.GeoTargeting; + eventTagOverrides?: Dfareporting.Schema.EventTagOverride[]; + geoTargeting?: Dfareporting.Schema.GeoTargeting; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; - keyValueTargetingExpression?: Dfareporting_v3_3.Schema.KeyValueTargetingExpression; + idDimensionValue?: Dfareporting.Schema.DimensionValue; + keyValueTargetingExpression?: Dfareporting.Schema.KeyValueTargetingExpression; kind?: string; - languageTargeting?: Dfareporting_v3_3.Schema.LanguageTargeting; - lastModifiedInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + languageTargeting?: Dfareporting.Schema.LanguageTargeting; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; name?: string; - placementAssignments?: Dfareporting_v3_3.Schema.PlacementAssignment[]; - remarketingListExpression?: Dfareporting_v3_3.Schema.ListTargetingExpression; - size?: Dfareporting_v3_3.Schema.Size; + placementAssignments?: Dfareporting.Schema.PlacementAssignment[]; + remarketingListExpression?: Dfareporting.Schema.ListTargetingExpression; + size?: Dfareporting.Schema.Size; sslCompliant?: boolean; sslRequired?: boolean; startTime?: string; subaccountId?: string; targetingTemplateId?: string; - technologyTargeting?: Dfareporting_v3_3.Schema.TechnologyTargeting; + technologyTargeting?: Dfareporting.Schema.TechnologyTargeting; type?: string; } export interface AdBlockingConfiguration { @@ -775,7 +775,7 @@ declare namespace GoogleAppsScript { width?: string; } export interface AdsListResponse { - ads?: Dfareporting_v3_3.Schema.Ad[]; + ads?: Dfareporting.Schema.Ad[]; kind?: string; nextPageToken?: string; } @@ -786,9 +786,9 @@ declare namespace GoogleAppsScript { defaultClickThroughEventTagId?: string; defaultEmail?: string; floodlightConfigurationId?: string; - floodlightConfigurationIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + floodlightConfigurationIdDimensionValue?: Dfareporting.Schema.DimensionValue; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; kind?: string; name?: string; originalFloodlightConfigurationId?: string; @@ -803,17 +803,17 @@ declare namespace GoogleAppsScript { name?: string; } export interface AdvertiserGroupsListResponse { - advertiserGroups?: Dfareporting_v3_3.Schema.AdvertiserGroup[]; + advertiserGroups?: Dfareporting.Schema.AdvertiserGroup[]; kind?: string; nextPageToken?: string; } export interface AdvertiserLandingPagesListResponse { kind?: string; - landingPages?: Dfareporting_v3_3.Schema.LandingPage[]; + landingPages?: Dfareporting.Schema.LandingPage[]; nextPageToken?: string; } export interface AdvertisersListResponse { - advertisers?: Dfareporting_v3_3.Schema.Advertiser[]; + advertisers?: Dfareporting.Schema.Advertiser[]; kind?: string; nextPageToken?: string; } @@ -823,7 +823,7 @@ declare namespace GoogleAppsScript { name?: string; } export interface AudienceSegmentGroup { - audienceSegments?: Dfareporting_v3_3.Schema.AudienceSegment[]; + audienceSegments?: Dfareporting.Schema.AudienceSegment[]; id?: string; name?: string; } @@ -836,33 +836,33 @@ declare namespace GoogleAppsScript { name?: string; } export interface BrowsersListResponse { - browsers?: Dfareporting_v3_3.Schema.Browser[]; + browsers?: Dfareporting.Schema.Browser[]; kind?: string; } export interface Campaign { accountId?: string; - adBlockingConfiguration?: Dfareporting_v3_3.Schema.AdBlockingConfiguration; - additionalCreativeOptimizationConfigurations?: Dfareporting_v3_3.Schema.CreativeOptimizationConfiguration[]; + adBlockingConfiguration?: Dfareporting.Schema.AdBlockingConfiguration; + additionalCreativeOptimizationConfigurations?: Dfareporting.Schema.CreativeOptimizationConfiguration[]; advertiserGroupId?: string; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; archived?: boolean; - audienceSegmentGroups?: Dfareporting_v3_3.Schema.AudienceSegmentGroup[]; + audienceSegmentGroups?: Dfareporting.Schema.AudienceSegmentGroup[]; billingInvoiceCode?: string; - clickThroughUrlSuffixProperties?: Dfareporting_v3_3.Schema.ClickThroughUrlSuffixProperties; + clickThroughUrlSuffixProperties?: Dfareporting.Schema.ClickThroughUrlSuffixProperties; comment?: string; - createInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + createInfo?: Dfareporting.Schema.LastModifiedInfo; creativeGroupIds?: string[]; - creativeOptimizationConfiguration?: Dfareporting_v3_3.Schema.CreativeOptimizationConfiguration; - defaultClickThroughEventTagProperties?: Dfareporting_v3_3.Schema.DefaultClickThroughEventTagProperties; + creativeOptimizationConfiguration?: Dfareporting.Schema.CreativeOptimizationConfiguration; + defaultClickThroughEventTagProperties?: Dfareporting.Schema.DefaultClickThroughEventTagProperties; defaultLandingPageId?: string; endDate?: string; - eventTagOverrides?: Dfareporting_v3_3.Schema.EventTagOverride[]; + eventTagOverrides?: Dfareporting.Schema.EventTagOverride[]; externalId?: string; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; kind?: string; - lastModifiedInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; name?: string; nielsenOcrEnabled?: boolean; startDate?: string; @@ -874,12 +874,12 @@ declare namespace GoogleAppsScript { kind?: string; } export interface CampaignCreativeAssociationsListResponse { - campaignCreativeAssociations?: Dfareporting_v3_3.Schema.CampaignCreativeAssociation[]; + campaignCreativeAssociations?: Dfareporting.Schema.CampaignCreativeAssociation[]; kind?: string; nextPageToken?: string; } export interface CampaignsListResponse { - campaigns?: Dfareporting_v3_3.Schema.Campaign[]; + campaigns?: Dfareporting.Schema.Campaign[]; kind?: string; nextPageToken?: string; } @@ -900,12 +900,12 @@ declare namespace GoogleAppsScript { userProfileName?: string; } export interface ChangeLogsListResponse { - changeLogs?: Dfareporting_v3_3.Schema.ChangeLog[]; + changeLogs?: Dfareporting.Schema.ChangeLog[]; kind?: string; nextPageToken?: string; } export interface CitiesListResponse { - cities?: Dfareporting_v3_3.Schema.City[]; + cities?: Dfareporting.Schema.City[]; kind?: string; } export interface City { @@ -920,7 +920,7 @@ declare namespace GoogleAppsScript { regionDartId?: string; } export interface ClickTag { - clickThroughUrl?: Dfareporting_v3_3.Schema.CreativeClickThroughUrl; + clickThroughUrl?: Dfareporting.Schema.CreativeClickThroughUrl; eventName?: string; name?: string; } @@ -935,22 +935,22 @@ declare namespace GoogleAppsScript { overrideInheritedSuffix?: boolean; } export interface CompanionClickThroughOverride { - clickThroughUrl?: Dfareporting_v3_3.Schema.ClickThroughUrl; + clickThroughUrl?: Dfareporting.Schema.ClickThroughUrl; creativeId?: string; } export interface CompanionSetting { companionsDisabled?: boolean; - enabledSizes?: Dfareporting_v3_3.Schema.Size[]; + enabledSizes?: Dfareporting.Schema.Size[]; imageOnly?: boolean; kind?: string; } export interface CompatibleFields { - crossDimensionReachReportCompatibleFields?: Dfareporting_v3_3.Schema.CrossDimensionReachReportCompatibleFields; - floodlightReportCompatibleFields?: Dfareporting_v3_3.Schema.FloodlightReportCompatibleFields; + crossDimensionReachReportCompatibleFields?: Dfareporting.Schema.CrossDimensionReachReportCompatibleFields; + floodlightReportCompatibleFields?: Dfareporting.Schema.FloodlightReportCompatibleFields; kind?: string; - pathToConversionReportCompatibleFields?: Dfareporting_v3_3.Schema.PathToConversionReportCompatibleFields; - reachReportCompatibleFields?: Dfareporting_v3_3.Schema.ReachReportCompatibleFields; - reportCompatibleFields?: Dfareporting_v3_3.Schema.ReportCompatibleFields; + pathToConversionReportCompatibleFields?: Dfareporting.Schema.PathToConversionReportCompatibleFields; + reachReportCompatibleFields?: Dfareporting.Schema.ReachReportCompatibleFields; + reportCompatibleFields?: Dfareporting.Schema.ReportCompatibleFields; } export interface ConnectionType { id?: string; @@ -958,11 +958,11 @@ declare namespace GoogleAppsScript { name?: string; } export interface ConnectionTypesListResponse { - connectionTypes?: Dfareporting_v3_3.Schema.ConnectionType[]; + connectionTypes?: Dfareporting.Schema.ConnectionType[]; kind?: string; } export interface ContentCategoriesListResponse { - contentCategories?: Dfareporting_v3_3.Schema.ContentCategory[]; + contentCategories?: Dfareporting.Schema.ContentCategory[]; kind?: string; nextPageToken?: string; } @@ -974,7 +974,7 @@ declare namespace GoogleAppsScript { } export interface Conversion { childDirectedTreatment?: boolean; - customVariables?: Dfareporting_v3_3.Schema.CustomFloodlightVariable[]; + customVariables?: Dfareporting.Schema.CustomFloodlightVariable[]; encryptedUserId?: string; encryptedUserIdCandidates?: string[]; floodlightActivityId?: string; @@ -996,32 +996,32 @@ declare namespace GoogleAppsScript { message?: string; } export interface ConversionStatus { - conversion?: Dfareporting_v3_3.Schema.Conversion; - errors?: Dfareporting_v3_3.Schema.ConversionError[]; + conversion?: Dfareporting.Schema.Conversion; + errors?: Dfareporting.Schema.ConversionError[]; kind?: string; } export interface ConversionsBatchInsertRequest { - conversions?: Dfareporting_v3_3.Schema.Conversion[]; - encryptionInfo?: Dfareporting_v3_3.Schema.EncryptionInfo; + conversions?: Dfareporting.Schema.Conversion[]; + encryptionInfo?: Dfareporting.Schema.EncryptionInfo; kind?: string; } export interface ConversionsBatchInsertResponse { hasFailures?: boolean; kind?: string; - status?: Dfareporting_v3_3.Schema.ConversionStatus[]; + status?: Dfareporting.Schema.ConversionStatus[]; } export interface ConversionsBatchUpdateRequest { - conversions?: Dfareporting_v3_3.Schema.Conversion[]; - encryptionInfo?: Dfareporting_v3_3.Schema.EncryptionInfo; + conversions?: Dfareporting.Schema.Conversion[]; + encryptionInfo?: Dfareporting.Schema.EncryptionInfo; kind?: string; } export interface ConversionsBatchUpdateResponse { hasFailures?: boolean; kind?: string; - status?: Dfareporting_v3_3.Schema.ConversionStatus[]; + status?: Dfareporting.Schema.ConversionStatus[]; } export interface CountriesListResponse { - countries?: Dfareporting_v3_3.Schema.Country[]; + countries?: Dfareporting.Schema.Country[]; kind?: string; } export interface Country { @@ -1036,7 +1036,7 @@ declare namespace GoogleAppsScript { active?: boolean; adParameters?: string; adTagKeys?: string[]; - additionalSizes?: Dfareporting_v3_3.Schema.Size[]; + additionalSizes?: Dfareporting.Schema.Size[]; advertiserId?: string; allowScriptAccess?: boolean; archived?: boolean; @@ -1045,42 +1045,42 @@ declare namespace GoogleAppsScript { authoringTool?: string; autoAdvanceImages?: boolean; backgroundColor?: string; - backupImageClickThroughUrl?: Dfareporting_v3_3.Schema.CreativeClickThroughUrl; + backupImageClickThroughUrl?: Dfareporting.Schema.CreativeClickThroughUrl; backupImageFeatures?: string[]; backupImageReportingLabel?: string; - backupImageTargetWindow?: Dfareporting_v3_3.Schema.TargetWindow; - clickTags?: Dfareporting_v3_3.Schema.ClickTag[]; + backupImageTargetWindow?: Dfareporting.Schema.TargetWindow; + clickTags?: Dfareporting.Schema.ClickTag[]; commercialId?: string; companionCreatives?: string[]; compatibility?: string[]; convertFlashToHtml5?: boolean; - counterCustomEvents?: Dfareporting_v3_3.Schema.CreativeCustomEvent[]; - creativeAssetSelection?: Dfareporting_v3_3.Schema.CreativeAssetSelection; - creativeAssets?: Dfareporting_v3_3.Schema.CreativeAsset[]; - creativeFieldAssignments?: Dfareporting_v3_3.Schema.CreativeFieldAssignment[]; + counterCustomEvents?: Dfareporting.Schema.CreativeCustomEvent[]; + creativeAssetSelection?: Dfareporting.Schema.CreativeAssetSelection; + creativeAssets?: Dfareporting.Schema.CreativeAsset[]; + creativeFieldAssignments?: Dfareporting.Schema.CreativeFieldAssignment[]; customKeyValues?: string[]; dynamicAssetSelection?: boolean; - exitCustomEvents?: Dfareporting_v3_3.Schema.CreativeCustomEvent[]; - fsCommand?: Dfareporting_v3_3.Schema.FsCommand; + exitCustomEvents?: Dfareporting.Schema.CreativeCustomEvent[]; + fsCommand?: Dfareporting.Schema.FsCommand; htmlCode?: string; htmlCodeLocked?: boolean; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; kind?: string; - lastModifiedInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; latestTraffickedCreativeId?: string; mediaDescription?: string; mediaDuration?: Number; name?: string; overrideCss?: string; - progressOffset?: Dfareporting_v3_3.Schema.VideoOffset; + progressOffset?: Dfareporting.Schema.VideoOffset; redirectUrl?: string; renderingId?: string; - renderingIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + renderingIdDimensionValue?: Dfareporting.Schema.DimensionValue; requiredFlashPluginVersion?: string; requiredFlashVersion?: number; - size?: Dfareporting_v3_3.Schema.Size; - skipOffset?: Dfareporting_v3_3.Schema.VideoOffset; + size?: Dfareporting.Schema.Size; + skipOffset?: Dfareporting.Schema.VideoOffset; skippable?: boolean; sslCompliant?: boolean; sslOverride?: boolean; @@ -1090,33 +1090,33 @@ declare namespace GoogleAppsScript { subaccountId?: string; thirdPartyBackupImageImpressionsUrl?: string; thirdPartyRichMediaImpressionsUrl?: string; - thirdPartyUrls?: Dfareporting_v3_3.Schema.ThirdPartyTrackingUrl[]; - timerCustomEvents?: Dfareporting_v3_3.Schema.CreativeCustomEvent[]; + thirdPartyUrls?: Dfareporting.Schema.ThirdPartyTrackingUrl[]; + timerCustomEvents?: Dfareporting.Schema.CreativeCustomEvent[]; totalFileSize?: string; type?: string; - universalAdId?: Dfareporting_v3_3.Schema.UniversalAdId; + universalAdId?: Dfareporting.Schema.UniversalAdId; version?: number; } export interface CreativeAsset { actionScript3?: boolean; active?: boolean; - additionalSizes?: Dfareporting_v3_3.Schema.Size[]; + additionalSizes?: Dfareporting.Schema.Size[]; alignment?: string; artworkType?: string; - assetIdentifier?: Dfareporting_v3_3.Schema.CreativeAssetId; + assetIdentifier?: Dfareporting.Schema.CreativeAssetId; audioBitRate?: number; audioSampleRate?: number; - backupImageExit?: Dfareporting_v3_3.Schema.CreativeCustomEvent; + backupImageExit?: Dfareporting.Schema.CreativeCustomEvent; bitRate?: number; childAssetType?: string; - collapsedSize?: Dfareporting_v3_3.Schema.Size; + collapsedSize?: Dfareporting.Schema.Size; companionCreativeIds?: string[]; customStartTimeValue?: number; detectedFeatures?: string[]; displayType?: string; duration?: number; durationType?: string; - expandedDimension?: Dfareporting_v3_3.Schema.Size; + expandedDimension?: Dfareporting.Schema.Size; fileSize?: string; flashVersion?: number; frameRate?: Number; @@ -1124,21 +1124,21 @@ declare namespace GoogleAppsScript { hideSelectionBoxes?: boolean; horizontallyLocked?: boolean; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; mediaDuration?: Number; mimeType?: string; - offset?: Dfareporting_v3_3.Schema.OffsetPosition; + offset?: Dfareporting.Schema.OffsetPosition; orientation?: string; originalBackup?: boolean; politeLoad?: boolean; - position?: Dfareporting_v3_3.Schema.OffsetPosition; + position?: Dfareporting.Schema.OffsetPosition; positionLeftUnit?: string; positionTopUnit?: string; progressiveServingUrl?: string; pushdown?: boolean; pushdownDuration?: Number; role?: string; - size?: Dfareporting_v3_3.Schema.Size; + size?: Dfareporting.Schema.Size; sslCompliant?: boolean; startTimeType?: string; streamingServingUrl?: string; @@ -1154,28 +1154,28 @@ declare namespace GoogleAppsScript { type?: string; } export interface CreativeAssetMetadata { - assetIdentifier?: Dfareporting_v3_3.Schema.CreativeAssetId; - clickTags?: Dfareporting_v3_3.Schema.ClickTag[]; + assetIdentifier?: Dfareporting.Schema.CreativeAssetId; + clickTags?: Dfareporting.Schema.ClickTag[]; detectedFeatures?: string[]; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; kind?: string; warnedValidationRules?: string[]; } export interface CreativeAssetSelection { defaultAssetId?: string; - rules?: Dfareporting_v3_3.Schema.Rule[]; + rules?: Dfareporting.Schema.Rule[]; } export interface CreativeAssignment { active?: boolean; applyEventTags?: boolean; - clickThroughUrl?: Dfareporting_v3_3.Schema.ClickThroughUrl; - companionCreativeOverrides?: Dfareporting_v3_3.Schema.CompanionClickThroughOverride[]; - creativeGroupAssignments?: Dfareporting_v3_3.Schema.CreativeGroupAssignment[]; + clickThroughUrl?: Dfareporting.Schema.ClickThroughUrl; + companionCreativeOverrides?: Dfareporting.Schema.CompanionClickThroughOverride[]; + creativeGroupAssignments?: Dfareporting.Schema.CreativeGroupAssignment[]; creativeId?: string; - creativeIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + creativeIdDimensionValue?: Dfareporting.Schema.DimensionValue; endTime?: string; - richMediaExitOverrides?: Dfareporting_v3_3.Schema.RichMediaExitOverride[]; + richMediaExitOverrides?: Dfareporting.Schema.RichMediaExitOverride[]; sequence?: number; sslCompliant?: boolean; startTime?: string; @@ -1192,16 +1192,16 @@ declare namespace GoogleAppsScript { advertiserCustomEventType?: string; artworkLabel?: string; artworkType?: string; - exitClickThroughUrl?: Dfareporting_v3_3.Schema.CreativeClickThroughUrl; + exitClickThroughUrl?: Dfareporting.Schema.CreativeClickThroughUrl; id?: string; - popupWindowProperties?: Dfareporting_v3_3.Schema.PopupWindowProperties; + popupWindowProperties?: Dfareporting.Schema.PopupWindowProperties; targetType?: string; videoReportingId?: string; } export interface CreativeField { accountId?: string; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; id?: string; kind?: string; name?: string; @@ -1217,19 +1217,19 @@ declare namespace GoogleAppsScript { value?: string; } export interface CreativeFieldValuesListResponse { - creativeFieldValues?: Dfareporting_v3_3.Schema.CreativeFieldValue[]; + creativeFieldValues?: Dfareporting.Schema.CreativeFieldValue[]; kind?: string; nextPageToken?: string; } export interface CreativeFieldsListResponse { - creativeFields?: Dfareporting_v3_3.Schema.CreativeField[]; + creativeFields?: Dfareporting.Schema.CreativeField[]; kind?: string; nextPageToken?: string; } export interface CreativeGroup { accountId?: string; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; groupNumber?: number; id?: string; kind?: string; @@ -1241,33 +1241,33 @@ declare namespace GoogleAppsScript { creativeGroupNumber?: string; } export interface CreativeGroupsListResponse { - creativeGroups?: Dfareporting_v3_3.Schema.CreativeGroup[]; + creativeGroups?: Dfareporting.Schema.CreativeGroup[]; kind?: string; nextPageToken?: string; } export interface CreativeOptimizationConfiguration { id?: string; name?: string; - optimizationActivitys?: Dfareporting_v3_3.Schema.OptimizationActivity[]; + optimizationActivitys?: Dfareporting.Schema.OptimizationActivity[]; optimizationModel?: string; } export interface CreativeRotation { - creativeAssignments?: Dfareporting_v3_3.Schema.CreativeAssignment[]; + creativeAssignments?: Dfareporting.Schema.CreativeAssignment[]; creativeOptimizationConfigurationId?: string; type?: string; weightCalculationStrategy?: string; } export interface CreativesListResponse { - creatives?: Dfareporting_v3_3.Schema.Creative[]; + creatives?: Dfareporting.Schema.Creative[]; kind?: string; nextPageToken?: string; } export interface CrossDimensionReachReportCompatibleFields { - breakdown?: Dfareporting_v3_3.Schema.Dimension[]; - dimensionFilters?: Dfareporting_v3_3.Schema.Dimension[]; + breakdown?: Dfareporting.Schema.Dimension[]; + dimensionFilters?: Dfareporting.Schema.Dimension[]; kind?: string; - metrics?: Dfareporting_v3_3.Schema.Metric[]; - overlapMetrics?: Dfareporting_v3_3.Schema.Metric[]; + metrics?: Dfareporting.Schema.Metric[]; + overlapMetrics?: Dfareporting.Schema.Metric[]; } export interface CustomFloodlightVariable { kind?: string; @@ -1275,11 +1275,11 @@ declare namespace GoogleAppsScript { value?: string; } export interface CustomRichMediaEvents { - filteredEventIds?: Dfareporting_v3_3.Schema.DimensionValue[]; + filteredEventIds?: Dfareporting.Schema.DimensionValue[]; kind?: string; } export interface CustomViewabilityMetric { - configuration?: Dfareporting_v3_3.Schema.CustomViewabilityMetricConfiguration; + configuration?: Dfareporting.Schema.CustomViewabilityMetricConfiguration; id?: string; name?: string; } @@ -1304,7 +1304,7 @@ declare namespace GoogleAppsScript { appUrl?: string; fallbackUrl?: string; kind?: string; - mobileApp?: Dfareporting_v3_3.Schema.MobileApp; + mobileApp?: Dfareporting.Schema.MobileApp; remarketingListIds?: string[]; } export interface DefaultClickThroughEventTagProperties { @@ -1312,7 +1312,7 @@ declare namespace GoogleAppsScript { overrideInheritedEventTag?: boolean; } export interface DeliverySchedule { - frequencyCap?: Dfareporting_v3_3.Schema.FrequencyCap; + frequencyCap?: Dfareporting.Schema.FrequencyCap; hardCutoff?: boolean; impressionRatio?: string; priority?: string; @@ -1343,36 +1343,36 @@ declare namespace GoogleAppsScript { } export interface DimensionValueList { etag?: string; - items?: Dfareporting_v3_3.Schema.DimensionValue[]; + items?: Dfareporting.Schema.DimensionValue[]; kind?: string; nextPageToken?: string; } export interface DimensionValueRequest { dimensionName?: string; endDate?: string; - filters?: Dfareporting_v3_3.Schema.DimensionFilter[]; + filters?: Dfareporting.Schema.DimensionFilter[]; kind?: string; startDate?: string; } export interface DirectorySite { active?: boolean; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; inpageTagFormats?: string[]; interstitialTagFormats?: string[]; kind?: string; name?: string; - settings?: Dfareporting_v3_3.Schema.DirectorySiteSettings; + settings?: Dfareporting.Schema.DirectorySiteSettings; url?: string; } export interface DirectorySiteSettings { activeViewOptOut?: boolean; - dfpSettings?: Dfareporting_v3_3.Schema.DfpSettings; + dfpSettings?: Dfareporting.Schema.DfpSettings; instreamVideoPlacementAccepted?: boolean; interstitialPlacementAccepted?: boolean; } export interface DirectorySitesListResponse { - directorySites?: Dfareporting_v3_3.Schema.DirectorySite[]; + directorySites?: Dfareporting.Schema.DirectorySite[]; kind?: string; nextPageToken?: string; } @@ -1383,7 +1383,7 @@ declare namespace GoogleAppsScript { objectType?: string; } export interface DynamicTargetingKeysListResponse { - dynamicTargetingKeys?: Dfareporting_v3_3.Schema.DynamicTargetingKey[]; + dynamicTargetingKeys?: Dfareporting.Schema.DynamicTargetingKey[]; kind?: string; } export interface EncryptionInfo { @@ -1395,9 +1395,9 @@ declare namespace GoogleAppsScript { export interface EventTag { accountId?: string; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; campaignId?: string; - campaignIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + campaignIdDimensionValue?: Dfareporting.Schema.DimensionValue; enabledByDefault?: boolean; excludeFromAdxRequests?: boolean; id?: string; @@ -1417,11 +1417,11 @@ declare namespace GoogleAppsScript { id?: string; } export interface EventTagsListResponse { - eventTags?: Dfareporting_v3_3.Schema.EventTag[]; + eventTags?: Dfareporting.Schema.EventTag[]; kind?: string; } export interface File { - dateRange?: Dfareporting_v3_3.Schema.DateRange; + dateRange?: Dfareporting.Schema.DateRange; etag?: string; fileName?: string; format?: string; @@ -1430,11 +1430,11 @@ declare namespace GoogleAppsScript { lastModifiedTime?: string; reportId?: string; status?: string; - urls?: Dfareporting_v3_3.Schema.FileUrls; + urls?: Dfareporting.Schema.FileUrls; } export interface FileList { etag?: string; - items?: Dfareporting_v3_3.Schema.File[]; + items?: Dfareporting.Schema.File[]; kind?: string; nextPageToken?: string; } @@ -1454,32 +1454,32 @@ declare namespace GoogleAppsScript { kind?: string; } export interface FloodlightActivitiesListResponse { - floodlightActivities?: Dfareporting_v3_3.Schema.FloodlightActivity[]; + floodlightActivities?: Dfareporting.Schema.FloodlightActivity[]; kind?: string; nextPageToken?: string; } export interface FloodlightActivity { accountId?: string; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; cacheBustingType?: string; countingMethod?: string; - defaultTags?: Dfareporting_v3_3.Schema.FloodlightActivityDynamicTag[]; + defaultTags?: Dfareporting.Schema.FloodlightActivityDynamicTag[]; expectedUrl?: string; floodlightActivityGroupId?: string; floodlightActivityGroupName?: string; floodlightActivityGroupTagString?: string; floodlightActivityGroupType?: string; floodlightConfigurationId?: string; - floodlightConfigurationIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + floodlightConfigurationIdDimensionValue?: Dfareporting.Schema.DimensionValue; floodlightTagType?: string; hidden?: boolean; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; kind?: string; name?: string; notes?: string; - publisherTags?: Dfareporting_v3_3.Schema.FloodlightActivityPublisherDynamicTag[]; + publisherTags?: Dfareporting.Schema.FloodlightActivityPublisherDynamicTag[]; secure?: boolean; sslCompliant?: boolean; sslRequired?: boolean; @@ -1496,11 +1496,11 @@ declare namespace GoogleAppsScript { export interface FloodlightActivityGroup { accountId?: string; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; floodlightConfigurationId?: string; - floodlightConfigurationIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + floodlightConfigurationIdDimensionValue?: Dfareporting.Schema.DimensionValue; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; kind?: string; name?: string; subaccountId?: string; @@ -1508,47 +1508,47 @@ declare namespace GoogleAppsScript { type?: string; } export interface FloodlightActivityGroupsListResponse { - floodlightActivityGroups?: Dfareporting_v3_3.Schema.FloodlightActivityGroup[]; + floodlightActivityGroups?: Dfareporting.Schema.FloodlightActivityGroup[]; kind?: string; nextPageToken?: string; } export interface FloodlightActivityPublisherDynamicTag { clickThrough?: boolean; directorySiteId?: string; - dynamicTag?: Dfareporting_v3_3.Schema.FloodlightActivityDynamicTag; + dynamicTag?: Dfareporting.Schema.FloodlightActivityDynamicTag; siteId?: string; - siteIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + siteIdDimensionValue?: Dfareporting.Schema.DimensionValue; viewThrough?: boolean; } export interface FloodlightConfiguration { accountId?: string; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; analyticsDataSharingEnabled?: boolean; - customViewabilityMetric?: Dfareporting_v3_3.Schema.CustomViewabilityMetric; + customViewabilityMetric?: Dfareporting.Schema.CustomViewabilityMetric; exposureToConversionEnabled?: boolean; firstDayOfWeek?: string; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; inAppAttributionTrackingEnabled?: boolean; kind?: string; - lookbackConfiguration?: Dfareporting_v3_3.Schema.LookbackConfiguration; + lookbackConfiguration?: Dfareporting.Schema.LookbackConfiguration; naturalSearchConversionAttributionOption?: string; - omnitureSettings?: Dfareporting_v3_3.Schema.OmnitureSettings; + omnitureSettings?: Dfareporting.Schema.OmnitureSettings; subaccountId?: string; - tagSettings?: Dfareporting_v3_3.Schema.TagSettings; - thirdPartyAuthenticationTokens?: Dfareporting_v3_3.Schema.ThirdPartyAuthenticationToken[]; - userDefinedVariableConfigurations?: Dfareporting_v3_3.Schema.UserDefinedVariableConfiguration[]; + tagSettings?: Dfareporting.Schema.TagSettings; + thirdPartyAuthenticationTokens?: Dfareporting.Schema.ThirdPartyAuthenticationToken[]; + userDefinedVariableConfigurations?: Dfareporting.Schema.UserDefinedVariableConfiguration[]; } export interface FloodlightConfigurationsListResponse { - floodlightConfigurations?: Dfareporting_v3_3.Schema.FloodlightConfiguration[]; + floodlightConfigurations?: Dfareporting.Schema.FloodlightConfiguration[]; kind?: string; } export interface FloodlightReportCompatibleFields { - dimensionFilters?: Dfareporting_v3_3.Schema.Dimension[]; - dimensions?: Dfareporting_v3_3.Schema.Dimension[]; + dimensionFilters?: Dfareporting.Schema.Dimension[]; + dimensions?: Dfareporting.Schema.Dimension[]; kind?: string; - metrics?: Dfareporting_v3_3.Schema.Metric[]; + metrics?: Dfareporting.Schema.Metric[]; } export interface FrequencyCap { duration?: string; @@ -1562,16 +1562,16 @@ declare namespace GoogleAppsScript { windowWidth?: number; } export interface GeoTargeting { - cities?: Dfareporting_v3_3.Schema.City[]; - countries?: Dfareporting_v3_3.Schema.Country[]; + cities?: Dfareporting.Schema.City[]; + countries?: Dfareporting.Schema.Country[]; excludeCountries?: boolean; - metros?: Dfareporting_v3_3.Schema.Metro[]; - postalCodes?: Dfareporting_v3_3.Schema.PostalCode[]; - regions?: Dfareporting_v3_3.Schema.Region[]; + metros?: Dfareporting.Schema.Metro[]; + postalCodes?: Dfareporting.Schema.PostalCode[]; + regions?: Dfareporting.Schema.Region[]; } export interface InventoryItem { accountId?: string; - adSlots?: Dfareporting_v3_3.Schema.AdSlot[]; + adSlots?: Dfareporting.Schema.AdSlot[]; advertiserId?: string; contentCategoryId?: string; estimatedClickThroughRate?: string; @@ -1579,12 +1579,12 @@ declare namespace GoogleAppsScript { id?: string; inPlan?: boolean; kind?: string; - lastModifiedInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; name?: string; negotiationChannelId?: string; orderId?: string; placementStrategyId?: string; - pricing?: Dfareporting_v3_3.Schema.Pricing; + pricing?: Dfareporting.Schema.Pricing; projectId?: string; rfpId?: string; siteId?: string; @@ -1592,7 +1592,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface InventoryItemsListResponse { - inventoryItems?: Dfareporting_v3_3.Schema.InventoryItem[]; + inventoryItems?: Dfareporting.Schema.InventoryItem[]; kind?: string; nextPageToken?: string; } @@ -1602,7 +1602,7 @@ declare namespace GoogleAppsScript { export interface LandingPage { advertiserId?: string; archived?: boolean; - deepLinks?: Dfareporting_v3_3.Schema.DeepLink[]; + deepLinks?: Dfareporting.Schema.DeepLink[]; id?: string; kind?: string; name?: string; @@ -1615,22 +1615,22 @@ declare namespace GoogleAppsScript { name?: string; } export interface LanguageTargeting { - languages?: Dfareporting_v3_3.Schema.Language[]; + languages?: Dfareporting.Schema.Language[]; } export interface LanguagesListResponse { kind?: string; - languages?: Dfareporting_v3_3.Schema.Language[]; + languages?: Dfareporting.Schema.Language[]; } export interface LastModifiedInfo { time?: string; } export interface ListPopulationClause { - terms?: Dfareporting_v3_3.Schema.ListPopulationTerm[]; + terms?: Dfareporting.Schema.ListPopulationTerm[]; } export interface ListPopulationRule { floodlightActivityId?: string; floodlightActivityName?: string; - listPopulationClauses?: Dfareporting_v3_3.Schema.ListPopulationClause[]; + listPopulationClauses?: Dfareporting.Schema.ListPopulationClause[]; } export interface ListPopulationTerm { contains?: boolean; @@ -1664,7 +1664,7 @@ declare namespace GoogleAppsScript { } export interface MetrosListResponse { kind?: string; - metros?: Dfareporting_v3_3.Schema.Metro[]; + metros?: Dfareporting.Schema.Metro[]; } export interface MobileApp { directory?: string; @@ -1675,7 +1675,7 @@ declare namespace GoogleAppsScript { } export interface MobileAppsListResponse { kind?: string; - mobileApps?: Dfareporting_v3_3.Schema.MobileApp[]; + mobileApps?: Dfareporting.Schema.MobileApp[]; nextPageToken?: string; } export interface MobileCarrier { @@ -1687,7 +1687,7 @@ declare namespace GoogleAppsScript { } export interface MobileCarriersListResponse { kind?: string; - mobileCarriers?: Dfareporting_v3_3.Schema.MobileCarrier[]; + mobileCarriers?: Dfareporting.Schema.MobileCarrier[]; } export interface ObjectFilter { kind?: string; @@ -1715,19 +1715,19 @@ declare namespace GoogleAppsScript { majorVersion?: string; minorVersion?: string; name?: string; - operatingSystem?: Dfareporting_v3_3.Schema.OperatingSystem; + operatingSystem?: Dfareporting.Schema.OperatingSystem; } export interface OperatingSystemVersionsListResponse { kind?: string; - operatingSystemVersions?: Dfareporting_v3_3.Schema.OperatingSystemVersion[]; + operatingSystemVersions?: Dfareporting.Schema.OperatingSystemVersion[]; } export interface OperatingSystemsListResponse { kind?: string; - operatingSystems?: Dfareporting_v3_3.Schema.OperatingSystem[]; + operatingSystems?: Dfareporting.Schema.OperatingSystem[]; } export interface OptimizationActivity { floodlightActivityId?: string; - floodlightActivityIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + floodlightActivityIdDimensionValue?: Dfareporting.Schema.DimensionValue; weight?: number; } export interface Order { @@ -1737,10 +1737,10 @@ declare namespace GoogleAppsScript { buyerInvoiceId?: string; buyerOrganizationName?: string; comments?: string; - contacts?: Dfareporting_v3_3.Schema.OrderContact[]; + contacts?: Dfareporting.Schema.OrderContact[]; id?: string; kind?: string; - lastModifiedInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; name?: string; notes?: string; planningTermId?: string; @@ -1765,7 +1765,7 @@ declare namespace GoogleAppsScript { amendedOrderDocumentId?: string; approvedByUserProfileIds?: string[]; cancelled?: boolean; - createdInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + createdInfo?: Dfareporting.Schema.LastModifiedInfo; effectiveDate?: string; id?: string; kind?: string; @@ -1781,106 +1781,106 @@ declare namespace GoogleAppsScript { export interface OrderDocumentsListResponse { kind?: string; nextPageToken?: string; - orderDocuments?: Dfareporting_v3_3.Schema.OrderDocument[]; + orderDocuments?: Dfareporting.Schema.OrderDocument[]; } export interface OrdersListResponse { kind?: string; nextPageToken?: string; - orders?: Dfareporting_v3_3.Schema.Order[]; + orders?: Dfareporting.Schema.Order[]; } export interface PathToConversionReportCompatibleFields { - conversionDimensions?: Dfareporting_v3_3.Schema.Dimension[]; - customFloodlightVariables?: Dfareporting_v3_3.Schema.Dimension[]; + conversionDimensions?: Dfareporting.Schema.Dimension[]; + customFloodlightVariables?: Dfareporting.Schema.Dimension[]; kind?: string; - metrics?: Dfareporting_v3_3.Schema.Metric[]; - perInteractionDimensions?: Dfareporting_v3_3.Schema.Dimension[]; + metrics?: Dfareporting.Schema.Metric[]; + perInteractionDimensions?: Dfareporting.Schema.Dimension[]; } export interface Placement { accountId?: string; adBlockingOptOut?: boolean; - additionalSizes?: Dfareporting_v3_3.Schema.Size[]; + additionalSizes?: Dfareporting.Schema.Size[]; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; archived?: boolean; campaignId?: string; - campaignIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + campaignIdDimensionValue?: Dfareporting.Schema.DimensionValue; comment?: string; compatibility?: string; contentCategoryId?: string; - createInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + createInfo?: Dfareporting.Schema.LastModifiedInfo; directorySiteId?: string; - directorySiteIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + directorySiteIdDimensionValue?: Dfareporting.Schema.DimensionValue; externalId?: string; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; keyName?: string; kind?: string; - lastModifiedInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; - lookbackConfiguration?: Dfareporting_v3_3.Schema.LookbackConfiguration; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; + lookbackConfiguration?: Dfareporting.Schema.LookbackConfiguration; name?: string; paymentApproved?: boolean; paymentSource?: string; placementGroupId?: string; - placementGroupIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + placementGroupIdDimensionValue?: Dfareporting.Schema.DimensionValue; placementStrategyId?: string; - pricingSchedule?: Dfareporting_v3_3.Schema.PricingSchedule; + pricingSchedule?: Dfareporting.Schema.PricingSchedule; primary?: boolean; - publisherUpdateInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + publisherUpdateInfo?: Dfareporting.Schema.LastModifiedInfo; siteId?: string; - siteIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; - size?: Dfareporting_v3_3.Schema.Size; + siteIdDimensionValue?: Dfareporting.Schema.DimensionValue; + size?: Dfareporting.Schema.Size; sslRequired?: boolean; status?: string; subaccountId?: string; tagFormats?: string[]; - tagSetting?: Dfareporting_v3_3.Schema.TagSetting; + tagSetting?: Dfareporting.Schema.TagSetting; videoActiveViewOptOut?: boolean; - videoSettings?: Dfareporting_v3_3.Schema.VideoSettings; + videoSettings?: Dfareporting.Schema.VideoSettings; vpaidAdapterChoice?: string; } export interface PlacementAssignment { active?: boolean; placementId?: string; - placementIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + placementIdDimensionValue?: Dfareporting.Schema.DimensionValue; sslRequired?: boolean; } export interface PlacementGroup { accountId?: string; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; archived?: boolean; campaignId?: string; - campaignIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + campaignIdDimensionValue?: Dfareporting.Schema.DimensionValue; childPlacementIds?: string[]; comment?: string; contentCategoryId?: string; - createInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + createInfo?: Dfareporting.Schema.LastModifiedInfo; directorySiteId?: string; - directorySiteIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + directorySiteIdDimensionValue?: Dfareporting.Schema.DimensionValue; externalId?: string; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; kind?: string; - lastModifiedInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; name?: string; placementGroupType?: string; placementStrategyId?: string; - pricingSchedule?: Dfareporting_v3_3.Schema.PricingSchedule; + pricingSchedule?: Dfareporting.Schema.PricingSchedule; primaryPlacementId?: string; - primaryPlacementIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + primaryPlacementIdDimensionValue?: Dfareporting.Schema.DimensionValue; siteId?: string; - siteIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + siteIdDimensionValue?: Dfareporting.Schema.DimensionValue; subaccountId?: string; } export interface PlacementGroupsListResponse { kind?: string; nextPageToken?: string; - placementGroups?: Dfareporting_v3_3.Schema.PlacementGroup[]; + placementGroups?: Dfareporting.Schema.PlacementGroup[]; } export interface PlacementStrategiesListResponse { kind?: string; nextPageToken?: string; - placementStrategies?: Dfareporting_v3_3.Schema.PlacementStrategy[]; + placementStrategies?: Dfareporting.Schema.PlacementStrategy[]; } export interface PlacementStrategy { accountId?: string; @@ -1890,16 +1890,16 @@ declare namespace GoogleAppsScript { } export interface PlacementTag { placementId?: string; - tagDatas?: Dfareporting_v3_3.Schema.TagData[]; + tagDatas?: Dfareporting.Schema.TagData[]; } export interface PlacementsGenerateTagsResponse { kind?: string; - placementTags?: Dfareporting_v3_3.Schema.PlacementTag[]; + placementTags?: Dfareporting.Schema.PlacementTag[]; } export interface PlacementsListResponse { kind?: string; nextPageToken?: string; - placements?: Dfareporting_v3_3.Schema.Placement[]; + placements?: Dfareporting.Schema.Placement[]; } export interface PlatformType { id?: string; @@ -1908,11 +1908,11 @@ declare namespace GoogleAppsScript { } export interface PlatformTypesListResponse { kind?: string; - platformTypes?: Dfareporting_v3_3.Schema.PlatformType[]; + platformTypes?: Dfareporting.Schema.PlatformType[]; } export interface PopupWindowProperties { - dimension?: Dfareporting_v3_3.Schema.Size; - offset?: Dfareporting_v3_3.Schema.OffsetPosition; + dimension?: Dfareporting.Schema.Size; + offset?: Dfareporting.Schema.OffsetPosition; positionType?: string; showAddressBar?: boolean; showMenuBar?: boolean; @@ -1930,12 +1930,12 @@ declare namespace GoogleAppsScript { } export interface PostalCodesListResponse { kind?: string; - postalCodes?: Dfareporting_v3_3.Schema.PostalCode[]; + postalCodes?: Dfareporting.Schema.PostalCode[]; } export interface Pricing { capCostType?: string; endDate?: string; - flights?: Dfareporting_v3_3.Schema.Flight[]; + flights?: Dfareporting.Schema.Flight[]; groupType?: string; pricingType?: string; startDate?: string; @@ -1946,7 +1946,7 @@ declare namespace GoogleAppsScript { endDate?: string; flighted?: boolean; floodlightActivityId?: string; - pricingPeriods?: Dfareporting_v3_3.Schema.PricingSchedulePricingPeriod[]; + pricingPeriods?: Dfareporting.Schema.PricingSchedulePricingPeriod[]; pricingType?: string; startDate?: string; testingStartDate?: string; @@ -1969,7 +1969,7 @@ declare namespace GoogleAppsScript { endDate?: string; id?: string; kind?: string; - lastModifiedInfo?: Dfareporting_v3_3.Schema.LastModifiedInfo; + lastModifiedInfo?: Dfareporting.Schema.LastModifiedInfo; name?: string; overview?: string; startDate?: string; @@ -1985,15 +1985,15 @@ declare namespace GoogleAppsScript { export interface ProjectsListResponse { kind?: string; nextPageToken?: string; - projects?: Dfareporting_v3_3.Schema.Project[]; + projects?: Dfareporting.Schema.Project[]; } export interface ReachReportCompatibleFields { - dimensionFilters?: Dfareporting_v3_3.Schema.Dimension[]; - dimensions?: Dfareporting_v3_3.Schema.Dimension[]; + dimensionFilters?: Dfareporting.Schema.Dimension[]; + dimensions?: Dfareporting.Schema.Dimension[]; kind?: string; - metrics?: Dfareporting_v3_3.Schema.Metric[]; - pivotedActivityMetrics?: Dfareporting_v3_3.Schema.Metric[]; - reachByFrequencyMetrics?: Dfareporting_v3_3.Schema.Metric[]; + metrics?: Dfareporting.Schema.Metric[]; + pivotedActivityMetrics?: Dfareporting.Schema.Metric[]; + reachByFrequencyMetrics?: Dfareporting.Schema.Metric[]; } export interface Recipient { deliveryType?: string; @@ -2010,18 +2010,18 @@ declare namespace GoogleAppsScript { } export interface RegionsListResponse { kind?: string; - regions?: Dfareporting_v3_3.Schema.Region[]; + regions?: Dfareporting.Schema.Region[]; } export interface RemarketingList { accountId?: string; active?: boolean; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; description?: string; id?: string; kind?: string; lifeSpan?: string; - listPopulationRule?: Dfareporting_v3_3.Schema.ListPopulationRule; + listPopulationRule?: Dfareporting.Schema.ListPopulationRule; listSize?: string; listSource?: string; name?: string; @@ -2036,48 +2036,48 @@ declare namespace GoogleAppsScript { export interface RemarketingListsListResponse { kind?: string; nextPageToken?: string; - remarketingLists?: Dfareporting_v3_3.Schema.RemarketingList[]; + remarketingLists?: Dfareporting.Schema.RemarketingList[]; } export interface Report { accountId?: string; - criteria?: Dfareporting_v3_3.Schema.ReportCriteria; - crossDimensionReachCriteria?: Dfareporting_v3_3.Schema.ReportCrossDimensionReachCriteria; - delivery?: Dfareporting_v3_3.Schema.ReportDelivery; + criteria?: Dfareporting.Schema.ReportCriteria; + crossDimensionReachCriteria?: Dfareporting.Schema.ReportCrossDimensionReachCriteria; + delivery?: Dfareporting.Schema.ReportDelivery; etag?: string; fileName?: string; - floodlightCriteria?: Dfareporting_v3_3.Schema.ReportFloodlightCriteria; + floodlightCriteria?: Dfareporting.Schema.ReportFloodlightCriteria; format?: string; id?: string; kind?: string; lastModifiedTime?: string; name?: string; ownerProfileId?: string; - pathToConversionCriteria?: Dfareporting_v3_3.Schema.ReportPathToConversionCriteria; - reachCriteria?: Dfareporting_v3_3.Schema.ReportReachCriteria; - schedule?: Dfareporting_v3_3.Schema.ReportSchedule; + pathToConversionCriteria?: Dfareporting.Schema.ReportPathToConversionCriteria; + reachCriteria?: Dfareporting.Schema.ReportReachCriteria; + schedule?: Dfareporting.Schema.ReportSchedule; subAccountId?: string; type?: string; } export interface ReportCompatibleFields { - dimensionFilters?: Dfareporting_v3_3.Schema.Dimension[]; - dimensions?: Dfareporting_v3_3.Schema.Dimension[]; + dimensionFilters?: Dfareporting.Schema.Dimension[]; + dimensions?: Dfareporting.Schema.Dimension[]; kind?: string; - metrics?: Dfareporting_v3_3.Schema.Metric[]; - pivotedActivityMetrics?: Dfareporting_v3_3.Schema.Metric[]; + metrics?: Dfareporting.Schema.Metric[]; + pivotedActivityMetrics?: Dfareporting.Schema.Metric[]; } export interface ReportCriteria { - activities?: Dfareporting_v3_3.Schema.Activities; - customRichMediaEvents?: Dfareporting_v3_3.Schema.CustomRichMediaEvents; - dateRange?: Dfareporting_v3_3.Schema.DateRange; - dimensionFilters?: Dfareporting_v3_3.Schema.DimensionValue[]; - dimensions?: Dfareporting_v3_3.Schema.SortedDimension[]; + activities?: Dfareporting.Schema.Activities; + customRichMediaEvents?: Dfareporting.Schema.CustomRichMediaEvents; + dateRange?: Dfareporting.Schema.DateRange; + dimensionFilters?: Dfareporting.Schema.DimensionValue[]; + dimensions?: Dfareporting.Schema.SortedDimension[]; metricNames?: string[]; } export interface ReportCrossDimensionReachCriteria { - breakdown?: Dfareporting_v3_3.Schema.SortedDimension[]; - dateRange?: Dfareporting_v3_3.Schema.DateRange; + breakdown?: Dfareporting.Schema.SortedDimension[]; + dateRange?: Dfareporting.Schema.DateRange; dimension?: string; - dimensionFilters?: Dfareporting_v3_3.Schema.DimensionValue[]; + dimensionFilters?: Dfareporting.Schema.DimensionValue[]; metricNames?: string[]; overlapMetricNames?: string[]; pivoted?: boolean; @@ -2086,16 +2086,16 @@ declare namespace GoogleAppsScript { emailOwner?: boolean; emailOwnerDeliveryType?: string; message?: string; - recipients?: Dfareporting_v3_3.Schema.Recipient[]; + recipients?: Dfareporting.Schema.Recipient[]; } export interface ReportFloodlightCriteria { - customRichMediaEvents?: Dfareporting_v3_3.Schema.DimensionValue[]; - dateRange?: Dfareporting_v3_3.Schema.DateRange; - dimensionFilters?: Dfareporting_v3_3.Schema.DimensionValue[]; - dimensions?: Dfareporting_v3_3.Schema.SortedDimension[]; - floodlightConfigId?: Dfareporting_v3_3.Schema.DimensionValue; + customRichMediaEvents?: Dfareporting.Schema.DimensionValue[]; + dateRange?: Dfareporting.Schema.DateRange; + dimensionFilters?: Dfareporting.Schema.DimensionValue[]; + dimensions?: Dfareporting.Schema.SortedDimension[]; + floodlightConfigId?: Dfareporting.Schema.DimensionValue; metricNames?: string[]; - reportProperties?: Dfareporting_v3_3.Schema.ReportFloodlightCriteriaReportProperties; + reportProperties?: Dfareporting.Schema.ReportFloodlightCriteriaReportProperties; } export interface ReportFloodlightCriteriaReportProperties { includeAttributedIPConversions?: boolean; @@ -2104,20 +2104,20 @@ declare namespace GoogleAppsScript { } export interface ReportList { etag?: string; - items?: Dfareporting_v3_3.Schema.Report[]; + items?: Dfareporting.Schema.Report[]; kind?: string; nextPageToken?: string; } export interface ReportPathToConversionCriteria { - activityFilters?: Dfareporting_v3_3.Schema.DimensionValue[]; - conversionDimensions?: Dfareporting_v3_3.Schema.SortedDimension[]; - customFloodlightVariables?: Dfareporting_v3_3.Schema.SortedDimension[]; - customRichMediaEvents?: Dfareporting_v3_3.Schema.DimensionValue[]; - dateRange?: Dfareporting_v3_3.Schema.DateRange; - floodlightConfigId?: Dfareporting_v3_3.Schema.DimensionValue; + activityFilters?: Dfareporting.Schema.DimensionValue[]; + conversionDimensions?: Dfareporting.Schema.SortedDimension[]; + customFloodlightVariables?: Dfareporting.Schema.SortedDimension[]; + customRichMediaEvents?: Dfareporting.Schema.DimensionValue[]; + dateRange?: Dfareporting.Schema.DateRange; + floodlightConfigId?: Dfareporting.Schema.DimensionValue; metricNames?: string[]; - perInteractionDimensions?: Dfareporting_v3_3.Schema.SortedDimension[]; - reportProperties?: Dfareporting_v3_3.Schema.ReportPathToConversionCriteriaReportProperties; + perInteractionDimensions?: Dfareporting.Schema.SortedDimension[]; + reportProperties?: Dfareporting.Schema.ReportPathToConversionCriteriaReportProperties; } export interface ReportPathToConversionCriteriaReportProperties { clicksLookbackWindow?: number; @@ -2131,11 +2131,11 @@ declare namespace GoogleAppsScript { pivotOnInteractionPath?: boolean; } export interface ReportReachCriteria { - activities?: Dfareporting_v3_3.Schema.Activities; - customRichMediaEvents?: Dfareporting_v3_3.Schema.CustomRichMediaEvents; - dateRange?: Dfareporting_v3_3.Schema.DateRange; - dimensionFilters?: Dfareporting_v3_3.Schema.DimensionValue[]; - dimensions?: Dfareporting_v3_3.Schema.SortedDimension[]; + activities?: Dfareporting.Schema.Activities; + customRichMediaEvents?: Dfareporting.Schema.CustomRichMediaEvents; + dateRange?: Dfareporting.Schema.DateRange; + dimensionFilters?: Dfareporting.Schema.DimensionValue[]; + dimensions?: Dfareporting.Schema.SortedDimension[]; enableAllDimensionCombinations?: boolean; metricNames?: string[]; reachByFrequencyMetricNames?: string[]; @@ -2151,11 +2151,11 @@ declare namespace GoogleAppsScript { } export interface ReportsConfiguration { exposureToConversionEnabled?: boolean; - lookbackConfiguration?: Dfareporting_v3_3.Schema.LookbackConfiguration; + lookbackConfiguration?: Dfareporting.Schema.LookbackConfiguration; reportGenerationTimeZoneId?: string; } export interface RichMediaExitOverride { - clickThroughUrl?: Dfareporting_v3_3.Schema.ClickThroughUrl; + clickThroughUrl?: Dfareporting.Schema.ClickThroughUrl; enabled?: boolean; exitId?: string; } @@ -2168,20 +2168,20 @@ declare namespace GoogleAppsScript { accountId?: string; approved?: boolean; directorySiteId?: string; - directorySiteIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + directorySiteIdDimensionValue?: Dfareporting.Schema.DimensionValue; id?: string; - idDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + idDimensionValue?: Dfareporting.Schema.DimensionValue; keyName?: string; kind?: string; name?: string; - siteContacts?: Dfareporting_v3_3.Schema.SiteContact[]; - siteSettings?: Dfareporting_v3_3.Schema.SiteSettings; + siteContacts?: Dfareporting.Schema.SiteContact[]; + siteSettings?: Dfareporting.Schema.SiteSettings; subaccountId?: string; - videoSettings?: Dfareporting_v3_3.Schema.SiteVideoSettings; + videoSettings?: Dfareporting.Schema.SiteVideoSettings; } export interface SiteCompanionSetting { companionsDisabled?: boolean; - enabledSizes?: Dfareporting_v3_3.Schema.Size[]; + enabledSizes?: Dfareporting.Schema.Size[]; imageOnly?: boolean; kind?: string; } @@ -2199,14 +2199,14 @@ declare namespace GoogleAppsScript { activeViewOptOut?: boolean; adBlockingOptOut?: boolean; disableNewCookie?: boolean; - tagSetting?: Dfareporting_v3_3.Schema.TagSetting; + tagSetting?: Dfareporting.Schema.TagSetting; videoActiveViewOptOutTemplate?: boolean; vpaidAdapterChoiceTemplate?: string; } export interface SiteSkippableSetting { kind?: string; - progressOffset?: Dfareporting_v3_3.Schema.VideoOffset; - skipOffset?: Dfareporting_v3_3.Schema.VideoOffset; + progressOffset?: Dfareporting.Schema.VideoOffset; + skipOffset?: Dfareporting.Schema.VideoOffset; skippable?: boolean; } export interface SiteTranscodeSetting { @@ -2214,16 +2214,16 @@ declare namespace GoogleAppsScript { kind?: string; } export interface SiteVideoSettings { - companionSettings?: Dfareporting_v3_3.Schema.SiteCompanionSetting; + companionSettings?: Dfareporting.Schema.SiteCompanionSetting; kind?: string; orientation?: string; - skippableSettings?: Dfareporting_v3_3.Schema.SiteSkippableSetting; - transcodeSettings?: Dfareporting_v3_3.Schema.SiteTranscodeSetting; + skippableSettings?: Dfareporting.Schema.SiteSkippableSetting; + transcodeSettings?: Dfareporting.Schema.SiteTranscodeSetting; } export interface SitesListResponse { kind?: string; nextPageToken?: string; - sites?: Dfareporting_v3_3.Schema.Site[]; + sites?: Dfareporting.Schema.Site[]; } export interface Size { height?: number; @@ -2234,12 +2234,12 @@ declare namespace GoogleAppsScript { } export interface SizesListResponse { kind?: string; - sizes?: Dfareporting_v3_3.Schema.Size[]; + sizes?: Dfareporting.Schema.Size[]; } export interface SkippableSetting { kind?: string; - progressOffset?: Dfareporting_v3_3.Schema.VideoOffset; - skipOffset?: Dfareporting_v3_3.Schema.VideoOffset; + progressOffset?: Dfareporting.Schema.VideoOffset; + skipOffset?: Dfareporting.Schema.VideoOffset; skippable?: boolean; } export interface SortedDimension { @@ -2257,7 +2257,7 @@ declare namespace GoogleAppsScript { export interface SubaccountsListResponse { kind?: string; nextPageToken?: string; - subaccounts?: Dfareporting_v3_3.Schema.Subaccount[]; + subaccounts?: Dfareporting.Schema.Subaccount[]; } export interface TagData { adId?: string; @@ -2284,7 +2284,7 @@ declare namespace GoogleAppsScript { accountId?: string; active?: boolean; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; description?: string; id?: string; kind?: string; @@ -2297,35 +2297,35 @@ declare namespace GoogleAppsScript { export interface TargetableRemarketingListsListResponse { kind?: string; nextPageToken?: string; - targetableRemarketingLists?: Dfareporting_v3_3.Schema.TargetableRemarketingList[]; + targetableRemarketingLists?: Dfareporting.Schema.TargetableRemarketingList[]; } export interface TargetingTemplate { accountId?: string; advertiserId?: string; - advertiserIdDimensionValue?: Dfareporting_v3_3.Schema.DimensionValue; - dayPartTargeting?: Dfareporting_v3_3.Schema.DayPartTargeting; - geoTargeting?: Dfareporting_v3_3.Schema.GeoTargeting; + advertiserIdDimensionValue?: Dfareporting.Schema.DimensionValue; + dayPartTargeting?: Dfareporting.Schema.DayPartTargeting; + geoTargeting?: Dfareporting.Schema.GeoTargeting; id?: string; - keyValueTargetingExpression?: Dfareporting_v3_3.Schema.KeyValueTargetingExpression; + keyValueTargetingExpression?: Dfareporting.Schema.KeyValueTargetingExpression; kind?: string; - languageTargeting?: Dfareporting_v3_3.Schema.LanguageTargeting; - listTargetingExpression?: Dfareporting_v3_3.Schema.ListTargetingExpression; + languageTargeting?: Dfareporting.Schema.LanguageTargeting; + listTargetingExpression?: Dfareporting.Schema.ListTargetingExpression; name?: string; subaccountId?: string; - technologyTargeting?: Dfareporting_v3_3.Schema.TechnologyTargeting; + technologyTargeting?: Dfareporting.Schema.TechnologyTargeting; } export interface TargetingTemplatesListResponse { kind?: string; nextPageToken?: string; - targetingTemplates?: Dfareporting_v3_3.Schema.TargetingTemplate[]; + targetingTemplates?: Dfareporting.Schema.TargetingTemplate[]; } export interface TechnologyTargeting { - browsers?: Dfareporting_v3_3.Schema.Browser[]; - connectionTypes?: Dfareporting_v3_3.Schema.ConnectionType[]; - mobileCarriers?: Dfareporting_v3_3.Schema.MobileCarrier[]; - operatingSystemVersions?: Dfareporting_v3_3.Schema.OperatingSystemVersion[]; - operatingSystems?: Dfareporting_v3_3.Schema.OperatingSystem[]; - platformTypes?: Dfareporting_v3_3.Schema.PlatformType[]; + browsers?: Dfareporting.Schema.Browser[]; + connectionTypes?: Dfareporting.Schema.ConnectionType[]; + mobileCarriers?: Dfareporting.Schema.MobileCarrier[]; + operatingSystemVersions?: Dfareporting.Schema.OperatingSystemVersion[]; + operatingSystems?: Dfareporting.Schema.OperatingSystem[]; + platformTypes?: Dfareporting.Schema.PlatformType[]; } export interface ThirdPartyAuthenticationToken { name?: string; @@ -2360,7 +2360,7 @@ declare namespace GoogleAppsScript { } export interface UserProfileList { etag?: string; - items?: Dfareporting_v3_3.Schema.UserProfile[]; + items?: Dfareporting.Schema.UserProfile[]; kind?: string; } export interface UserRole { @@ -2370,7 +2370,7 @@ declare namespace GoogleAppsScript { kind?: string; name?: string; parentUserRoleId?: string; - permissions?: Dfareporting_v3_3.Schema.UserRolePermission[]; + permissions?: Dfareporting.Schema.UserRolePermission[]; subaccountId?: string; } export interface UserRolePermission { @@ -2387,375 +2387,375 @@ declare namespace GoogleAppsScript { } export interface UserRolePermissionGroupsListResponse { kind?: string; - userRolePermissionGroups?: Dfareporting_v3_3.Schema.UserRolePermissionGroup[]; + userRolePermissionGroups?: Dfareporting.Schema.UserRolePermissionGroup[]; } export interface UserRolePermissionsListResponse { kind?: string; - userRolePermissions?: Dfareporting_v3_3.Schema.UserRolePermission[]; + userRolePermissions?: Dfareporting.Schema.UserRolePermission[]; } export interface UserRolesListResponse { kind?: string; nextPageToken?: string; - userRoles?: Dfareporting_v3_3.Schema.UserRole[]; + userRoles?: Dfareporting.Schema.UserRole[]; } export interface VideoFormat { fileType?: string; id?: number; kind?: string; - resolution?: Dfareporting_v3_3.Schema.Size; + resolution?: Dfareporting.Schema.Size; targetBitRate?: number; } export interface VideoFormatsListResponse { kind?: string; - videoFormats?: Dfareporting_v3_3.Schema.VideoFormat[]; + videoFormats?: Dfareporting.Schema.VideoFormat[]; } export interface VideoOffset { offsetPercentage?: number; offsetSeconds?: number; } export interface VideoSettings { - companionSettings?: Dfareporting_v3_3.Schema.CompanionSetting; + companionSettings?: Dfareporting.Schema.CompanionSetting; kind?: string; orientation?: string; - skippableSettings?: Dfareporting_v3_3.Schema.SkippableSetting; - transcodeSettings?: Dfareporting_v3_3.Schema.TranscodeSetting; + skippableSettings?: Dfareporting.Schema.SkippableSetting; + transcodeSettings?: Dfareporting.Schema.TranscodeSetting; } } } - export interface Dfareporting_v3_3 { - AccountActiveAdSummaries?: Dfareporting_v3_3.Collection.AccountActiveAdSummariesCollection; - AccountPermissionGroups?: Dfareporting_v3_3.Collection.AccountPermissionGroupsCollection; - AccountPermissions?: Dfareporting_v3_3.Collection.AccountPermissionsCollection; - AccountUserProfiles?: Dfareporting_v3_3.Collection.AccountUserProfilesCollection; - Accounts?: Dfareporting_v3_3.Collection.AccountsCollection; - Ads?: Dfareporting_v3_3.Collection.AdsCollection; - AdvertiserGroups?: Dfareporting_v3_3.Collection.AdvertiserGroupsCollection; - AdvertiserLandingPages?: Dfareporting_v3_3.Collection.AdvertiserLandingPagesCollection; - Advertisers?: Dfareporting_v3_3.Collection.AdvertisersCollection; - Browsers?: Dfareporting_v3_3.Collection.BrowsersCollection; - CampaignCreativeAssociations?: Dfareporting_v3_3.Collection.CampaignCreativeAssociationsCollection; - Campaigns?: Dfareporting_v3_3.Collection.CampaignsCollection; - ChangeLogs?: Dfareporting_v3_3.Collection.ChangeLogsCollection; - Cities?: Dfareporting_v3_3.Collection.CitiesCollection; - ConnectionTypes?: Dfareporting_v3_3.Collection.ConnectionTypesCollection; - ContentCategories?: Dfareporting_v3_3.Collection.ContentCategoriesCollection; - Conversions?: Dfareporting_v3_3.Collection.ConversionsCollection; - Countries?: Dfareporting_v3_3.Collection.CountriesCollection; - CreativeAssets?: Dfareporting_v3_3.Collection.CreativeAssetsCollection; - CreativeFieldValues?: Dfareporting_v3_3.Collection.CreativeFieldValuesCollection; - CreativeFields?: Dfareporting_v3_3.Collection.CreativeFieldsCollection; - CreativeGroups?: Dfareporting_v3_3.Collection.CreativeGroupsCollection; - Creatives?: Dfareporting_v3_3.Collection.CreativesCollection; - DimensionValues?: Dfareporting_v3_3.Collection.DimensionValuesCollection; - DirectorySites?: Dfareporting_v3_3.Collection.DirectorySitesCollection; - DynamicTargetingKeys?: Dfareporting_v3_3.Collection.DynamicTargetingKeysCollection; - EventTags?: Dfareporting_v3_3.Collection.EventTagsCollection; - Files?: Dfareporting_v3_3.Collection.FilesCollection; - FloodlightActivities?: Dfareporting_v3_3.Collection.FloodlightActivitiesCollection; - FloodlightActivityGroups?: Dfareporting_v3_3.Collection.FloodlightActivityGroupsCollection; - FloodlightConfigurations?: Dfareporting_v3_3.Collection.FloodlightConfigurationsCollection; - InventoryItems?: Dfareporting_v3_3.Collection.InventoryItemsCollection; - Languages?: Dfareporting_v3_3.Collection.LanguagesCollection; - Metros?: Dfareporting_v3_3.Collection.MetrosCollection; - MobileApps?: Dfareporting_v3_3.Collection.MobileAppsCollection; - MobileCarriers?: Dfareporting_v3_3.Collection.MobileCarriersCollection; - OperatingSystemVersions?: Dfareporting_v3_3.Collection.OperatingSystemVersionsCollection; - OperatingSystems?: Dfareporting_v3_3.Collection.OperatingSystemsCollection; - OrderDocuments?: Dfareporting_v3_3.Collection.OrderDocumentsCollection; - Orders?: Dfareporting_v3_3.Collection.OrdersCollection; - PlacementGroups?: Dfareporting_v3_3.Collection.PlacementGroupsCollection; - PlacementStrategies?: Dfareporting_v3_3.Collection.PlacementStrategiesCollection; - Placements?: Dfareporting_v3_3.Collection.PlacementsCollection; - PlatformTypes?: Dfareporting_v3_3.Collection.PlatformTypesCollection; - PostalCodes?: Dfareporting_v3_3.Collection.PostalCodesCollection; - Projects?: Dfareporting_v3_3.Collection.ProjectsCollection; - Regions?: Dfareporting_v3_3.Collection.RegionsCollection; - RemarketingListShares?: Dfareporting_v3_3.Collection.RemarketingListSharesCollection; - RemarketingLists?: Dfareporting_v3_3.Collection.RemarketingListsCollection; - Reports?: Dfareporting_v3_3.Collection.ReportsCollection; - Sites?: Dfareporting_v3_3.Collection.SitesCollection; - Sizes?: Dfareporting_v3_3.Collection.SizesCollection; - Subaccounts?: Dfareporting_v3_3.Collection.SubaccountsCollection; - TargetableRemarketingLists?: Dfareporting_v3_3.Collection.TargetableRemarketingListsCollection; - TargetingTemplates?: Dfareporting_v3_3.Collection.TargetingTemplatesCollection; - UserProfiles?: Dfareporting_v3_3.Collection.UserProfilesCollection; - UserRolePermissionGroups?: Dfareporting_v3_3.Collection.UserRolePermissionGroupsCollection; - UserRolePermissions?: Dfareporting_v3_3.Collection.UserRolePermissionsCollection; - UserRoles?: Dfareporting_v3_3.Collection.UserRolesCollection; - VideoFormats?: Dfareporting_v3_3.Collection.VideoFormatsCollection; + export interface Dfareporting { + AccountActiveAdSummaries?: Dfareporting.Collection.AccountActiveAdSummariesCollection; + AccountPermissionGroups?: Dfareporting.Collection.AccountPermissionGroupsCollection; + AccountPermissions?: Dfareporting.Collection.AccountPermissionsCollection; + AccountUserProfiles?: Dfareporting.Collection.AccountUserProfilesCollection; + Accounts?: Dfareporting.Collection.AccountsCollection; + Ads?: Dfareporting.Collection.AdsCollection; + AdvertiserGroups?: Dfareporting.Collection.AdvertiserGroupsCollection; + AdvertiserLandingPages?: Dfareporting.Collection.AdvertiserLandingPagesCollection; + Advertisers?: Dfareporting.Collection.AdvertisersCollection; + Browsers?: Dfareporting.Collection.BrowsersCollection; + CampaignCreativeAssociations?: Dfareporting.Collection.CampaignCreativeAssociationsCollection; + Campaigns?: Dfareporting.Collection.CampaignsCollection; + ChangeLogs?: Dfareporting.Collection.ChangeLogsCollection; + Cities?: Dfareporting.Collection.CitiesCollection; + ConnectionTypes?: Dfareporting.Collection.ConnectionTypesCollection; + ContentCategories?: Dfareporting.Collection.ContentCategoriesCollection; + Conversions?: Dfareporting.Collection.ConversionsCollection; + Countries?: Dfareporting.Collection.CountriesCollection; + CreativeAssets?: Dfareporting.Collection.CreativeAssetsCollection; + CreativeFieldValues?: Dfareporting.Collection.CreativeFieldValuesCollection; + CreativeFields?: Dfareporting.Collection.CreativeFieldsCollection; + CreativeGroups?: Dfareporting.Collection.CreativeGroupsCollection; + Creatives?: Dfareporting.Collection.CreativesCollection; + DimensionValues?: Dfareporting.Collection.DimensionValuesCollection; + DirectorySites?: Dfareporting.Collection.DirectorySitesCollection; + DynamicTargetingKeys?: Dfareporting.Collection.DynamicTargetingKeysCollection; + EventTags?: Dfareporting.Collection.EventTagsCollection; + Files?: Dfareporting.Collection.FilesCollection; + FloodlightActivities?: Dfareporting.Collection.FloodlightActivitiesCollection; + FloodlightActivityGroups?: Dfareporting.Collection.FloodlightActivityGroupsCollection; + FloodlightConfigurations?: Dfareporting.Collection.FloodlightConfigurationsCollection; + InventoryItems?: Dfareporting.Collection.InventoryItemsCollection; + Languages?: Dfareporting.Collection.LanguagesCollection; + Metros?: Dfareporting.Collection.MetrosCollection; + MobileApps?: Dfareporting.Collection.MobileAppsCollection; + MobileCarriers?: Dfareporting.Collection.MobileCarriersCollection; + OperatingSystemVersions?: Dfareporting.Collection.OperatingSystemVersionsCollection; + OperatingSystems?: Dfareporting.Collection.OperatingSystemsCollection; + OrderDocuments?: Dfareporting.Collection.OrderDocumentsCollection; + Orders?: Dfareporting.Collection.OrdersCollection; + PlacementGroups?: Dfareporting.Collection.PlacementGroupsCollection; + PlacementStrategies?: Dfareporting.Collection.PlacementStrategiesCollection; + Placements?: Dfareporting.Collection.PlacementsCollection; + PlatformTypes?: Dfareporting.Collection.PlatformTypesCollection; + PostalCodes?: Dfareporting.Collection.PostalCodesCollection; + Projects?: Dfareporting.Collection.ProjectsCollection; + Regions?: Dfareporting.Collection.RegionsCollection; + RemarketingListShares?: Dfareporting.Collection.RemarketingListSharesCollection; + RemarketingLists?: Dfareporting.Collection.RemarketingListsCollection; + Reports?: Dfareporting.Collection.ReportsCollection; + Sites?: Dfareporting.Collection.SitesCollection; + Sizes?: Dfareporting.Collection.SizesCollection; + Subaccounts?: Dfareporting.Collection.SubaccountsCollection; + TargetableRemarketingLists?: Dfareporting.Collection.TargetableRemarketingListsCollection; + TargetingTemplates?: Dfareporting.Collection.TargetingTemplatesCollection; + UserProfiles?: Dfareporting.Collection.UserProfilesCollection; + UserRolePermissionGroups?: Dfareporting.Collection.UserRolePermissionGroupsCollection; + UserRolePermissions?: Dfareporting.Collection.UserRolePermissionsCollection; + UserRoles?: Dfareporting.Collection.UserRolesCollection; + VideoFormats?: Dfareporting.Collection.VideoFormatsCollection; // Create a new instance of Account - newAccount(): Dfareporting_v3_3.Schema.Account; + newAccount(): Dfareporting.Schema.Account; // Create a new instance of AccountUserProfile - newAccountUserProfile(): Dfareporting_v3_3.Schema.AccountUserProfile; + newAccountUserProfile(): Dfareporting.Schema.AccountUserProfile; // Create a new instance of Activities - newActivities(): Dfareporting_v3_3.Schema.Activities; + newActivities(): Dfareporting.Schema.Activities; // Create a new instance of Ad - newAd(): Dfareporting_v3_3.Schema.Ad; + newAd(): Dfareporting.Schema.Ad; // Create a new instance of AdBlockingConfiguration - newAdBlockingConfiguration(): Dfareporting_v3_3.Schema.AdBlockingConfiguration; + newAdBlockingConfiguration(): Dfareporting.Schema.AdBlockingConfiguration; // Create a new instance of Advertiser - newAdvertiser(): Dfareporting_v3_3.Schema.Advertiser; + newAdvertiser(): Dfareporting.Schema.Advertiser; // Create a new instance of AdvertiserGroup - newAdvertiserGroup(): Dfareporting_v3_3.Schema.AdvertiserGroup; + newAdvertiserGroup(): Dfareporting.Schema.AdvertiserGroup; // Create a new instance of AudienceSegment - newAudienceSegment(): Dfareporting_v3_3.Schema.AudienceSegment; + newAudienceSegment(): Dfareporting.Schema.AudienceSegment; // Create a new instance of AudienceSegmentGroup - newAudienceSegmentGroup(): Dfareporting_v3_3.Schema.AudienceSegmentGroup; + newAudienceSegmentGroup(): Dfareporting.Schema.AudienceSegmentGroup; // Create a new instance of Browser - newBrowser(): Dfareporting_v3_3.Schema.Browser; + newBrowser(): Dfareporting.Schema.Browser; // Create a new instance of Campaign - newCampaign(): Dfareporting_v3_3.Schema.Campaign; + newCampaign(): Dfareporting.Schema.Campaign; // Create a new instance of CampaignCreativeAssociation - newCampaignCreativeAssociation(): Dfareporting_v3_3.Schema.CampaignCreativeAssociation; + newCampaignCreativeAssociation(): Dfareporting.Schema.CampaignCreativeAssociation; // Create a new instance of City - newCity(): Dfareporting_v3_3.Schema.City; + newCity(): Dfareporting.Schema.City; // Create a new instance of ClickTag - newClickTag(): Dfareporting_v3_3.Schema.ClickTag; + newClickTag(): Dfareporting.Schema.ClickTag; // Create a new instance of ClickThroughUrl - newClickThroughUrl(): Dfareporting_v3_3.Schema.ClickThroughUrl; + newClickThroughUrl(): Dfareporting.Schema.ClickThroughUrl; // Create a new instance of ClickThroughUrlSuffixProperties - newClickThroughUrlSuffixProperties(): Dfareporting_v3_3.Schema.ClickThroughUrlSuffixProperties; + newClickThroughUrlSuffixProperties(): Dfareporting.Schema.ClickThroughUrlSuffixProperties; // Create a new instance of CompanionClickThroughOverride - newCompanionClickThroughOverride(): Dfareporting_v3_3.Schema.CompanionClickThroughOverride; + newCompanionClickThroughOverride(): Dfareporting.Schema.CompanionClickThroughOverride; // Create a new instance of CompanionSetting - newCompanionSetting(): Dfareporting_v3_3.Schema.CompanionSetting; + newCompanionSetting(): Dfareporting.Schema.CompanionSetting; // Create a new instance of ConnectionType - newConnectionType(): Dfareporting_v3_3.Schema.ConnectionType; + newConnectionType(): Dfareporting.Schema.ConnectionType; // Create a new instance of ContentCategory - newContentCategory(): Dfareporting_v3_3.Schema.ContentCategory; + newContentCategory(): Dfareporting.Schema.ContentCategory; // Create a new instance of Conversion - newConversion(): Dfareporting_v3_3.Schema.Conversion; + newConversion(): Dfareporting.Schema.Conversion; // Create a new instance of ConversionsBatchInsertRequest - newConversionsBatchInsertRequest(): Dfareporting_v3_3.Schema.ConversionsBatchInsertRequest; + newConversionsBatchInsertRequest(): Dfareporting.Schema.ConversionsBatchInsertRequest; // Create a new instance of ConversionsBatchUpdateRequest - newConversionsBatchUpdateRequest(): Dfareporting_v3_3.Schema.ConversionsBatchUpdateRequest; + newConversionsBatchUpdateRequest(): Dfareporting.Schema.ConversionsBatchUpdateRequest; // Create a new instance of Country - newCountry(): Dfareporting_v3_3.Schema.Country; + newCountry(): Dfareporting.Schema.Country; // Create a new instance of Creative - newCreative(): Dfareporting_v3_3.Schema.Creative; + newCreative(): Dfareporting.Schema.Creative; // Create a new instance of CreativeAsset - newCreativeAsset(): Dfareporting_v3_3.Schema.CreativeAsset; + newCreativeAsset(): Dfareporting.Schema.CreativeAsset; // Create a new instance of CreativeAssetId - newCreativeAssetId(): Dfareporting_v3_3.Schema.CreativeAssetId; + newCreativeAssetId(): Dfareporting.Schema.CreativeAssetId; // Create a new instance of CreativeAssetMetadata - newCreativeAssetMetadata(): Dfareporting_v3_3.Schema.CreativeAssetMetadata; + newCreativeAssetMetadata(): Dfareporting.Schema.CreativeAssetMetadata; // Create a new instance of CreativeAssetSelection - newCreativeAssetSelection(): Dfareporting_v3_3.Schema.CreativeAssetSelection; + newCreativeAssetSelection(): Dfareporting.Schema.CreativeAssetSelection; // Create a new instance of CreativeAssignment - newCreativeAssignment(): Dfareporting_v3_3.Schema.CreativeAssignment; + newCreativeAssignment(): Dfareporting.Schema.CreativeAssignment; // Create a new instance of CreativeClickThroughUrl - newCreativeClickThroughUrl(): Dfareporting_v3_3.Schema.CreativeClickThroughUrl; + newCreativeClickThroughUrl(): Dfareporting.Schema.CreativeClickThroughUrl; // Create a new instance of CreativeCustomEvent - newCreativeCustomEvent(): Dfareporting_v3_3.Schema.CreativeCustomEvent; + newCreativeCustomEvent(): Dfareporting.Schema.CreativeCustomEvent; // Create a new instance of CreativeField - newCreativeField(): Dfareporting_v3_3.Schema.CreativeField; + newCreativeField(): Dfareporting.Schema.CreativeField; // Create a new instance of CreativeFieldAssignment - newCreativeFieldAssignment(): Dfareporting_v3_3.Schema.CreativeFieldAssignment; + newCreativeFieldAssignment(): Dfareporting.Schema.CreativeFieldAssignment; // Create a new instance of CreativeFieldValue - newCreativeFieldValue(): Dfareporting_v3_3.Schema.CreativeFieldValue; + newCreativeFieldValue(): Dfareporting.Schema.CreativeFieldValue; // Create a new instance of CreativeGroup - newCreativeGroup(): Dfareporting_v3_3.Schema.CreativeGroup; + newCreativeGroup(): Dfareporting.Schema.CreativeGroup; // Create a new instance of CreativeGroupAssignment - newCreativeGroupAssignment(): Dfareporting_v3_3.Schema.CreativeGroupAssignment; + newCreativeGroupAssignment(): Dfareporting.Schema.CreativeGroupAssignment; // Create a new instance of CreativeOptimizationConfiguration - newCreativeOptimizationConfiguration(): Dfareporting_v3_3.Schema.CreativeOptimizationConfiguration; + newCreativeOptimizationConfiguration(): Dfareporting.Schema.CreativeOptimizationConfiguration; // Create a new instance of CreativeRotation - newCreativeRotation(): Dfareporting_v3_3.Schema.CreativeRotation; + newCreativeRotation(): Dfareporting.Schema.CreativeRotation; // Create a new instance of CustomFloodlightVariable - newCustomFloodlightVariable(): Dfareporting_v3_3.Schema.CustomFloodlightVariable; + newCustomFloodlightVariable(): Dfareporting.Schema.CustomFloodlightVariable; // Create a new instance of CustomRichMediaEvents - newCustomRichMediaEvents(): Dfareporting_v3_3.Schema.CustomRichMediaEvents; + newCustomRichMediaEvents(): Dfareporting.Schema.CustomRichMediaEvents; // Create a new instance of CustomViewabilityMetric - newCustomViewabilityMetric(): Dfareporting_v3_3.Schema.CustomViewabilityMetric; + newCustomViewabilityMetric(): Dfareporting.Schema.CustomViewabilityMetric; // Create a new instance of CustomViewabilityMetricConfiguration - newCustomViewabilityMetricConfiguration(): Dfareporting_v3_3.Schema.CustomViewabilityMetricConfiguration; + newCustomViewabilityMetricConfiguration(): Dfareporting.Schema.CustomViewabilityMetricConfiguration; // Create a new instance of DateRange - newDateRange(): Dfareporting_v3_3.Schema.DateRange; + newDateRange(): Dfareporting.Schema.DateRange; // Create a new instance of DayPartTargeting - newDayPartTargeting(): Dfareporting_v3_3.Schema.DayPartTargeting; + newDayPartTargeting(): Dfareporting.Schema.DayPartTargeting; // Create a new instance of DeepLink - newDeepLink(): Dfareporting_v3_3.Schema.DeepLink; + newDeepLink(): Dfareporting.Schema.DeepLink; // Create a new instance of DefaultClickThroughEventTagProperties - newDefaultClickThroughEventTagProperties(): Dfareporting_v3_3.Schema.DefaultClickThroughEventTagProperties; + newDefaultClickThroughEventTagProperties(): Dfareporting.Schema.DefaultClickThroughEventTagProperties; // Create a new instance of DeliverySchedule - newDeliverySchedule(): Dfareporting_v3_3.Schema.DeliverySchedule; + newDeliverySchedule(): Dfareporting.Schema.DeliverySchedule; // Create a new instance of DfpSettings - newDfpSettings(): Dfareporting_v3_3.Schema.DfpSettings; + newDfpSettings(): Dfareporting.Schema.DfpSettings; // Create a new instance of DimensionFilter - newDimensionFilter(): Dfareporting_v3_3.Schema.DimensionFilter; + newDimensionFilter(): Dfareporting.Schema.DimensionFilter; // Create a new instance of DimensionValue - newDimensionValue(): Dfareporting_v3_3.Schema.DimensionValue; + newDimensionValue(): Dfareporting.Schema.DimensionValue; // Create a new instance of DimensionValueRequest - newDimensionValueRequest(): Dfareporting_v3_3.Schema.DimensionValueRequest; + newDimensionValueRequest(): Dfareporting.Schema.DimensionValueRequest; // Create a new instance of DirectorySite - newDirectorySite(): Dfareporting_v3_3.Schema.DirectorySite; + newDirectorySite(): Dfareporting.Schema.DirectorySite; // Create a new instance of DirectorySiteSettings - newDirectorySiteSettings(): Dfareporting_v3_3.Schema.DirectorySiteSettings; + newDirectorySiteSettings(): Dfareporting.Schema.DirectorySiteSettings; // Create a new instance of DynamicTargetingKey - newDynamicTargetingKey(): Dfareporting_v3_3.Schema.DynamicTargetingKey; + newDynamicTargetingKey(): Dfareporting.Schema.DynamicTargetingKey; // Create a new instance of EncryptionInfo - newEncryptionInfo(): Dfareporting_v3_3.Schema.EncryptionInfo; + newEncryptionInfo(): Dfareporting.Schema.EncryptionInfo; // Create a new instance of EventTag - newEventTag(): Dfareporting_v3_3.Schema.EventTag; + newEventTag(): Dfareporting.Schema.EventTag; // Create a new instance of EventTagOverride - newEventTagOverride(): Dfareporting_v3_3.Schema.EventTagOverride; + newEventTagOverride(): Dfareporting.Schema.EventTagOverride; // Create a new instance of FloodlightActivity - newFloodlightActivity(): Dfareporting_v3_3.Schema.FloodlightActivity; + newFloodlightActivity(): Dfareporting.Schema.FloodlightActivity; // Create a new instance of FloodlightActivityDynamicTag - newFloodlightActivityDynamicTag(): Dfareporting_v3_3.Schema.FloodlightActivityDynamicTag; + newFloodlightActivityDynamicTag(): Dfareporting.Schema.FloodlightActivityDynamicTag; // Create a new instance of FloodlightActivityGroup - newFloodlightActivityGroup(): Dfareporting_v3_3.Schema.FloodlightActivityGroup; + newFloodlightActivityGroup(): Dfareporting.Schema.FloodlightActivityGroup; // Create a new instance of FloodlightActivityPublisherDynamicTag - newFloodlightActivityPublisherDynamicTag(): Dfareporting_v3_3.Schema.FloodlightActivityPublisherDynamicTag; + newFloodlightActivityPublisherDynamicTag(): Dfareporting.Schema.FloodlightActivityPublisherDynamicTag; // Create a new instance of FloodlightConfiguration - newFloodlightConfiguration(): Dfareporting_v3_3.Schema.FloodlightConfiguration; + newFloodlightConfiguration(): Dfareporting.Schema.FloodlightConfiguration; // Create a new instance of FrequencyCap - newFrequencyCap(): Dfareporting_v3_3.Schema.FrequencyCap; + newFrequencyCap(): Dfareporting.Schema.FrequencyCap; // Create a new instance of FsCommand - newFsCommand(): Dfareporting_v3_3.Schema.FsCommand; + newFsCommand(): Dfareporting.Schema.FsCommand; // Create a new instance of GeoTargeting - newGeoTargeting(): Dfareporting_v3_3.Schema.GeoTargeting; + newGeoTargeting(): Dfareporting.Schema.GeoTargeting; // Create a new instance of KeyValueTargetingExpression - newKeyValueTargetingExpression(): Dfareporting_v3_3.Schema.KeyValueTargetingExpression; + newKeyValueTargetingExpression(): Dfareporting.Schema.KeyValueTargetingExpression; // Create a new instance of LandingPage - newLandingPage(): Dfareporting_v3_3.Schema.LandingPage; + newLandingPage(): Dfareporting.Schema.LandingPage; // Create a new instance of Language - newLanguage(): Dfareporting_v3_3.Schema.Language; + newLanguage(): Dfareporting.Schema.Language; // Create a new instance of LanguageTargeting - newLanguageTargeting(): Dfareporting_v3_3.Schema.LanguageTargeting; + newLanguageTargeting(): Dfareporting.Schema.LanguageTargeting; // Create a new instance of LastModifiedInfo - newLastModifiedInfo(): Dfareporting_v3_3.Schema.LastModifiedInfo; + newLastModifiedInfo(): Dfareporting.Schema.LastModifiedInfo; // Create a new instance of ListPopulationClause - newListPopulationClause(): Dfareporting_v3_3.Schema.ListPopulationClause; + newListPopulationClause(): Dfareporting.Schema.ListPopulationClause; // Create a new instance of ListPopulationRule - newListPopulationRule(): Dfareporting_v3_3.Schema.ListPopulationRule; + newListPopulationRule(): Dfareporting.Schema.ListPopulationRule; // Create a new instance of ListPopulationTerm - newListPopulationTerm(): Dfareporting_v3_3.Schema.ListPopulationTerm; + newListPopulationTerm(): Dfareporting.Schema.ListPopulationTerm; // Create a new instance of ListTargetingExpression - newListTargetingExpression(): Dfareporting_v3_3.Schema.ListTargetingExpression; + newListTargetingExpression(): Dfareporting.Schema.ListTargetingExpression; // Create a new instance of LookbackConfiguration - newLookbackConfiguration(): Dfareporting_v3_3.Schema.LookbackConfiguration; + newLookbackConfiguration(): Dfareporting.Schema.LookbackConfiguration; // Create a new instance of Metro - newMetro(): Dfareporting_v3_3.Schema.Metro; + newMetro(): Dfareporting.Schema.Metro; // Create a new instance of MobileApp - newMobileApp(): Dfareporting_v3_3.Schema.MobileApp; + newMobileApp(): Dfareporting.Schema.MobileApp; // Create a new instance of MobileCarrier - newMobileCarrier(): Dfareporting_v3_3.Schema.MobileCarrier; + newMobileCarrier(): Dfareporting.Schema.MobileCarrier; // Create a new instance of ObjectFilter - newObjectFilter(): Dfareporting_v3_3.Schema.ObjectFilter; + newObjectFilter(): Dfareporting.Schema.ObjectFilter; // Create a new instance of OffsetPosition - newOffsetPosition(): Dfareporting_v3_3.Schema.OffsetPosition; + newOffsetPosition(): Dfareporting.Schema.OffsetPosition; // Create a new instance of OmnitureSettings - newOmnitureSettings(): Dfareporting_v3_3.Schema.OmnitureSettings; + newOmnitureSettings(): Dfareporting.Schema.OmnitureSettings; // Create a new instance of OperatingSystem - newOperatingSystem(): Dfareporting_v3_3.Schema.OperatingSystem; + newOperatingSystem(): Dfareporting.Schema.OperatingSystem; // Create a new instance of OperatingSystemVersion - newOperatingSystemVersion(): Dfareporting_v3_3.Schema.OperatingSystemVersion; + newOperatingSystemVersion(): Dfareporting.Schema.OperatingSystemVersion; // Create a new instance of OptimizationActivity - newOptimizationActivity(): Dfareporting_v3_3.Schema.OptimizationActivity; + newOptimizationActivity(): Dfareporting.Schema.OptimizationActivity; // Create a new instance of Placement - newPlacement(): Dfareporting_v3_3.Schema.Placement; + newPlacement(): Dfareporting.Schema.Placement; // Create a new instance of PlacementAssignment - newPlacementAssignment(): Dfareporting_v3_3.Schema.PlacementAssignment; + newPlacementAssignment(): Dfareporting.Schema.PlacementAssignment; // Create a new instance of PlacementGroup - newPlacementGroup(): Dfareporting_v3_3.Schema.PlacementGroup; + newPlacementGroup(): Dfareporting.Schema.PlacementGroup; // Create a new instance of PlacementStrategy - newPlacementStrategy(): Dfareporting_v3_3.Schema.PlacementStrategy; + newPlacementStrategy(): Dfareporting.Schema.PlacementStrategy; // Create a new instance of PlatformType - newPlatformType(): Dfareporting_v3_3.Schema.PlatformType; + newPlatformType(): Dfareporting.Schema.PlatformType; // Create a new instance of PopupWindowProperties - newPopupWindowProperties(): Dfareporting_v3_3.Schema.PopupWindowProperties; + newPopupWindowProperties(): Dfareporting.Schema.PopupWindowProperties; // Create a new instance of PostalCode - newPostalCode(): Dfareporting_v3_3.Schema.PostalCode; + newPostalCode(): Dfareporting.Schema.PostalCode; // Create a new instance of PricingSchedule - newPricingSchedule(): Dfareporting_v3_3.Schema.PricingSchedule; + newPricingSchedule(): Dfareporting.Schema.PricingSchedule; // Create a new instance of PricingSchedulePricingPeriod - newPricingSchedulePricingPeriod(): Dfareporting_v3_3.Schema.PricingSchedulePricingPeriod; + newPricingSchedulePricingPeriod(): Dfareporting.Schema.PricingSchedulePricingPeriod; // Create a new instance of Recipient - newRecipient(): Dfareporting_v3_3.Schema.Recipient; + newRecipient(): Dfareporting.Schema.Recipient; // Create a new instance of Region - newRegion(): Dfareporting_v3_3.Schema.Region; + newRegion(): Dfareporting.Schema.Region; // Create a new instance of RemarketingList - newRemarketingList(): Dfareporting_v3_3.Schema.RemarketingList; + newRemarketingList(): Dfareporting.Schema.RemarketingList; // Create a new instance of RemarketingListShare - newRemarketingListShare(): Dfareporting_v3_3.Schema.RemarketingListShare; + newRemarketingListShare(): Dfareporting.Schema.RemarketingListShare; // Create a new instance of Report - newReport(): Dfareporting_v3_3.Schema.Report; + newReport(): Dfareporting.Schema.Report; // Create a new instance of ReportCriteria - newReportCriteria(): Dfareporting_v3_3.Schema.ReportCriteria; + newReportCriteria(): Dfareporting.Schema.ReportCriteria; // Create a new instance of ReportCrossDimensionReachCriteria - newReportCrossDimensionReachCriteria(): Dfareporting_v3_3.Schema.ReportCrossDimensionReachCriteria; + newReportCrossDimensionReachCriteria(): Dfareporting.Schema.ReportCrossDimensionReachCriteria; // Create a new instance of ReportDelivery - newReportDelivery(): Dfareporting_v3_3.Schema.ReportDelivery; + newReportDelivery(): Dfareporting.Schema.ReportDelivery; // Create a new instance of ReportFloodlightCriteria - newReportFloodlightCriteria(): Dfareporting_v3_3.Schema.ReportFloodlightCriteria; + newReportFloodlightCriteria(): Dfareporting.Schema.ReportFloodlightCriteria; // Create a new instance of ReportFloodlightCriteriaReportProperties - newReportFloodlightCriteriaReportProperties(): Dfareporting_v3_3.Schema.ReportFloodlightCriteriaReportProperties; + newReportFloodlightCriteriaReportProperties(): Dfareporting.Schema.ReportFloodlightCriteriaReportProperties; // Create a new instance of ReportPathToConversionCriteria - newReportPathToConversionCriteria(): Dfareporting_v3_3.Schema.ReportPathToConversionCriteria; + newReportPathToConversionCriteria(): Dfareporting.Schema.ReportPathToConversionCriteria; // Create a new instance of ReportPathToConversionCriteriaReportProperties - newReportPathToConversionCriteriaReportProperties(): Dfareporting_v3_3.Schema.ReportPathToConversionCriteriaReportProperties; + newReportPathToConversionCriteriaReportProperties(): Dfareporting.Schema.ReportPathToConversionCriteriaReportProperties; // Create a new instance of ReportReachCriteria - newReportReachCriteria(): Dfareporting_v3_3.Schema.ReportReachCriteria; + newReportReachCriteria(): Dfareporting.Schema.ReportReachCriteria; // Create a new instance of ReportSchedule - newReportSchedule(): Dfareporting_v3_3.Schema.ReportSchedule; + newReportSchedule(): Dfareporting.Schema.ReportSchedule; // Create a new instance of ReportsConfiguration - newReportsConfiguration(): Dfareporting_v3_3.Schema.ReportsConfiguration; + newReportsConfiguration(): Dfareporting.Schema.ReportsConfiguration; // Create a new instance of RichMediaExitOverride - newRichMediaExitOverride(): Dfareporting_v3_3.Schema.RichMediaExitOverride; + newRichMediaExitOverride(): Dfareporting.Schema.RichMediaExitOverride; // Create a new instance of Rule - newRule(): Dfareporting_v3_3.Schema.Rule; + newRule(): Dfareporting.Schema.Rule; // Create a new instance of Site - newSite(): Dfareporting_v3_3.Schema.Site; + newSite(): Dfareporting.Schema.Site; // Create a new instance of SiteCompanionSetting - newSiteCompanionSetting(): Dfareporting_v3_3.Schema.SiteCompanionSetting; + newSiteCompanionSetting(): Dfareporting.Schema.SiteCompanionSetting; // Create a new instance of SiteContact - newSiteContact(): Dfareporting_v3_3.Schema.SiteContact; + newSiteContact(): Dfareporting.Schema.SiteContact; // Create a new instance of SiteSettings - newSiteSettings(): Dfareporting_v3_3.Schema.SiteSettings; + newSiteSettings(): Dfareporting.Schema.SiteSettings; // Create a new instance of SiteSkippableSetting - newSiteSkippableSetting(): Dfareporting_v3_3.Schema.SiteSkippableSetting; + newSiteSkippableSetting(): Dfareporting.Schema.SiteSkippableSetting; // Create a new instance of SiteTranscodeSetting - newSiteTranscodeSetting(): Dfareporting_v3_3.Schema.SiteTranscodeSetting; + newSiteTranscodeSetting(): Dfareporting.Schema.SiteTranscodeSetting; // Create a new instance of SiteVideoSettings - newSiteVideoSettings(): Dfareporting_v3_3.Schema.SiteVideoSettings; + newSiteVideoSettings(): Dfareporting.Schema.SiteVideoSettings; // Create a new instance of Size - newSize(): Dfareporting_v3_3.Schema.Size; + newSize(): Dfareporting.Schema.Size; // Create a new instance of SkippableSetting - newSkippableSetting(): Dfareporting_v3_3.Schema.SkippableSetting; + newSkippableSetting(): Dfareporting.Schema.SkippableSetting; // Create a new instance of SortedDimension - newSortedDimension(): Dfareporting_v3_3.Schema.SortedDimension; + newSortedDimension(): Dfareporting.Schema.SortedDimension; // Create a new instance of Subaccount - newSubaccount(): Dfareporting_v3_3.Schema.Subaccount; + newSubaccount(): Dfareporting.Schema.Subaccount; // Create a new instance of TagSetting - newTagSetting(): Dfareporting_v3_3.Schema.TagSetting; + newTagSetting(): Dfareporting.Schema.TagSetting; // Create a new instance of TagSettings - newTagSettings(): Dfareporting_v3_3.Schema.TagSettings; + newTagSettings(): Dfareporting.Schema.TagSettings; // Create a new instance of TargetWindow - newTargetWindow(): Dfareporting_v3_3.Schema.TargetWindow; + newTargetWindow(): Dfareporting.Schema.TargetWindow; // Create a new instance of TargetingTemplate - newTargetingTemplate(): Dfareporting_v3_3.Schema.TargetingTemplate; + newTargetingTemplate(): Dfareporting.Schema.TargetingTemplate; // Create a new instance of TechnologyTargeting - newTechnologyTargeting(): Dfareporting_v3_3.Schema.TechnologyTargeting; + newTechnologyTargeting(): Dfareporting.Schema.TechnologyTargeting; // Create a new instance of ThirdPartyAuthenticationToken - newThirdPartyAuthenticationToken(): Dfareporting_v3_3.Schema.ThirdPartyAuthenticationToken; + newThirdPartyAuthenticationToken(): Dfareporting.Schema.ThirdPartyAuthenticationToken; // Create a new instance of ThirdPartyTrackingUrl - newThirdPartyTrackingUrl(): Dfareporting_v3_3.Schema.ThirdPartyTrackingUrl; + newThirdPartyTrackingUrl(): Dfareporting.Schema.ThirdPartyTrackingUrl; // Create a new instance of TranscodeSetting - newTranscodeSetting(): Dfareporting_v3_3.Schema.TranscodeSetting; + newTranscodeSetting(): Dfareporting.Schema.TranscodeSetting; // Create a new instance of UniversalAdId - newUniversalAdId(): Dfareporting_v3_3.Schema.UniversalAdId; + newUniversalAdId(): Dfareporting.Schema.UniversalAdId; // Create a new instance of UserDefinedVariableConfiguration - newUserDefinedVariableConfiguration(): Dfareporting_v3_3.Schema.UserDefinedVariableConfiguration; + newUserDefinedVariableConfiguration(): Dfareporting.Schema.UserDefinedVariableConfiguration; // Create a new instance of UserRole - newUserRole(): Dfareporting_v3_3.Schema.UserRole; + newUserRole(): Dfareporting.Schema.UserRole; // Create a new instance of UserRolePermission - newUserRolePermission(): Dfareporting_v3_3.Schema.UserRolePermission; + newUserRolePermission(): Dfareporting.Schema.UserRolePermission; // Create a new instance of VideoOffset - newVideoOffset(): Dfareporting_v3_3.Schema.VideoOffset; + newVideoOffset(): Dfareporting.Schema.VideoOffset; // Create a new instance of VideoSettings - newVideoSettings(): Dfareporting_v3_3.Schema.VideoSettings; + newVideoSettings(): Dfareporting.Schema.VideoSettings; } } -declare var Dfareporting_v3_3: GoogleAppsScript.Dfareporting_v3_3; +declare var Dfareporting: GoogleAppsScript.Dfareporting; diff --git a/types/google-apps-script/apis/directory_v1.d.ts b/types/google-apps-script/apis/directory_v1.d.ts index a0181b2a8f..156fb4eb12 100644 --- a/types/google-apps-script/apis/directory_v1.d.ts +++ b/types/google-apps-script/apis/directory_v1.d.ts @@ -5,14 +5,14 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Admin_directory_v1 { + namespace AdminDirectory { namespace Collection { namespace Groups { export interface AliasesCollection { // Add a alias for the group - insert(resource: Schema.Alias, groupKey: string): Admin_directory_v1.Schema.Alias; + insert(resource: Schema.Alias, groupKey: string): AdminDirectory.Schema.Alias; // List all aliases for a group - list(groupKey: string): Admin_directory_v1.Schema.Aliases; + list(groupKey: string): AdminDirectory.Schema.Aliases; // Remove a alias for the group remove(groupKey: string, alias: string): void; } @@ -20,94 +20,94 @@ declare namespace GoogleAppsScript { namespace Resources { export interface BuildingsCollection { // Retrieves a building. - get(customer: string, buildingId: string): Admin_directory_v1.Schema.Building; + get(customer: string, buildingId: string): AdminDirectory.Schema.Building; // Inserts a building. - insert(resource: Schema.Building, customer: string): Admin_directory_v1.Schema.Building; + insert(resource: Schema.Building, customer: string): AdminDirectory.Schema.Building; // Inserts a building. - insert(resource: Schema.Building, customer: string, optionalArgs: object): Admin_directory_v1.Schema.Building; + insert(resource: Schema.Building, customer: string, optionalArgs: object): AdminDirectory.Schema.Building; // Retrieves a list of buildings for an account. - list(customer: string): Admin_directory_v1.Schema.Buildings; + list(customer: string): AdminDirectory.Schema.Buildings; // Retrieves a list of buildings for an account. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.Buildings; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.Buildings; // Updates a building. This method supports patch semantics. - patch(resource: Schema.Building, customer: string, buildingId: string): Admin_directory_v1.Schema.Building; + patch(resource: Schema.Building, customer: string, buildingId: string): AdminDirectory.Schema.Building; // Updates a building. This method supports patch semantics. - patch(resource: Schema.Building, customer: string, buildingId: string, optionalArgs: object): Admin_directory_v1.Schema.Building; + patch(resource: Schema.Building, customer: string, buildingId: string, optionalArgs: object): AdminDirectory.Schema.Building; // Deletes a building. remove(customer: string, buildingId: string): void; // Updates a building. - update(resource: Schema.Building, customer: string, buildingId: string): Admin_directory_v1.Schema.Building; + update(resource: Schema.Building, customer: string, buildingId: string): AdminDirectory.Schema.Building; // Updates a building. - update(resource: Schema.Building, customer: string, buildingId: string, optionalArgs: object): Admin_directory_v1.Schema.Building; + update(resource: Schema.Building, customer: string, buildingId: string, optionalArgs: object): AdminDirectory.Schema.Building; } export interface CalendarsCollection { // Retrieves a calendar resource. - get(customer: string, calendarResourceId: string): Admin_directory_v1.Schema.CalendarResource; + get(customer: string, calendarResourceId: string): AdminDirectory.Schema.CalendarResource; // Inserts a calendar resource. - insert(resource: Schema.CalendarResource, customer: string): Admin_directory_v1.Schema.CalendarResource; + insert(resource: Schema.CalendarResource, customer: string): AdminDirectory.Schema.CalendarResource; // Retrieves a list of calendar resources for an account. - list(customer: string): Admin_directory_v1.Schema.CalendarResources; + list(customer: string): AdminDirectory.Schema.CalendarResources; // Retrieves a list of calendar resources for an account. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.CalendarResources; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.CalendarResources; // Updates a calendar resource. // This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved. This method supports patch semantics. - patch(resource: Schema.CalendarResource, customer: string, calendarResourceId: string): Admin_directory_v1.Schema.CalendarResource; + patch(resource: Schema.CalendarResource, customer: string, calendarResourceId: string): AdminDirectory.Schema.CalendarResource; // Deletes a calendar resource. remove(customer: string, calendarResourceId: string): void; // Updates a calendar resource. // This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved. - update(resource: Schema.CalendarResource, customer: string, calendarResourceId: string): Admin_directory_v1.Schema.CalendarResource; + update(resource: Schema.CalendarResource, customer: string, calendarResourceId: string): AdminDirectory.Schema.CalendarResource; } export interface FeaturesCollection { // Retrieves a feature. - get(customer: string, featureKey: string): Admin_directory_v1.Schema.Feature; + get(customer: string, featureKey: string): AdminDirectory.Schema.Feature; // Inserts a feature. - insert(resource: Schema.Feature, customer: string): Admin_directory_v1.Schema.Feature; + insert(resource: Schema.Feature, customer: string): AdminDirectory.Schema.Feature; // Retrieves a list of features for an account. - list(customer: string): Admin_directory_v1.Schema.Features; + list(customer: string): AdminDirectory.Schema.Features; // Retrieves a list of features for an account. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.Features; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.Features; // Updates a feature. This method supports patch semantics. - patch(resource: Schema.Feature, customer: string, featureKey: string): Admin_directory_v1.Schema.Feature; + patch(resource: Schema.Feature, customer: string, featureKey: string): AdminDirectory.Schema.Feature; // Deletes a feature. remove(customer: string, featureKey: string): void; // Renames a feature. rename(resource: Schema.FeatureRename, customer: string, oldName: string): void; // Updates a feature. - update(resource: Schema.Feature, customer: string, featureKey: string): Admin_directory_v1.Schema.Feature; + update(resource: Schema.Feature, customer: string, featureKey: string): AdminDirectory.Schema.Feature; } } namespace Users { export interface AliasesCollection { // Add a alias for the user - insert(resource: Schema.Alias, userKey: string): Admin_directory_v1.Schema.Alias; + insert(resource: Schema.Alias, userKey: string): AdminDirectory.Schema.Alias; // List all aliases for a user - list(userKey: string): Admin_directory_v1.Schema.Aliases; + list(userKey: string): AdminDirectory.Schema.Aliases; // List all aliases for a user - list(userKey: string, optionalArgs: object): Admin_directory_v1.Schema.Aliases; + list(userKey: string, optionalArgs: object): AdminDirectory.Schema.Aliases; // Remove a alias for the user remove(userKey: string, alias: string): void; // Watch for changes in user aliases list - watch(resource: Schema.Channel, userKey: string): Admin_directory_v1.Schema.Channel; + watch(resource: Schema.Channel, userKey: string): AdminDirectory.Schema.Channel; // Watch for changes in user aliases list - watch(resource: Schema.Channel, userKey: string, optionalArgs: object): Admin_directory_v1.Schema.Channel; + watch(resource: Schema.Channel, userKey: string, optionalArgs: object): AdminDirectory.Schema.Channel; } export interface PhotosCollection { // Retrieve photo of a user - get(userKey: string): Admin_directory_v1.Schema.UserPhoto; + get(userKey: string): AdminDirectory.Schema.UserPhoto; // Add a photo for the user. This method supports patch semantics. - patch(resource: Schema.UserPhoto, userKey: string): Admin_directory_v1.Schema.UserPhoto; + patch(resource: Schema.UserPhoto, userKey: string): AdminDirectory.Schema.UserPhoto; // Remove photos for the user remove(userKey: string): void; // Add a photo for the user - update(resource: Schema.UserPhoto, userKey: string): Admin_directory_v1.Schema.UserPhoto; + update(resource: Schema.UserPhoto, userKey: string): AdminDirectory.Schema.UserPhoto; } } export interface AspsCollection { // Get information about an ASP issued by a user. - get(userKey: string, codeId: number): Admin_directory_v1.Schema.Asp; + get(userKey: string, codeId: number): AdminDirectory.Schema.Asp; // List the ASPs issued by a user. - list(userKey: string): Admin_directory_v1.Schema.Asps; + list(userKey: string): AdminDirectory.Schema.Asps; // Delete an ASP issued by a user. remove(userKey: string, codeId: number): void; } @@ -119,225 +119,225 @@ declare namespace GoogleAppsScript { // Take action on Chrome OS Device action(resource: Schema.ChromeOsDeviceAction, customerId: string, resourceId: string): void; // Retrieve Chrome OS Device - get(customerId: string, deviceId: string): Admin_directory_v1.Schema.ChromeOsDevice; + get(customerId: string, deviceId: string): AdminDirectory.Schema.ChromeOsDevice; // Retrieve Chrome OS Device - get(customerId: string, deviceId: string, optionalArgs: object): Admin_directory_v1.Schema.ChromeOsDevice; + get(customerId: string, deviceId: string, optionalArgs: object): AdminDirectory.Schema.ChromeOsDevice; // Retrieve all Chrome OS Devices of a customer (paginated) - list(customerId: string): Admin_directory_v1.Schema.ChromeOsDevices; + list(customerId: string): AdminDirectory.Schema.ChromeOsDevices; // Retrieve all Chrome OS Devices of a customer (paginated) - list(customerId: string, optionalArgs: object): Admin_directory_v1.Schema.ChromeOsDevices; + list(customerId: string, optionalArgs: object): AdminDirectory.Schema.ChromeOsDevices; // Move or insert multiple Chrome OS Devices to organizational unit moveDevicesToOu(resource: Schema.ChromeOsMoveDevicesToOu, customerId: string, orgUnitPath: string): void; // Update Chrome OS Device. This method supports patch semantics. - patch(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string): Admin_directory_v1.Schema.ChromeOsDevice; + patch(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string): AdminDirectory.Schema.ChromeOsDevice; // Update Chrome OS Device. This method supports patch semantics. - patch(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string, optionalArgs: object): Admin_directory_v1.Schema.ChromeOsDevice; + patch(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string, optionalArgs: object): AdminDirectory.Schema.ChromeOsDevice; // Update Chrome OS Device - update(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string): Admin_directory_v1.Schema.ChromeOsDevice; + update(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string): AdminDirectory.Schema.ChromeOsDevice; // Update Chrome OS Device - update(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string, optionalArgs: object): Admin_directory_v1.Schema.ChromeOsDevice; + update(resource: Schema.ChromeOsDevice, customerId: string, deviceId: string, optionalArgs: object): AdminDirectory.Schema.ChromeOsDevice; } export interface CustomersCollection { // Retrieves a customer. - get(customerKey: string): Admin_directory_v1.Schema.Customer; + get(customerKey: string): AdminDirectory.Schema.Customer; // Updates a customer. This method supports patch semantics. - patch(resource: Schema.Customer, customerKey: string): Admin_directory_v1.Schema.Customer; + patch(resource: Schema.Customer, customerKey: string): AdminDirectory.Schema.Customer; // Updates a customer. - update(resource: Schema.Customer, customerKey: string): Admin_directory_v1.Schema.Customer; + update(resource: Schema.Customer, customerKey: string): AdminDirectory.Schema.Customer; } export interface DomainAliasesCollection { // Retrieves a domain alias of the customer. - get(customer: string, domainAliasName: string): Admin_directory_v1.Schema.DomainAlias; + get(customer: string, domainAliasName: string): AdminDirectory.Schema.DomainAlias; // Inserts a Domain alias of the customer. - insert(resource: Schema.DomainAlias, customer: string): Admin_directory_v1.Schema.DomainAlias; + insert(resource: Schema.DomainAlias, customer: string): AdminDirectory.Schema.DomainAlias; // Lists the domain aliases of the customer. - list(customer: string): Admin_directory_v1.Schema.DomainAliases; + list(customer: string): AdminDirectory.Schema.DomainAliases; // Lists the domain aliases of the customer. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.DomainAliases; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.DomainAliases; // Deletes a Domain Alias of the customer. remove(customer: string, domainAliasName: string): void; } export interface DomainsCollection { // Retrieves a domain of the customer. - get(customer: string, domainName: string): Admin_directory_v1.Schema.Domains; + get(customer: string, domainName: string): AdminDirectory.Schema.Domains; // Inserts a domain of the customer. - insert(resource: Schema.Domains, customer: string): Admin_directory_v1.Schema.Domains; + insert(resource: Schema.Domains, customer: string): AdminDirectory.Schema.Domains; // Lists the domains of the customer. - list(customer: string): Admin_directory_v1.Schema.Domains2; + list(customer: string): AdminDirectory.Schema.Domains2; // Deletes a domain of the customer. remove(customer: string, domainName: string): void; } export interface GroupsCollection { - Aliases?: Admin_directory_v1.Collection.Groups.AliasesCollection; + Aliases?: AdminDirectory.Collection.Groups.AliasesCollection; // Retrieve Group - get(groupKey: string): Admin_directory_v1.Schema.Group; + get(groupKey: string): AdminDirectory.Schema.Group; // Create Group - insert(resource: Schema.Group): Admin_directory_v1.Schema.Group; + insert(resource: Schema.Group): AdminDirectory.Schema.Group; // Retrieve all groups of a domain or of a user given a userKey (paginated) - list(): Admin_directory_v1.Schema.Groups; + list(): AdminDirectory.Schema.Groups; // Retrieve all groups of a domain or of a user given a userKey (paginated) - list(optionalArgs: object): Admin_directory_v1.Schema.Groups; + list(optionalArgs: object): AdminDirectory.Schema.Groups; // Update Group. This method supports patch semantics. - patch(resource: Schema.Group, groupKey: string): Admin_directory_v1.Schema.Group; + patch(resource: Schema.Group, groupKey: string): AdminDirectory.Schema.Group; // Delete Group remove(groupKey: string): void; // Update Group - update(resource: Schema.Group, groupKey: string): Admin_directory_v1.Schema.Group; + update(resource: Schema.Group, groupKey: string): AdminDirectory.Schema.Group; } export interface MembersCollection { // Retrieve Group Member - get(groupKey: string, memberKey: string): Admin_directory_v1.Schema.Member; + get(groupKey: string, memberKey: string): AdminDirectory.Schema.Member; // Checks whether the given user is a member of the group. Membership can be direct or nested. - hasMember(groupKey: string, memberKey: string): Admin_directory_v1.Schema.MembersHasMember; + hasMember(groupKey: string, memberKey: string): AdminDirectory.Schema.MembersHasMember; // Add user to the specified group. - insert(resource: Schema.Member, groupKey: string): Admin_directory_v1.Schema.Member; + insert(resource: Schema.Member, groupKey: string): AdminDirectory.Schema.Member; // Retrieve all members in a group (paginated) - list(groupKey: string): Admin_directory_v1.Schema.Members; + list(groupKey: string): AdminDirectory.Schema.Members; // Retrieve all members in a group (paginated) - list(groupKey: string, optionalArgs: object): Admin_directory_v1.Schema.Members; + list(groupKey: string, optionalArgs: object): AdminDirectory.Schema.Members; // Update membership of a user in the specified group. This method supports patch semantics. - patch(resource: Schema.Member, groupKey: string, memberKey: string): Admin_directory_v1.Schema.Member; + patch(resource: Schema.Member, groupKey: string, memberKey: string): AdminDirectory.Schema.Member; // Remove membership. remove(groupKey: string, memberKey: string): void; // Update membership of a user in the specified group. - update(resource: Schema.Member, groupKey: string, memberKey: string): Admin_directory_v1.Schema.Member; + update(resource: Schema.Member, groupKey: string, memberKey: string): AdminDirectory.Schema.Member; } export interface MobiledevicesCollection { // Take action on Mobile Device action(resource: Schema.MobileDeviceAction, customerId: string, resourceId: string): void; // Retrieve Mobile Device - get(customerId: string, resourceId: string): Admin_directory_v1.Schema.MobileDevice; + get(customerId: string, resourceId: string): AdminDirectory.Schema.MobileDevice; // Retrieve Mobile Device - get(customerId: string, resourceId: string, optionalArgs: object): Admin_directory_v1.Schema.MobileDevice; + get(customerId: string, resourceId: string, optionalArgs: object): AdminDirectory.Schema.MobileDevice; // Retrieve all Mobile Devices of a customer (paginated) - list(customerId: string): Admin_directory_v1.Schema.MobileDevices; + list(customerId: string): AdminDirectory.Schema.MobileDevices; // Retrieve all Mobile Devices of a customer (paginated) - list(customerId: string, optionalArgs: object): Admin_directory_v1.Schema.MobileDevices; + list(customerId: string, optionalArgs: object): AdminDirectory.Schema.MobileDevices; // Delete Mobile Device remove(customerId: string, resourceId: string): void; } export interface NotificationsCollection { // Retrieves a notification. - get(customer: string, notificationId: string): Admin_directory_v1.Schema.Notification; + get(customer: string, notificationId: string): AdminDirectory.Schema.Notification; // Retrieves a list of notifications. - list(customer: string): Admin_directory_v1.Schema.Notifications; + list(customer: string): AdminDirectory.Schema.Notifications; // Retrieves a list of notifications. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.Notifications; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.Notifications; // Updates a notification. This method supports patch semantics. - patch(resource: Schema.Notification, customer: string, notificationId: string): Admin_directory_v1.Schema.Notification; + patch(resource: Schema.Notification, customer: string, notificationId: string): AdminDirectory.Schema.Notification; // Deletes a notification remove(customer: string, notificationId: string): void; // Updates a notification. - update(resource: Schema.Notification, customer: string, notificationId: string): Admin_directory_v1.Schema.Notification; + update(resource: Schema.Notification, customer: string, notificationId: string): AdminDirectory.Schema.Notification; } export interface OrgunitsCollection { // Retrieve organizational unit - get(customerId: string, orgUnitPath: string[]): Admin_directory_v1.Schema.OrgUnit; + get(customerId: string, orgUnitPath: string[]): AdminDirectory.Schema.OrgUnit; // Add organizational unit - insert(resource: Schema.OrgUnit, customerId: string): Admin_directory_v1.Schema.OrgUnit; + insert(resource: Schema.OrgUnit, customerId: string): AdminDirectory.Schema.OrgUnit; // Retrieve all organizational units - list(customerId: string): Admin_directory_v1.Schema.OrgUnits; + list(customerId: string): AdminDirectory.Schema.OrgUnits; // Retrieve all organizational units - list(customerId: string, optionalArgs: object): Admin_directory_v1.Schema.OrgUnits; + list(customerId: string, optionalArgs: object): AdminDirectory.Schema.OrgUnits; // Update organizational unit. This method supports patch semantics. - patch(resource: Schema.OrgUnit, customerId: string, orgUnitPath: string[]): Admin_directory_v1.Schema.OrgUnit; + patch(resource: Schema.OrgUnit, customerId: string, orgUnitPath: string[]): AdminDirectory.Schema.OrgUnit; // Remove organizational unit remove(customerId: string, orgUnitPath: string[]): void; // Update organizational unit - update(resource: Schema.OrgUnit, customerId: string, orgUnitPath: string[]): Admin_directory_v1.Schema.OrgUnit; + update(resource: Schema.OrgUnit, customerId: string, orgUnitPath: string[]): AdminDirectory.Schema.OrgUnit; } export interface PrivilegesCollection { // Retrieves a paginated list of all privileges for a customer. - list(customer: string): Admin_directory_v1.Schema.Privileges; + list(customer: string): AdminDirectory.Schema.Privileges; } export interface ResolvedAppAccessSettingsCollection { // Retrieves resolved app access settings of the logged in user. - GetSettings(): Admin_directory_v1.Schema.AppAccessCollections; + GetSettings(): AdminDirectory.Schema.AppAccessCollections; // Retrieves the list of apps trusted by the admin of the logged in user. - ListTrustedApps(): Admin_directory_v1.Schema.TrustedApps; + ListTrustedApps(): AdminDirectory.Schema.TrustedApps; } export interface ResourcesCollection { - Buildings?: Admin_directory_v1.Collection.Resources.BuildingsCollection; - Calendars?: Admin_directory_v1.Collection.Resources.CalendarsCollection; - Features?: Admin_directory_v1.Collection.Resources.FeaturesCollection; + Buildings?: AdminDirectory.Collection.Resources.BuildingsCollection; + Calendars?: AdminDirectory.Collection.Resources.CalendarsCollection; + Features?: AdminDirectory.Collection.Resources.FeaturesCollection; } export interface RoleAssignmentsCollection { // Retrieve a role assignment. - get(customer: string, roleAssignmentId: string): Admin_directory_v1.Schema.RoleAssignment; + get(customer: string, roleAssignmentId: string): AdminDirectory.Schema.RoleAssignment; // Creates a role assignment. - insert(resource: Schema.RoleAssignment, customer: string): Admin_directory_v1.Schema.RoleAssignment; + insert(resource: Schema.RoleAssignment, customer: string): AdminDirectory.Schema.RoleAssignment; // Retrieves a paginated list of all roleAssignments. - list(customer: string): Admin_directory_v1.Schema.RoleAssignments; + list(customer: string): AdminDirectory.Schema.RoleAssignments; // Retrieves a paginated list of all roleAssignments. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.RoleAssignments; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.RoleAssignments; // Deletes a role assignment. remove(customer: string, roleAssignmentId: string): void; } export interface RolesCollection { // Retrieves a role. - get(customer: string, roleId: string): Admin_directory_v1.Schema.Role; + get(customer: string, roleId: string): AdminDirectory.Schema.Role; // Creates a role. - insert(resource: Schema.Role, customer: string): Admin_directory_v1.Schema.Role; + insert(resource: Schema.Role, customer: string): AdminDirectory.Schema.Role; // Retrieves a paginated list of all the roles in a domain. - list(customer: string): Admin_directory_v1.Schema.Roles; + list(customer: string): AdminDirectory.Schema.Roles; // Retrieves a paginated list of all the roles in a domain. - list(customer: string, optionalArgs: object): Admin_directory_v1.Schema.Roles; + list(customer: string, optionalArgs: object): AdminDirectory.Schema.Roles; // Updates a role. This method supports patch semantics. - patch(resource: Schema.Role, customer: string, roleId: string): Admin_directory_v1.Schema.Role; + patch(resource: Schema.Role, customer: string, roleId: string): AdminDirectory.Schema.Role; // Deletes a role. remove(customer: string, roleId: string): void; // Updates a role. - update(resource: Schema.Role, customer: string, roleId: string): Admin_directory_v1.Schema.Role; + update(resource: Schema.Role, customer: string, roleId: string): AdminDirectory.Schema.Role; } export interface SchemasCollection { // Retrieve schema - get(customerId: string, schemaKey: string): Admin_directory_v1.Schema.Schema; + get(customerId: string, schemaKey: string): AdminDirectory.Schema.Schema; // Create schema. - insert(resource: Schema.Schema, customerId: string): Admin_directory_v1.Schema.Schema; + insert(resource: Schema.Schema, customerId: string): AdminDirectory.Schema.Schema; // Retrieve all schemas for a customer - list(customerId: string): Admin_directory_v1.Schema.Schemas; + list(customerId: string): AdminDirectory.Schema.Schemas; // Update schema. This method supports patch semantics. - patch(resource: Schema.Schema, customerId: string, schemaKey: string): Admin_directory_v1.Schema.Schema; + patch(resource: Schema.Schema, customerId: string, schemaKey: string): AdminDirectory.Schema.Schema; // Delete schema remove(customerId: string, schemaKey: string): void; // Update schema - update(resource: Schema.Schema, customerId: string, schemaKey: string): Admin_directory_v1.Schema.Schema; + update(resource: Schema.Schema, customerId: string, schemaKey: string): AdminDirectory.Schema.Schema; } export interface TokensCollection { // Get information about an access token issued by a user. - get(userKey: string, clientId: string): Admin_directory_v1.Schema.Token; + get(userKey: string, clientId: string): AdminDirectory.Schema.Token; // Returns the set of tokens specified user has issued to 3rd party applications. - list(userKey: string): Admin_directory_v1.Schema.Tokens; + list(userKey: string): AdminDirectory.Schema.Tokens; // Delete all access tokens issued by a user for an application. remove(userKey: string, clientId: string): void; } export interface UsersCollection { - Aliases?: Admin_directory_v1.Collection.Users.AliasesCollection; - Photos?: Admin_directory_v1.Collection.Users.PhotosCollection; + Aliases?: AdminDirectory.Collection.Users.AliasesCollection; + Photos?: AdminDirectory.Collection.Users.PhotosCollection; // retrieve user - get(userKey: string): Admin_directory_v1.Schema.User; + get(userKey: string): AdminDirectory.Schema.User; // retrieve user - get(userKey: string, optionalArgs: object): Admin_directory_v1.Schema.User; + get(userKey: string, optionalArgs: object): AdminDirectory.Schema.User; // create user. - insert(resource: Schema.User): Admin_directory_v1.Schema.User; + insert(resource: Schema.User): AdminDirectory.Schema.User; // Retrieve either deleted users or all users in a domain (paginated) - list(): Admin_directory_v1.Schema.Users; + list(): AdminDirectory.Schema.Users; // Retrieve either deleted users or all users in a domain (paginated) - list(optionalArgs: object): Admin_directory_v1.Schema.Users; + list(optionalArgs: object): AdminDirectory.Schema.Users; // change admin status of a user makeAdmin(resource: Schema.UserMakeAdmin, userKey: string): void; // update user. This method supports patch semantics. - patch(resource: Schema.User, userKey: string): Admin_directory_v1.Schema.User; + patch(resource: Schema.User, userKey: string): AdminDirectory.Schema.User; // Delete user remove(userKey: string): void; // Undelete a deleted user undelete(resource: Schema.UserUndelete, userKey: string): void; // update user - update(resource: Schema.User, userKey: string): Admin_directory_v1.Schema.User; + update(resource: Schema.User, userKey: string): AdminDirectory.Schema.User; // Watch for changes in users list - watch(resource: Schema.Channel): Admin_directory_v1.Schema.Channel; + watch(resource: Schema.Channel): AdminDirectory.Schema.Channel; // Watch for changes in users list - watch(resource: Schema.Channel, optionalArgs: object): Admin_directory_v1.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object): AdminDirectory.Schema.Channel; } export interface VerificationCodesCollection { // Generate new backup verification codes for the user. @@ -345,7 +345,7 @@ declare namespace GoogleAppsScript { // Invalidate the current backup verification codes for the user. invalidate(userKey: string): void; // Returns the current set of valid backup verification codes for the specified user. - list(userKey: string): Admin_directory_v1.Schema.VerificationCodes; + list(userKey: string): AdminDirectory.Schema.VerificationCodes; } } namespace Schema { @@ -382,14 +382,14 @@ declare namespace GoogleAppsScript { } export interface Asps { etag?: string; - items?: Admin_directory_v1.Schema.Asp[]; + items?: AdminDirectory.Schema.Asp[]; kind?: string; } export interface Building { - address?: Admin_directory_v1.Schema.BuildingAddress; + address?: AdminDirectory.Schema.BuildingAddress; buildingId?: string; buildingName?: string; - coordinates?: Admin_directory_v1.Schema.BuildingCoordinates; + coordinates?: AdminDirectory.Schema.BuildingCoordinates; description?: string; etags?: string; floorNames?: string[]; @@ -409,7 +409,7 @@ declare namespace GoogleAppsScript { longitude?: Number; } export interface Buildings { - buildings?: Admin_directory_v1.Schema.Building[]; + buildings?: AdminDirectory.Schema.Building[]; etag?: string; kind?: string; nextPageToken?: string; @@ -433,7 +433,7 @@ declare namespace GoogleAppsScript { } export interface CalendarResources { etag?: string; - items?: Admin_directory_v1.Schema.CalendarResource[]; + items?: AdminDirectory.Schema.CalendarResource[]; kind?: string; nextPageToken?: string; } @@ -450,15 +450,15 @@ declare namespace GoogleAppsScript { type?: string; } export interface ChromeOsDevice { - activeTimeRanges?: Admin_directory_v1.Schema.ChromeOsDeviceActiveTimeRanges[]; + activeTimeRanges?: AdminDirectory.Schema.ChromeOsDeviceActiveTimeRanges[]; annotatedAssetId?: string; annotatedLocation?: string; annotatedUser?: string; bootMode?: string; - cpuStatusReports?: Admin_directory_v1.Schema.ChromeOsDeviceCpuStatusReports[]; - deviceFiles?: Admin_directory_v1.Schema.ChromeOsDeviceDeviceFiles[]; + cpuStatusReports?: AdminDirectory.Schema.ChromeOsDeviceCpuStatusReports[]; + deviceFiles?: AdminDirectory.Schema.ChromeOsDeviceDeviceFiles[]; deviceId?: string; - diskVolumeReports?: Admin_directory_v1.Schema.ChromeOsDeviceDiskVolumeReports[]; + diskVolumeReports?: AdminDirectory.Schema.ChromeOsDeviceDiskVolumeReports[]; etag?: string; ethernetMacAddress?: string; firmwareVersion?: string; @@ -473,13 +473,13 @@ declare namespace GoogleAppsScript { orgUnitPath?: string; osVersion?: string; platformVersion?: string; - recentUsers?: Admin_directory_v1.Schema.ChromeOsDeviceRecentUsers[]; + recentUsers?: AdminDirectory.Schema.ChromeOsDeviceRecentUsers[]; serialNumber?: string; status?: string; supportEndDate?: string; - systemRamFreeReports?: Admin_directory_v1.Schema.ChromeOsDeviceSystemRamFreeReports[]; + systemRamFreeReports?: AdminDirectory.Schema.ChromeOsDeviceSystemRamFreeReports[]; systemRamTotal?: string; - tpmVersionInfo?: Admin_directory_v1.Schema.ChromeOsDeviceTpmVersionInfo; + tpmVersionInfo?: AdminDirectory.Schema.ChromeOsDeviceTpmVersionInfo; willAutoRenew?: boolean; } export interface ChromeOsDeviceAction { @@ -491,7 +491,7 @@ declare namespace GoogleAppsScript { date?: string; } export interface ChromeOsDeviceCpuStatusReports { - cpuTemperatureInfo?: Admin_directory_v1.Schema.ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo[]; + cpuTemperatureInfo?: AdminDirectory.Schema.ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo[]; cpuUtilizationPercentageInfo?: number[]; reportTime?: string; } @@ -506,7 +506,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface ChromeOsDeviceDiskVolumeReports { - volumeInfo?: Admin_directory_v1.Schema.ChromeOsDeviceDiskVolumeReportsVolumeInfo[]; + volumeInfo?: AdminDirectory.Schema.ChromeOsDeviceDiskVolumeReportsVolumeInfo[]; } export interface ChromeOsDeviceDiskVolumeReportsVolumeInfo { storageFree?: string; @@ -530,7 +530,7 @@ declare namespace GoogleAppsScript { vendorSpecific?: string; } export interface ChromeOsDevices { - chromeosdevices?: Admin_directory_v1.Schema.ChromeOsDevice[]; + chromeosdevices?: AdminDirectory.Schema.ChromeOsDevice[]; etag?: string; kind?: string; nextPageToken?: string; @@ -547,7 +547,7 @@ declare namespace GoogleAppsScript { kind?: string; language?: string; phoneNumber?: string; - postalAddress?: Admin_directory_v1.Schema.CustomerPostalAddress; + postalAddress?: AdminDirectory.Schema.CustomerPostalAddress; } export interface CustomerPostalAddress { addressLine1?: string; @@ -569,13 +569,13 @@ declare namespace GoogleAppsScript { verified?: boolean; } export interface DomainAliases { - domainAliases?: Admin_directory_v1.Schema.DomainAlias[]; + domainAliases?: AdminDirectory.Schema.DomainAlias[]; etag?: string; kind?: string; } export interface Domains { creationTime?: string; - domainAliases?: Admin_directory_v1.Schema.DomainAlias[]; + domainAliases?: AdminDirectory.Schema.DomainAlias[]; domainName?: string; etag?: string; isPrimary?: boolean; @@ -583,7 +583,7 @@ declare namespace GoogleAppsScript { verified?: boolean; } export interface Domains2 { - domains?: Admin_directory_v1.Schema.Domains[]; + domains?: AdminDirectory.Schema.Domains[]; etag?: string; kind?: string; } @@ -593,14 +593,14 @@ declare namespace GoogleAppsScript { name?: string; } export interface FeatureInstance { - feature?: Admin_directory_v1.Schema.Feature; + feature?: AdminDirectory.Schema.Feature; } export interface FeatureRename { newName?: string; } export interface Features { etag?: string; - features?: Admin_directory_v1.Schema.Feature[]; + features?: AdminDirectory.Schema.Feature[]; kind?: string; nextPageToken?: string; } @@ -618,7 +618,7 @@ declare namespace GoogleAppsScript { } export interface Groups { etag?: string; - groups?: Admin_directory_v1.Schema.Group[]; + groups?: AdminDirectory.Schema.Group[]; kind?: string; nextPageToken?: string; } @@ -635,7 +635,7 @@ declare namespace GoogleAppsScript { export interface Members { etag?: string; kind?: string; - members?: Admin_directory_v1.Schema.Member[]; + members?: AdminDirectory.Schema.Member[]; nextPageToken?: string; } export interface MembersHasMember { @@ -643,7 +643,7 @@ declare namespace GoogleAppsScript { } export interface MobileDevice { adbStatus?: boolean; - applications?: Admin_directory_v1.Schema.MobileDeviceApplications[]; + applications?: AdminDirectory.Schema.MobileDeviceApplications[]; basebandVersion?: string; bootloaderVersion?: string; brand?: string; @@ -696,7 +696,7 @@ declare namespace GoogleAppsScript { export interface MobileDevices { etag?: string; kind?: string; - mobiledevices?: Admin_directory_v1.Schema.MobileDevice[]; + mobiledevices?: AdminDirectory.Schema.MobileDevice[]; nextPageToken?: string; } export interface Notification { @@ -711,7 +711,7 @@ declare namespace GoogleAppsScript { } export interface Notifications { etag?: string; - items?: Admin_directory_v1.Schema.Notification[]; + items?: AdminDirectory.Schema.Notification[]; kind?: string; nextPageToken?: string; unreadNotificationsCount?: number; @@ -730,10 +730,10 @@ declare namespace GoogleAppsScript { export interface OrgUnits { etag?: string; kind?: string; - organizationUnits?: Admin_directory_v1.Schema.OrgUnit[]; + organizationUnits?: AdminDirectory.Schema.OrgUnit[]; } export interface Privilege { - childPrivileges?: Admin_directory_v1.Schema.Privilege[]; + childPrivileges?: AdminDirectory.Schema.Privilege[]; etag?: string; isOuScopable?: boolean; kind?: string; @@ -743,7 +743,7 @@ declare namespace GoogleAppsScript { } export interface Privileges { etag?: string; - items?: Admin_directory_v1.Schema.Privilege[]; + items?: AdminDirectory.Schema.Privilege[]; kind?: string; } export interface Role { @@ -754,7 +754,7 @@ declare namespace GoogleAppsScript { roleDescription?: string; roleId?: string; roleName?: string; - rolePrivileges?: Admin_directory_v1.Schema.RoleRolePrivileges[]; + rolePrivileges?: AdminDirectory.Schema.RoleRolePrivileges[]; } export interface RoleAssignment { assignedTo?: string; @@ -767,7 +767,7 @@ declare namespace GoogleAppsScript { } export interface RoleAssignments { etag?: string; - items?: Admin_directory_v1.Schema.RoleAssignment[]; + items?: AdminDirectory.Schema.RoleAssignment[]; kind?: string; nextPageToken?: string; } @@ -777,14 +777,14 @@ declare namespace GoogleAppsScript { } export interface Roles { etag?: string; - items?: Admin_directory_v1.Schema.Role[]; + items?: AdminDirectory.Schema.Role[]; kind?: string; nextPageToken?: string; } export interface Schema { displayName?: string; etag?: string; - fields?: Admin_directory_v1.Schema.SchemaFieldSpec[]; + fields?: AdminDirectory.Schema.SchemaFieldSpec[]; kind?: string; schemaId?: string; schemaName?: string; @@ -798,7 +798,7 @@ declare namespace GoogleAppsScript { indexed?: boolean; kind?: string; multiValued?: boolean; - numericIndexingSpec?: Admin_directory_v1.Schema.SchemaFieldSpecNumericIndexingSpec; + numericIndexingSpec?: AdminDirectory.Schema.SchemaFieldSpecNumericIndexingSpec; readAccessType?: string; } export interface SchemaFieldSpecNumericIndexingSpec { @@ -808,7 +808,7 @@ declare namespace GoogleAppsScript { export interface Schemas { etag?: string; kind?: string; - schemas?: Admin_directory_v1.Schema.Schema[]; + schemas?: AdminDirectory.Schema.Schema[]; } export interface Token { anonymous?: boolean; @@ -822,7 +822,7 @@ declare namespace GoogleAppsScript { } export interface Tokens { etag?: string; - items?: Admin_directory_v1.Schema.Token[]; + items?: AdminDirectory.Schema.Token[]; kind?: string; } export interface TrustedAppId { @@ -836,7 +836,7 @@ declare namespace GoogleAppsScript { etag?: string; kind?: string; nextPageToken?: string; - trustedApps?: Admin_directory_v1.Schema.TrustedAppId[]; + trustedApps?: AdminDirectory.Schema.TrustedAppId[]; } export interface User { addresses?: object; @@ -867,7 +867,7 @@ declare namespace GoogleAppsScript { languages?: object; lastLoginTime?: string; locations?: object; - name?: Admin_directory_v1.Schema.UserName; + name?: AdminDirectory.Schema.UserName; nonEditableAliases?: string[]; notes?: object; orgUnitPath?: string; @@ -1019,7 +1019,7 @@ declare namespace GoogleAppsScript { kind?: string; nextPageToken?: string; trigger_event?: string; - users?: Admin_directory_v1.Schema.User[]; + users?: AdminDirectory.Schema.User[]; } export interface VerificationCode { etag?: string; @@ -1029,113 +1029,113 @@ declare namespace GoogleAppsScript { } export interface VerificationCodes { etag?: string; - items?: Admin_directory_v1.Schema.VerificationCode[]; + items?: AdminDirectory.Schema.VerificationCode[]; kind?: string; } } } - export interface Admin_directory_v1 { - Asps?: Admin_directory_v1.Collection.AspsCollection; - Channels?: Admin_directory_v1.Collection.ChannelsCollection; - Chromeosdevices?: Admin_directory_v1.Collection.ChromeosdevicesCollection; - Customers?: Admin_directory_v1.Collection.CustomersCollection; - DomainAliases?: Admin_directory_v1.Collection.DomainAliasesCollection; - Domains?: Admin_directory_v1.Collection.DomainsCollection; - Groups?: Admin_directory_v1.Collection.GroupsCollection; - Members?: Admin_directory_v1.Collection.MembersCollection; - Mobiledevices?: Admin_directory_v1.Collection.MobiledevicesCollection; - Notifications?: Admin_directory_v1.Collection.NotificationsCollection; - Orgunits?: Admin_directory_v1.Collection.OrgunitsCollection; - Privileges?: Admin_directory_v1.Collection.PrivilegesCollection; - ResolvedAppAccessSettings?: Admin_directory_v1.Collection.ResolvedAppAccessSettingsCollection; - Resources?: Admin_directory_v1.Collection.ResourcesCollection; - RoleAssignments?: Admin_directory_v1.Collection.RoleAssignmentsCollection; - Roles?: Admin_directory_v1.Collection.RolesCollection; - Schemas?: Admin_directory_v1.Collection.SchemasCollection; - Tokens?: Admin_directory_v1.Collection.TokensCollection; - Users?: Admin_directory_v1.Collection.UsersCollection; - VerificationCodes?: Admin_directory_v1.Collection.VerificationCodesCollection; + export interface AdminDirectory { + Asps?: AdminDirectory.Collection.AspsCollection; + Channels?: AdminDirectory.Collection.ChannelsCollection; + Chromeosdevices?: AdminDirectory.Collection.ChromeosdevicesCollection; + Customers?: AdminDirectory.Collection.CustomersCollection; + DomainAliases?: AdminDirectory.Collection.DomainAliasesCollection; + Domains?: AdminDirectory.Collection.DomainsCollection; + Groups?: AdminDirectory.Collection.GroupsCollection; + Members?: AdminDirectory.Collection.MembersCollection; + Mobiledevices?: AdminDirectory.Collection.MobiledevicesCollection; + Notifications?: AdminDirectory.Collection.NotificationsCollection; + Orgunits?: AdminDirectory.Collection.OrgunitsCollection; + Privileges?: AdminDirectory.Collection.PrivilegesCollection; + ResolvedAppAccessSettings?: AdminDirectory.Collection.ResolvedAppAccessSettingsCollection; + Resources?: AdminDirectory.Collection.ResourcesCollection; + RoleAssignments?: AdminDirectory.Collection.RoleAssignmentsCollection; + Roles?: AdminDirectory.Collection.RolesCollection; + Schemas?: AdminDirectory.Collection.SchemasCollection; + Tokens?: AdminDirectory.Collection.TokensCollection; + Users?: AdminDirectory.Collection.UsersCollection; + VerificationCodes?: AdminDirectory.Collection.VerificationCodesCollection; // Create a new instance of Alias - newAlias(): Admin_directory_v1.Schema.Alias; + newAlias(): AdminDirectory.Schema.Alias; // Create a new instance of Building - newBuilding(): Admin_directory_v1.Schema.Building; + newBuilding(): AdminDirectory.Schema.Building; // Create a new instance of BuildingAddress - newBuildingAddress(): Admin_directory_v1.Schema.BuildingAddress; + newBuildingAddress(): AdminDirectory.Schema.BuildingAddress; // Create a new instance of BuildingCoordinates - newBuildingCoordinates(): Admin_directory_v1.Schema.BuildingCoordinates; + newBuildingCoordinates(): AdminDirectory.Schema.BuildingCoordinates; // Create a new instance of CalendarResource - newCalendarResource(): Admin_directory_v1.Schema.CalendarResource; + newCalendarResource(): AdminDirectory.Schema.CalendarResource; // Create a new instance of Channel - newChannel(): Admin_directory_v1.Schema.Channel; + newChannel(): AdminDirectory.Schema.Channel; // Create a new instance of ChromeOsDevice - newChromeOsDevice(): Admin_directory_v1.Schema.ChromeOsDevice; + newChromeOsDevice(): AdminDirectory.Schema.ChromeOsDevice; // Create a new instance of ChromeOsDeviceAction - newChromeOsDeviceAction(): Admin_directory_v1.Schema.ChromeOsDeviceAction; + newChromeOsDeviceAction(): AdminDirectory.Schema.ChromeOsDeviceAction; // Create a new instance of ChromeOsDeviceActiveTimeRanges - newChromeOsDeviceActiveTimeRanges(): Admin_directory_v1.Schema.ChromeOsDeviceActiveTimeRanges; + newChromeOsDeviceActiveTimeRanges(): AdminDirectory.Schema.ChromeOsDeviceActiveTimeRanges; // Create a new instance of ChromeOsDeviceCpuStatusReports - newChromeOsDeviceCpuStatusReports(): Admin_directory_v1.Schema.ChromeOsDeviceCpuStatusReports; + newChromeOsDeviceCpuStatusReports(): AdminDirectory.Schema.ChromeOsDeviceCpuStatusReports; // Create a new instance of ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo - newChromeOsDeviceCpuStatusReportsCpuTemperatureInfo(): Admin_directory_v1.Schema.ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo; + newChromeOsDeviceCpuStatusReportsCpuTemperatureInfo(): AdminDirectory.Schema.ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo; // Create a new instance of ChromeOsDeviceDeviceFiles - newChromeOsDeviceDeviceFiles(): Admin_directory_v1.Schema.ChromeOsDeviceDeviceFiles; + newChromeOsDeviceDeviceFiles(): AdminDirectory.Schema.ChromeOsDeviceDeviceFiles; // Create a new instance of ChromeOsDeviceDiskVolumeReports - newChromeOsDeviceDiskVolumeReports(): Admin_directory_v1.Schema.ChromeOsDeviceDiskVolumeReports; + newChromeOsDeviceDiskVolumeReports(): AdminDirectory.Schema.ChromeOsDeviceDiskVolumeReports; // Create a new instance of ChromeOsDeviceDiskVolumeReportsVolumeInfo - newChromeOsDeviceDiskVolumeReportsVolumeInfo(): Admin_directory_v1.Schema.ChromeOsDeviceDiskVolumeReportsVolumeInfo; + newChromeOsDeviceDiskVolumeReportsVolumeInfo(): AdminDirectory.Schema.ChromeOsDeviceDiskVolumeReportsVolumeInfo; // Create a new instance of ChromeOsDeviceRecentUsers - newChromeOsDeviceRecentUsers(): Admin_directory_v1.Schema.ChromeOsDeviceRecentUsers; + newChromeOsDeviceRecentUsers(): AdminDirectory.Schema.ChromeOsDeviceRecentUsers; // Create a new instance of ChromeOsDeviceSystemRamFreeReports - newChromeOsDeviceSystemRamFreeReports(): Admin_directory_v1.Schema.ChromeOsDeviceSystemRamFreeReports; + newChromeOsDeviceSystemRamFreeReports(): AdminDirectory.Schema.ChromeOsDeviceSystemRamFreeReports; // Create a new instance of ChromeOsDeviceTpmVersionInfo - newChromeOsDeviceTpmVersionInfo(): Admin_directory_v1.Schema.ChromeOsDeviceTpmVersionInfo; + newChromeOsDeviceTpmVersionInfo(): AdminDirectory.Schema.ChromeOsDeviceTpmVersionInfo; // Create a new instance of ChromeOsMoveDevicesToOu - newChromeOsMoveDevicesToOu(): Admin_directory_v1.Schema.ChromeOsMoveDevicesToOu; + newChromeOsMoveDevicesToOu(): AdminDirectory.Schema.ChromeOsMoveDevicesToOu; // Create a new instance of Customer - newCustomer(): Admin_directory_v1.Schema.Customer; + newCustomer(): AdminDirectory.Schema.Customer; // Create a new instance of CustomerPostalAddress - newCustomerPostalAddress(): Admin_directory_v1.Schema.CustomerPostalAddress; + newCustomerPostalAddress(): AdminDirectory.Schema.CustomerPostalAddress; // Create a new instance of DomainAlias - newDomainAlias(): Admin_directory_v1.Schema.DomainAlias; + newDomainAlias(): AdminDirectory.Schema.DomainAlias; // Create a new instance of Domains - newDomains(): Admin_directory_v1.Schema.Domains; + newDomains(): AdminDirectory.Schema.Domains; // Create a new instance of Feature - newFeature(): Admin_directory_v1.Schema.Feature; + newFeature(): AdminDirectory.Schema.Feature; // Create a new instance of FeatureRename - newFeatureRename(): Admin_directory_v1.Schema.FeatureRename; + newFeatureRename(): AdminDirectory.Schema.FeatureRename; // Create a new instance of Group - newGroup(): Admin_directory_v1.Schema.Group; + newGroup(): AdminDirectory.Schema.Group; // Create a new instance of Member - newMember(): Admin_directory_v1.Schema.Member; + newMember(): AdminDirectory.Schema.Member; // Create a new instance of MobileDeviceAction - newMobileDeviceAction(): Admin_directory_v1.Schema.MobileDeviceAction; + newMobileDeviceAction(): AdminDirectory.Schema.MobileDeviceAction; // Create a new instance of Notification - newNotification(): Admin_directory_v1.Schema.Notification; + newNotification(): AdminDirectory.Schema.Notification; // Create a new instance of OrgUnit - newOrgUnit(): Admin_directory_v1.Schema.OrgUnit; + newOrgUnit(): AdminDirectory.Schema.OrgUnit; // Create a new instance of Role - newRole(): Admin_directory_v1.Schema.Role; + newRole(): AdminDirectory.Schema.Role; // Create a new instance of RoleAssignment - newRoleAssignment(): Admin_directory_v1.Schema.RoleAssignment; + newRoleAssignment(): AdminDirectory.Schema.RoleAssignment; // Create a new instance of RoleRolePrivileges - newRoleRolePrivileges(): Admin_directory_v1.Schema.RoleRolePrivileges; + newRoleRolePrivileges(): AdminDirectory.Schema.RoleRolePrivileges; // Create a new instance of Schema - newSchema(): Admin_directory_v1.Schema.Schema; + newSchema(): AdminDirectory.Schema.Schema; // Create a new instance of SchemaFieldSpec - newSchemaFieldSpec(): Admin_directory_v1.Schema.SchemaFieldSpec; + newSchemaFieldSpec(): AdminDirectory.Schema.SchemaFieldSpec; // Create a new instance of SchemaFieldSpecNumericIndexingSpec - newSchemaFieldSpecNumericIndexingSpec(): Admin_directory_v1.Schema.SchemaFieldSpecNumericIndexingSpec; + newSchemaFieldSpecNumericIndexingSpec(): AdminDirectory.Schema.SchemaFieldSpecNumericIndexingSpec; // Create a new instance of User - newUser(): Admin_directory_v1.Schema.User; + newUser(): AdminDirectory.Schema.User; // Create a new instance of UserMakeAdmin - newUserMakeAdmin(): Admin_directory_v1.Schema.UserMakeAdmin; + newUserMakeAdmin(): AdminDirectory.Schema.UserMakeAdmin; // Create a new instance of UserName - newUserName(): Admin_directory_v1.Schema.UserName; + newUserName(): AdminDirectory.Schema.UserName; // Create a new instance of UserPhoto - newUserPhoto(): Admin_directory_v1.Schema.UserPhoto; + newUserPhoto(): AdminDirectory.Schema.UserPhoto; // Create a new instance of UserUndelete - newUserUndelete(): Admin_directory_v1.Schema.UserUndelete; + newUserUndelete(): AdminDirectory.Schema.UserUndelete; } } -declare var Admin_directory_v1: GoogleAppsScript.Admin_directory_v1; \ No newline at end of file +declare var AdminDirectory: GoogleAppsScript.AdminDirectory; diff --git a/types/google-apps-script/apis/docs_v1.d.ts b/types/google-apps-script/apis/docs_v1.d.ts index d74ccd5a75..39dc4bde0e 100644 --- a/types/google-apps-script/apis/docs_v1.d.ts +++ b/types/google-apps-script/apis/docs_v1.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Docs_v1 { + namespace Docs { namespace Collection { export interface DocumentsCollection { // Applies one or more updates to the document. @@ -25,15 +25,15 @@ declare namespace GoogleAppsScript { // collaborators, the document should reflect your changes. In any case, // the updates in your request are guaranteed to be applied together // atomically. - batchUpdate(resource: Schema.BatchUpdateDocumentRequest, documentId: string): Docs_v1.Schema.BatchUpdateDocumentResponse; + batchUpdate(resource: Schema.BatchUpdateDocumentRequest, documentId: string): Docs.Schema.BatchUpdateDocumentResponse; // Creates a blank document using the title given in the request. Other fields // in the request, including any provided content, are ignored. // Returns the created document. - create(resource: Schema.Document): Docs_v1.Schema.Document; + create(resource: Schema.Document): Docs.Schema.Document; // Gets the latest version of the specified document. - get(documentId: string): Docs_v1.Schema.Document; + get(documentId: string): Docs.Schema.Document; // Gets the latest version of the specified document. - get(documentId: string, optionalArgs: object): Docs_v1.Schema.Document; + get(documentId: string, optionalArgs: object): Docs.Schema.Document; } } namespace Schema { @@ -41,56 +41,56 @@ declare namespace GoogleAppsScript { suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; suggestedTextStyleChanges?: object; - textStyle?: Docs_v1.Schema.TextStyle; + textStyle?: Docs.Schema.TextStyle; type?: string; } export interface Background { - color?: Docs_v1.Schema.OptionalColor; + color?: Docs.Schema.OptionalColor; } export interface BackgroundSuggestionState { backgroundColorSuggested?: boolean; } export interface BatchUpdateDocumentRequest { - requests?: Docs_v1.Schema.Request[]; - writeControl?: Docs_v1.Schema.WriteControl; + requests?: Docs.Schema.Request[]; + writeControl?: Docs.Schema.WriteControl; } export interface BatchUpdateDocumentResponse { documentId?: string; - replies?: Docs_v1.Schema.Response[]; - writeControl?: Docs_v1.Schema.WriteControl; + replies?: Docs.Schema.Response[]; + writeControl?: Docs.Schema.WriteControl; } export interface Body { - content?: Docs_v1.Schema.StructuralElement[]; + content?: Docs.Schema.StructuralElement[]; } export interface Bullet { listId?: string; nestingLevel?: number; - textStyle?: Docs_v1.Schema.TextStyle; + textStyle?: Docs.Schema.TextStyle; } export interface BulletSuggestionState { listIdSuggested?: boolean; nestingLevelSuggested?: boolean; - textStyleSuggestionState?: Docs_v1.Schema.TextStyleSuggestionState; + textStyleSuggestionState?: Docs.Schema.TextStyleSuggestionState; } export interface Color { - rgbColor?: Docs_v1.Schema.RgbColor; + rgbColor?: Docs.Schema.RgbColor; } export interface ColumnBreak { suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; suggestedTextStyleChanges?: object; - textStyle?: Docs_v1.Schema.TextStyle; + textStyle?: Docs.Schema.TextStyle; } export interface CreateNamedRangeRequest { name?: string; - range?: Docs_v1.Schema.Range; + range?: Docs.Schema.Range; } export interface CreateNamedRangeResponse { namedRangeId?: string; } export interface CreateParagraphBulletsRequest { bulletPreset?: string; - range?: Docs_v1.Schema.Range; + range?: Docs.Schema.Range; } export interface CropProperties { angle?: Number; @@ -107,39 +107,39 @@ declare namespace GoogleAppsScript { offsetTopSuggested?: boolean; } export interface DeleteContentRangeRequest { - range?: Docs_v1.Schema.Range; + range?: Docs.Schema.Range; } export interface DeleteNamedRangeRequest { name?: string; namedRangeId?: string; } export interface DeleteParagraphBulletsRequest { - range?: Docs_v1.Schema.Range; + range?: Docs.Schema.Range; } export interface DeletePositionedObjectRequest { objectId?: string; } export interface DeleteTableColumnRequest { - tableCellLocation?: Docs_v1.Schema.TableCellLocation; + tableCellLocation?: Docs.Schema.TableCellLocation; } export interface DeleteTableRowRequest { - tableCellLocation?: Docs_v1.Schema.TableCellLocation; + tableCellLocation?: Docs.Schema.TableCellLocation; } export interface Dimension { magnitude?: Number; unit?: string; } export interface Document { - body?: Docs_v1.Schema.Body; + body?: Docs.Schema.Body; documentId?: string; - documentStyle?: Docs_v1.Schema.DocumentStyle; + documentStyle?: Docs.Schema.DocumentStyle; footers?: object; footnotes?: object; headers?: object; inlineObjects?: object; lists?: object; namedRanges?: object; - namedStyles?: Docs_v1.Schema.NamedStyles; + namedStyles?: Docs.Schema.NamedStyles; positionedObjects?: object; revisionId?: string; suggestedDocumentStyleChanges?: object; @@ -148,24 +148,24 @@ declare namespace GoogleAppsScript { title?: string; } export interface DocumentStyle { - background?: Docs_v1.Schema.Background; + background?: Docs.Schema.Background; defaultFooterId?: string; defaultHeaderId?: string; evenPageFooterId?: string; evenPageHeaderId?: string; firstPageFooterId?: string; firstPageHeaderId?: string; - marginBottom?: Docs_v1.Schema.Dimension; - marginLeft?: Docs_v1.Schema.Dimension; - marginRight?: Docs_v1.Schema.Dimension; - marginTop?: Docs_v1.Schema.Dimension; + marginBottom?: Docs.Schema.Dimension; + marginLeft?: Docs.Schema.Dimension; + marginRight?: Docs.Schema.Dimension; + marginTop?: Docs.Schema.Dimension; pageNumberStart?: number; - pageSize?: Docs_v1.Schema.Size; + pageSize?: Docs.Schema.Size; useEvenPageHeaderFooter?: boolean; useFirstPageHeaderFooter?: boolean; } export interface DocumentStyleSuggestionState { - backgroundSuggestionState?: Docs_v1.Schema.BackgroundSuggestionState; + backgroundSuggestionState?: Docs.Schema.BackgroundSuggestionState; defaultFooterIdSuggested?: boolean; defaultHeaderIdSuggested?: boolean; evenPageFooterIdSuggested?: boolean; @@ -177,28 +177,28 @@ declare namespace GoogleAppsScript { marginRightSuggested?: boolean; marginTopSuggested?: boolean; pageNumberStartSuggested?: boolean; - pageSizeSuggestionState?: Docs_v1.Schema.SizeSuggestionState; + pageSizeSuggestionState?: Docs.Schema.SizeSuggestionState; useEvenPageHeaderFooterSuggested?: boolean; useFirstPageHeaderFooterSuggested?: boolean; } export interface EmbeddedObject { description?: string; embeddedDrawingProperties?: any; - embeddedObjectBorder?: Docs_v1.Schema.EmbeddedObjectBorder; - imageProperties?: Docs_v1.Schema.ImageProperties; - linkedContentReference?: Docs_v1.Schema.LinkedContentReference; - marginBottom?: Docs_v1.Schema.Dimension; - marginLeft?: Docs_v1.Schema.Dimension; - marginRight?: Docs_v1.Schema.Dimension; - marginTop?: Docs_v1.Schema.Dimension; - size?: Docs_v1.Schema.Size; + embeddedObjectBorder?: Docs.Schema.EmbeddedObjectBorder; + imageProperties?: Docs.Schema.ImageProperties; + linkedContentReference?: Docs.Schema.LinkedContentReference; + marginBottom?: Docs.Schema.Dimension; + marginLeft?: Docs.Schema.Dimension; + marginRight?: Docs.Schema.Dimension; + marginTop?: Docs.Schema.Dimension; + size?: Docs.Schema.Size; title?: string; } export interface EmbeddedObjectBorder { - color?: Docs_v1.Schema.OptionalColor; + color?: Docs.Schema.OptionalColor; dashStyle?: string; propertyState?: string; - width?: Docs_v1.Schema.Dimension; + width?: Docs.Schema.Dimension; } export interface EmbeddedObjectBorderSuggestionState { colorSuggested?: boolean; @@ -209,14 +209,14 @@ declare namespace GoogleAppsScript { export interface EmbeddedObjectSuggestionState { descriptionSuggested?: boolean; embeddedDrawingPropertiesSuggestionState?: any; - embeddedObjectBorderSuggestionState?: Docs_v1.Schema.EmbeddedObjectBorderSuggestionState; - imagePropertiesSuggestionState?: Docs_v1.Schema.ImagePropertiesSuggestionState; - linkedContentReferenceSuggestionState?: Docs_v1.Schema.LinkedContentReferenceSuggestionState; + embeddedObjectBorderSuggestionState?: Docs.Schema.EmbeddedObjectBorderSuggestionState; + imagePropertiesSuggestionState?: Docs.Schema.ImagePropertiesSuggestionState; + linkedContentReferenceSuggestionState?: Docs.Schema.LinkedContentReferenceSuggestionState; marginBottomSuggested?: boolean; marginLeftSuggested?: boolean; marginRightSuggested?: boolean; marginTopSuggested?: boolean; - sizeSuggestionState?: Docs_v1.Schema.SizeSuggestionState; + sizeSuggestionState?: Docs.Schema.SizeSuggestionState; titleSuggested?: boolean; } export interface EndOfSegmentLocation { @@ -227,11 +227,11 @@ declare namespace GoogleAppsScript { suggestedInsertionIds?: string[]; } export interface Footer { - content?: Docs_v1.Schema.StructuralElement[]; + content?: Docs.Schema.StructuralElement[]; footerId?: string; } export interface Footnote { - content?: Docs_v1.Schema.StructuralElement[]; + content?: Docs.Schema.StructuralElement[]; footnoteId?: string; } export interface FootnoteReference { @@ -240,24 +240,24 @@ declare namespace GoogleAppsScript { suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; suggestedTextStyleChanges?: object; - textStyle?: Docs_v1.Schema.TextStyle; + textStyle?: Docs.Schema.TextStyle; } export interface Header { - content?: Docs_v1.Schema.StructuralElement[]; + content?: Docs.Schema.StructuralElement[]; headerId?: string; } export interface HorizontalRule { suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; suggestedTextStyleChanges?: object; - textStyle?: Docs_v1.Schema.TextStyle; + textStyle?: Docs.Schema.TextStyle; } export interface ImageProperties { angle?: Number; brightness?: Number; contentUri?: string; contrast?: Number; - cropProperties?: Docs_v1.Schema.CropProperties; + cropProperties?: Docs.Schema.CropProperties; sourceUri?: string; transparency?: Number; } @@ -266,12 +266,12 @@ declare namespace GoogleAppsScript { brightnessSuggested?: boolean; contentUriSuggested?: boolean; contrastSuggested?: boolean; - cropPropertiesSuggestionState?: Docs_v1.Schema.CropPropertiesSuggestionState; + cropPropertiesSuggestionState?: Docs.Schema.CropPropertiesSuggestionState; sourceUriSuggested?: boolean; transparencySuggested?: boolean; } export interface InlineObject { - inlineObjectProperties?: Docs_v1.Schema.InlineObjectProperties; + inlineObjectProperties?: Docs.Schema.InlineObjectProperties; objectId?: string; suggestedDeletionIds?: string[]; suggestedInlineObjectPropertiesChanges?: object; @@ -282,18 +282,18 @@ declare namespace GoogleAppsScript { suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; suggestedTextStyleChanges?: object; - textStyle?: Docs_v1.Schema.TextStyle; + textStyle?: Docs.Schema.TextStyle; } export interface InlineObjectProperties { - embeddedObject?: Docs_v1.Schema.EmbeddedObject; + embeddedObject?: Docs.Schema.EmbeddedObject; } export interface InlineObjectPropertiesSuggestionState { - embeddedObjectSuggestionState?: Docs_v1.Schema.EmbeddedObjectSuggestionState; + embeddedObjectSuggestionState?: Docs.Schema.EmbeddedObjectSuggestionState; } export interface InsertInlineImageRequest { - endOfSegmentLocation?: Docs_v1.Schema.EndOfSegmentLocation; - location?: Docs_v1.Schema.Location; - objectSize?: Docs_v1.Schema.Size; + endOfSegmentLocation?: Docs.Schema.EndOfSegmentLocation; + location?: Docs.Schema.Location; + objectSize?: Docs.Schema.Size; uri?: string; } export interface InsertInlineImageResponse { @@ -303,22 +303,22 @@ declare namespace GoogleAppsScript { objectId?: string; } export interface InsertPageBreakRequest { - endOfSegmentLocation?: Docs_v1.Schema.EndOfSegmentLocation; - location?: Docs_v1.Schema.Location; + endOfSegmentLocation?: Docs.Schema.EndOfSegmentLocation; + location?: Docs.Schema.Location; } export interface InsertTableRequest { columns?: number; - endOfSegmentLocation?: Docs_v1.Schema.EndOfSegmentLocation; - location?: Docs_v1.Schema.Location; + endOfSegmentLocation?: Docs.Schema.EndOfSegmentLocation; + location?: Docs.Schema.Location; rows?: number; } export interface InsertTableRowRequest { insertBelow?: boolean; - tableCellLocation?: Docs_v1.Schema.TableCellLocation; + tableCellLocation?: Docs.Schema.TableCellLocation; } export interface InsertTextRequest { - endOfSegmentLocation?: Docs_v1.Schema.EndOfSegmentLocation; - location?: Docs_v1.Schema.Location; + endOfSegmentLocation?: Docs.Schema.EndOfSegmentLocation; + location?: Docs.Schema.Location; text?: string; } export interface Link { @@ -327,22 +327,22 @@ declare namespace GoogleAppsScript { url?: string; } export interface LinkedContentReference { - sheetsChartReference?: Docs_v1.Schema.SheetsChartReference; + sheetsChartReference?: Docs.Schema.SheetsChartReference; } export interface LinkedContentReferenceSuggestionState { - sheetsChartReferenceSuggestionState?: Docs_v1.Schema.SheetsChartReferenceSuggestionState; + sheetsChartReferenceSuggestionState?: Docs.Schema.SheetsChartReferenceSuggestionState; } export interface List { - listProperties?: Docs_v1.Schema.ListProperties; + listProperties?: Docs.Schema.ListProperties; suggestedDeletionIds?: string[]; suggestedInsertionId?: string; suggestedListPropertiesChanges?: object; } export interface ListProperties { - nestingLevels?: Docs_v1.Schema.NestingLevel[]; + nestingLevels?: Docs.Schema.NestingLevel[]; } export interface ListPropertiesSuggestionState { - nestingLevelsSuggestionStates?: Docs_v1.Schema.NestingLevelSuggestionState[]; + nestingLevelsSuggestionStates?: Docs.Schema.NestingLevelSuggestionState[]; } export interface Location { index?: number; @@ -351,37 +351,37 @@ declare namespace GoogleAppsScript { export interface NamedRange { name?: string; namedRangeId?: string; - ranges?: Docs_v1.Schema.Range[]; + ranges?: Docs.Schema.Range[]; } export interface NamedRanges { name?: string; - namedRanges?: Docs_v1.Schema.NamedRange[]; + namedRanges?: Docs.Schema.NamedRange[]; } export interface NamedStyle { namedStyleType?: string; - paragraphStyle?: Docs_v1.Schema.ParagraphStyle; - textStyle?: Docs_v1.Schema.TextStyle; + paragraphStyle?: Docs.Schema.ParagraphStyle; + textStyle?: Docs.Schema.TextStyle; } export interface NamedStyleSuggestionState { namedStyleType?: string; - paragraphStyleSuggestionState?: Docs_v1.Schema.ParagraphStyleSuggestionState; - textStyleSuggestionState?: Docs_v1.Schema.TextStyleSuggestionState; + paragraphStyleSuggestionState?: Docs.Schema.ParagraphStyleSuggestionState; + textStyleSuggestionState?: Docs.Schema.TextStyleSuggestionState; } export interface NamedStyles { - styles?: Docs_v1.Schema.NamedStyle[]; + styles?: Docs.Schema.NamedStyle[]; } export interface NamedStylesSuggestionState { - stylesSuggestionStates?: Docs_v1.Schema.NamedStyleSuggestionState[]; + stylesSuggestionStates?: Docs.Schema.NamedStyleSuggestionState[]; } export interface NestingLevel { bulletAlignment?: string; glyphFormat?: string; glyphSymbol?: string; glyphType?: string; - indentFirstLine?: Docs_v1.Schema.Dimension; - indentStart?: Docs_v1.Schema.Dimension; + indentFirstLine?: Docs.Schema.Dimension; + indentStart?: Docs.Schema.Dimension; startNumber?: number; - textStyle?: Docs_v1.Schema.TextStyle; + textStyle?: Docs.Schema.TextStyle; } export interface NestingLevelSuggestionState { bulletAlignmentSuggested?: boolean; @@ -391,69 +391,69 @@ declare namespace GoogleAppsScript { indentFirstLineSuggested?: boolean; indentStartSuggested?: boolean; startNumberSuggested?: boolean; - textStyleSuggestionState?: Docs_v1.Schema.TextStyleSuggestionState; + textStyleSuggestionState?: Docs.Schema.TextStyleSuggestionState; } export interface ObjectReferences { objectIds?: string[]; } export interface OptionalColor { - color?: Docs_v1.Schema.Color; + color?: Docs.Schema.Color; } export interface PageBreak { suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; suggestedTextStyleChanges?: object; - textStyle?: Docs_v1.Schema.TextStyle; + textStyle?: Docs.Schema.TextStyle; } export interface Paragraph { - bullet?: Docs_v1.Schema.Bullet; - elements?: Docs_v1.Schema.ParagraphElement[]; - paragraphStyle?: Docs_v1.Schema.ParagraphStyle; + bullet?: Docs.Schema.Bullet; + elements?: Docs.Schema.ParagraphElement[]; + paragraphStyle?: Docs.Schema.ParagraphStyle; positionedObjectIds?: string[]; suggestedBulletChanges?: object; suggestedParagraphStyleChanges?: object; suggestedPositionedObjectIds?: object; } export interface ParagraphBorder { - color?: Docs_v1.Schema.OptionalColor; + color?: Docs.Schema.OptionalColor; dashStyle?: string; - padding?: Docs_v1.Schema.Dimension; - width?: Docs_v1.Schema.Dimension; + padding?: Docs.Schema.Dimension; + width?: Docs.Schema.Dimension; } export interface ParagraphElement { - autoText?: Docs_v1.Schema.AutoText; - columnBreak?: Docs_v1.Schema.ColumnBreak; + autoText?: Docs.Schema.AutoText; + columnBreak?: Docs.Schema.ColumnBreak; endIndex?: number; - equation?: Docs_v1.Schema.Equation; - footnoteReference?: Docs_v1.Schema.FootnoteReference; - horizontalRule?: Docs_v1.Schema.HorizontalRule; - inlineObjectElement?: Docs_v1.Schema.InlineObjectElement; - pageBreak?: Docs_v1.Schema.PageBreak; + equation?: Docs.Schema.Equation; + footnoteReference?: Docs.Schema.FootnoteReference; + horizontalRule?: Docs.Schema.HorizontalRule; + inlineObjectElement?: Docs.Schema.InlineObjectElement; + pageBreak?: Docs.Schema.PageBreak; startIndex?: number; - textRun?: Docs_v1.Schema.TextRun; + textRun?: Docs.Schema.TextRun; } export interface ParagraphStyle { alignment?: string; avoidWidowAndOrphan?: boolean; - borderBetween?: Docs_v1.Schema.ParagraphBorder; - borderBottom?: Docs_v1.Schema.ParagraphBorder; - borderLeft?: Docs_v1.Schema.ParagraphBorder; - borderRight?: Docs_v1.Schema.ParagraphBorder; - borderTop?: Docs_v1.Schema.ParagraphBorder; + borderBetween?: Docs.Schema.ParagraphBorder; + borderBottom?: Docs.Schema.ParagraphBorder; + borderLeft?: Docs.Schema.ParagraphBorder; + borderRight?: Docs.Schema.ParagraphBorder; + borderTop?: Docs.Schema.ParagraphBorder; direction?: string; headingId?: string; - indentEnd?: Docs_v1.Schema.Dimension; - indentFirstLine?: Docs_v1.Schema.Dimension; - indentStart?: Docs_v1.Schema.Dimension; + indentEnd?: Docs.Schema.Dimension; + indentFirstLine?: Docs.Schema.Dimension; + indentStart?: Docs.Schema.Dimension; keepLinesTogether?: boolean; keepWithNext?: boolean; lineSpacing?: Number; namedStyleType?: string; - shading?: Docs_v1.Schema.Shading; - spaceAbove?: Docs_v1.Schema.Dimension; - spaceBelow?: Docs_v1.Schema.Dimension; + shading?: Docs.Schema.Shading; + spaceAbove?: Docs.Schema.Dimension; + spaceBelow?: Docs.Schema.Dimension; spacingMode?: string; - tabStops?: Docs_v1.Schema.TabStop[]; + tabStops?: Docs.Schema.TabStop[]; } export interface ParagraphStyleSuggestionState { alignmentSuggested?: boolean; @@ -472,22 +472,22 @@ declare namespace GoogleAppsScript { keepWithNextSuggested?: boolean; lineSpacingSuggested?: boolean; namedStyleTypeSuggested?: boolean; - shadingSuggestionState?: Docs_v1.Schema.ShadingSuggestionState; + shadingSuggestionState?: Docs.Schema.ShadingSuggestionState; spaceAboveSuggested?: boolean; spaceBelowSuggested?: boolean; spacingModeSuggested?: boolean; } export interface PositionedObject { objectId?: string; - positionedObjectProperties?: Docs_v1.Schema.PositionedObjectProperties; + positionedObjectProperties?: Docs.Schema.PositionedObjectProperties; suggestedDeletionIds?: string[]; suggestedInsertionId?: string; suggestedPositionedObjectPropertiesChanges?: object; } export interface PositionedObjectPositioning { layout?: string; - leftOffset?: Docs_v1.Schema.Dimension; - topOffset?: Docs_v1.Schema.Dimension; + leftOffset?: Docs.Schema.Dimension; + topOffset?: Docs.Schema.Dimension; } export interface PositionedObjectPositioningSuggestionState { layoutSuggested?: boolean; @@ -495,12 +495,12 @@ declare namespace GoogleAppsScript { topOffsetSuggested?: boolean; } export interface PositionedObjectProperties { - embeddedObject?: Docs_v1.Schema.EmbeddedObject; - positioning?: Docs_v1.Schema.PositionedObjectPositioning; + embeddedObject?: Docs.Schema.EmbeddedObject; + positioning?: Docs.Schema.PositionedObjectPositioning; } export interface PositionedObjectPropertiesSuggestionState { - embeddedObjectSuggestionState?: Docs_v1.Schema.EmbeddedObjectSuggestionState; - positioningSuggestionState?: Docs_v1.Schema.PositionedObjectPositioningSuggestionState; + embeddedObjectSuggestionState?: Docs.Schema.EmbeddedObjectSuggestionState; + positioningSuggestionState?: Docs.Schema.PositionedObjectPositioningSuggestionState; } export interface Range { endIndex?: number; @@ -508,35 +508,35 @@ declare namespace GoogleAppsScript { startIndex?: number; } export interface ReplaceAllTextRequest { - containsText?: Docs_v1.Schema.SubstringMatchCriteria; + containsText?: Docs.Schema.SubstringMatchCriteria; replaceText?: string; } export interface ReplaceAllTextResponse { occurrencesChanged?: number; } export interface Request { - createNamedRange?: Docs_v1.Schema.CreateNamedRangeRequest; - createParagraphBullets?: Docs_v1.Schema.CreateParagraphBulletsRequest; - deleteContentRange?: Docs_v1.Schema.DeleteContentRangeRequest; - deleteNamedRange?: Docs_v1.Schema.DeleteNamedRangeRequest; - deleteParagraphBullets?: Docs_v1.Schema.DeleteParagraphBulletsRequest; - deletePositionedObject?: Docs_v1.Schema.DeletePositionedObjectRequest; - deleteTableColumn?: Docs_v1.Schema.DeleteTableColumnRequest; - deleteTableRow?: Docs_v1.Schema.DeleteTableRowRequest; - insertInlineImage?: Docs_v1.Schema.InsertInlineImageRequest; - insertPageBreak?: Docs_v1.Schema.InsertPageBreakRequest; - insertTable?: Docs_v1.Schema.InsertTableRequest; - insertTableRow?: Docs_v1.Schema.InsertTableRowRequest; - insertText?: Docs_v1.Schema.InsertTextRequest; - replaceAllText?: Docs_v1.Schema.ReplaceAllTextRequest; - updateParagraphStyle?: Docs_v1.Schema.UpdateParagraphStyleRequest; - updateTextStyle?: Docs_v1.Schema.UpdateTextStyleRequest; + createNamedRange?: Docs.Schema.CreateNamedRangeRequest; + createParagraphBullets?: Docs.Schema.CreateParagraphBulletsRequest; + deleteContentRange?: Docs.Schema.DeleteContentRangeRequest; + deleteNamedRange?: Docs.Schema.DeleteNamedRangeRequest; + deleteParagraphBullets?: Docs.Schema.DeleteParagraphBulletsRequest; + deletePositionedObject?: Docs.Schema.DeletePositionedObjectRequest; + deleteTableColumn?: Docs.Schema.DeleteTableColumnRequest; + deleteTableRow?: Docs.Schema.DeleteTableRowRequest; + insertInlineImage?: Docs.Schema.InsertInlineImageRequest; + insertPageBreak?: Docs.Schema.InsertPageBreakRequest; + insertTable?: Docs.Schema.InsertTableRequest; + insertTableRow?: Docs.Schema.InsertTableRowRequest; + insertText?: Docs.Schema.InsertTextRequest; + replaceAllText?: Docs.Schema.ReplaceAllTextRequest; + updateParagraphStyle?: Docs.Schema.UpdateParagraphStyleRequest; + updateTextStyle?: Docs.Schema.UpdateTextStyleRequest; } export interface Response { - createNamedRange?: Docs_v1.Schema.CreateNamedRangeResponse; - insertInlineImage?: Docs_v1.Schema.InsertInlineImageResponse; - insertInlineSheetsChart?: Docs_v1.Schema.InsertInlineSheetsChartResponse; - replaceAllText?: Docs_v1.Schema.ReplaceAllTextResponse; + createNamedRange?: Docs.Schema.CreateNamedRangeResponse; + insertInlineImage?: Docs.Schema.InsertInlineImageResponse; + insertInlineSheetsChart?: Docs.Schema.InsertInlineSheetsChartResponse; + replaceAllText?: Docs.Schema.ReplaceAllTextResponse; } export interface RgbColor { blue?: Number; @@ -544,21 +544,21 @@ declare namespace GoogleAppsScript { red?: Number; } export interface SectionBreak { - sectionStyle?: Docs_v1.Schema.SectionStyle; + sectionStyle?: Docs.Schema.SectionStyle; suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; } export interface SectionColumnProperties { - paddingEnd?: Docs_v1.Schema.Dimension; - width?: Docs_v1.Schema.Dimension; + paddingEnd?: Docs.Schema.Dimension; + width?: Docs.Schema.Dimension; } export interface SectionStyle { - columnProperties?: Docs_v1.Schema.SectionColumnProperties[]; + columnProperties?: Docs.Schema.SectionColumnProperties[]; columnSeparatorStyle?: string; contentDirection?: string; } export interface Shading { - backgroundColor?: Docs_v1.Schema.OptionalColor; + backgroundColor?: Docs.Schema.OptionalColor; } export interface ShadingSuggestionState { backgroundColorSuggested?: boolean; @@ -572,8 +572,8 @@ declare namespace GoogleAppsScript { spreadsheetIdSuggested?: boolean; } export interface Size { - height?: Docs_v1.Schema.Dimension; - width?: Docs_v1.Schema.Dimension; + height?: Docs.Schema.Dimension; + width?: Docs.Schema.Dimension; } export interface SizeSuggestionState { heightSuggested?: boolean; @@ -581,99 +581,99 @@ declare namespace GoogleAppsScript { } export interface StructuralElement { endIndex?: number; - paragraph?: Docs_v1.Schema.Paragraph; - sectionBreak?: Docs_v1.Schema.SectionBreak; + paragraph?: Docs.Schema.Paragraph; + sectionBreak?: Docs.Schema.SectionBreak; startIndex?: number; - table?: Docs_v1.Schema.Table; - tableOfContents?: Docs_v1.Schema.TableOfContents; + table?: Docs.Schema.Table; + tableOfContents?: Docs.Schema.TableOfContents; } export interface SubstringMatchCriteria { matchCase?: boolean; text?: string; } export interface SuggestedBullet { - bullet?: Docs_v1.Schema.Bullet; - bulletSuggestionState?: Docs_v1.Schema.BulletSuggestionState; + bullet?: Docs.Schema.Bullet; + bulletSuggestionState?: Docs.Schema.BulletSuggestionState; } export interface SuggestedDocumentStyle { - documentStyle?: Docs_v1.Schema.DocumentStyle; - documentStyleSuggestionState?: Docs_v1.Schema.DocumentStyleSuggestionState; + documentStyle?: Docs.Schema.DocumentStyle; + documentStyleSuggestionState?: Docs.Schema.DocumentStyleSuggestionState; } export interface SuggestedInlineObjectProperties { - inlineObjectProperties?: Docs_v1.Schema.InlineObjectProperties; - inlineObjectPropertiesSuggestionState?: Docs_v1.Schema.InlineObjectPropertiesSuggestionState; + inlineObjectProperties?: Docs.Schema.InlineObjectProperties; + inlineObjectPropertiesSuggestionState?: Docs.Schema.InlineObjectPropertiesSuggestionState; } export interface SuggestedListProperties { - listProperties?: Docs_v1.Schema.ListProperties; - listPropertiesSuggestionState?: Docs_v1.Schema.ListPropertiesSuggestionState; + listProperties?: Docs.Schema.ListProperties; + listPropertiesSuggestionState?: Docs.Schema.ListPropertiesSuggestionState; } export interface SuggestedNamedStyles { - namedStyles?: Docs_v1.Schema.NamedStyles; - namedStylesSuggestionState?: Docs_v1.Schema.NamedStylesSuggestionState; + namedStyles?: Docs.Schema.NamedStyles; + namedStylesSuggestionState?: Docs.Schema.NamedStylesSuggestionState; } export interface SuggestedParagraphStyle { - paragraphStyle?: Docs_v1.Schema.ParagraphStyle; - paragraphStyleSuggestionState?: Docs_v1.Schema.ParagraphStyleSuggestionState; + paragraphStyle?: Docs.Schema.ParagraphStyle; + paragraphStyleSuggestionState?: Docs.Schema.ParagraphStyleSuggestionState; } export interface SuggestedPositionedObjectProperties { - positionedObjectProperties?: Docs_v1.Schema.PositionedObjectProperties; - positionedObjectPropertiesSuggestionState?: Docs_v1.Schema.PositionedObjectPropertiesSuggestionState; + positionedObjectProperties?: Docs.Schema.PositionedObjectProperties; + positionedObjectPropertiesSuggestionState?: Docs.Schema.PositionedObjectPropertiesSuggestionState; } export interface SuggestedTableCellStyle { - tableCellStyle?: Docs_v1.Schema.TableCellStyle; - tableCellStyleSuggestionState?: Docs_v1.Schema.TableCellStyleSuggestionState; + tableCellStyle?: Docs.Schema.TableCellStyle; + tableCellStyleSuggestionState?: Docs.Schema.TableCellStyleSuggestionState; } export interface SuggestedTableRowStyle { - tableRowStyle?: Docs_v1.Schema.TableRowStyle; - tableRowStyleSuggestionState?: Docs_v1.Schema.TableRowStyleSuggestionState; + tableRowStyle?: Docs.Schema.TableRowStyle; + tableRowStyleSuggestionState?: Docs.Schema.TableRowStyleSuggestionState; } export interface SuggestedTextStyle { - textStyle?: Docs_v1.Schema.TextStyle; - textStyleSuggestionState?: Docs_v1.Schema.TextStyleSuggestionState; + textStyle?: Docs.Schema.TextStyle; + textStyleSuggestionState?: Docs.Schema.TextStyleSuggestionState; } export interface TabStop { alignment?: string; - offset?: Docs_v1.Schema.Dimension; + offset?: Docs.Schema.Dimension; } export interface Table { columns?: number; rows?: number; suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; - tableRows?: Docs_v1.Schema.TableRow[]; - tableStyle?: Docs_v1.Schema.TableStyle; + tableRows?: Docs.Schema.TableRow[]; + tableStyle?: Docs.Schema.TableStyle; } export interface TableCell { - content?: Docs_v1.Schema.StructuralElement[]; + content?: Docs.Schema.StructuralElement[]; endIndex?: number; startIndex?: number; suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; suggestedTableCellStyleChanges?: object; - tableCellStyle?: Docs_v1.Schema.TableCellStyle; + tableCellStyle?: Docs.Schema.TableCellStyle; } export interface TableCellBorder { - color?: Docs_v1.Schema.OptionalColor; + color?: Docs.Schema.OptionalColor; dashStyle?: string; - width?: Docs_v1.Schema.Dimension; + width?: Docs.Schema.Dimension; } export interface TableCellLocation { columnIndex?: number; rowIndex?: number; - tableStartLocation?: Docs_v1.Schema.Location; + tableStartLocation?: Docs.Schema.Location; } export interface TableCellStyle { - backgroundColor?: Docs_v1.Schema.OptionalColor; - borderBottom?: Docs_v1.Schema.TableCellBorder; - borderLeft?: Docs_v1.Schema.TableCellBorder; - borderRight?: Docs_v1.Schema.TableCellBorder; - borderTop?: Docs_v1.Schema.TableCellBorder; + backgroundColor?: Docs.Schema.OptionalColor; + borderBottom?: Docs.Schema.TableCellBorder; + borderLeft?: Docs.Schema.TableCellBorder; + borderRight?: Docs.Schema.TableCellBorder; + borderTop?: Docs.Schema.TableCellBorder; columnSpan?: number; contentAlignment?: string; - paddingBottom?: Docs_v1.Schema.Dimension; - paddingLeft?: Docs_v1.Schema.Dimension; - paddingRight?: Docs_v1.Schema.Dimension; - paddingTop?: Docs_v1.Schema.Dimension; + paddingBottom?: Docs.Schema.Dimension; + paddingLeft?: Docs.Schema.Dimension; + paddingRight?: Docs.Schema.Dimension; + paddingTop?: Docs.Schema.Dimension; rowSpan?: number; } export interface TableCellStyleSuggestionState { @@ -691,11 +691,11 @@ declare namespace GoogleAppsScript { rowSpanSuggested?: boolean; } export interface TableColumnProperties { - width?: Docs_v1.Schema.Dimension; + width?: Docs.Schema.Dimension; widthType?: string; } export interface TableOfContents { - content?: Docs_v1.Schema.StructuralElement[]; + content?: Docs.Schema.StructuralElement[]; suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; } @@ -705,37 +705,37 @@ declare namespace GoogleAppsScript { suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; suggestedTableRowStyleChanges?: object; - tableCells?: Docs_v1.Schema.TableCell[]; - tableRowStyle?: Docs_v1.Schema.TableRowStyle; + tableCells?: Docs.Schema.TableCell[]; + tableRowStyle?: Docs.Schema.TableRowStyle; } export interface TableRowStyle { - minRowHeight?: Docs_v1.Schema.Dimension; + minRowHeight?: Docs.Schema.Dimension; } export interface TableRowStyleSuggestionState { minRowHeightSuggested?: boolean; } export interface TableStyle { - tableColumnProperties?: Docs_v1.Schema.TableColumnProperties[]; + tableColumnProperties?: Docs.Schema.TableColumnProperties[]; } export interface TextRun { content?: string; suggestedDeletionIds?: string[]; suggestedInsertionIds?: string[]; suggestedTextStyleChanges?: object; - textStyle?: Docs_v1.Schema.TextStyle; + textStyle?: Docs.Schema.TextStyle; } export interface TextStyle { - backgroundColor?: Docs_v1.Schema.OptionalColor; + backgroundColor?: Docs.Schema.OptionalColor; baselineOffset?: string; bold?: boolean; - fontSize?: Docs_v1.Schema.Dimension; - foregroundColor?: Docs_v1.Schema.OptionalColor; + fontSize?: Docs.Schema.Dimension; + foregroundColor?: Docs.Schema.OptionalColor; italic?: boolean; - link?: Docs_v1.Schema.Link; + link?: Docs.Schema.Link; smallCaps?: boolean; strikethrough?: boolean; underline?: boolean; - weightedFontFamily?: Docs_v1.Schema.WeightedFontFamily; + weightedFontFamily?: Docs.Schema.WeightedFontFamily; } export interface TextStyleSuggestionState { backgroundColorSuggested?: boolean; @@ -752,13 +752,13 @@ declare namespace GoogleAppsScript { } export interface UpdateParagraphStyleRequest { fields?: string; - paragraphStyle?: Docs_v1.Schema.ParagraphStyle; - range?: Docs_v1.Schema.Range; + paragraphStyle?: Docs.Schema.ParagraphStyle; + range?: Docs.Schema.Range; } export interface UpdateTextStyleRequest { fields?: string; - range?: Docs_v1.Schema.Range; - textStyle?: Docs_v1.Schema.TextStyle; + range?: Docs.Schema.Range; + textStyle?: Docs.Schema.TextStyle; } export interface WeightedFontFamily { fontFamily?: string; @@ -770,141 +770,141 @@ declare namespace GoogleAppsScript { } } } - export interface Docs_v1 { - Documents?: Docs_v1.Collection.DocumentsCollection; + export interface Docs { + Documents?: Docs.Collection.DocumentsCollection; // Create a new instance of AutoText - newAutoText(): Docs_v1.Schema.AutoText; + newAutoText(): Docs.Schema.AutoText; // Create a new instance of Background - newBackground(): Docs_v1.Schema.Background; + newBackground(): Docs.Schema.Background; // Create a new instance of BatchUpdateDocumentRequest - newBatchUpdateDocumentRequest(): Docs_v1.Schema.BatchUpdateDocumentRequest; + newBatchUpdateDocumentRequest(): Docs.Schema.BatchUpdateDocumentRequest; // Create a new instance of Body - newBody(): Docs_v1.Schema.Body; + newBody(): Docs.Schema.Body; // Create a new instance of Bullet - newBullet(): Docs_v1.Schema.Bullet; + newBullet(): Docs.Schema.Bullet; // Create a new instance of Color - newColor(): Docs_v1.Schema.Color; + newColor(): Docs.Schema.Color; // Create a new instance of ColumnBreak - newColumnBreak(): Docs_v1.Schema.ColumnBreak; + newColumnBreak(): Docs.Schema.ColumnBreak; // Create a new instance of CreateNamedRangeRequest - newCreateNamedRangeRequest(): Docs_v1.Schema.CreateNamedRangeRequest; + newCreateNamedRangeRequest(): Docs.Schema.CreateNamedRangeRequest; // Create a new instance of CreateParagraphBulletsRequest - newCreateParagraphBulletsRequest(): Docs_v1.Schema.CreateParagraphBulletsRequest; + newCreateParagraphBulletsRequest(): Docs.Schema.CreateParagraphBulletsRequest; // Create a new instance of DeleteContentRangeRequest - newDeleteContentRangeRequest(): Docs_v1.Schema.DeleteContentRangeRequest; + newDeleteContentRangeRequest(): Docs.Schema.DeleteContentRangeRequest; // Create a new instance of DeleteNamedRangeRequest - newDeleteNamedRangeRequest(): Docs_v1.Schema.DeleteNamedRangeRequest; + newDeleteNamedRangeRequest(): Docs.Schema.DeleteNamedRangeRequest; // Create a new instance of DeleteParagraphBulletsRequest - newDeleteParagraphBulletsRequest(): Docs_v1.Schema.DeleteParagraphBulletsRequest; + newDeleteParagraphBulletsRequest(): Docs.Schema.DeleteParagraphBulletsRequest; // Create a new instance of DeletePositionedObjectRequest - newDeletePositionedObjectRequest(): Docs_v1.Schema.DeletePositionedObjectRequest; + newDeletePositionedObjectRequest(): Docs.Schema.DeletePositionedObjectRequest; // Create a new instance of DeleteTableColumnRequest - newDeleteTableColumnRequest(): Docs_v1.Schema.DeleteTableColumnRequest; + newDeleteTableColumnRequest(): Docs.Schema.DeleteTableColumnRequest; // Create a new instance of DeleteTableRowRequest - newDeleteTableRowRequest(): Docs_v1.Schema.DeleteTableRowRequest; + newDeleteTableRowRequest(): Docs.Schema.DeleteTableRowRequest; // Create a new instance of Dimension - newDimension(): Docs_v1.Schema.Dimension; + newDimension(): Docs.Schema.Dimension; // Create a new instance of Document - newDocument(): Docs_v1.Schema.Document; + newDocument(): Docs.Schema.Document; // Create a new instance of DocumentStyle - newDocumentStyle(): Docs_v1.Schema.DocumentStyle; + newDocumentStyle(): Docs.Schema.DocumentStyle; // Create a new instance of EndOfSegmentLocation - newEndOfSegmentLocation(): Docs_v1.Schema.EndOfSegmentLocation; + newEndOfSegmentLocation(): Docs.Schema.EndOfSegmentLocation; // Create a new instance of Equation - newEquation(): Docs_v1.Schema.Equation; + newEquation(): Docs.Schema.Equation; // Create a new instance of FootnoteReference - newFootnoteReference(): Docs_v1.Schema.FootnoteReference; + newFootnoteReference(): Docs.Schema.FootnoteReference; // Create a new instance of HorizontalRule - newHorizontalRule(): Docs_v1.Schema.HorizontalRule; + newHorizontalRule(): Docs.Schema.HorizontalRule; // Create a new instance of InlineObjectElement - newInlineObjectElement(): Docs_v1.Schema.InlineObjectElement; + newInlineObjectElement(): Docs.Schema.InlineObjectElement; // Create a new instance of InsertInlineImageRequest - newInsertInlineImageRequest(): Docs_v1.Schema.InsertInlineImageRequest; + newInsertInlineImageRequest(): Docs.Schema.InsertInlineImageRequest; // Create a new instance of InsertPageBreakRequest - newInsertPageBreakRequest(): Docs_v1.Schema.InsertPageBreakRequest; + newInsertPageBreakRequest(): Docs.Schema.InsertPageBreakRequest; // Create a new instance of InsertTableRequest - newInsertTableRequest(): Docs_v1.Schema.InsertTableRequest; + newInsertTableRequest(): Docs.Schema.InsertTableRequest; // Create a new instance of InsertTableRowRequest - newInsertTableRowRequest(): Docs_v1.Schema.InsertTableRowRequest; + newInsertTableRowRequest(): Docs.Schema.InsertTableRowRequest; // Create a new instance of InsertTextRequest - newInsertTextRequest(): Docs_v1.Schema.InsertTextRequest; + newInsertTextRequest(): Docs.Schema.InsertTextRequest; // Create a new instance of Link - newLink(): Docs_v1.Schema.Link; + newLink(): Docs.Schema.Link; // Create a new instance of Location - newLocation(): Docs_v1.Schema.Location; + newLocation(): Docs.Schema.Location; // Create a new instance of NamedStyle - newNamedStyle(): Docs_v1.Schema.NamedStyle; + newNamedStyle(): Docs.Schema.NamedStyle; // Create a new instance of NamedStyles - newNamedStyles(): Docs_v1.Schema.NamedStyles; + newNamedStyles(): Docs.Schema.NamedStyles; // Create a new instance of OptionalColor - newOptionalColor(): Docs_v1.Schema.OptionalColor; + newOptionalColor(): Docs.Schema.OptionalColor; // Create a new instance of PageBreak - newPageBreak(): Docs_v1.Schema.PageBreak; + newPageBreak(): Docs.Schema.PageBreak; // Create a new instance of Paragraph - newParagraph(): Docs_v1.Schema.Paragraph; + newParagraph(): Docs.Schema.Paragraph; // Create a new instance of ParagraphBorder - newParagraphBorder(): Docs_v1.Schema.ParagraphBorder; + newParagraphBorder(): Docs.Schema.ParagraphBorder; // Create a new instance of ParagraphElement - newParagraphElement(): Docs_v1.Schema.ParagraphElement; + newParagraphElement(): Docs.Schema.ParagraphElement; // Create a new instance of ParagraphStyle - newParagraphStyle(): Docs_v1.Schema.ParagraphStyle; + newParagraphStyle(): Docs.Schema.ParagraphStyle; // Create a new instance of Range - newRange(): Docs_v1.Schema.Range; + newRange(): Docs.Schema.Range; // Create a new instance of ReplaceAllTextRequest - newReplaceAllTextRequest(): Docs_v1.Schema.ReplaceAllTextRequest; + newReplaceAllTextRequest(): Docs.Schema.ReplaceAllTextRequest; // Create a new instance of Request - newRequest(): Docs_v1.Schema.Request; + newRequest(): Docs.Schema.Request; // Create a new instance of RgbColor - newRgbColor(): Docs_v1.Schema.RgbColor; + newRgbColor(): Docs.Schema.RgbColor; // Create a new instance of SectionBreak - newSectionBreak(): Docs_v1.Schema.SectionBreak; + newSectionBreak(): Docs.Schema.SectionBreak; // Create a new instance of SectionColumnProperties - newSectionColumnProperties(): Docs_v1.Schema.SectionColumnProperties; + newSectionColumnProperties(): Docs.Schema.SectionColumnProperties; // Create a new instance of SectionStyle - newSectionStyle(): Docs_v1.Schema.SectionStyle; + newSectionStyle(): Docs.Schema.SectionStyle; // Create a new instance of Shading - newShading(): Docs_v1.Schema.Shading; + newShading(): Docs.Schema.Shading; // Create a new instance of Size - newSize(): Docs_v1.Schema.Size; + newSize(): Docs.Schema.Size; // Create a new instance of StructuralElement - newStructuralElement(): Docs_v1.Schema.StructuralElement; + newStructuralElement(): Docs.Schema.StructuralElement; // Create a new instance of SubstringMatchCriteria - newSubstringMatchCriteria(): Docs_v1.Schema.SubstringMatchCriteria; + newSubstringMatchCriteria(): Docs.Schema.SubstringMatchCriteria; // Create a new instance of TabStop - newTabStop(): Docs_v1.Schema.TabStop; + newTabStop(): Docs.Schema.TabStop; // Create a new instance of Table - newTable(): Docs_v1.Schema.Table; + newTable(): Docs.Schema.Table; // Create a new instance of TableCell - newTableCell(): Docs_v1.Schema.TableCell; + newTableCell(): Docs.Schema.TableCell; // Create a new instance of TableCellBorder - newTableCellBorder(): Docs_v1.Schema.TableCellBorder; + newTableCellBorder(): Docs.Schema.TableCellBorder; // Create a new instance of TableCellLocation - newTableCellLocation(): Docs_v1.Schema.TableCellLocation; + newTableCellLocation(): Docs.Schema.TableCellLocation; // Create a new instance of TableCellStyle - newTableCellStyle(): Docs_v1.Schema.TableCellStyle; + newTableCellStyle(): Docs.Schema.TableCellStyle; // Create a new instance of TableColumnProperties - newTableColumnProperties(): Docs_v1.Schema.TableColumnProperties; + newTableColumnProperties(): Docs.Schema.TableColumnProperties; // Create a new instance of TableOfContents - newTableOfContents(): Docs_v1.Schema.TableOfContents; + newTableOfContents(): Docs.Schema.TableOfContents; // Create a new instance of TableRow - newTableRow(): Docs_v1.Schema.TableRow; + newTableRow(): Docs.Schema.TableRow; // Create a new instance of TableRowStyle - newTableRowStyle(): Docs_v1.Schema.TableRowStyle; + newTableRowStyle(): Docs.Schema.TableRowStyle; // Create a new instance of TableStyle - newTableStyle(): Docs_v1.Schema.TableStyle; + newTableStyle(): Docs.Schema.TableStyle; // Create a new instance of TextRun - newTextRun(): Docs_v1.Schema.TextRun; + newTextRun(): Docs.Schema.TextRun; // Create a new instance of TextStyle - newTextStyle(): Docs_v1.Schema.TextStyle; + newTextStyle(): Docs.Schema.TextStyle; // Create a new instance of UpdateParagraphStyleRequest - newUpdateParagraphStyleRequest(): Docs_v1.Schema.UpdateParagraphStyleRequest; + newUpdateParagraphStyleRequest(): Docs.Schema.UpdateParagraphStyleRequest; // Create a new instance of UpdateTextStyleRequest - newUpdateTextStyleRequest(): Docs_v1.Schema.UpdateTextStyleRequest; + newUpdateTextStyleRequest(): Docs.Schema.UpdateTextStyleRequest; // Create a new instance of WeightedFontFamily - newWeightedFontFamily(): Docs_v1.Schema.WeightedFontFamily; + newWeightedFontFamily(): Docs.Schema.WeightedFontFamily; // Create a new instance of WriteControl - newWriteControl(): Docs_v1.Schema.WriteControl; + newWriteControl(): Docs.Schema.WriteControl; } } -declare var Docs_v1: GoogleAppsScript.Docs_v1; \ No newline at end of file +declare var Docs: GoogleAppsScript.Docs; diff --git a/types/google-apps-script/apis/drive_v2.d.ts b/types/google-apps-script/apis/drive_v2.d.ts index 9a956bef53..9fd614bf16 100644 --- a/types/google-apps-script/apis/drive_v2.d.ts +++ b/types/google-apps-script/apis/drive_v2.d.ts @@ -5,39 +5,39 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Drive_v2 { + namespace Drive { namespace Collection { export interface AboutCollection { // Gets the information about the current user along with Drive API settings - get(): Drive_v2.Schema.About; + get(): Drive.Schema.About; // Gets the information about the current user along with Drive API settings - get(optionalArgs: object): Drive_v2.Schema.About; + get(optionalArgs: object): Drive.Schema.About; } export interface AppsCollection { // Gets a specific app. - get(appId: string): Drive_v2.Schema.App; + get(appId: string): Drive.Schema.App; // Lists a user's installed apps. - list(): Drive_v2.Schema.AppList; + list(): Drive.Schema.AppList; // Lists a user's installed apps. - list(optionalArgs: object): Drive_v2.Schema.AppList; + list(optionalArgs: object): Drive.Schema.AppList; } export interface ChangesCollection { // Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes. - get(changeId: string): Drive_v2.Schema.Change; + get(changeId: string): Drive.Schema.Change; // Deprecated - Use changes.getStartPageToken and changes.list to retrieve recent changes. - get(changeId: string, optionalArgs: object): Drive_v2.Schema.Change; + get(changeId: string, optionalArgs: object): Drive.Schema.Change; // Gets the starting pageToken for listing future changes. - getStartPageToken(): Drive_v2.Schema.StartPageToken; + getStartPageToken(): Drive.Schema.StartPageToken; // Gets the starting pageToken for listing future changes. - getStartPageToken(optionalArgs: object): Drive_v2.Schema.StartPageToken; + getStartPageToken(optionalArgs: object): Drive.Schema.StartPageToken; // Lists the changes for a user or Team Drive. - list(): Drive_v2.Schema.ChangeList; + list(): Drive.Schema.ChangeList; // Lists the changes for a user or Team Drive. - list(optionalArgs: object): Drive_v2.Schema.ChangeList; + list(optionalArgs: object): Drive.Schema.ChangeList; // Subscribe to changes for a user. - watch(resource: Schema.Channel): Drive_v2.Schema.Channel; + watch(resource: Schema.Channel): Drive.Schema.Channel; // Subscribe to changes for a user. - watch(resource: Schema.Channel, optionalArgs: object): Drive_v2.Schema.Channel; + watch(resource: Schema.Channel, optionalArgs: object): Drive.Schema.Channel; } export interface ChannelsCollection { // Stop watching resources through this channel @@ -45,155 +45,155 @@ declare namespace GoogleAppsScript { } export interface ChildrenCollection { // Gets a specific child reference. - get(folderId: string, childId: string): Drive_v2.Schema.ChildReference; + get(folderId: string, childId: string): Drive.Schema.ChildReference; // Inserts a file into a folder. - insert(resource: Schema.ChildReference, folderId: string): Drive_v2.Schema.ChildReference; + insert(resource: Schema.ChildReference, folderId: string): Drive.Schema.ChildReference; // Inserts a file into a folder. - insert(resource: Schema.ChildReference, folderId: string, optionalArgs: object): Drive_v2.Schema.ChildReference; + insert(resource: Schema.ChildReference, folderId: string, optionalArgs: object): Drive.Schema.ChildReference; // Lists a folder's children. - list(folderId: string): Drive_v2.Schema.ChildList; + list(folderId: string): Drive.Schema.ChildList; // Lists a folder's children. - list(folderId: string, optionalArgs: object): Drive_v2.Schema.ChildList; + list(folderId: string, optionalArgs: object): Drive.Schema.ChildList; // Removes a child from a folder. remove(folderId: string, childId: string): void; } export interface CommentsCollection { // Gets a comment by ID. - get(fileId: string, commentId: string): Drive_v2.Schema.Comment; + get(fileId: string, commentId: string): Drive.Schema.Comment; // Gets a comment by ID. - get(fileId: string, commentId: string, optionalArgs: object): Drive_v2.Schema.Comment; + get(fileId: string, commentId: string, optionalArgs: object): Drive.Schema.Comment; // Creates a new comment on the given file. - insert(resource: Schema.Comment, fileId: string): Drive_v2.Schema.Comment; + insert(resource: Schema.Comment, fileId: string): Drive.Schema.Comment; // Lists a file's comments. - list(fileId: string): Drive_v2.Schema.CommentList; + list(fileId: string): Drive.Schema.CommentList; // Lists a file's comments. - list(fileId: string, optionalArgs: object): Drive_v2.Schema.CommentList; + list(fileId: string, optionalArgs: object): Drive.Schema.CommentList; // Updates an existing comment. This method supports patch semantics. - patch(resource: Schema.Comment, fileId: string, commentId: string): Drive_v2.Schema.Comment; + patch(resource: Schema.Comment, fileId: string, commentId: string): Drive.Schema.Comment; // Deletes a comment. remove(fileId: string, commentId: string): void; // Updates an existing comment. - update(resource: Schema.Comment, fileId: string, commentId: string): Drive_v2.Schema.Comment; + update(resource: Schema.Comment, fileId: string, commentId: string): Drive.Schema.Comment; } export interface FilesCollection { // Creates a copy of the specified file. - copy(resource: Schema.File, fileId: string): Drive_v2.Schema.File; + copy(resource: Schema.File, fileId: string): Drive.Schema.File; // Creates a copy of the specified file. - copy(resource: Schema.File, fileId: string, optionalArgs: object): Drive_v2.Schema.File; + copy(resource: Schema.File, fileId: string, optionalArgs: object): Drive.Schema.File; // Permanently deletes all of the user's trashed files. emptyTrash(): void; // Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB. export(fileId: string, mimeType: string): void; // Generates a set of file IDs which can be provided in insert requests. - generateIds(): Drive_v2.Schema.GeneratedIds; + generateIds(): Drive.Schema.GeneratedIds; // Generates a set of file IDs which can be provided in insert requests. - generateIds(optionalArgs: object): Drive_v2.Schema.GeneratedIds; + generateIds(optionalArgs: object): Drive.Schema.GeneratedIds; // Gets a file's metadata by ID. - get(fileId: string): Drive_v2.Schema.File; + get(fileId: string): Drive.Schema.File; // Gets a file's metadata by ID. - get(fileId: string, optionalArgs: object): Drive_v2.Schema.File; + get(fileId: string, optionalArgs: object): Drive.Schema.File; // Insert a new file. - insert(resource: Schema.File): Drive_v2.Schema.File; + insert(resource: Schema.File): Drive.Schema.File; // Insert a new file. - insert(resource: Schema.File, mediaData: any): Drive_v2.Schema.File; + insert(resource: Schema.File, mediaData: any): Drive.Schema.File; // Insert a new file. - insert(resource: Schema.File, mediaData: any, optionalArgs: object): Drive_v2.Schema.File; + insert(resource: Schema.File, mediaData: any, optionalArgs: object): Drive.Schema.File; // Lists the user's files. - list(): Drive_v2.Schema.FileList; + list(): Drive.Schema.FileList; // Lists the user's files. - list(optionalArgs: object): Drive_v2.Schema.FileList; + list(optionalArgs: object): Drive.Schema.FileList; // Updates file metadata and/or content. This method supports patch semantics. - patch(resource: Schema.File, fileId: string): Drive_v2.Schema.File; + patch(resource: Schema.File, fileId: string): Drive.Schema.File; // Updates file metadata and/or content. This method supports patch semantics. - patch(resource: Schema.File, fileId: string, optionalArgs: object): Drive_v2.Schema.File; + patch(resource: Schema.File, fileId: string, optionalArgs: object): Drive.Schema.File; // Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files. remove(fileId: string): void; // Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for Team Drive files. remove(fileId: string, optionalArgs: object): void; // Set the file's updated time to the current server time. - touch(fileId: string): Drive_v2.Schema.File; + touch(fileId: string): Drive.Schema.File; // Set the file's updated time to the current server time. - touch(fileId: string, optionalArgs: object): Drive_v2.Schema.File; + touch(fileId: string, optionalArgs: object): Drive.Schema.File; // Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for Team Drive files. - trash(fileId: string): Drive_v2.Schema.File; + trash(fileId: string): Drive.Schema.File; // Moves a file to the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for Team Drive files. - trash(fileId: string, optionalArgs: object): Drive_v2.Schema.File; + trash(fileId: string, optionalArgs: object): Drive.Schema.File; // Restores a file from the trash. - untrash(fileId: string): Drive_v2.Schema.File; + untrash(fileId: string): Drive.Schema.File; // Restores a file from the trash. - untrash(fileId: string, optionalArgs: object): Drive_v2.Schema.File; + untrash(fileId: string, optionalArgs: object): Drive.Schema.File; // Updates file metadata and/or content. - update(resource: Schema.File, fileId: string): Drive_v2.Schema.File; + update(resource: Schema.File, fileId: string): Drive.Schema.File; // Updates file metadata and/or content. - update(resource: Schema.File, fileId: string, mediaData: any): Drive_v2.Schema.File; + update(resource: Schema.File, fileId: string, mediaData: any): Drive.Schema.File; // Updates file metadata and/or content. - update(resource: Schema.File, fileId: string, mediaData: any, optionalArgs: object): Drive_v2.Schema.File; + update(resource: Schema.File, fileId: string, mediaData: any, optionalArgs: object): Drive.Schema.File; // Subscribe to changes on a file - watch(resource: Schema.Channel, fileId: string): Drive_v2.Schema.Channel; + watch(resource: Schema.Channel, fileId: string): Drive.Schema.Channel; // Subscribe to changes on a file - watch(resource: Schema.Channel, fileId: string, optionalArgs: object): Drive_v2.Schema.Channel; + watch(resource: Schema.Channel, fileId: string, optionalArgs: object): Drive.Schema.Channel; } export interface ParentsCollection { // Gets a specific parent reference. - get(fileId: string, parentId: string): Drive_v2.Schema.ParentReference; + get(fileId: string, parentId: string): Drive.Schema.ParentReference; // Adds a parent folder for a file. - insert(resource: Schema.ParentReference, fileId: string): Drive_v2.Schema.ParentReference; + insert(resource: Schema.ParentReference, fileId: string): Drive.Schema.ParentReference; // Adds a parent folder for a file. - insert(resource: Schema.ParentReference, fileId: string, optionalArgs: object): Drive_v2.Schema.ParentReference; + insert(resource: Schema.ParentReference, fileId: string, optionalArgs: object): Drive.Schema.ParentReference; // Lists a file's parents. - list(fileId: string): Drive_v2.Schema.ParentList; + list(fileId: string): Drive.Schema.ParentList; // Removes a parent from a file. remove(fileId: string, parentId: string): void; } export interface PermissionsCollection { // Gets a permission by ID. - get(fileId: string, permissionId: string): Drive_v2.Schema.Permission; + get(fileId: string, permissionId: string): Drive.Schema.Permission; // Gets a permission by ID. - get(fileId: string, permissionId: string, optionalArgs: object): Drive_v2.Schema.Permission; + get(fileId: string, permissionId: string, optionalArgs: object): Drive.Schema.Permission; // Returns the permission ID for an email address. - getIdForEmail(email: string): Drive_v2.Schema.PermissionId; + getIdForEmail(email: string): Drive.Schema.PermissionId; // Inserts a permission for a file or Team Drive. - insert(resource: Schema.Permission, fileId: string): Drive_v2.Schema.Permission; + insert(resource: Schema.Permission, fileId: string): Drive.Schema.Permission; // Inserts a permission for a file or Team Drive. - insert(resource: Schema.Permission, fileId: string, optionalArgs: object): Drive_v2.Schema.Permission; + insert(resource: Schema.Permission, fileId: string, optionalArgs: object): Drive.Schema.Permission; // Lists a file's or Team Drive's permissions. - list(fileId: string): Drive_v2.Schema.PermissionList; + list(fileId: string): Drive.Schema.PermissionList; // Lists a file's or Team Drive's permissions. - list(fileId: string, optionalArgs: object): Drive_v2.Schema.PermissionList; + list(fileId: string, optionalArgs: object): Drive.Schema.PermissionList; // Updates a permission using patch semantics. - patch(resource: Schema.Permission, fileId: string, permissionId: string): Drive_v2.Schema.Permission; + patch(resource: Schema.Permission, fileId: string, permissionId: string): Drive.Schema.Permission; // Updates a permission using patch semantics. - patch(resource: Schema.Permission, fileId: string, permissionId: string, optionalArgs: object): Drive_v2.Schema.Permission; + patch(resource: Schema.Permission, fileId: string, permissionId: string, optionalArgs: object): Drive.Schema.Permission; // Deletes a permission from a file or Team Drive. remove(fileId: string, permissionId: string): void; // Deletes a permission from a file or Team Drive. remove(fileId: string, permissionId: string, optionalArgs: object): void; // Updates a permission. - update(resource: Schema.Permission, fileId: string, permissionId: string): Drive_v2.Schema.Permission; + update(resource: Schema.Permission, fileId: string, permissionId: string): Drive.Schema.Permission; // Updates a permission. - update(resource: Schema.Permission, fileId: string, permissionId: string, optionalArgs: object): Drive_v2.Schema.Permission; + update(resource: Schema.Permission, fileId: string, permissionId: string, optionalArgs: object): Drive.Schema.Permission; } export interface PropertiesCollection { // Gets a property by its key. - get(fileId: string, propertyKey: string): Drive_v2.Schema.Property; + get(fileId: string, propertyKey: string): Drive.Schema.Property; // Gets a property by its key. - get(fileId: string, propertyKey: string, optionalArgs: object): Drive_v2.Schema.Property; + get(fileId: string, propertyKey: string, optionalArgs: object): Drive.Schema.Property; // Adds a property to a file, or updates it if it already exists. - insert(resource: Schema.Property, fileId: string): Drive_v2.Schema.Property; + insert(resource: Schema.Property, fileId: string): Drive.Schema.Property; // Lists a file's properties. - list(fileId: string): Drive_v2.Schema.PropertyList; + list(fileId: string): Drive.Schema.PropertyList; // Updates a property. - patch(resource: Schema.Property, fileId: string, propertyKey: string): Drive_v2.Schema.Property; + patch(resource: Schema.Property, fileId: string, propertyKey: string): Drive.Schema.Property; // Updates a property. - patch(resource: Schema.Property, fileId: string, propertyKey: string, optionalArgs: object): Drive_v2.Schema.Property; + patch(resource: Schema.Property, fileId: string, propertyKey: string, optionalArgs: object): Drive.Schema.Property; // Deletes a property. remove(fileId: string, propertyKey: string): void; // Deletes a property. remove(fileId: string, propertyKey: string, optionalArgs: object): void; // Updates a property. - update(resource: Schema.Property, fileId: string, propertyKey: string): Drive_v2.Schema.Property; + update(resource: Schema.Property, fileId: string, propertyKey: string): Drive.Schema.Property; // Updates a property. - update(resource: Schema.Property, fileId: string, propertyKey: string, optionalArgs: object): Drive_v2.Schema.Property; + update(resource: Schema.Property, fileId: string, propertyKey: string, optionalArgs: object): Drive.Schema.Property; } export interface RealtimeCollection { // Exports the contents of the Realtime API data model associated with this file as JSON. @@ -209,73 +209,73 @@ declare namespace GoogleAppsScript { } export interface RepliesCollection { // Gets a reply. - get(fileId: string, commentId: string, replyId: string): Drive_v2.Schema.CommentReply; + get(fileId: string, commentId: string, replyId: string): Drive.Schema.CommentReply; // Gets a reply. - get(fileId: string, commentId: string, replyId: string, optionalArgs: object): Drive_v2.Schema.CommentReply; + get(fileId: string, commentId: string, replyId: string, optionalArgs: object): Drive.Schema.CommentReply; // Creates a new reply to the given comment. - insert(resource: Schema.CommentReply, fileId: string, commentId: string): Drive_v2.Schema.CommentReply; + insert(resource: Schema.CommentReply, fileId: string, commentId: string): Drive.Schema.CommentReply; // Lists all of the replies to a comment. - list(fileId: string, commentId: string): Drive_v2.Schema.CommentReplyList; + list(fileId: string, commentId: string): Drive.Schema.CommentReplyList; // Lists all of the replies to a comment. - list(fileId: string, commentId: string, optionalArgs: object): Drive_v2.Schema.CommentReplyList; + list(fileId: string, commentId: string, optionalArgs: object): Drive.Schema.CommentReplyList; // Updates an existing reply. This method supports patch semantics. - patch(resource: Schema.CommentReply, fileId: string, commentId: string, replyId: string): Drive_v2.Schema.CommentReply; + patch(resource: Schema.CommentReply, fileId: string, commentId: string, replyId: string): Drive.Schema.CommentReply; // Deletes a reply. remove(fileId: string, commentId: string, replyId: string): void; // Updates an existing reply. - update(resource: Schema.CommentReply, fileId: string, commentId: string, replyId: string): Drive_v2.Schema.CommentReply; + update(resource: Schema.CommentReply, fileId: string, commentId: string, replyId: string): Drive.Schema.CommentReply; } export interface RevisionsCollection { // Gets a specific revision. - get(fileId: string, revisionId: string): Drive_v2.Schema.Revision; + get(fileId: string, revisionId: string): Drive.Schema.Revision; // Lists a file's revisions. - list(fileId: string): Drive_v2.Schema.RevisionList; + list(fileId: string): Drive.Schema.RevisionList; // Lists a file's revisions. - list(fileId: string, optionalArgs: object): Drive_v2.Schema.RevisionList; + list(fileId: string, optionalArgs: object): Drive.Schema.RevisionList; // Updates a revision. This method supports patch semantics. - patch(resource: Schema.Revision, fileId: string, revisionId: string): Drive_v2.Schema.Revision; + patch(resource: Schema.Revision, fileId: string, revisionId: string): Drive.Schema.Revision; // Permanently deletes a file version. You can only delete revisions for files with binary content, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted. remove(fileId: string, revisionId: string): void; // Updates a revision. - update(resource: Schema.Revision, fileId: string, revisionId: string): Drive_v2.Schema.Revision; + update(resource: Schema.Revision, fileId: string, revisionId: string): Drive.Schema.Revision; } export interface TeamdrivesCollection { // Gets a Team Drive's metadata by ID. - get(teamDriveId: string): Drive_v2.Schema.TeamDrive; + get(teamDriveId: string): Drive.Schema.TeamDrive; // Gets a Team Drive's metadata by ID. - get(teamDriveId: string, optionalArgs: object): Drive_v2.Schema.TeamDrive; + get(teamDriveId: string, optionalArgs: object): Drive.Schema.TeamDrive; // Creates a new Team Drive. - insert(resource: Schema.TeamDrive, requestId: string): Drive_v2.Schema.TeamDrive; + insert(resource: Schema.TeamDrive, requestId: string): Drive.Schema.TeamDrive; // Lists the user's Team Drives. - list(): Drive_v2.Schema.TeamDriveList; + list(): Drive.Schema.TeamDriveList; // Lists the user's Team Drives. - list(optionalArgs: object): Drive_v2.Schema.TeamDriveList; + list(optionalArgs: object): Drive.Schema.TeamDriveList; // Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. remove(teamDriveId: string): void; // Updates a Team Drive's metadata - update(resource: Schema.TeamDrive, teamDriveId: string): Drive_v2.Schema.TeamDrive; + update(resource: Schema.TeamDrive, teamDriveId: string): Drive.Schema.TeamDrive; // Updates a Team Drive's metadata - update(resource: Schema.TeamDrive, teamDriveId: string, optionalArgs: object): Drive_v2.Schema.TeamDrive; + update(resource: Schema.TeamDrive, teamDriveId: string, optionalArgs: object): Drive.Schema.TeamDrive; } } namespace Schema { export interface About { - additionalRoleInfo?: Drive_v2.Schema.AboutAdditionalRoleInfo[]; + additionalRoleInfo?: Drive.Schema.AboutAdditionalRoleInfo[]; canCreateTeamDrives?: boolean; domainSharingPolicy?: string; etag?: string; - exportFormats?: Drive_v2.Schema.AboutExportFormats[]; - features?: Drive_v2.Schema.AboutFeatures[]; + exportFormats?: Drive.Schema.AboutExportFormats[]; + features?: Drive.Schema.AboutFeatures[]; folderColorPalette?: string[]; - importFormats?: Drive_v2.Schema.AboutImportFormats[]; + importFormats?: Drive.Schema.AboutImportFormats[]; isCurrentAppInstalled?: boolean; kind?: string; languageCode?: string; largestChangeId?: string; - maxUploadSizes?: Drive_v2.Schema.AboutMaxUploadSizes[]; + maxUploadSizes?: Drive.Schema.AboutMaxUploadSizes[]; name?: string; permissionId?: string; - quotaBytesByService?: Drive_v2.Schema.AboutQuotaBytesByService[]; + quotaBytesByService?: Drive.Schema.AboutQuotaBytesByService[]; quotaBytesTotal?: string; quotaBytesUsed?: string; quotaBytesUsedAggregate?: string; @@ -284,11 +284,11 @@ declare namespace GoogleAppsScript { remainingChangeIds?: string; rootFolderId?: string; selfLink?: string; - teamDriveThemes?: Drive_v2.Schema.AboutTeamDriveThemes[]; - user?: Drive_v2.Schema.User; + teamDriveThemes?: Drive.Schema.AboutTeamDriveThemes[]; + user?: Drive.Schema.User; } export interface AboutAdditionalRoleInfo { - roleSets?: Drive_v2.Schema.AboutAdditionalRoleInfoRoleSets[]; + roleSets?: Drive.Schema.AboutAdditionalRoleInfoRoleSets[]; type?: string; } export interface AboutAdditionalRoleInfoRoleSets { @@ -325,7 +325,7 @@ declare namespace GoogleAppsScript { createInFolderTemplate?: string; createUrl?: string; hasDriveWideScope?: boolean; - icons?: Drive_v2.Schema.AppIcons[]; + icons?: Drive.Schema.AppIcons[]; id?: string; installed?: boolean; kind?: string; @@ -354,25 +354,25 @@ declare namespace GoogleAppsScript { export interface AppList { defaultAppIds?: string[]; etag?: string; - items?: Drive_v2.Schema.App[]; + items?: Drive.Schema.App[]; kind?: string; selfLink?: string; } export interface Change { deleted?: boolean; - file?: Drive_v2.Schema.File; + file?: Drive.Schema.File; fileId?: string; id?: string; kind?: string; modificationDate?: string; selfLink?: string; - teamDrive?: Drive_v2.Schema.TeamDrive; + teamDrive?: Drive.Schema.TeamDrive; teamDriveId?: string; type?: string; } export interface ChangeList { etag?: string; - items?: Drive_v2.Schema.Change[]; + items?: Drive.Schema.Change[]; kind?: string; largestChangeId?: string; newStartPageToken?: string; @@ -394,7 +394,7 @@ declare namespace GoogleAppsScript { } export interface ChildList { etag?: string; - items?: Drive_v2.Schema.ChildReference[]; + items?: Drive.Schema.ChildReference[]; kind?: string; nextLink?: string; nextPageToken?: string; @@ -408,10 +408,10 @@ declare namespace GoogleAppsScript { } export interface Comment { anchor?: string; - author?: Drive_v2.Schema.User; + author?: Drive.Schema.User; commentId?: string; content?: string; - context?: Drive_v2.Schema.CommentContext; + context?: Drive.Schema.CommentContext; createdDate?: string; deleted?: boolean; fileId?: string; @@ -419,7 +419,7 @@ declare namespace GoogleAppsScript { htmlContent?: string; kind?: string; modifiedDate?: string; - replies?: Drive_v2.Schema.CommentReply[]; + replies?: Drive.Schema.CommentReply[]; selfLink?: string; status?: string; } @@ -428,14 +428,14 @@ declare namespace GoogleAppsScript { value?: string; } export interface CommentList { - items?: Drive_v2.Schema.Comment[]; + items?: Drive.Schema.Comment[]; kind?: string; nextLink?: string; nextPageToken?: string; selfLink?: string; } export interface CommentReply { - author?: Drive_v2.Schema.User; + author?: Drive.Schema.User; content?: string; createdDate?: string; deleted?: boolean; @@ -446,7 +446,7 @@ declare namespace GoogleAppsScript { verb?: string; } export interface CommentReplyList { - items?: Drive_v2.Schema.CommentReply[]; + items?: Drive.Schema.CommentReply[]; kind?: string; nextLink?: string; nextPageToken?: string; @@ -457,7 +457,7 @@ declare namespace GoogleAppsScript { appDataContents?: boolean; canComment?: boolean; canReadRevisions?: boolean; - capabilities?: Drive_v2.Schema.FileCapabilities; + capabilities?: Drive.Schema.FileCapabilities; copyRequiresWriterPermission?: boolean; copyable?: boolean; createdDate?: string; @@ -478,12 +478,12 @@ declare namespace GoogleAppsScript { headRevisionId?: string; iconLink?: string; id?: string; - imageMediaMetadata?: Drive_v2.Schema.FileImageMediaMetadata; - indexableText?: Drive_v2.Schema.FileIndexableText; + imageMediaMetadata?: Drive.Schema.FileImageMediaMetadata; + indexableText?: Drive.Schema.FileIndexableText; isAppAuthorized?: boolean; kind?: string; - labels?: Drive_v2.Schema.FileLabels; - lastModifyingUser?: Drive_v2.Schema.User; + labels?: Drive.Schema.FileLabels; + lastModifyingUser?: Drive.Schema.User; lastModifyingUserName?: string; lastViewedByMeDate?: string; markedViewedByMeDate?: string; @@ -495,28 +495,28 @@ declare namespace GoogleAppsScript { originalFilename?: string; ownedByMe?: boolean; ownerNames?: string[]; - owners?: Drive_v2.Schema.User[]; - parents?: Drive_v2.Schema.ParentReference[]; + owners?: Drive.Schema.User[]; + parents?: Drive.Schema.ParentReference[]; permissionIds?: string[]; - permissions?: Drive_v2.Schema.Permission[]; - properties?: Drive_v2.Schema.Property[]; + permissions?: Drive.Schema.Permission[]; + properties?: Drive.Schema.Property[]; quotaBytesUsed?: string; selfLink?: string; shareable?: boolean; shared?: boolean; sharedWithMeDate?: string; - sharingUser?: Drive_v2.Schema.User; + sharingUser?: Drive.Schema.User; spaces?: string[]; teamDriveId?: string; - thumbnail?: Drive_v2.Schema.FileThumbnail; + thumbnail?: Drive.Schema.FileThumbnail; thumbnailLink?: string; thumbnailVersion?: string; title?: string; trashedDate?: string; - trashingUser?: Drive_v2.Schema.User; - userPermission?: Drive_v2.Schema.Permission; + trashingUser?: Drive.Schema.User; + userPermission?: Drive.Schema.Permission; version?: string; - videoMediaMetadata?: Drive_v2.Schema.FileVideoMediaMetadata; + videoMediaMetadata?: Drive.Schema.FileVideoMediaMetadata; webContentLink?: string; webViewLink?: string; writersCanShare?: boolean; @@ -561,7 +561,7 @@ declare namespace GoogleAppsScript { height?: number; isoSpeed?: number; lens?: string; - location?: Drive_v2.Schema.FileImageMediaMetadataLocation; + location?: Drive.Schema.FileImageMediaMetadataLocation; maxApertureValue?: Number; meteringMode?: string; rotation?: number; @@ -589,7 +589,7 @@ declare namespace GoogleAppsScript { export interface FileList { etag?: string; incompleteSearch?: boolean; - items?: Drive_v2.Schema.File[]; + items?: Drive.Schema.File[]; kind?: string; nextLink?: string; nextPageToken?: string; @@ -611,7 +611,7 @@ declare namespace GoogleAppsScript { } export interface ParentList { etag?: string; - items?: Drive_v2.Schema.ParentReference[]; + items?: Drive.Schema.ParentReference[]; kind?: string; selfLink?: string; } @@ -636,7 +636,7 @@ declare namespace GoogleAppsScript { photoLink?: string; role?: string; selfLink?: string; - teamDrivePermissionDetails?: Drive_v2.Schema.PermissionTeamDrivePermissionDetails[]; + teamDrivePermissionDetails?: Drive.Schema.PermissionTeamDrivePermissionDetails[]; type?: string; value?: string; withLink?: boolean; @@ -647,7 +647,7 @@ declare namespace GoogleAppsScript { } export interface PermissionList { etag?: string; - items?: Drive_v2.Schema.Permission[]; + items?: Drive.Schema.Permission[]; kind?: string; nextPageToken?: string; selfLink?: string; @@ -669,7 +669,7 @@ declare namespace GoogleAppsScript { } export interface PropertyList { etag?: string; - items?: Drive_v2.Schema.Property[]; + items?: Drive.Schema.Property[]; kind?: string; selfLink?: string; } @@ -680,7 +680,7 @@ declare namespace GoogleAppsScript { fileSize?: string; id?: string; kind?: string; - lastModifyingUser?: Drive_v2.Schema.User; + lastModifyingUser?: Drive.Schema.User; lastModifyingUserName?: string; md5Checksum?: string; mimeType?: string; @@ -695,7 +695,7 @@ declare namespace GoogleAppsScript { } export interface RevisionList { etag?: string; - items?: Drive_v2.Schema.Revision[]; + items?: Drive.Schema.Revision[]; kind?: string; nextPageToken?: string; selfLink?: string; @@ -705,15 +705,15 @@ declare namespace GoogleAppsScript { startPageToken?: string; } export interface TeamDrive { - backgroundImageFile?: Drive_v2.Schema.TeamDriveBackgroundImageFile; + backgroundImageFile?: Drive.Schema.TeamDriveBackgroundImageFile; backgroundImageLink?: string; - capabilities?: Drive_v2.Schema.TeamDriveCapabilities; + capabilities?: Drive.Schema.TeamDriveCapabilities; colorRgb?: string; createdDate?: string; id?: string; kind?: string; name?: string; - restrictions?: Drive_v2.Schema.TeamDriveRestrictions; + restrictions?: Drive.Schema.TeamDriveRestrictions; themeId?: string; } export interface TeamDriveBackgroundImageFile { @@ -744,7 +744,7 @@ declare namespace GoogleAppsScript { canTrashChildren?: boolean; } export interface TeamDriveList { - items?: Drive_v2.Schema.TeamDrive[]; + items?: Drive.Schema.TeamDrive[]; kind?: string; nextPageToken?: string; } @@ -760,77 +760,77 @@ declare namespace GoogleAppsScript { isAuthenticatedUser?: boolean; kind?: string; permissionId?: string; - picture?: Drive_v2.Schema.UserPicture; + picture?: Drive.Schema.UserPicture; } export interface UserPicture { url?: string; } } } - export interface Drive_v2 { - About?: Drive_v2.Collection.AboutCollection; - Apps?: Drive_v2.Collection.AppsCollection; - Changes?: Drive_v2.Collection.ChangesCollection; - Channels?: Drive_v2.Collection.ChannelsCollection; - Children?: Drive_v2.Collection.ChildrenCollection; - Comments?: Drive_v2.Collection.CommentsCollection; - Files?: Drive_v2.Collection.FilesCollection; - Parents?: Drive_v2.Collection.ParentsCollection; - Permissions?: Drive_v2.Collection.PermissionsCollection; - Properties?: Drive_v2.Collection.PropertiesCollection; - Realtime?: Drive_v2.Collection.RealtimeCollection; - Replies?: Drive_v2.Collection.RepliesCollection; - Revisions?: Drive_v2.Collection.RevisionsCollection; - Teamdrives?: Drive_v2.Collection.TeamdrivesCollection; + export interface Drive { + About?: Drive.Collection.AboutCollection; + Apps?: Drive.Collection.AppsCollection; + Changes?: Drive.Collection.ChangesCollection; + Channels?: Drive.Collection.ChannelsCollection; + Children?: Drive.Collection.ChildrenCollection; + Comments?: Drive.Collection.CommentsCollection; + Files?: Drive.Collection.FilesCollection; + Parents?: Drive.Collection.ParentsCollection; + Permissions?: Drive.Collection.PermissionsCollection; + Properties?: Drive.Collection.PropertiesCollection; + Realtime?: Drive.Collection.RealtimeCollection; + Replies?: Drive.Collection.RepliesCollection; + Revisions?: Drive.Collection.RevisionsCollection; + Teamdrives?: Drive.Collection.TeamdrivesCollection; // Create a new instance of Channel - newChannel(): Drive_v2.Schema.Channel; + newChannel(): Drive.Schema.Channel; // Create a new instance of ChildReference - newChildReference(): Drive_v2.Schema.ChildReference; + newChildReference(): Drive.Schema.ChildReference; // Create a new instance of Comment - newComment(): Drive_v2.Schema.Comment; + newComment(): Drive.Schema.Comment; // Create a new instance of CommentContext - newCommentContext(): Drive_v2.Schema.CommentContext; + newCommentContext(): Drive.Schema.CommentContext; // Create a new instance of CommentReply - newCommentReply(): Drive_v2.Schema.CommentReply; + newCommentReply(): Drive.Schema.CommentReply; // Create a new instance of File - newFile(): Drive_v2.Schema.File; + newFile(): Drive.Schema.File; // Create a new instance of FileCapabilities - newFileCapabilities(): Drive_v2.Schema.FileCapabilities; + newFileCapabilities(): Drive.Schema.FileCapabilities; // Create a new instance of FileImageMediaMetadata - newFileImageMediaMetadata(): Drive_v2.Schema.FileImageMediaMetadata; + newFileImageMediaMetadata(): Drive.Schema.FileImageMediaMetadata; // Create a new instance of FileImageMediaMetadataLocation - newFileImageMediaMetadataLocation(): Drive_v2.Schema.FileImageMediaMetadataLocation; + newFileImageMediaMetadataLocation(): Drive.Schema.FileImageMediaMetadataLocation; // Create a new instance of FileIndexableText - newFileIndexableText(): Drive_v2.Schema.FileIndexableText; + newFileIndexableText(): Drive.Schema.FileIndexableText; // Create a new instance of FileLabels - newFileLabels(): Drive_v2.Schema.FileLabels; + newFileLabels(): Drive.Schema.FileLabels; // Create a new instance of FileThumbnail - newFileThumbnail(): Drive_v2.Schema.FileThumbnail; + newFileThumbnail(): Drive.Schema.FileThumbnail; // Create a new instance of FileVideoMediaMetadata - newFileVideoMediaMetadata(): Drive_v2.Schema.FileVideoMediaMetadata; + newFileVideoMediaMetadata(): Drive.Schema.FileVideoMediaMetadata; // Create a new instance of ParentReference - newParentReference(): Drive_v2.Schema.ParentReference; + newParentReference(): Drive.Schema.ParentReference; // Create a new instance of Permission - newPermission(): Drive_v2.Schema.Permission; + newPermission(): Drive.Schema.Permission; // Create a new instance of PermissionTeamDrivePermissionDetails - newPermissionTeamDrivePermissionDetails(): Drive_v2.Schema.PermissionTeamDrivePermissionDetails; + newPermissionTeamDrivePermissionDetails(): Drive.Schema.PermissionTeamDrivePermissionDetails; // Create a new instance of Property - newProperty(): Drive_v2.Schema.Property; + newProperty(): Drive.Schema.Property; // Create a new instance of Revision - newRevision(): Drive_v2.Schema.Revision; + newRevision(): Drive.Schema.Revision; // Create a new instance of TeamDrive - newTeamDrive(): Drive_v2.Schema.TeamDrive; + newTeamDrive(): Drive.Schema.TeamDrive; // Create a new instance of TeamDriveBackgroundImageFile - newTeamDriveBackgroundImageFile(): Drive_v2.Schema.TeamDriveBackgroundImageFile; + newTeamDriveBackgroundImageFile(): Drive.Schema.TeamDriveBackgroundImageFile; // Create a new instance of TeamDriveCapabilities - newTeamDriveCapabilities(): Drive_v2.Schema.TeamDriveCapabilities; + newTeamDriveCapabilities(): Drive.Schema.TeamDriveCapabilities; // Create a new instance of TeamDriveRestrictions - newTeamDriveRestrictions(): Drive_v2.Schema.TeamDriveRestrictions; + newTeamDriveRestrictions(): Drive.Schema.TeamDriveRestrictions; // Create a new instance of User - newUser(): Drive_v2.Schema.User; + newUser(): Drive.Schema.User; // Create a new instance of UserPicture - newUserPicture(): Drive_v2.Schema.UserPicture; + newUserPicture(): Drive.Schema.UserPicture; } } -declare var Drive_v2: GoogleAppsScript.Drive_v2; \ No newline at end of file +declare var Drive: GoogleAppsScript.Drive; diff --git a/types/google-apps-script/apis/driveactivity_v2.d.ts b/types/google-apps-script/apis/driveactivity_v2.d.ts index 70eeea3e5b..4f670fc108 100644 --- a/types/google-apps-script/apis/driveactivity_v2.d.ts +++ b/types/google-apps-script/apis/driveactivity_v2.d.ts @@ -5,40 +5,40 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Driveactivity_v2 { + namespace DriveActivity { namespace Collection { export interface ActivityCollection { // Query past activity in Google Drive. - query(resource: Schema.QueryDriveActivityRequest): Driveactivity_v2.Schema.QueryDriveActivityResponse; + query(resource: Schema.QueryDriveActivityRequest): DriveActivity.Schema.QueryDriveActivityResponse; } } namespace Schema { export interface Action { - actor?: Driveactivity_v2.Schema.Actor; - detail?: Driveactivity_v2.Schema.ActionDetail; - target?: Driveactivity_v2.Schema.Target; - timeRange?: Driveactivity_v2.Schema.TimeRange; + actor?: DriveActivity.Schema.Actor; + detail?: DriveActivity.Schema.ActionDetail; + target?: DriveActivity.Schema.Target; + timeRange?: DriveActivity.Schema.TimeRange; timestamp?: string; } export interface ActionDetail { - comment?: Driveactivity_v2.Schema.Comment; - create?: Driveactivity_v2.Schema.Create; - delete?: Driveactivity_v2.Schema.Delete; - dlpChange?: Driveactivity_v2.Schema.DataLeakPreventionChange; + comment?: DriveActivity.Schema.Comment; + create?: DriveActivity.Schema.Create; + delete?: DriveActivity.Schema.Delete; + dlpChange?: DriveActivity.Schema.DataLeakPreventionChange; edit?: any; - move?: Driveactivity_v2.Schema.Move; - permissionChange?: Driveactivity_v2.Schema.PermissionChange; - reference?: Driveactivity_v2.Schema.ApplicationReference; - rename?: Driveactivity_v2.Schema.Rename; - restore?: Driveactivity_v2.Schema.Restore; - settingsChange?: Driveactivity_v2.Schema.SettingsChange; + move?: DriveActivity.Schema.Move; + permissionChange?: DriveActivity.Schema.PermissionChange; + reference?: DriveActivity.Schema.ApplicationReference; + rename?: DriveActivity.Schema.Rename; + restore?: DriveActivity.Schema.Restore; + settingsChange?: DriveActivity.Schema.SettingsChange; } export interface Actor { administrator?: string; anonymous?: string; - impersonation?: Driveactivity_v2.Schema.Impersonation; - system?: Driveactivity_v2.Schema.SystemEvent; - user?: Driveactivity_v2.Schema.User; + impersonation?: DriveActivity.Schema.Impersonation; + system?: DriveActivity.Schema.SystemEvent; + user?: DriveActivity.Schema.User; } export interface ApplicationReference { type?: string; @@ -47,20 +47,20 @@ declare namespace GoogleAppsScript { subtype?: string; } export interface Comment { - assignment?: Driveactivity_v2.Schema.Assignment; - mentionedUsers?: Driveactivity_v2.Schema.User[]; - post?: Driveactivity_v2.Schema.Post; - suggestion?: Driveactivity_v2.Schema.Suggestion; + assignment?: DriveActivity.Schema.Assignment; + mentionedUsers?: DriveActivity.Schema.User[]; + post?: DriveActivity.Schema.Post; + suggestion?: DriveActivity.Schema.Suggestion; } export interface ConsolidationStrategy { legacy?: any; none?: any; } export interface Copy { - originalObject?: Driveactivity_v2.Schema.TargetReference; + originalObject?: DriveActivity.Schema.TargetReference; } export interface Create { - copy?: Driveactivity_v2.Schema.Copy; + copy?: DriveActivity.Schema.Copy; new?: any; upload?: any; } @@ -75,24 +75,24 @@ declare namespace GoogleAppsScript { name?: string; } export interface DriveActivity { - actions?: Driveactivity_v2.Schema.Action[]; - actors?: Driveactivity_v2.Schema.Actor[]; - primaryActionDetail?: Driveactivity_v2.Schema.ActionDetail; - targets?: Driveactivity_v2.Schema.Target[]; - timeRange?: Driveactivity_v2.Schema.TimeRange; + actions?: DriveActivity.Schema.Action[]; + actors?: DriveActivity.Schema.Actor[]; + primaryActionDetail?: DriveActivity.Schema.ActionDetail; + targets?: DriveActivity.Schema.Target[]; + timeRange?: DriveActivity.Schema.TimeRange; timestamp?: string; } export interface DriveItem { file?: any; - folder?: Driveactivity_v2.Schema.Folder; + folder?: DriveActivity.Schema.Folder; mimeType?: string; name?: string; - owner?: Driveactivity_v2.Schema.Owner; + owner?: DriveActivity.Schema.Owner; title?: string; } export interface DriveItemReference { file?: any; - folder?: Driveactivity_v2.Schema.Folder; + folder?: DriveActivity.Schema.Folder; name?: string; title?: string; } @@ -100,7 +100,7 @@ declare namespace GoogleAppsScript { legacyCommentId?: string; legacyDiscussionId?: string; linkToDiscussion?: string; - parent?: Driveactivity_v2.Schema.DriveItem; + parent?: DriveActivity.Schema.DriveItem; } export interface Folder { type?: string; @@ -110,46 +110,46 @@ declare namespace GoogleAppsScript { title?: string; } export interface Impersonation { - impersonatedUser?: Driveactivity_v2.Schema.User; + impersonatedUser?: DriveActivity.Schema.User; } export interface KnownUser { isCurrentUser?: boolean; personName?: string; } export interface Move { - addedParents?: Driveactivity_v2.Schema.TargetReference[]; - removedParents?: Driveactivity_v2.Schema.TargetReference[]; + addedParents?: DriveActivity.Schema.TargetReference[]; + removedParents?: DriveActivity.Schema.TargetReference[]; } export interface Owner { - domain?: Driveactivity_v2.Schema.Domain; - teamDrive?: Driveactivity_v2.Schema.TeamDriveReference; - user?: Driveactivity_v2.Schema.User; + domain?: DriveActivity.Schema.Domain; + teamDrive?: DriveActivity.Schema.TeamDriveReference; + user?: DriveActivity.Schema.User; } export interface Permission { allowDiscovery?: boolean; anyone?: any; - domain?: Driveactivity_v2.Schema.Domain; - group?: Driveactivity_v2.Schema.Group; + domain?: DriveActivity.Schema.Domain; + group?: DriveActivity.Schema.Group; role?: string; - user?: Driveactivity_v2.Schema.User; + user?: DriveActivity.Schema.User; } export interface PermissionChange { - addedPermissions?: Driveactivity_v2.Schema.Permission[]; - removedPermissions?: Driveactivity_v2.Schema.Permission[]; + addedPermissions?: DriveActivity.Schema.Permission[]; + removedPermissions?: DriveActivity.Schema.Permission[]; } export interface Post { subtype?: string; } export interface QueryDriveActivityRequest { ancestorName?: string; - consolidationStrategy?: Driveactivity_v2.Schema.ConsolidationStrategy; + consolidationStrategy?: DriveActivity.Schema.ConsolidationStrategy; filter?: string; itemName?: string; pageSize?: number; pageToken?: string; } export interface QueryDriveActivityResponse { - activities?: Driveactivity_v2.Schema.DriveActivity[]; + activities?: DriveActivity.Schema.DriveActivity[]; nextPageToken?: string; } export interface Rename { @@ -164,7 +164,7 @@ declare namespace GoogleAppsScript { newRestriction?: string; } export interface SettingsChange { - restrictionChanges?: Driveactivity_v2.Schema.RestrictionChange[]; + restrictionChanges?: DriveActivity.Schema.RestrictionChange[]; } export interface Suggestion { subtype?: string; @@ -173,17 +173,17 @@ declare namespace GoogleAppsScript { type?: string; } export interface Target { - driveItem?: Driveactivity_v2.Schema.DriveItem; + driveItem?: DriveActivity.Schema.DriveItem; fileComment?: any; - teamDrive?: Driveactivity_v2.Schema.TeamDrive; + teamDrive?: DriveActivity.Schema.TeamDrive; } export interface TargetReference { - driveItem?: Driveactivity_v2.Schema.DriveItemReference; - teamDrive?: Driveactivity_v2.Schema.TeamDriveReference; + driveItem?: DriveActivity.Schema.DriveItemReference; + teamDrive?: DriveActivity.Schema.TeamDriveReference; } export interface TeamDrive { name?: string; - root?: Driveactivity_v2.Schema.DriveItem; + root?: DriveActivity.Schema.DriveItem; title?: string; } export interface TeamDriveReference { @@ -196,22 +196,22 @@ declare namespace GoogleAppsScript { } export interface User { deletedUser?: any; - knownUser?: Driveactivity_v2.Schema.KnownUser; + knownUser?: DriveActivity.Schema.KnownUser; unknownUser?: any; } } } - export interface Driveactivity_v2 { - Activity?: Driveactivity_v2.Collection.ActivityCollection; + export interface DriveActivity { + Activity?: DriveActivity.Collection.ActivityCollection; // Create a new instance of ConsolidationStrategy - newConsolidationStrategy(): Driveactivity_v2.Schema.ConsolidationStrategy; + newConsolidationStrategy(): DriveActivity.Schema.ConsolidationStrategy; // Create a new instance of Legacy newLegacy(): any; // Create a new instance of NoConsolidation newNoConsolidation(): any; // Create a new instance of QueryDriveActivityRequest - newQueryDriveActivityRequest(): Driveactivity_v2.Schema.QueryDriveActivityRequest; + newQueryDriveActivityRequest(): DriveActivity.Schema.QueryDriveActivityRequest; } } -declare var Driveactivity_v2: GoogleAppsScript.Driveactivity_v2; \ No newline at end of file +declare var DriveActivity: GoogleAppsScript.DriveActivity; diff --git a/types/google-apps-script/apis/fusiontables_v2.d.ts b/types/google-apps-script/apis/fusiontables_v2.d.ts index 46ad172f1a..23f6da5901 100644 --- a/types/google-apps-script/apis/fusiontables_v2.d.ts +++ b/types/google-apps-script/apis/fusiontables_v2.d.ts @@ -5,23 +5,23 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Fusiontables_v2 { + namespace FusionTables { namespace Collection { export interface ColumnCollection { // Retrieves a specific column by its ID. - get(tableId: string, columnId: string): Fusiontables_v2.Schema.Column; + get(tableId: string, columnId: string): FusionTables.Schema.Column; // Adds a new column to the table. - insert(resource: Schema.Column, tableId: string): Fusiontables_v2.Schema.Column; + insert(resource: Schema.Column, tableId: string): FusionTables.Schema.Column; // Retrieves a list of columns. - list(tableId: string): Fusiontables_v2.Schema.ColumnList; + list(tableId: string): FusionTables.Schema.ColumnList; // Retrieves a list of columns. - list(tableId: string, optionalArgs: object): Fusiontables_v2.Schema.ColumnList; + list(tableId: string, optionalArgs: object): FusionTables.Schema.ColumnList; // Updates the name or type of an existing column. This method supports patch semantics. - patch(resource: Schema.Column, tableId: string, columnId: string): Fusiontables_v2.Schema.Column; + patch(resource: Schema.Column, tableId: string, columnId: string): FusionTables.Schema.Column; // Deletes the specified column. remove(tableId: string, columnId: string): void; // Updates the name or type of an existing column. - update(resource: Schema.Column, tableId: string, columnId: string): Fusiontables_v2.Schema.Column; + update(resource: Schema.Column, tableId: string, columnId: string): FusionTables.Schema.Column; } export interface QueryCollection { // Executes a Fusion Tables SQL statement, which can be any of @@ -32,7 +32,7 @@ declare namespace GoogleAppsScript { // - SHOW // - DESCRIBE // - CREATE statement. - sql(sql: string): Fusiontables_v2.Schema.Sqlresponse; + sql(sql: string): FusionTables.Schema.Sqlresponse; // Executes a Fusion Tables SQL statement, which can be any of // - SELECT // - INSERT @@ -41,103 +41,103 @@ declare namespace GoogleAppsScript { // - SHOW // - DESCRIBE // - CREATE statement. - sql(sql: string, optionalArgs: object): Fusiontables_v2.Schema.Sqlresponse; + sql(sql: string, optionalArgs: object): FusionTables.Schema.Sqlresponse; // Executes a SQL statement which can be any of // - SELECT // - SHOW // - DESCRIBE - sqlGet(sql: string): Fusiontables_v2.Schema.Sqlresponse; + sqlGet(sql: string): FusionTables.Schema.Sqlresponse; // Executes a SQL statement which can be any of // - SELECT // - SHOW // - DESCRIBE - sqlGet(sql: string, optionalArgs: object): Fusiontables_v2.Schema.Sqlresponse; + sqlGet(sql: string, optionalArgs: object): FusionTables.Schema.Sqlresponse; } export interface StyleCollection { // Gets a specific style. - get(tableId: string, styleId: number): Fusiontables_v2.Schema.StyleSetting; + get(tableId: string, styleId: number): FusionTables.Schema.StyleSetting; // Adds a new style for the table. - insert(resource: Schema.StyleSetting, tableId: string): Fusiontables_v2.Schema.StyleSetting; + insert(resource: Schema.StyleSetting, tableId: string): FusionTables.Schema.StyleSetting; // Retrieves a list of styles. - list(tableId: string): Fusiontables_v2.Schema.StyleSettingList; + list(tableId: string): FusionTables.Schema.StyleSettingList; // Retrieves a list of styles. - list(tableId: string, optionalArgs: object): Fusiontables_v2.Schema.StyleSettingList; + list(tableId: string, optionalArgs: object): FusionTables.Schema.StyleSettingList; // Updates an existing style. This method supports patch semantics. - patch(resource: Schema.StyleSetting, tableId: string, styleId: number): Fusiontables_v2.Schema.StyleSetting; + patch(resource: Schema.StyleSetting, tableId: string, styleId: number): FusionTables.Schema.StyleSetting; // Deletes a style. remove(tableId: string, styleId: number): void; // Updates an existing style. - update(resource: Schema.StyleSetting, tableId: string, styleId: number): Fusiontables_v2.Schema.StyleSetting; + update(resource: Schema.StyleSetting, tableId: string, styleId: number): FusionTables.Schema.StyleSetting; } export interface TableCollection { // Copies a table. - copy(tableId: string): Fusiontables_v2.Schema.Table; + copy(tableId: string): FusionTables.Schema.Table; // Copies a table. - copy(tableId: string, optionalArgs: object): Fusiontables_v2.Schema.Table; + copy(tableId: string, optionalArgs: object): FusionTables.Schema.Table; // Retrieves a specific table by its ID. - get(tableId: string): Fusiontables_v2.Schema.Table; + get(tableId: string): FusionTables.Schema.Table; // Imports more rows into a table. - importRows(tableId: string): Fusiontables_v2.Schema.Import; + importRows(tableId: string): FusionTables.Schema.Import; // Imports more rows into a table. - importRows(tableId: string, mediaData: any): Fusiontables_v2.Schema.Import; + importRows(tableId: string, mediaData: any): FusionTables.Schema.Import; // Imports more rows into a table. - importRows(tableId: string, mediaData: any, optionalArgs: object): Fusiontables_v2.Schema.Import; + importRows(tableId: string, mediaData: any, optionalArgs: object): FusionTables.Schema.Import; // Imports a new table. - importTable(name: string): Fusiontables_v2.Schema.Table; + importTable(name: string): FusionTables.Schema.Table; // Imports a new table. - importTable(name: string, mediaData: any): Fusiontables_v2.Schema.Table; + importTable(name: string, mediaData: any): FusionTables.Schema.Table; // Imports a new table. - importTable(name: string, mediaData: any, optionalArgs: object): Fusiontables_v2.Schema.Table; + importTable(name: string, mediaData: any, optionalArgs: object): FusionTables.Schema.Table; // Creates a new table. - insert(resource: Schema.Table): Fusiontables_v2.Schema.Table; + insert(resource: Schema.Table): FusionTables.Schema.Table; // Retrieves a list of tables a user owns. - list(): Fusiontables_v2.Schema.TableList; + list(): FusionTables.Schema.TableList; // Retrieves a list of tables a user owns. - list(optionalArgs: object): Fusiontables_v2.Schema.TableList; + list(optionalArgs: object): FusionTables.Schema.TableList; // Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch semantics. - patch(resource: Schema.Table, tableId: string): Fusiontables_v2.Schema.Table; + patch(resource: Schema.Table, tableId: string): FusionTables.Schema.Table; // Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch semantics. - patch(resource: Schema.Table, tableId: string, optionalArgs: object): Fusiontables_v2.Schema.Table; + patch(resource: Schema.Table, tableId: string, optionalArgs: object): FusionTables.Schema.Table; // Replaces rows of the table with the rows of the spreadsheet that is first imported from. Current rows remain visible until all replacement rows are ready. - refetchSheet(tableId: string): Fusiontables_v2.Schema.Task; + refetchSheet(tableId: string): FusionTables.Schema.Task; // Deletes a table. remove(tableId: string): void; // Replaces rows of an existing table. Current rows remain visible until all replacement rows are ready. - replaceRows(tableId: string): Fusiontables_v2.Schema.Task; + replaceRows(tableId: string): FusionTables.Schema.Task; // Replaces rows of an existing table. Current rows remain visible until all replacement rows are ready. - replaceRows(tableId: string, mediaData: any): Fusiontables_v2.Schema.Task; + replaceRows(tableId: string, mediaData: any): FusionTables.Schema.Task; // Replaces rows of an existing table. Current rows remain visible until all replacement rows are ready. - replaceRows(tableId: string, mediaData: any, optionalArgs: object): Fusiontables_v2.Schema.Task; + replaceRows(tableId: string, mediaData: any, optionalArgs: object): FusionTables.Schema.Task; // Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. - update(resource: Schema.Table, tableId: string): Fusiontables_v2.Schema.Table; + update(resource: Schema.Table, tableId: string): FusionTables.Schema.Table; // Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. - update(resource: Schema.Table, tableId: string, optionalArgs: object): Fusiontables_v2.Schema.Table; + update(resource: Schema.Table, tableId: string, optionalArgs: object): FusionTables.Schema.Table; } export interface TaskCollection { // Retrieves a specific task by its ID. - get(tableId: string, taskId: string): Fusiontables_v2.Schema.Task; + get(tableId: string, taskId: string): FusionTables.Schema.Task; // Retrieves a list of tasks. - list(tableId: string): Fusiontables_v2.Schema.TaskList; + list(tableId: string): FusionTables.Schema.TaskList; // Retrieves a list of tasks. - list(tableId: string, optionalArgs: object): Fusiontables_v2.Schema.TaskList; + list(tableId: string, optionalArgs: object): FusionTables.Schema.TaskList; // Deletes a specific task by its ID, unless that task has already started running. remove(tableId: string, taskId: string): void; } export interface TemplateCollection { // Retrieves a specific template by its id - get(tableId: string, templateId: number): Fusiontables_v2.Schema.Template; + get(tableId: string, templateId: number): FusionTables.Schema.Template; // Creates a new template for the table. - insert(resource: Schema.Template, tableId: string): Fusiontables_v2.Schema.Template; + insert(resource: Schema.Template, tableId: string): FusionTables.Schema.Template; // Retrieves a list of templates. - list(tableId: string): Fusiontables_v2.Schema.TemplateList; + list(tableId: string): FusionTables.Schema.TemplateList; // Retrieves a list of templates. - list(tableId: string, optionalArgs: object): Fusiontables_v2.Schema.TemplateList; + list(tableId: string, optionalArgs: object): FusionTables.Schema.TemplateList; // Updates an existing template. This method supports patch semantics. - patch(resource: Schema.Template, tableId: string, templateId: number): Fusiontables_v2.Schema.Template; + patch(resource: Schema.Template, tableId: string, templateId: number): FusionTables.Schema.Template; // Deletes a template remove(tableId: string, templateId: number): void; // Updates an existing template - update(resource: Schema.Template, tableId: string, templateId: number): Fusiontables_v2.Schema.Template; + update(resource: Schema.Template, tableId: string, templateId: number): FusionTables.Schema.Template; } } namespace Schema { @@ -150,7 +150,7 @@ declare namespace GoogleAppsScript { weight?: number; } export interface Column { - baseColumn?: Fusiontables_v2.Schema.ColumnBaseColumn; + baseColumn?: FusionTables.Schema.ColumnBaseColumn; columnId?: number; columnJsonSchema?: string; columnPropertiesJson?: string; @@ -168,7 +168,7 @@ declare namespace GoogleAppsScript { tableIndex?: number; } export interface ColumnList { - items?: Fusiontables_v2.Schema.Column[]; + items?: FusionTables.Schema.Column[]; kind?: string; nextPageToken?: string; totalItems?: number; @@ -188,10 +188,10 @@ declare namespace GoogleAppsScript { } export interface LineStyle { strokeColor?: string; - strokeColorStyler?: Fusiontables_v2.Schema.StyleFunction; + strokeColorStyler?: FusionTables.Schema.StyleFunction; strokeOpacity?: Number; strokeWeight?: number; - strokeWeightStyler?: Fusiontables_v2.Schema.StyleFunction; + strokeWeightStyler?: FusionTables.Schema.StyleFunction; } export interface Point { coordinates?: Number[]; @@ -199,7 +199,7 @@ declare namespace GoogleAppsScript { } export interface PointStyle { iconName?: string; - iconStyler?: Fusiontables_v2.Schema.StyleFunction; + iconStyler?: FusionTables.Schema.StyleFunction; } export interface Polygon { coordinates?: Number[][][]; @@ -207,13 +207,13 @@ declare namespace GoogleAppsScript { } export interface PolygonStyle { fillColor?: string; - fillColorStyler?: Fusiontables_v2.Schema.StyleFunction; + fillColorStyler?: FusionTables.Schema.StyleFunction; fillOpacity?: Number; strokeColor?: string; - strokeColorStyler?: Fusiontables_v2.Schema.StyleFunction; + strokeColorStyler?: FusionTables.Schema.StyleFunction; strokeOpacity?: Number; strokeWeight?: number; - strokeWeightStyler?: Fusiontables_v2.Schema.StyleFunction; + strokeWeightStyler?: FusionTables.Schema.StyleFunction; } export interface Sqlresponse { columns?: string[]; @@ -221,13 +221,13 @@ declare namespace GoogleAppsScript { rows?: Object[][]; } export interface StyleFunction { - buckets?: Fusiontables_v2.Schema.Bucket[]; + buckets?: FusionTables.Schema.Bucket[]; columnName?: string; - gradient?: Fusiontables_v2.Schema.StyleFunctionGradient; + gradient?: FusionTables.Schema.StyleFunctionGradient; kind?: string; } export interface StyleFunctionGradient { - colors?: Fusiontables_v2.Schema.StyleFunctionGradientColors[]; + colors?: FusionTables.Schema.StyleFunctionGradientColors[]; max?: Number; min?: Number; } @@ -237,15 +237,15 @@ declare namespace GoogleAppsScript { } export interface StyleSetting { kind?: string; - markerOptions?: Fusiontables_v2.Schema.PointStyle; + markerOptions?: FusionTables.Schema.PointStyle; name?: string; - polygonOptions?: Fusiontables_v2.Schema.PolygonStyle; - polylineOptions?: Fusiontables_v2.Schema.LineStyle; + polygonOptions?: FusionTables.Schema.PolygonStyle; + polylineOptions?: FusionTables.Schema.LineStyle; styleId?: number; tableId?: string; } export interface StyleSettingList { - items?: Fusiontables_v2.Schema.StyleSetting[]; + items?: FusionTables.Schema.StyleSetting[]; kind?: string; nextPageToken?: string; totalItems?: number; @@ -255,7 +255,7 @@ declare namespace GoogleAppsScript { attributionLink?: string; baseTableIds?: string[]; columnPropertiesJsonSchema?: string; - columns?: Fusiontables_v2.Schema.Column[]; + columns?: FusionTables.Schema.Column[]; description?: string; isExportable?: boolean; kind?: string; @@ -266,7 +266,7 @@ declare namespace GoogleAppsScript { tablePropertiesJsonSchema?: string; } export interface TableList { - items?: Fusiontables_v2.Schema.Table[]; + items?: FusionTables.Schema.Table[]; kind?: string; nextPageToken?: string; } @@ -278,7 +278,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface TaskList { - items?: Fusiontables_v2.Schema.Task[]; + items?: FusionTables.Schema.Task[]; kind?: string; nextPageToken?: string; totalItems?: number; @@ -292,45 +292,45 @@ declare namespace GoogleAppsScript { templateId?: number; } export interface TemplateList { - items?: Fusiontables_v2.Schema.Template[]; + items?: FusionTables.Schema.Template[]; kind?: string; nextPageToken?: string; totalItems?: number; } } } - export interface Fusiontables_v2 { - Column?: Fusiontables_v2.Collection.ColumnCollection; - Query?: Fusiontables_v2.Collection.QueryCollection; - Style?: Fusiontables_v2.Collection.StyleCollection; - Table?: Fusiontables_v2.Collection.TableCollection; - Task?: Fusiontables_v2.Collection.TaskCollection; - Template?: Fusiontables_v2.Collection.TemplateCollection; + export interface FusionTables { + Column?: FusionTables.Collection.ColumnCollection; + Query?: FusionTables.Collection.QueryCollection; + Style?: FusionTables.Collection.StyleCollection; + Table?: FusionTables.Collection.TableCollection; + Task?: FusionTables.Collection.TaskCollection; + Template?: FusionTables.Collection.TemplateCollection; // Create a new instance of Bucket - newBucket(): Fusiontables_v2.Schema.Bucket; + newBucket(): FusionTables.Schema.Bucket; // Create a new instance of Column - newColumn(): Fusiontables_v2.Schema.Column; + newColumn(): FusionTables.Schema.Column; // Create a new instance of ColumnBaseColumn - newColumnBaseColumn(): Fusiontables_v2.Schema.ColumnBaseColumn; + newColumnBaseColumn(): FusionTables.Schema.ColumnBaseColumn; // Create a new instance of LineStyle - newLineStyle(): Fusiontables_v2.Schema.LineStyle; + newLineStyle(): FusionTables.Schema.LineStyle; // Create a new instance of PointStyle - newPointStyle(): Fusiontables_v2.Schema.PointStyle; + newPointStyle(): FusionTables.Schema.PointStyle; // Create a new instance of PolygonStyle - newPolygonStyle(): Fusiontables_v2.Schema.PolygonStyle; + newPolygonStyle(): FusionTables.Schema.PolygonStyle; // Create a new instance of StyleFunction - newStyleFunction(): Fusiontables_v2.Schema.StyleFunction; + newStyleFunction(): FusionTables.Schema.StyleFunction; // Create a new instance of StyleFunctionGradient - newStyleFunctionGradient(): Fusiontables_v2.Schema.StyleFunctionGradient; + newStyleFunctionGradient(): FusionTables.Schema.StyleFunctionGradient; // Create a new instance of StyleFunctionGradientColors - newStyleFunctionGradientColors(): Fusiontables_v2.Schema.StyleFunctionGradientColors; + newStyleFunctionGradientColors(): FusionTables.Schema.StyleFunctionGradientColors; // Create a new instance of StyleSetting - newStyleSetting(): Fusiontables_v2.Schema.StyleSetting; + newStyleSetting(): FusionTables.Schema.StyleSetting; // Create a new instance of Table - newTable(): Fusiontables_v2.Schema.Table; + newTable(): FusionTables.Schema.Table; // Create a new instance of Template - newTemplate(): Fusiontables_v2.Schema.Template; + newTemplate(): FusionTables.Schema.Template; } } -declare var Fusiontables_v2: GoogleAppsScript.Fusiontables_v2; +declare var FusionTables: GoogleAppsScript.FusionTables; diff --git a/types/google-apps-script/apis/gmail_v1.d.ts b/types/google-apps-script/apis/gmail_v1.d.ts index bc848817e9..0268d2948e 100644 --- a/types/google-apps-script/apis/gmail_v1.d.ts +++ b/types/google-apps-script/apis/gmail_v1.d.ts @@ -5,24 +5,24 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Gmail_v1 { + namespace Gmail { namespace Collection { namespace Users { namespace Messages { export interface AttachmentsCollection { // Gets the specified message attachment. - get(userId: string, messageId: string, id: string): Gmail_v1.Schema.MessagePartBody; + get(userId: string, messageId: string, id: string): Gmail.Schema.MessagePartBody; } } namespace Settings { namespace SendAs { export interface SmimeInfoCollection { // Gets the specified S/MIME config for the specified send-as alias. - get(userId: string, sendAsEmail: string, id: string): Gmail_v1.Schema.SmimeInfo; + get(userId: string, sendAsEmail: string, id: string): Gmail.Schema.SmimeInfo; // Insert (upload) the given S/MIME config for the specified send-as alias. Note that pkcs12 format is required for the key. - insert(resource: Schema.SmimeInfo, userId: string, sendAsEmail: string): Gmail_v1.Schema.SmimeInfo; + insert(resource: Schema.SmimeInfo, userId: string, sendAsEmail: string): Gmail.Schema.SmimeInfo; // Lists S/MIME configs for the specified send-as alias. - list(userId: string, sendAsEmail: string): Gmail_v1.Schema.ListSmimeInfoResponse; + list(userId: string, sendAsEmail: string): Gmail.Schema.ListSmimeInfoResponse; // Deletes the specified S/MIME config for the specified send-as alias. remove(userId: string, sendAsEmail: string, id: string): void; // Sets the default S/MIME config for the specified send-as alias. @@ -35,14 +35,14 @@ declare namespace GoogleAppsScript { // Note that a delegate user must be referred to by their primary email address, and not an email alias. // Also note that when a new delegate is created, there may be up to a one minute delay before the new delegate is available for use. // This method is only available to service account clients that have been delegated domain-wide authority. - create(resource: Schema.Delegate, userId: string): Gmail_v1.Schema.Delegate; + create(resource: Schema.Delegate, userId: string): Gmail.Schema.Delegate; // Gets the specified delegate. // Note that a delegate user must be referred to by their primary email address, and not an email alias. // This method is only available to service account clients that have been delegated domain-wide authority. - get(userId: string, delegateEmail: string): Gmail_v1.Schema.Delegate; + get(userId: string, delegateEmail: string): Gmail.Schema.Delegate; // Lists the delegates for the specified account. // This method is only available to service account clients that have been delegated domain-wide authority. - list(userId: string): Gmail_v1.Schema.ListDelegatesResponse; + list(userId: string): Gmail.Schema.ListDelegatesResponse; // Removes the specified delegate (which can be of any verification status), and revokes any verification that may have been required for using it. // Note that a delegate user must be referred to by their primary email address, and not an email alias. // This method is only available to service account clients that have been delegated domain-wide authority. @@ -50,44 +50,44 @@ declare namespace GoogleAppsScript { } export interface FiltersCollection { // Creates a filter. - create(resource: Schema.Filter, userId: string): Gmail_v1.Schema.Filter; + create(resource: Schema.Filter, userId: string): Gmail.Schema.Filter; // Gets a filter. - get(userId: string, id: string): Gmail_v1.Schema.Filter; + get(userId: string, id: string): Gmail.Schema.Filter; // Lists the message filters of a Gmail user. - list(userId: string): Gmail_v1.Schema.ListFiltersResponse; + list(userId: string): Gmail.Schema.ListFiltersResponse; // Deletes a filter. remove(userId: string, id: string): void; } export interface ForwardingAddressesCollection { // Creates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. // This method is only available to service account clients that have been delegated domain-wide authority. - create(resource: Schema.ForwardingAddress, userId: string): Gmail_v1.Schema.ForwardingAddress; + create(resource: Schema.ForwardingAddress, userId: string): Gmail.Schema.ForwardingAddress; // Gets the specified forwarding address. - get(userId: string, forwardingEmail: string): Gmail_v1.Schema.ForwardingAddress; + get(userId: string, forwardingEmail: string): Gmail.Schema.ForwardingAddress; // Lists the forwarding addresses for the specified account. - list(userId: string): Gmail_v1.Schema.ListForwardingAddressesResponse; + list(userId: string): Gmail.Schema.ListForwardingAddressesResponse; // Deletes the specified forwarding address and revokes any verification that may have been required. // This method is only available to service account clients that have been delegated domain-wide authority. remove(userId: string, forwardingEmail: string): void; } export interface SendAsCollection { - SmimeInfo?: Gmail_v1.Collection.Users.Settings.SendAs.SmimeInfoCollection; + SmimeInfo?: Gmail.Collection.Users.Settings.SendAs.SmimeInfoCollection; // Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. // This method is only available to service account clients that have been delegated domain-wide authority. - create(resource: Schema.SendAs, userId: string): Gmail_v1.Schema.SendAs; + create(resource: Schema.SendAs, userId: string): Gmail.Schema.SendAs; // Gets the specified send-as alias. Fails with an HTTP 404 error if the specified address is not a member of the collection. - get(userId: string, sendAsEmail: string): Gmail_v1.Schema.SendAs; + get(userId: string, sendAsEmail: string): Gmail.Schema.SendAs; // Lists the send-as aliases for the specified account. The result includes the primary send-as address associated with the account as well as any custom "from" aliases. - list(userId: string): Gmail_v1.Schema.ListSendAsResponse; + list(userId: string): Gmail.Schema.ListSendAsResponse; // Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. // Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. This method supports patch semantics. - patch(resource: Schema.SendAs, userId: string, sendAsEmail: string): Gmail_v1.Schema.SendAs; + patch(resource: Schema.SendAs, userId: string, sendAsEmail: string): Gmail.Schema.SendAs; // Deletes the specified send-as alias. Revokes any verification that may have been required for using it. // This method is only available to service account clients that have been delegated domain-wide authority. remove(userId: string, sendAsEmail: string): void; // Updates a send-as alias. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. // Addresses other than the primary address for the account can only be updated by service account clients that have been delegated domain-wide authority. - update(resource: Schema.SendAs, userId: string, sendAsEmail: string): Gmail_v1.Schema.SendAs; + update(resource: Schema.SendAs, userId: string, sendAsEmail: string): Gmail.Schema.SendAs; // Sends a verification email to the specified send-as alias address. The verification status must be pending. // This method is only available to service account clients that have been delegated domain-wide authority. verify(userId: string, sendAsEmail: string): void; @@ -95,142 +95,142 @@ declare namespace GoogleAppsScript { } export interface DraftsCollection { // Creates a new draft with the DRAFT label. - create(resource: Schema.Draft, userId: string): Gmail_v1.Schema.Draft; + create(resource: Schema.Draft, userId: string): Gmail.Schema.Draft; // Creates a new draft with the DRAFT label. - create(resource: Schema.Draft, userId: string, mediaData: any): Gmail_v1.Schema.Draft; + create(resource: Schema.Draft, userId: string, mediaData: any): Gmail.Schema.Draft; // Gets the specified draft. - get(userId: string, id: string): Gmail_v1.Schema.Draft; + get(userId: string, id: string): Gmail.Schema.Draft; // Gets the specified draft. - get(userId: string, id: string, optionalArgs: object): Gmail_v1.Schema.Draft; + get(userId: string, id: string, optionalArgs: object): Gmail.Schema.Draft; // Lists the drafts in the user's mailbox. - list(userId: string): Gmail_v1.Schema.ListDraftsResponse; + list(userId: string): Gmail.Schema.ListDraftsResponse; // Lists the drafts in the user's mailbox. - list(userId: string, optionalArgs: object): Gmail_v1.Schema.ListDraftsResponse; + list(userId: string, optionalArgs: object): Gmail.Schema.ListDraftsResponse; // Immediately and permanently deletes the specified draft. Does not simply trash it. remove(userId: string, id: string): void; // Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers. - send(resource: Schema.Draft, userId: string): Gmail_v1.Schema.Message; + send(resource: Schema.Draft, userId: string): Gmail.Schema.Message; // Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers. - send(resource: Schema.Draft, userId: string, mediaData: any): Gmail_v1.Schema.Message; + send(resource: Schema.Draft, userId: string, mediaData: any): Gmail.Schema.Message; // Replaces a draft's content. - update(resource: Schema.Draft, userId: string, id: string): Gmail_v1.Schema.Draft; + update(resource: Schema.Draft, userId: string, id: string): Gmail.Schema.Draft; // Replaces a draft's content. - update(resource: Schema.Draft, userId: string, id: string, mediaData: any): Gmail_v1.Schema.Draft; + update(resource: Schema.Draft, userId: string, id: string, mediaData: any): Gmail.Schema.Draft; } export interface HistoryCollection { // Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId). - list(userId: string): Gmail_v1.Schema.ListHistoryResponse; + list(userId: string): Gmail.Schema.ListHistoryResponse; // Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId). - list(userId: string, optionalArgs: object): Gmail_v1.Schema.ListHistoryResponse; + list(userId: string, optionalArgs: object): Gmail.Schema.ListHistoryResponse; } export interface LabelsCollection { // Creates a new label. - create(resource: Schema.Label, userId: string): Gmail_v1.Schema.Label; + create(resource: Schema.Label, userId: string): Gmail.Schema.Label; // Gets the specified label. - get(userId: string, id: string): Gmail_v1.Schema.Label; + get(userId: string, id: string): Gmail.Schema.Label; // Lists all labels in the user's mailbox. - list(userId: string): Gmail_v1.Schema.ListLabelsResponse; + list(userId: string): Gmail.Schema.ListLabelsResponse; // Updates the specified label. This method supports patch semantics. - patch(resource: Schema.Label, userId: string, id: string): Gmail_v1.Schema.Label; + patch(resource: Schema.Label, userId: string, id: string): Gmail.Schema.Label; // Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to. remove(userId: string, id: string): void; // Updates the specified label. - update(resource: Schema.Label, userId: string, id: string): Gmail_v1.Schema.Label; + update(resource: Schema.Label, userId: string, id: string): Gmail.Schema.Label; } export interface MessagesCollection { - Attachments?: Gmail_v1.Collection.Users.Messages.AttachmentsCollection; + Attachments?: Gmail.Collection.Users.Messages.AttachmentsCollection; // Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all. batchDelete(resource: Schema.BatchDeleteMessagesRequest, userId: string): void; // Modifies the labels on the specified messages. batchModify(resource: Schema.BatchModifyMessagesRequest, userId: string): void; // Gets the specified message. - get(userId: string, id: string): Gmail_v1.Schema.Message; + get(userId: string, id: string): Gmail.Schema.Message; // Gets the specified message. - get(userId: string, id: string, optionalArgs: object): Gmail_v1.Schema.Message; + get(userId: string, id: string, optionalArgs: object): Gmail.Schema.Message; // Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message. - import(resource: Schema.Message, userId: string): Gmail_v1.Schema.Message; + import(resource: Schema.Message, userId: string): Gmail.Schema.Message; // Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message. - import(resource: Schema.Message, userId: string, mediaData: any): Gmail_v1.Schema.Message; + import(resource: Schema.Message, userId: string, mediaData: any): Gmail.Schema.Message; // Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message. - import(resource: Schema.Message, userId: string, mediaData: any, optionalArgs: object): Gmail_v1.Schema.Message; + import(resource: Schema.Message, userId: string, mediaData: any, optionalArgs: object): Gmail.Schema.Message; // Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message. - insert(resource: Schema.Message, userId: string): Gmail_v1.Schema.Message; + insert(resource: Schema.Message, userId: string): Gmail.Schema.Message; // Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message. - insert(resource: Schema.Message, userId: string, mediaData: any): Gmail_v1.Schema.Message; + insert(resource: Schema.Message, userId: string, mediaData: any): Gmail.Schema.Message; // Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message. - insert(resource: Schema.Message, userId: string, mediaData: any, optionalArgs: object): Gmail_v1.Schema.Message; + insert(resource: Schema.Message, userId: string, mediaData: any, optionalArgs: object): Gmail.Schema.Message; // Lists the messages in the user's mailbox. - list(userId: string): Gmail_v1.Schema.ListMessagesResponse; + list(userId: string): Gmail.Schema.ListMessagesResponse; // Lists the messages in the user's mailbox. - list(userId: string, optionalArgs: object): Gmail_v1.Schema.ListMessagesResponse; + list(userId: string, optionalArgs: object): Gmail.Schema.ListMessagesResponse; // Modifies the labels on the specified message. - modify(resource: Schema.ModifyMessageRequest, userId: string, id: string): Gmail_v1.Schema.Message; + modify(resource: Schema.ModifyMessageRequest, userId: string, id: string): Gmail.Schema.Message; // Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead. remove(userId: string, id: string): void; // Sends the specified message to the recipients in the To, Cc, and Bcc headers. - send(resource: Schema.Message, userId: string): Gmail_v1.Schema.Message; + send(resource: Schema.Message, userId: string): Gmail.Schema.Message; // Sends the specified message to the recipients in the To, Cc, and Bcc headers. - send(resource: Schema.Message, userId: string, mediaData: any): Gmail_v1.Schema.Message; + send(resource: Schema.Message, userId: string, mediaData: any): Gmail.Schema.Message; // Moves the specified message to the trash. - trash(userId: string, id: string): Gmail_v1.Schema.Message; + trash(userId: string, id: string): Gmail.Schema.Message; // Removes the specified message from the trash. - untrash(userId: string, id: string): Gmail_v1.Schema.Message; + untrash(userId: string, id: string): Gmail.Schema.Message; } export interface SettingsCollection { - Delegates?: Gmail_v1.Collection.Users.Settings.DelegatesCollection; - Filters?: Gmail_v1.Collection.Users.Settings.FiltersCollection; - ForwardingAddresses?: Gmail_v1.Collection.Users.Settings.ForwardingAddressesCollection; - SendAs?: Gmail_v1.Collection.Users.Settings.SendAsCollection; + Delegates?: Gmail.Collection.Users.Settings.DelegatesCollection; + Filters?: Gmail.Collection.Users.Settings.FiltersCollection; + ForwardingAddresses?: Gmail.Collection.Users.Settings.ForwardingAddressesCollection; + SendAs?: Gmail.Collection.Users.Settings.SendAsCollection; // Gets the auto-forwarding setting for the specified account. - getAutoForwarding(userId: string): Gmail_v1.Schema.AutoForwarding; + getAutoForwarding(userId: string): Gmail.Schema.AutoForwarding; // Gets IMAP settings. - getImap(userId: string): Gmail_v1.Schema.ImapSettings; + getImap(userId: string): Gmail.Schema.ImapSettings; // Gets POP settings. - getPop(userId: string): Gmail_v1.Schema.PopSettings; + getPop(userId: string): Gmail.Schema.PopSettings; // Gets vacation responder settings. - getVacation(userId: string): Gmail_v1.Schema.VacationSettings; + getVacation(userId: string): Gmail.Schema.VacationSettings; // Updates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled. // This method is only available to service account clients that have been delegated domain-wide authority. - updateAutoForwarding(resource: Schema.AutoForwarding, userId: string): Gmail_v1.Schema.AutoForwarding; + updateAutoForwarding(resource: Schema.AutoForwarding, userId: string): Gmail.Schema.AutoForwarding; // Updates IMAP settings. - updateImap(resource: Schema.ImapSettings, userId: string): Gmail_v1.Schema.ImapSettings; + updateImap(resource: Schema.ImapSettings, userId: string): Gmail.Schema.ImapSettings; // Updates POP settings. - updatePop(resource: Schema.PopSettings, userId: string): Gmail_v1.Schema.PopSettings; + updatePop(resource: Schema.PopSettings, userId: string): Gmail.Schema.PopSettings; // Updates vacation responder settings. - updateVacation(resource: Schema.VacationSettings, userId: string): Gmail_v1.Schema.VacationSettings; + updateVacation(resource: Schema.VacationSettings, userId: string): Gmail.Schema.VacationSettings; } export interface ThreadsCollection { // Gets the specified thread. - get(userId: string, id: string): Gmail_v1.Schema.Thread; + get(userId: string, id: string): Gmail.Schema.Thread; // Gets the specified thread. - get(userId: string, id: string, optionalArgs: object): Gmail_v1.Schema.Thread; + get(userId: string, id: string, optionalArgs: object): Gmail.Schema.Thread; // Lists the threads in the user's mailbox. - list(userId: string): Gmail_v1.Schema.ListThreadsResponse; + list(userId: string): Gmail.Schema.ListThreadsResponse; // Lists the threads in the user's mailbox. - list(userId: string, optionalArgs: object): Gmail_v1.Schema.ListThreadsResponse; + list(userId: string, optionalArgs: object): Gmail.Schema.ListThreadsResponse; // Modifies the labels applied to the thread. This applies to all messages in the thread. - modify(resource: Schema.ModifyThreadRequest, userId: string, id: string): Gmail_v1.Schema.Thread; + modify(resource: Schema.ModifyThreadRequest, userId: string, id: string): Gmail.Schema.Thread; // Immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer threads.trash instead. remove(userId: string, id: string): void; // Moves the specified thread to the trash. - trash(userId: string, id: string): Gmail_v1.Schema.Thread; + trash(userId: string, id: string): Gmail.Schema.Thread; // Removes the specified thread from the trash. - untrash(userId: string, id: string): Gmail_v1.Schema.Thread; + untrash(userId: string, id: string): Gmail.Schema.Thread; } } export interface UsersCollection { - Drafts?: Gmail_v1.Collection.Users.DraftsCollection; - History?: Gmail_v1.Collection.Users.HistoryCollection; - Labels?: Gmail_v1.Collection.Users.LabelsCollection; - Messages?: Gmail_v1.Collection.Users.MessagesCollection; - Settings?: Gmail_v1.Collection.Users.SettingsCollection; - Threads?: Gmail_v1.Collection.Users.ThreadsCollection; + Drafts?: Gmail.Collection.Users.DraftsCollection; + History?: Gmail.Collection.Users.HistoryCollection; + Labels?: Gmail.Collection.Users.LabelsCollection; + Messages?: Gmail.Collection.Users.MessagesCollection; + Settings?: Gmail.Collection.Users.SettingsCollection; + Threads?: Gmail.Collection.Users.ThreadsCollection; // Gets the current user's Gmail profile. - getProfile(userId: string): Gmail_v1.Schema.Profile; + getProfile(userId: string): Gmail.Schema.Profile; // Stop receiving push notifications for the given user mailbox. stop(userId: string): void; // Set up or update a push notification watch on the given user mailbox. - watch(resource: Schema.WatchRequest, userId: string): Gmail_v1.Schema.WatchResponse; + watch(resource: Schema.WatchRequest, userId: string): Gmail.Schema.WatchResponse; } } namespace Schema { @@ -253,11 +253,11 @@ declare namespace GoogleAppsScript { } export interface Draft { id?: string; - message?: Gmail_v1.Schema.Message; + message?: Gmail.Schema.Message; } export interface Filter { - action?: Gmail_v1.Schema.FilterAction; - criteria?: Gmail_v1.Schema.FilterCriteria; + action?: Gmail.Schema.FilterAction; + criteria?: Gmail.Schema.FilterCriteria; id?: string; } export interface FilterAction { @@ -282,25 +282,25 @@ declare namespace GoogleAppsScript { } export interface History { id?: string; - labelsAdded?: Gmail_v1.Schema.HistoryLabelAdded[]; - labelsRemoved?: Gmail_v1.Schema.HistoryLabelRemoved[]; - messages?: Gmail_v1.Schema.Message[]; - messagesAdded?: Gmail_v1.Schema.HistoryMessageAdded[]; - messagesDeleted?: Gmail_v1.Schema.HistoryMessageDeleted[]; + labelsAdded?: Gmail.Schema.HistoryLabelAdded[]; + labelsRemoved?: Gmail.Schema.HistoryLabelRemoved[]; + messages?: Gmail.Schema.Message[]; + messagesAdded?: Gmail.Schema.HistoryMessageAdded[]; + messagesDeleted?: Gmail.Schema.HistoryMessageDeleted[]; } export interface HistoryLabelAdded { labelIds?: string[]; - message?: Gmail_v1.Schema.Message; + message?: Gmail.Schema.Message; } export interface HistoryLabelRemoved { labelIds?: string[]; - message?: Gmail_v1.Schema.Message; + message?: Gmail.Schema.Message; } export interface HistoryMessageAdded { - message?: Gmail_v1.Schema.Message; + message?: Gmail.Schema.Message; } export interface HistoryMessageDeleted { - message?: Gmail_v1.Schema.Message; + message?: Gmail.Schema.Message; } export interface ImapSettings { autoExpunge?: boolean; @@ -309,7 +309,7 @@ declare namespace GoogleAppsScript { maxFolderSize?: number; } export interface Label { - color?: Gmail_v1.Schema.LabelColor; + color?: Gmail.Schema.LabelColor; id?: string; labelListVisibility?: string; messageListVisibility?: string; @@ -325,61 +325,61 @@ declare namespace GoogleAppsScript { textColor?: string; } export interface ListDelegatesResponse { - delegates?: Gmail_v1.Schema.Delegate[]; + delegates?: Gmail.Schema.Delegate[]; } export interface ListDraftsResponse { - drafts?: Gmail_v1.Schema.Draft[]; + drafts?: Gmail.Schema.Draft[]; nextPageToken?: string; resultSizeEstimate?: number; } export interface ListFiltersResponse { - filter?: Gmail_v1.Schema.Filter[]; + filter?: Gmail.Schema.Filter[]; } export interface ListForwardingAddressesResponse { - forwardingAddresses?: Gmail_v1.Schema.ForwardingAddress[]; + forwardingAddresses?: Gmail.Schema.ForwardingAddress[]; } export interface ListHistoryResponse { - history?: Gmail_v1.Schema.History[]; + history?: Gmail.Schema.History[]; historyId?: string; nextPageToken?: string; } export interface ListLabelsResponse { - labels?: Gmail_v1.Schema.Label[]; + labels?: Gmail.Schema.Label[]; } export interface ListMessagesResponse { - messages?: Gmail_v1.Schema.Message[]; + messages?: Gmail.Schema.Message[]; nextPageToken?: string; resultSizeEstimate?: number; } export interface ListSendAsResponse { - sendAs?: Gmail_v1.Schema.SendAs[]; + sendAs?: Gmail.Schema.SendAs[]; } export interface ListSmimeInfoResponse { - smimeInfo?: Gmail_v1.Schema.SmimeInfo[]; + smimeInfo?: Gmail.Schema.SmimeInfo[]; } export interface ListThreadsResponse { nextPageToken?: string; resultSizeEstimate?: number; - threads?: Gmail_v1.Schema.Thread[]; + threads?: Gmail.Schema.Thread[]; } export interface Message { historyId?: string; id?: string; internalDate?: string; labelIds?: string[]; - payload?: Gmail_v1.Schema.MessagePart; + payload?: Gmail.Schema.MessagePart; raw?: string; sizeEstimate?: number; snippet?: string; threadId?: string; } export interface MessagePart { - body?: Gmail_v1.Schema.MessagePartBody; + body?: Gmail.Schema.MessagePartBody; filename?: string; - headers?: Gmail_v1.Schema.MessagePartHeader[]; + headers?: Gmail.Schema.MessagePartHeader[]; mimeType?: string; partId?: string; - parts?: Gmail_v1.Schema.MessagePart[]; + parts?: Gmail.Schema.MessagePart[]; } export interface MessagePartBody { attachmentId?: string; @@ -415,7 +415,7 @@ declare namespace GoogleAppsScript { replyToAddress?: string; sendAsEmail?: string; signature?: string; - smtpMsa?: Gmail_v1.Schema.SmtpMsa; + smtpMsa?: Gmail.Schema.SmtpMsa; treatAsAlias?: boolean; verificationStatus?: string; } @@ -438,7 +438,7 @@ declare namespace GoogleAppsScript { export interface Thread { historyId?: string; id?: string; - messages?: Gmail_v1.Schema.Message[]; + messages?: Gmail.Schema.Message[]; snippet?: string; } export interface VacationSettings { @@ -462,57 +462,57 @@ declare namespace GoogleAppsScript { } } } - export interface Gmail_v1 { - Users?: Gmail_v1.Collection.UsersCollection; + export interface Gmail { + Users?: Gmail.Collection.UsersCollection; // Create a new instance of AutoForwarding - newAutoForwarding(): Gmail_v1.Schema.AutoForwarding; + newAutoForwarding(): Gmail.Schema.AutoForwarding; // Create a new instance of BatchDeleteMessagesRequest - newBatchDeleteMessagesRequest(): Gmail_v1.Schema.BatchDeleteMessagesRequest; + newBatchDeleteMessagesRequest(): Gmail.Schema.BatchDeleteMessagesRequest; // Create a new instance of BatchModifyMessagesRequest - newBatchModifyMessagesRequest(): Gmail_v1.Schema.BatchModifyMessagesRequest; + newBatchModifyMessagesRequest(): Gmail.Schema.BatchModifyMessagesRequest; // Create a new instance of Delegate - newDelegate(): Gmail_v1.Schema.Delegate; + newDelegate(): Gmail.Schema.Delegate; // Create a new instance of Draft - newDraft(): Gmail_v1.Schema.Draft; + newDraft(): Gmail.Schema.Draft; // Create a new instance of Filter - newFilter(): Gmail_v1.Schema.Filter; + newFilter(): Gmail.Schema.Filter; // Create a new instance of FilterAction - newFilterAction(): Gmail_v1.Schema.FilterAction; + newFilterAction(): Gmail.Schema.FilterAction; // Create a new instance of FilterCriteria - newFilterCriteria(): Gmail_v1.Schema.FilterCriteria; + newFilterCriteria(): Gmail.Schema.FilterCriteria; // Create a new instance of ForwardingAddress - newForwardingAddress(): Gmail_v1.Schema.ForwardingAddress; + newForwardingAddress(): Gmail.Schema.ForwardingAddress; // Create a new instance of ImapSettings - newImapSettings(): Gmail_v1.Schema.ImapSettings; + newImapSettings(): Gmail.Schema.ImapSettings; // Create a new instance of Label - newLabel(): Gmail_v1.Schema.Label; + newLabel(): Gmail.Schema.Label; // Create a new instance of LabelColor - newLabelColor(): Gmail_v1.Schema.LabelColor; + newLabelColor(): Gmail.Schema.LabelColor; // Create a new instance of Message - newMessage(): Gmail_v1.Schema.Message; + newMessage(): Gmail.Schema.Message; // Create a new instance of MessagePart - newMessagePart(): Gmail_v1.Schema.MessagePart; + newMessagePart(): Gmail.Schema.MessagePart; // Create a new instance of MessagePartBody - newMessagePartBody(): Gmail_v1.Schema.MessagePartBody; + newMessagePartBody(): Gmail.Schema.MessagePartBody; // Create a new instance of MessagePartHeader - newMessagePartHeader(): Gmail_v1.Schema.MessagePartHeader; + newMessagePartHeader(): Gmail.Schema.MessagePartHeader; // Create a new instance of ModifyMessageRequest - newModifyMessageRequest(): Gmail_v1.Schema.ModifyMessageRequest; + newModifyMessageRequest(): Gmail.Schema.ModifyMessageRequest; // Create a new instance of ModifyThreadRequest - newModifyThreadRequest(): Gmail_v1.Schema.ModifyThreadRequest; + newModifyThreadRequest(): Gmail.Schema.ModifyThreadRequest; // Create a new instance of PopSettings - newPopSettings(): Gmail_v1.Schema.PopSettings; + newPopSettings(): Gmail.Schema.PopSettings; // Create a new instance of SendAs - newSendAs(): Gmail_v1.Schema.SendAs; + newSendAs(): Gmail.Schema.SendAs; // Create a new instance of SmimeInfo - newSmimeInfo(): Gmail_v1.Schema.SmimeInfo; + newSmimeInfo(): Gmail.Schema.SmimeInfo; // Create a new instance of SmtpMsa - newSmtpMsa(): Gmail_v1.Schema.SmtpMsa; + newSmtpMsa(): Gmail.Schema.SmtpMsa; // Create a new instance of VacationSettings - newVacationSettings(): Gmail_v1.Schema.VacationSettings; + newVacationSettings(): Gmail.Schema.VacationSettings; // Create a new instance of WatchRequest - newWatchRequest(): Gmail_v1.Schema.WatchRequest; + newWatchRequest(): Gmail.Schema.WatchRequest; } } -declare var Gmail_v1: GoogleAppsScript.Gmail_v1; \ No newline at end of file +declare var Gmail: GoogleAppsScript.Gmail; diff --git a/types/google-apps-script/apis/groupsmigration_v1.d.ts b/types/google-apps-script/apis/groupsmigration_v1.d.ts index 189a1fba06..126afe73b8 100644 --- a/types/google-apps-script/apis/groupsmigration_v1.d.ts +++ b/types/google-apps-script/apis/groupsmigration_v1.d.ts @@ -5,13 +5,13 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Groupsmigration_v1 { + namespace AdminGroupsMigration { namespace Collection { export interface ArchiveCollection { // Inserts a new mail into the archive of the Google group. - insert(groupId: string): Groupsmigration_v1.Schema.Groups; + insert(groupId: string): AdminGroupsMigration.Schema.Groups; // Inserts a new mail into the archive of the Google group. - insert(groupId: string, mediaData: any): Groupsmigration_v1.Schema.Groups; + insert(groupId: string, mediaData: any): AdminGroupsMigration.Schema.Groups; } } namespace Schema { @@ -21,9 +21,9 @@ declare namespace GoogleAppsScript { } } } - export interface Groupsmigration_v1 { - Archive?: Groupsmigration_v1.Collection.ArchiveCollection; + export interface AdminGroupsMigration { + Archive?: AdminGroupsMigration.Collection.ArchiveCollection; } } -declare var Groupsmigration_v1: GoogleAppsScript.Groupsmigration_v1; \ No newline at end of file +declare var AdminGroupsMigration: GoogleAppsScript.AdminGroupsMigration; diff --git a/types/google-apps-script/apis/groupssettings_v1.d.ts b/types/google-apps-script/apis/groupssettings_v1.d.ts index 71f60b438f..abec6f480d 100644 --- a/types/google-apps-script/apis/groupssettings_v1.d.ts +++ b/types/google-apps-script/apis/groupssettings_v1.d.ts @@ -5,15 +5,15 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Groupssettings_v1 { + namespace AdminGroupsSettings { namespace Collection { export interface GroupsCollection { // Gets one resource by id. - get(groupUniqueId: string): Groupssettings_v1.Schema.Groups; + get(groupUniqueId: string): AdminGroupsSettings.Schema.Groups; // Updates an existing resource. This method supports patch semantics. - patch(resource: Schema.Groups, groupUniqueId: string): Groupssettings_v1.Schema.Groups; + patch(resource: Schema.Groups, groupUniqueId: string): AdminGroupsSettings.Schema.Groups; // Updates an existing resource. - update(resource: Schema.Groups, groupUniqueId: string): Groupssettings_v1.Schema.Groups; + update(resource: Schema.Groups, groupUniqueId: string): AdminGroupsSettings.Schema.Groups; } } namespace Schema { @@ -82,11 +82,11 @@ declare namespace GoogleAppsScript { } } } - export interface Groupssettings_v1 { - Groups?: Groupssettings_v1.Collection.GroupsCollection; + export interface AdminGroupsSettings { + Groups?: AdminGroupsSettings.Collection.GroupsCollection; // Create a new instance of Groups - newGroups(): Groupssettings_v1.Schema.Groups; + newGroups(): AdminGroupsSettings.Schema.Groups; } } -declare var Groupssettings_v1: GoogleAppsScript.Groupssettings_v1; \ No newline at end of file +declare var AdminGroupsSettings: GoogleAppsScript.AdminGroupsSettings; diff --git a/types/google-apps-script/apis/licensing_v1.d.ts b/types/google-apps-script/apis/licensing_v1.d.ts index 7621eeeef5..eaf0d473bc 100644 --- a/types/google-apps-script/apis/licensing_v1.d.ts +++ b/types/google-apps-script/apis/licensing_v1.d.ts @@ -5,27 +5,27 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Licensing_v1 { + namespace AdminLicenseManager { namespace Collection { export interface LicenseAssignmentsCollection { // Get license assignment of a particular product and sku for a user - get(productId: string, skuId: string, userId: string): Licensing_v1.Schema.LicenseAssignment; + get(productId: string, skuId: string, userId: string): AdminLicenseManager.Schema.LicenseAssignment; // Assign License. - insert(resource: Schema.LicenseAssignmentInsert, productId: string, skuId: string): Licensing_v1.Schema.LicenseAssignment; + insert(resource: Schema.LicenseAssignmentInsert, productId: string, skuId: string): AdminLicenseManager.Schema.LicenseAssignment; // List license assignments for given product of the customer. - listForProduct(productId: string, customerId: string): Licensing_v1.Schema.LicenseAssignmentList; + listForProduct(productId: string, customerId: string): AdminLicenseManager.Schema.LicenseAssignmentList; // List license assignments for given product of the customer. - listForProduct(productId: string, customerId: string, optionalArgs: object): Licensing_v1.Schema.LicenseAssignmentList; + listForProduct(productId: string, customerId: string, optionalArgs: object): AdminLicenseManager.Schema.LicenseAssignmentList; // List license assignments for given product and sku of the customer. - listForProductAndSku(productId: string, skuId: string, customerId: string): Licensing_v1.Schema.LicenseAssignmentList; + listForProductAndSku(productId: string, skuId: string, customerId: string): AdminLicenseManager.Schema.LicenseAssignmentList; // List license assignments for given product and sku of the customer. - listForProductAndSku(productId: string, skuId: string, customerId: string, optionalArgs: object): Licensing_v1.Schema.LicenseAssignmentList; + listForProductAndSku(productId: string, skuId: string, customerId: string, optionalArgs: object): AdminLicenseManager.Schema.LicenseAssignmentList; // Assign License. This method supports patch semantics. - patch(resource: Schema.LicenseAssignment, productId: string, skuId: string, userId: string): Licensing_v1.Schema.LicenseAssignment; + patch(resource: Schema.LicenseAssignment, productId: string, skuId: string, userId: string): AdminLicenseManager.Schema.LicenseAssignment; // Revoke License. remove(productId: string, skuId: string, userId: string): void; // Assign License. - update(resource: Schema.LicenseAssignment, productId: string, skuId: string, userId: string): Licensing_v1.Schema.LicenseAssignment; + update(resource: Schema.LicenseAssignment, productId: string, skuId: string, userId: string): AdminLicenseManager.Schema.LicenseAssignment; } } namespace Schema { @@ -44,19 +44,19 @@ declare namespace GoogleAppsScript { } export interface LicenseAssignmentList { etag?: string; - items?: Licensing_v1.Schema.LicenseAssignment[]; + items?: AdminLicenseManager.Schema.LicenseAssignment[]; kind?: string; nextPageToken?: string; } } } - export interface Licensing_v1 { - LicenseAssignments?: Licensing_v1.Collection.LicenseAssignmentsCollection; + export interface AdminLicenseManager { + LicenseAssignments?: AdminLicenseManager.Collection.LicenseAssignmentsCollection; // Create a new instance of LicenseAssignment - newLicenseAssignment(): Licensing_v1.Schema.LicenseAssignment; + newLicenseAssignment(): AdminLicenseManager.Schema.LicenseAssignment; // Create a new instance of LicenseAssignmentInsert - newLicenseAssignmentInsert(): Licensing_v1.Schema.LicenseAssignmentInsert; + newLicenseAssignmentInsert(): AdminLicenseManager.Schema.LicenseAssignmentInsert; } } -declare var Licensing_v1: GoogleAppsScript.Licensing_v1; \ No newline at end of file +declare var AdminLicenseManager: GoogleAppsScript.AdminLicenseManager; diff --git a/types/google-apps-script/apis/mirror_v1.d.ts b/types/google-apps-script/apis/mirror_v1.d.ts index 6993fb6033..149d738411 100644 --- a/types/google-apps-script/apis/mirror_v1.d.ts +++ b/types/google-apps-script/apis/mirror_v1.d.ts @@ -5,88 +5,88 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Mirror_v1 { + namespace Mirror { namespace Collection { namespace Timeline { export interface AttachmentsCollection { // Retrieves an attachment on a timeline item by item ID and attachment ID. - get(itemId: string, attachmentId: string): Mirror_v1.Schema.Attachment; + get(itemId: string, attachmentId: string): Mirror.Schema.Attachment; // Adds a new attachment to a timeline item. - insert(itemId: string): Mirror_v1.Schema.Attachment; + insert(itemId: string): Mirror.Schema.Attachment; // Adds a new attachment to a timeline item. - insert(itemId: string, mediaData: any): Mirror_v1.Schema.Attachment; + insert(itemId: string, mediaData: any): Mirror.Schema.Attachment; // Returns a list of attachments for a timeline item. - list(itemId: string): Mirror_v1.Schema.AttachmentsListResponse; + list(itemId: string): Mirror.Schema.AttachmentsListResponse; // Deletes an attachment from a timeline item. remove(itemId: string, attachmentId: string): void; } } export interface AccountsCollection { // Inserts a new account for a user - insert(resource: Schema.Account, userToken: string, accountType: string, accountName: string): Mirror_v1.Schema.Account; + insert(resource: Schema.Account, userToken: string, accountType: string, accountName: string): Mirror.Schema.Account; } export interface ContactsCollection { // Gets a single contact by ID. - get(id: string): Mirror_v1.Schema.Contact; + get(id: string): Mirror.Schema.Contact; // Inserts a new contact. - insert(resource: Schema.Contact): Mirror_v1.Schema.Contact; + insert(resource: Schema.Contact): Mirror.Schema.Contact; // Retrieves a list of contacts for the authenticated user. - list(): Mirror_v1.Schema.ContactsListResponse; + list(): Mirror.Schema.ContactsListResponse; // Updates a contact in place. This method supports patch semantics. - patch(resource: Schema.Contact, id: string): Mirror_v1.Schema.Contact; + patch(resource: Schema.Contact, id: string): Mirror.Schema.Contact; // Deletes a contact. remove(id: string): void; // Updates a contact in place. - update(resource: Schema.Contact, id: string): Mirror_v1.Schema.Contact; + update(resource: Schema.Contact, id: string): Mirror.Schema.Contact; } export interface LocationsCollection { // Gets a single location by ID. - get(id: string): Mirror_v1.Schema.Location; + get(id: string): Mirror.Schema.Location; // Retrieves a list of locations for the user. - list(): Mirror_v1.Schema.LocationsListResponse; + list(): Mirror.Schema.LocationsListResponse; } export interface SettingsCollection { // Gets a single setting by ID. - get(id: string): Mirror_v1.Schema.Setting; + get(id: string): Mirror.Schema.Setting; } export interface SubscriptionsCollection { // Creates a new subscription. - insert(resource: Schema.Subscription): Mirror_v1.Schema.Subscription; + insert(resource: Schema.Subscription): Mirror.Schema.Subscription; // Retrieves a list of subscriptions for the authenticated user and service. - list(): Mirror_v1.Schema.SubscriptionsListResponse; + list(): Mirror.Schema.SubscriptionsListResponse; // Deletes a subscription. remove(id: string): void; // Updates an existing subscription in place. - update(resource: Schema.Subscription, id: string): Mirror_v1.Schema.Subscription; + update(resource: Schema.Subscription, id: string): Mirror.Schema.Subscription; } export interface TimelineCollection { - Attachments?: Mirror_v1.Collection.Timeline.AttachmentsCollection; + Attachments?: Mirror.Collection.Timeline.AttachmentsCollection; // Gets a single timeline item by ID. - get(id: string): Mirror_v1.Schema.TimelineItem; + get(id: string): Mirror.Schema.TimelineItem; // Inserts a new item into the timeline. - insert(resource: Schema.TimelineItem): Mirror_v1.Schema.TimelineItem; + insert(resource: Schema.TimelineItem): Mirror.Schema.TimelineItem; // Inserts a new item into the timeline. - insert(resource: Schema.TimelineItem, mediaData: any): Mirror_v1.Schema.TimelineItem; + insert(resource: Schema.TimelineItem, mediaData: any): Mirror.Schema.TimelineItem; // Retrieves a list of timeline items for the authenticated user. - list(): Mirror_v1.Schema.TimelineListResponse; + list(): Mirror.Schema.TimelineListResponse; // Retrieves a list of timeline items for the authenticated user. - list(optionalArgs: object): Mirror_v1.Schema.TimelineListResponse; + list(optionalArgs: object): Mirror.Schema.TimelineListResponse; // Updates a timeline item in place. This method supports patch semantics. - patch(resource: Schema.TimelineItem, id: string): Mirror_v1.Schema.TimelineItem; + patch(resource: Schema.TimelineItem, id: string): Mirror.Schema.TimelineItem; // Deletes a timeline item. remove(id: string): void; // Updates a timeline item in place. - update(resource: Schema.TimelineItem, id: string): Mirror_v1.Schema.TimelineItem; + update(resource: Schema.TimelineItem, id: string): Mirror.Schema.TimelineItem; // Updates a timeline item in place. - update(resource: Schema.TimelineItem, id: string, mediaData: any): Mirror_v1.Schema.TimelineItem; + update(resource: Schema.TimelineItem, id: string, mediaData: any): Mirror.Schema.TimelineItem; } } namespace Schema { export interface Account { - authTokens?: Mirror_v1.Schema.AuthToken[]; + authTokens?: Mirror.Schema.AuthToken[]; features?: string[]; password?: string; - userData?: Mirror_v1.Schema.UserData[]; + userData?: Mirror.Schema.UserData[]; } export interface Attachment { contentType?: string; @@ -95,7 +95,7 @@ declare namespace GoogleAppsScript { isProcessingContent?: boolean; } export interface AttachmentsListResponse { - items?: Mirror_v1.Schema.Attachment[]; + items?: Mirror.Schema.Attachment[]; kind?: string; } export interface AuthToken { @@ -106,7 +106,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface Contact { - acceptCommands?: Mirror_v1.Schema.Command[]; + acceptCommands?: Mirror.Schema.Command[]; acceptTypes?: string[]; displayName?: string; id?: string; @@ -120,7 +120,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface ContactsListResponse { - items?: Mirror_v1.Schema.Contact[]; + items?: Mirror.Schema.Contact[]; kind?: string; } export interface Location { @@ -134,7 +134,7 @@ declare namespace GoogleAppsScript { timestamp?: string; } export interface LocationsListResponse { - items?: Mirror_v1.Schema.Location[]; + items?: Mirror.Schema.Location[]; kind?: string; } export interface MenuItem { @@ -143,7 +143,7 @@ declare namespace GoogleAppsScript { id?: string; payload?: string; removeWhenSelected?: boolean; - values?: Mirror_v1.Schema.MenuValue[]; + values?: Mirror.Schema.MenuValue[]; } export interface MenuValue { displayName?: string; @@ -154,7 +154,7 @@ declare namespace GoogleAppsScript { collection?: string; itemId?: string; operation?: string; - userActions?: Mirror_v1.Schema.UserAction[]; + userActions?: Mirror.Schema.UserAction[]; userToken?: string; verifyToken?: string; } @@ -172,22 +172,22 @@ declare namespace GoogleAppsScript { collection?: string; id?: string; kind?: string; - notification?: Mirror_v1.Schema.Notification; + notification?: Mirror.Schema.Notification; operation?: string[]; updated?: string; userToken?: string; verifyToken?: string; } export interface SubscriptionsListResponse { - items?: Mirror_v1.Schema.Subscription[]; + items?: Mirror.Schema.Subscription[]; kind?: string; } export interface TimelineItem { - attachments?: Mirror_v1.Schema.Attachment[]; + attachments?: Mirror.Schema.Attachment[]; bundleId?: string; canonicalUrl?: string; created?: string; - creator?: Mirror_v1.Schema.Contact; + creator?: Mirror.Schema.Contact; displayTime?: string; etag?: string; html?: string; @@ -197,11 +197,11 @@ declare namespace GoogleAppsScript { isDeleted?: boolean; isPinned?: boolean; kind?: string; - location?: Mirror_v1.Schema.Location; - menuItems?: Mirror_v1.Schema.MenuItem[]; - notification?: Mirror_v1.Schema.NotificationConfig; + location?: Mirror.Schema.Location; + menuItems?: Mirror.Schema.MenuItem[]; + notification?: Mirror.Schema.NotificationConfig; pinScore?: number; - recipients?: Mirror_v1.Schema.Contact[]; + recipients?: Mirror.Schema.Contact[]; selfLink?: string; sourceItemId?: string; speakableText?: string; @@ -211,7 +211,7 @@ declare namespace GoogleAppsScript { updated?: string; } export interface TimelineListResponse { - items?: Mirror_v1.Schema.TimelineItem[]; + items?: Mirror.Schema.TimelineItem[]; kind?: string; nextPageToken?: string; } @@ -225,42 +225,42 @@ declare namespace GoogleAppsScript { } } } - export interface Mirror_v1 { - Accounts?: Mirror_v1.Collection.AccountsCollection; - Contacts?: Mirror_v1.Collection.ContactsCollection; - Locations?: Mirror_v1.Collection.LocationsCollection; - Settings?: Mirror_v1.Collection.SettingsCollection; - Subscriptions?: Mirror_v1.Collection.SubscriptionsCollection; - Timeline?: Mirror_v1.Collection.TimelineCollection; + export interface Mirror { + Accounts?: Mirror.Collection.AccountsCollection; + Contacts?: Mirror.Collection.ContactsCollection; + Locations?: Mirror.Collection.LocationsCollection; + Settings?: Mirror.Collection.SettingsCollection; + Subscriptions?: Mirror.Collection.SubscriptionsCollection; + Timeline?: Mirror.Collection.TimelineCollection; // Create a new instance of Account - newAccount(): Mirror_v1.Schema.Account; + newAccount(): Mirror.Schema.Account; // Create a new instance of Attachment - newAttachment(): Mirror_v1.Schema.Attachment; + newAttachment(): Mirror.Schema.Attachment; // Create a new instance of AuthToken - newAuthToken(): Mirror_v1.Schema.AuthToken; + newAuthToken(): Mirror.Schema.AuthToken; // Create a new instance of Command - newCommand(): Mirror_v1.Schema.Command; + newCommand(): Mirror.Schema.Command; // Create a new instance of Contact - newContact(): Mirror_v1.Schema.Contact; + newContact(): Mirror.Schema.Contact; // Create a new instance of Location - newLocation(): Mirror_v1.Schema.Location; + newLocation(): Mirror.Schema.Location; // Create a new instance of MenuItem - newMenuItem(): Mirror_v1.Schema.MenuItem; + newMenuItem(): Mirror.Schema.MenuItem; // Create a new instance of MenuValue - newMenuValue(): Mirror_v1.Schema.MenuValue; + newMenuValue(): Mirror.Schema.MenuValue; // Create a new instance of Notification - newNotification(): Mirror_v1.Schema.Notification; + newNotification(): Mirror.Schema.Notification; // Create a new instance of NotificationConfig - newNotificationConfig(): Mirror_v1.Schema.NotificationConfig; + newNotificationConfig(): Mirror.Schema.NotificationConfig; // Create a new instance of Subscription - newSubscription(): Mirror_v1.Schema.Subscription; + newSubscription(): Mirror.Schema.Subscription; // Create a new instance of TimelineItem - newTimelineItem(): Mirror_v1.Schema.TimelineItem; + newTimelineItem(): Mirror.Schema.TimelineItem; // Create a new instance of UserAction - newUserAction(): Mirror_v1.Schema.UserAction; + newUserAction(): Mirror.Schema.UserAction; // Create a new instance of UserData - newUserData(): Mirror_v1.Schema.UserData; + newUserData(): Mirror.Schema.UserData; } } -declare var Mirror_v1: GoogleAppsScript.Mirror_v1; +declare var Mirror: GoogleAppsScript.Mirror; diff --git a/types/google-apps-script/apis/peopleapi_v1.d.ts b/types/google-apps-script/apis/peopleapi_v1.d.ts index 4fecaf9bfa..21a54ca715 100644 --- a/types/google-apps-script/apis/peopleapi_v1.d.ts +++ b/types/google-apps-script/apis/peopleapi_v1.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Peopleapi_v1 { + namespace People { namespace Collection { namespace ContactGroups { export interface MembersCollection { @@ -14,7 +14,7 @@ declare namespace GoogleAppsScript { // The only system contact groups that can have members added are // `contactGroups/myContacts` and `contactGroups/starred`. Other system // contact groups are deprecated and can only have contacts removed. - modify(resource: Schema.ModifyContactGroupMembersRequest, resourceName: string): Peopleapi_v1.Schema.ModifyContactGroupMembersResponse; + modify(resource: Schema.ModifyContactGroupMembersRequest, resourceName: string): Schema.ModifyContactGroupMembersResponse; } } namespace People { @@ -23,36 +23,36 @@ declare namespace GoogleAppsScript { // connected profiles. //
// The request throws a 400 error if 'personFields' is not specified. - list(resourceName: string): Peopleapi_v1.Schema.ListConnectionsResponse; + list(resourceName: string): Schema.ListConnectionsResponse; // Provides a list of the authenticated user's contacts merged with any // connected profiles. //
// The request throws a 400 error if 'personFields' is not specified. - list(resourceName: string, optionalArgs: object): Peopleapi_v1.Schema.ListConnectionsResponse; + list(resourceName: string, optionalArgs: object): Schema.ListConnectionsResponse; } } export interface ContactGroupsCollection { - Members?: Peopleapi_v1.Collection.ContactGroups.MembersCollection; + Members?: Collection.ContactGroups.MembersCollection; // Get a list of contact groups owned by the authenticated user by specifying // a list of contact group resource names. - batchGet(): Peopleapi_v1.Schema.BatchGetContactGroupsResponse; + batchGet(): Schema.BatchGetContactGroupsResponse; // Get a list of contact groups owned by the authenticated user by specifying // a list of contact group resource names. - batchGet(optionalArgs: object): Peopleapi_v1.Schema.BatchGetContactGroupsResponse; + batchGet(optionalArgs: object): Schema.BatchGetContactGroupsResponse; // Create a new contact group owned by the authenticated user. - create(resource: Schema.CreateContactGroupRequest): Peopleapi_v1.Schema.ContactGroup; + create(resource: Schema.CreateContactGroupRequest): Schema.ContactGroup; // Get a specific contact group owned by the authenticated user by specifying // a contact group resource name. - get(resourceName: string): Peopleapi_v1.Schema.ContactGroup; + get(resourceName: string): Schema.ContactGroup; // Get a specific contact group owned by the authenticated user by specifying // a contact group resource name. - get(resourceName: string, optionalArgs: object): Peopleapi_v1.Schema.ContactGroup; + get(resourceName: string, optionalArgs: object): Schema.ContactGroup; // List all contact groups owned by the authenticated user. Members of the // contact groups are not populated. - list(): Peopleapi_v1.Schema.ListContactGroupsResponse; + list(): Schema.ListContactGroupsResponse; // List all contact groups owned by the authenticated user. Members of the // contact groups are not populated. - list(optionalArgs: object): Peopleapi_v1.Schema.ListContactGroupsResponse; + list(optionalArgs: object): Schema.ListContactGroupsResponse; // Delete an existing contact group owned by the authenticated user by // specifying a contact group resource name. remove(resourceName: string): void; @@ -61,38 +61,38 @@ declare namespace GoogleAppsScript { remove(resourceName: string, optionalArgs: object): void; // Update the name of an existing contact group owned by the authenticated // user. - update(resource: Schema.UpdateContactGroupRequest, resourceName: string): Peopleapi_v1.Schema.ContactGroup; + update(resource: Schema.UpdateContactGroupRequest, resourceName: string): Schema.ContactGroup; } export interface PeopleCollection { - Connections?: Peopleapi_v1.Collection.People.ConnectionsCollection; + Connections?: Collection.People.ConnectionsCollection; // Create a new contact and return the person resource for that contact. - createContact(resource: Schema.Person): Peopleapi_v1.Schema.Person; + createContact(resource: Schema.Person): Schema.Person; // Create a new contact and return the person resource for that contact. - createContact(resource: Schema.Person, optionalArgs: object): Peopleapi_v1.Schema.Person; + createContact(resource: Schema.Person, optionalArgs: object): Schema.Person; // Delete a contact person. Any non-contact data will not be deleted. deleteContact(resourceName: string): void; // Provides information about a person by specifying a resource name. Use // `people/me` to indicate the authenticated user. //
// The request throws a 400 error if 'personFields' is not specified. - get(resourceName: string): Peopleapi_v1.Schema.Person; + get(resourceName: string): Schema.Person; // Provides information about a person by specifying a resource name. Use // `people/me` to indicate the authenticated user. //
// The request throws a 400 error if 'personFields' is not specified. - get(resourceName: string, optionalArgs: object): Peopleapi_v1.Schema.Person; + get(resourceName: string, optionalArgs: object): Schema.Person; // Provides information about a list of specific people by specifying a list // of requested resource names. Use `people/me` to indicate the authenticated // user. //
// The request throws a 400 error if 'personFields' is not specified. - getBatchGet(): Peopleapi_v1.Schema.GetPeopleResponse; + getBatchGet(): Schema.GetPeopleResponse; // Provides information about a list of specific people by specifying a list // of requested resource names. Use `people/me` to indicate the authenticated // user. //
// The request throws a 400 error if 'personFields' is not specified. - getBatchGet(optionalArgs: object): Peopleapi_v1.Schema.GetPeopleResponse; + getBatchGet(optionalArgs: object): Schema.GetPeopleResponse; // Update contact data for an existing contact person. Any non-contact data // will not be modified. // The request throws a 400 error if `updatePersonFields` is not specified. @@ -104,7 +104,7 @@ declare namespace GoogleAppsScript { // different than the contact's etag, which indicates the contact has changed // since its data was read. Clients should get the latest person and re-apply // their updates to the latest person. - updateContact(resource: Schema.Person, resourceName: string): Peopleapi_v1.Schema.Person; + updateContact(resource: Schema.Person, resourceName: string): Schema.Person; // Update contact data for an existing contact person. Any non-contact data // will not be modified. // The request throws a 400 error if `updatePersonFields` is not specified. @@ -116,7 +116,7 @@ declare namespace GoogleAppsScript { // different than the contact's etag, which indicates the contact has changed // since its data was read. Clients should get the latest person and re-apply // their updates to the latest person. - updateContact(resource: Schema.Person, resourceName: string, optionalArgs: object): Peopleapi_v1.Schema.Person; + updateContact(resource: Schema.Person, resourceName: string, optionalArgs: object): Schema.Person; } } namespace Schema { @@ -127,7 +127,7 @@ declare namespace GoogleAppsScript { extendedAddress?: string; formattedType?: string; formattedValue?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; poBox?: string; postalCode?: string; region?: string; @@ -136,23 +136,23 @@ declare namespace GoogleAppsScript { } export interface AgeRangeType { ageRange?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; } export interface BatchGetContactGroupsResponse { - responses?: Peopleapi_v1.Schema.ContactGroupResponse[]; + responses?: People.Schema.ContactGroupResponse[]; } export interface Biography { contentType?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface Birthday { - date?: Peopleapi_v1.Schema.Date; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + date?: People.Schema.Date; + metadata?: People.Schema.FieldMetadata; text?: string; } export interface BraggingRights { - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface ContactGroup { @@ -161,7 +161,7 @@ declare namespace GoogleAppsScript { groupType?: string; memberCount?: number; memberResourceNames?: string[]; - metadata?: Peopleapi_v1.Schema.ContactGroupMetadata; + metadata?: People.Schema.ContactGroupMetadata; name?: string; resourceName?: string; } @@ -173,17 +173,17 @@ declare namespace GoogleAppsScript { updateTime?: string; } export interface ContactGroupResponse { - contactGroup?: Peopleapi_v1.Schema.ContactGroup; + contactGroup?: People.Schema.ContactGroup; requestedResourceName?: string; - status?: Peopleapi_v1.Schema.Status; + status?: People.Schema.Status; } export interface CoverPhoto { default?: boolean; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; url?: string; } export interface CreateContactGroupRequest { - contactGroup?: Peopleapi_v1.Schema.ContactGroup; + contactGroup?: People.Schema.ContactGroup; } export interface Date { day?: number; @@ -196,62 +196,62 @@ declare namespace GoogleAppsScript { export interface EmailAddress { displayName?: string; formattedType?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; type?: string; value?: string; } export interface Event { - date?: Peopleapi_v1.Schema.Date; + date?: People.Schema.Date; formattedType?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; type?: string; } export interface FieldMetadata { primary?: boolean; - source?: Peopleapi_v1.Schema.Source; + source?: People.Schema.Source; verified?: boolean; } export interface Gender { formattedValue?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface GetPeopleResponse { - responses?: Peopleapi_v1.Schema.PersonResponse[]; + responses?: People.Schema.PersonResponse[]; } export interface ImClient { formattedProtocol?: string; formattedType?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; protocol?: string; type?: string; username?: string; } export interface Interest { - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface ListConnectionsResponse { - connections?: Peopleapi_v1.Schema.Person[]; + connections?: People.Schema.Person[]; nextPageToken?: string; nextSyncToken?: string; totalItems?: number; totalPeople?: number; } export interface ListContactGroupsResponse { - contactGroups?: Peopleapi_v1.Schema.ContactGroup[]; + contactGroups?: People.Schema.ContactGroup[]; nextPageToken?: string; nextSyncToken?: string; totalItems?: number; } export interface Locale { - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface Membership { - contactGroupMembership?: Peopleapi_v1.Schema.ContactGroupMembership; - domainMembership?: Peopleapi_v1.Schema.DomainMembership; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + contactGroupMembership?: People.Schema.ContactGroupMembership; + domainMembership?: People.Schema.DomainMembership; + metadata?: People.Schema.FieldMetadata; } export interface ModifyContactGroupMembersRequest { resourceNamesToAdd?: string[]; @@ -267,7 +267,7 @@ declare namespace GoogleAppsScript { givenName?: string; honorificPrefix?: string; honorificSuffix?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; middleName?: string; phoneticFamilyName?: string; phoneticFullName?: string; @@ -277,87 +277,87 @@ declare namespace GoogleAppsScript { phoneticMiddleName?: string; } export interface Nickname { - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; type?: string; value?: string; } export interface Occupation { - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface Organization { current?: boolean; department?: string; domain?: string; - endDate?: Peopleapi_v1.Schema.Date; + endDate?: People.Schema.Date; formattedType?: string; jobDescription?: string; location?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; name?: string; phoneticName?: string; - startDate?: Peopleapi_v1.Schema.Date; + startDate?: People.Schema.Date; symbol?: string; title?: string; type?: string; } export interface Person { - addresses?: Peopleapi_v1.Schema.Address[]; + addresses?: People.Schema.Address[]; ageRange?: string; - ageRanges?: Peopleapi_v1.Schema.AgeRangeType[]; - biographies?: Peopleapi_v1.Schema.Biography[]; - birthdays?: Peopleapi_v1.Schema.Birthday[]; - braggingRights?: Peopleapi_v1.Schema.BraggingRights[]; - coverPhotos?: Peopleapi_v1.Schema.CoverPhoto[]; - emailAddresses?: Peopleapi_v1.Schema.EmailAddress[]; + ageRanges?: People.Schema.AgeRangeType[]; + biographies?: People.Schema.Biography[]; + birthdays?: People.Schema.Birthday[]; + braggingRights?: People.Schema.BraggingRights[]; + coverPhotos?: People.Schema.CoverPhoto[]; + emailAddresses?: People.Schema.EmailAddress[]; etag?: string; - events?: Peopleapi_v1.Schema.Event[]; - genders?: Peopleapi_v1.Schema.Gender[]; - imClients?: Peopleapi_v1.Schema.ImClient[]; - interests?: Peopleapi_v1.Schema.Interest[]; - locales?: Peopleapi_v1.Schema.Locale[]; - memberships?: Peopleapi_v1.Schema.Membership[]; - metadata?: Peopleapi_v1.Schema.PersonMetadata; - names?: Peopleapi_v1.Schema.Name[]; - nicknames?: Peopleapi_v1.Schema.Nickname[]; - occupations?: Peopleapi_v1.Schema.Occupation[]; - organizations?: Peopleapi_v1.Schema.Organization[]; - phoneNumbers?: Peopleapi_v1.Schema.PhoneNumber[]; - photos?: Peopleapi_v1.Schema.Photo[]; - relations?: Peopleapi_v1.Schema.Relation[]; - relationshipInterests?: Peopleapi_v1.Schema.RelationshipInterest[]; - relationshipStatuses?: Peopleapi_v1.Schema.RelationshipStatus[]; - residences?: Peopleapi_v1.Schema.Residence[]; + events?: People.Schema.Event[]; + genders?: People.Schema.Gender[]; + imClients?: People.Schema.ImClient[]; + interests?: People.Schema.Interest[]; + locales?: People.Schema.Locale[]; + memberships?: People.Schema.Membership[]; + metadata?: People.Schema.PersonMetadata; + names?: People.Schema.Name[]; + nicknames?: People.Schema.Nickname[]; + occupations?: People.Schema.Occupation[]; + organizations?: People.Schema.Organization[]; + phoneNumbers?: People.Schema.PhoneNumber[]; + photos?: People.Schema.Photo[]; + relations?: People.Schema.Relation[]; + relationshipInterests?: People.Schema.RelationshipInterest[]; + relationshipStatuses?: People.Schema.RelationshipStatus[]; + residences?: People.Schema.Residence[]; resourceName?: string; - sipAddresses?: Peopleapi_v1.Schema.SipAddress[]; - skills?: Peopleapi_v1.Schema.Skill[]; - taglines?: Peopleapi_v1.Schema.Tagline[]; - urls?: Peopleapi_v1.Schema.Url[]; - userDefined?: Peopleapi_v1.Schema.UserDefined[]; + sipAddresses?: People.Schema.SipAddress[]; + skills?: People.Schema.Skill[]; + taglines?: People.Schema.Tagline[]; + urls?: People.Schema.Url[]; + userDefined?: People.Schema.UserDefined[]; } export interface PersonMetadata { deleted?: boolean; linkedPeopleResourceNames?: string[]; objectType?: string; previousResourceNames?: string[]; - sources?: Peopleapi_v1.Schema.Source[]; + sources?: People.Schema.Source[]; } export interface PersonResponse { httpStatusCode?: number; - person?: Peopleapi_v1.Schema.Person; + person?: People.Schema.Person; requestedResourceName?: string; - status?: Peopleapi_v1.Schema.Status; + status?: People.Schema.Status; } export interface PhoneNumber { canonicalForm?: string; formattedType?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; type?: string; value?: string; } export interface Photo { default?: boolean; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; url?: string; } export interface ProfileMetadata { @@ -366,39 +366,39 @@ declare namespace GoogleAppsScript { } export interface Relation { formattedType?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; person?: string; type?: string; } export interface RelationshipInterest { formattedValue?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface RelationshipStatus { formattedValue?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface Residence { current?: boolean; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface SipAddress { formattedType?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; type?: string; value?: string; } export interface Skill { - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface Source { etag?: string; id?: string; - profileMetadata?: Peopleapi_v1.Schema.ProfileMetadata; + profileMetadata?: People.Schema.ProfileMetadata; type?: string; updateTime?: string; } @@ -408,111 +408,111 @@ declare namespace GoogleAppsScript { message?: string; } export interface Tagline { - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } export interface UpdateContactGroupRequest { - contactGroup?: Peopleapi_v1.Schema.ContactGroup; + contactGroup?: People.Schema.ContactGroup; } export interface Url { formattedType?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; type?: string; value?: string; } export interface UserDefined { key?: string; - metadata?: Peopleapi_v1.Schema.FieldMetadata; + metadata?: People.Schema.FieldMetadata; value?: string; } } } - export interface Peopleapi_v1 { - ContactGroups?: Peopleapi_v1.Collection.ContactGroupsCollection; - People?: Peopleapi_v1.Collection.PeopleCollection; + export interface People { + ContactGroups?: People.Collection.ContactGroupsCollection; + People?: People.Collection.PeopleCollection; // Create a new instance of Address - newAddress(): Peopleapi_v1.Schema.Address; + newAddress(): People.Schema.Address; // Create a new instance of AgeRangeType - newAgeRangeType(): Peopleapi_v1.Schema.AgeRangeType; + newAgeRangeType(): People.Schema.AgeRangeType; // Create a new instance of Biography - newBiography(): Peopleapi_v1.Schema.Biography; + newBiography(): People.Schema.Biography; // Create a new instance of Birthday - newBirthday(): Peopleapi_v1.Schema.Birthday; + newBirthday(): People.Schema.Birthday; // Create a new instance of BraggingRights - newBraggingRights(): Peopleapi_v1.Schema.BraggingRights; + newBraggingRights(): People.Schema.BraggingRights; // Create a new instance of ContactGroup - newContactGroup(): Peopleapi_v1.Schema.ContactGroup; + newContactGroup(): People.Schema.ContactGroup; // Create a new instance of ContactGroupMembership - newContactGroupMembership(): Peopleapi_v1.Schema.ContactGroupMembership; + newContactGroupMembership(): People.Schema.ContactGroupMembership; // Create a new instance of ContactGroupMetadata - newContactGroupMetadata(): Peopleapi_v1.Schema.ContactGroupMetadata; + newContactGroupMetadata(): People.Schema.ContactGroupMetadata; // Create a new instance of CoverPhoto - newCoverPhoto(): Peopleapi_v1.Schema.CoverPhoto; + newCoverPhoto(): People.Schema.CoverPhoto; // Create a new instance of CreateContactGroupRequest - newCreateContactGroupRequest(): Peopleapi_v1.Schema.CreateContactGroupRequest; + newCreateContactGroupRequest(): People.Schema.CreateContactGroupRequest; // Create a new instance of Date - newDate(): Peopleapi_v1.Schema.Date; + newDate(): People.Schema.Date; // Create a new instance of DomainMembership - newDomainMembership(): Peopleapi_v1.Schema.DomainMembership; + newDomainMembership(): People.Schema.DomainMembership; // Create a new instance of EmailAddress - newEmailAddress(): Peopleapi_v1.Schema.EmailAddress; + newEmailAddress(): People.Schema.EmailAddress; // Create a new instance of Event - newEvent(): Peopleapi_v1.Schema.Event; + newEvent(): People.Schema.Event; // Create a new instance of FieldMetadata - newFieldMetadata(): Peopleapi_v1.Schema.FieldMetadata; + newFieldMetadata(): People.Schema.FieldMetadata; // Create a new instance of Gender - newGender(): Peopleapi_v1.Schema.Gender; + newGender(): People.Schema.Gender; // Create a new instance of ImClient - newImClient(): Peopleapi_v1.Schema.ImClient; + newImClient(): People.Schema.ImClient; // Create a new instance of Interest - newInterest(): Peopleapi_v1.Schema.Interest; + newInterest(): People.Schema.Interest; // Create a new instance of Locale - newLocale(): Peopleapi_v1.Schema.Locale; + newLocale(): People.Schema.Locale; // Create a new instance of Membership - newMembership(): Peopleapi_v1.Schema.Membership; + newMembership(): People.Schema.Membership; // Create a new instance of ModifyContactGroupMembersRequest - newModifyContactGroupMembersRequest(): Peopleapi_v1.Schema.ModifyContactGroupMembersRequest; + newModifyContactGroupMembersRequest(): People.Schema.ModifyContactGroupMembersRequest; // Create a new instance of Name - newName(): Peopleapi_v1.Schema.Name; + newName(): People.Schema.Name; // Create a new instance of Nickname - newNickname(): Peopleapi_v1.Schema.Nickname; + newNickname(): People.Schema.Nickname; // Create a new instance of Occupation - newOccupation(): Peopleapi_v1.Schema.Occupation; + newOccupation(): People.Schema.Occupation; // Create a new instance of Organization - newOrganization(): Peopleapi_v1.Schema.Organization; + newOrganization(): People.Schema.Organization; // Create a new instance of Person - newPerson(): Peopleapi_v1.Schema.Person; + newPerson(): People.Schema.Person; // Create a new instance of PersonMetadata - newPersonMetadata(): Peopleapi_v1.Schema.PersonMetadata; + newPersonMetadata(): People.Schema.PersonMetadata; // Create a new instance of PhoneNumber - newPhoneNumber(): Peopleapi_v1.Schema.PhoneNumber; + newPhoneNumber(): People.Schema.PhoneNumber; // Create a new instance of Photo - newPhoto(): Peopleapi_v1.Schema.Photo; + newPhoto(): People.Schema.Photo; // Create a new instance of ProfileMetadata - newProfileMetadata(): Peopleapi_v1.Schema.ProfileMetadata; + newProfileMetadata(): People.Schema.ProfileMetadata; // Create a new instance of Relation - newRelation(): Peopleapi_v1.Schema.Relation; + newRelation(): People.Schema.Relation; // Create a new instance of RelationshipInterest - newRelationshipInterest(): Peopleapi_v1.Schema.RelationshipInterest; + newRelationshipInterest(): People.Schema.RelationshipInterest; // Create a new instance of RelationshipStatus - newRelationshipStatus(): Peopleapi_v1.Schema.RelationshipStatus; + newRelationshipStatus(): People.Schema.RelationshipStatus; // Create a new instance of Residence - newResidence(): Peopleapi_v1.Schema.Residence; + newResidence(): People.Schema.Residence; // Create a new instance of SipAddress - newSipAddress(): Peopleapi_v1.Schema.SipAddress; + newSipAddress(): People.Schema.SipAddress; // Create a new instance of Skill - newSkill(): Peopleapi_v1.Schema.Skill; + newSkill(): People.Schema.Skill; // Create a new instance of Source - newSource(): Peopleapi_v1.Schema.Source; + newSource(): People.Schema.Source; // Create a new instance of Tagline - newTagline(): Peopleapi_v1.Schema.Tagline; + newTagline(): People.Schema.Tagline; // Create a new instance of UpdateContactGroupRequest - newUpdateContactGroupRequest(): Peopleapi_v1.Schema.UpdateContactGroupRequest; + newUpdateContactGroupRequest(): People.Schema.UpdateContactGroupRequest; // Create a new instance of Url - newUrl(): Peopleapi_v1.Schema.Url; + newUrl(): People.Schema.Url; // Create a new instance of UserDefined - newUserDefined(): Peopleapi_v1.Schema.UserDefined; + newUserDefined(): People.Schema.UserDefined; } } -declare var Peopleapi_v1: GoogleAppsScript.Peopleapi_v1; \ No newline at end of file +declare var People: GoogleAppsScript.People; diff --git a/types/google-apps-script/apis/reports_v1.d.ts b/types/google-apps-script/apis/reports_v1.d.ts index e6f3a83c0c..21a91855b6 100644 --- a/types/google-apps-script/apis/reports_v1.d.ts +++ b/types/google-apps-script/apis/reports_v1.d.ts @@ -5,17 +5,17 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Admin_reports_v1 { + namespace AdminReports { namespace Collection { export interface ActivitiesCollection { // Retrieves a list of activities for a specific customer and application. - list(userKey: string, applicationName: string): Admin_reports_v1.Schema.Activities; + list(userKey: string, applicationName: string): AdminReports.Schema.Activities; // Retrieves a list of activities for a specific customer and application. - list(userKey: string, applicationName: string, optionalArgs: object): Admin_reports_v1.Schema.Activities; + list(userKey: string, applicationName: string, optionalArgs: object): AdminReports.Schema.Activities; // Push changes to activities - watch(resource: Schema.Channel, userKey: string, applicationName: string): Admin_reports_v1.Schema.Channel; + watch(resource: Schema.Channel, userKey: string, applicationName: string): AdminReports.Schema.Channel; // Push changes to activities - watch(resource: Schema.Channel, userKey: string, applicationName: string, optionalArgs: object): Admin_reports_v1.Schema.Channel; + watch(resource: Schema.Channel, userKey: string, applicationName: string, optionalArgs: object): AdminReports.Schema.Channel; } export interface ChannelsCollection { // Stop watching resources through this channel @@ -23,35 +23,35 @@ declare namespace GoogleAppsScript { } export interface CustomerUsageReportsCollection { // Retrieves a report which is a collection of properties / statistics for a specific customer. - get(date: string): Admin_reports_v1.Schema.UsageReports; + get(date: string): AdminReports.Schema.UsageReports; // Retrieves a report which is a collection of properties / statistics for a specific customer. - get(date: string, optionalArgs: object): Admin_reports_v1.Schema.UsageReports; + get(date: string, optionalArgs: object): AdminReports.Schema.UsageReports; } export interface EntityUsageReportsCollection { // Retrieves a report which is a collection of properties / statistics for a set of objects. - get(entityType: string, entityKey: string, date: string): Admin_reports_v1.Schema.UsageReports; + get(entityType: string, entityKey: string, date: string): AdminReports.Schema.UsageReports; // Retrieves a report which is a collection of properties / statistics for a set of objects. - get(entityType: string, entityKey: string, date: string, optionalArgs: object): Admin_reports_v1.Schema.UsageReports; + get(entityType: string, entityKey: string, date: string, optionalArgs: object): AdminReports.Schema.UsageReports; } export interface UserUsageReportCollection { // Retrieves a report which is a collection of properties / statistics for a set of users. - get(userKey: string, date: string): Admin_reports_v1.Schema.UsageReports; + get(userKey: string, date: string): AdminReports.Schema.UsageReports; // Retrieves a report which is a collection of properties / statistics for a set of users. - get(userKey: string, date: string, optionalArgs: object): Admin_reports_v1.Schema.UsageReports; + get(userKey: string, date: string, optionalArgs: object): AdminReports.Schema.UsageReports; } } namespace Schema { export interface Activities { etag?: string; - items?: Admin_reports_v1.Schema.Activity[]; + items?: AdminReports.Schema.Activity[]; kind?: string; nextPageToken?: string; } export interface Activity { - actor?: Admin_reports_v1.Schema.ActivityActor; + actor?: AdminReports.Schema.ActivityActor; etag?: string; - events?: Admin_reports_v1.Schema.ActivityEvents[]; - id?: Admin_reports_v1.Schema.ActivityId; + events?: AdminReports.Schema.ActivityEvents[]; + id?: AdminReports.Schema.ActivityId; ipAddress?: string; kind?: string; ownerDomain?: string; @@ -64,7 +64,7 @@ declare namespace GoogleAppsScript { } export interface ActivityEvents { name?: string; - parameters?: Admin_reports_v1.Schema.ActivityEventsParameters[]; + parameters?: AdminReports.Schema.ActivityEventsParameters[]; type?: string; } export interface ActivityEventsParameters { @@ -95,10 +95,10 @@ declare namespace GoogleAppsScript { } export interface UsageReport { date?: string; - entity?: Admin_reports_v1.Schema.UsageReportEntity; + entity?: AdminReports.Schema.UsageReportEntity; etag?: string; kind?: string; - parameters?: Admin_reports_v1.Schema.UsageReportParameters[]; + parameters?: AdminReports.Schema.UsageReportParameters[]; } export interface UsageReportEntity { customerId?: string; @@ -119,12 +119,12 @@ declare namespace GoogleAppsScript { etag?: string; kind?: string; nextPageToken?: string; - usageReports?: Admin_reports_v1.Schema.UsageReport[]; - warnings?: Admin_reports_v1.Schema.UsageReportsWarnings[]; + usageReports?: AdminReports.Schema.UsageReport[]; + warnings?: AdminReports.Schema.UsageReportsWarnings[]; } export interface UsageReportsWarnings { code?: string; - data?: Admin_reports_v1.Schema.UsageReportsWarningsData[]; + data?: AdminReports.Schema.UsageReportsWarningsData[]; message?: string; } export interface UsageReportsWarningsData { @@ -133,15 +133,15 @@ declare namespace GoogleAppsScript { } } } - export interface Admin_reports_v1 { - Activities?: Admin_reports_v1.Collection.ActivitiesCollection; - Channels?: Admin_reports_v1.Collection.ChannelsCollection; - CustomerUsageReports?: Admin_reports_v1.Collection.CustomerUsageReportsCollection; - EntityUsageReports?: Admin_reports_v1.Collection.EntityUsageReportsCollection; - UserUsageReport?: Admin_reports_v1.Collection.UserUsageReportCollection; + export interface AdminReports { + Activities?: AdminReports.Collection.ActivitiesCollection; + Channels?: AdminReports.Collection.ChannelsCollection; + CustomerUsageReports?: AdminReports.Collection.CustomerUsageReportsCollection; + EntityUsageReports?: AdminReports.Collection.EntityUsageReportsCollection; + UserUsageReport?: AdminReports.Collection.UserUsageReportCollection; // Create a new instance of Channel - newChannel(): Admin_reports_v1.Schema.Channel; + newChannel(): AdminReports.Schema.Channel; } } -declare var Admin_reports_v1: GoogleAppsScript.Admin_reports_v1; \ No newline at end of file +declare var AdminReports: GoogleAppsScript.AdminReports; diff --git a/types/google-apps-script/apis/reseller_v1.d.ts b/types/google-apps-script/apis/reseller_v1.d.ts index a20d0a1ccc..4a3d7de349 100644 --- a/types/google-apps-script/apis/reseller_v1.d.ts +++ b/types/google-apps-script/apis/reseller_v1.d.ts @@ -5,57 +5,57 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Reseller_v1 { + namespace AdminReseller { namespace Collection { export interface CustomersCollection { // Get a customer account. - get(customerId: string): Reseller_v1.Schema.Customer; + get(customerId: string): AdminReseller.Schema.Customer; // Order a new customer's account. - insert(resource: Schema.Customer): Reseller_v1.Schema.Customer; + insert(resource: Schema.Customer): AdminReseller.Schema.Customer; // Order a new customer's account. - insert(resource: Schema.Customer, optionalArgs: object): Reseller_v1.Schema.Customer; + insert(resource: Schema.Customer, optionalArgs: object): AdminReseller.Schema.Customer; // Update a customer account's settings. This method supports patch semantics. - patch(resource: Schema.Customer, customerId: string): Reseller_v1.Schema.Customer; + patch(resource: Schema.Customer, customerId: string): AdminReseller.Schema.Customer; // Update a customer account's settings. - update(resource: Schema.Customer, customerId: string): Reseller_v1.Schema.Customer; + update(resource: Schema.Customer, customerId: string): AdminReseller.Schema.Customer; } export interface ResellernotifyCollection { // Returns all the details of the watch corresponding to the reseller. - getwatchdetails(): Reseller_v1.Schema.ResellernotifyGetwatchdetailsResponse; + getwatchdetails(): AdminReseller.Schema.ResellernotifyGetwatchdetailsResponse; // Registers a Reseller for receiving notifications. - register(): Reseller_v1.Schema.ResellernotifyResource; + register(): AdminReseller.Schema.ResellernotifyResource; // Registers a Reseller for receiving notifications. - register(optionalArgs: object): Reseller_v1.Schema.ResellernotifyResource; + register(optionalArgs: object): AdminReseller.Schema.ResellernotifyResource; // Unregisters a Reseller for receiving notifications. - unregister(): Reseller_v1.Schema.ResellernotifyResource; + unregister(): AdminReseller.Schema.ResellernotifyResource; // Unregisters a Reseller for receiving notifications. - unregister(optionalArgs: object): Reseller_v1.Schema.ResellernotifyResource; + unregister(optionalArgs: object): AdminReseller.Schema.ResellernotifyResource; } export interface SubscriptionsCollection { // Activates a subscription previously suspended by the reseller - activate(customerId: string, subscriptionId: string): Reseller_v1.Schema.Subscription; + activate(customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; // Update a subscription plan. Use this method to update a plan for a 30-day trial or a flexible plan subscription to an annual commitment plan with monthly or yearly payments. - changePlan(resource: Schema.ChangePlanRequest, customerId: string, subscriptionId: string): Reseller_v1.Schema.Subscription; + changePlan(resource: Schema.ChangePlanRequest, customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; // Update a user license's renewal settings. This is applicable for accounts with annual commitment plans only. - changeRenewalSettings(resource: Schema.RenewalSettings, customerId: string, subscriptionId: string): Reseller_v1.Schema.Subscription; + changeRenewalSettings(resource: Schema.RenewalSettings, customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; // Update a subscription's user license settings. - changeSeats(resource: Schema.Seats, customerId: string, subscriptionId: string): Reseller_v1.Schema.Subscription; + changeSeats(resource: Schema.Seats, customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; // Get a specific subscription. - get(customerId: string, subscriptionId: string): Reseller_v1.Schema.Subscription; + get(customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; // Create or transfer a subscription. - insert(resource: Schema.Subscription, customerId: string): Reseller_v1.Schema.Subscription; + insert(resource: Schema.Subscription, customerId: string): AdminReseller.Schema.Subscription; // Create or transfer a subscription. - insert(resource: Schema.Subscription, customerId: string, optionalArgs: object): Reseller_v1.Schema.Subscription; + insert(resource: Schema.Subscription, customerId: string, optionalArgs: object): AdminReseller.Schema.Subscription; // List of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions. - list(): Reseller_v1.Schema.Subscriptions; + list(): AdminReseller.Schema.Subscriptions; // List of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions. - list(optionalArgs: object): Reseller_v1.Schema.Subscriptions; + list(optionalArgs: object): AdminReseller.Schema.Subscriptions; // Cancel or transfer a subscription to direct. remove(customerId: string, subscriptionId: string, deletionType: string): void; // Immediately move a 30-day free trial subscription to a paid service subscription. - startPaidService(customerId: string, subscriptionId: string): Reseller_v1.Schema.Subscription; + startPaidService(customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; // Suspends an active subscription. - suspend(customerId: string, subscriptionId: string): Reseller_v1.Schema.Subscription; + suspend(customerId: string, subscriptionId: string): AdminReseller.Schema.Subscription; } } namespace Schema { @@ -76,7 +76,7 @@ declare namespace GoogleAppsScript { kind?: string; planName?: string; purchaseOrderId?: string; - seats?: Reseller_v1.Schema.Seats; + seats?: AdminReseller.Schema.Seats; } export interface Customer { alternateEmail?: string; @@ -85,7 +85,7 @@ declare namespace GoogleAppsScript { customerId?: string; kind?: string; phoneNumber?: string; - postalAddress?: Reseller_v1.Schema.Address; + postalAddress?: AdminReseller.Schema.Address; resourceUiUrl?: string; } export interface RenewalSettings { @@ -112,21 +112,21 @@ declare namespace GoogleAppsScript { customerId?: string; dealCode?: string; kind?: string; - plan?: Reseller_v1.Schema.SubscriptionPlan; + plan?: AdminReseller.Schema.SubscriptionPlan; purchaseOrderId?: string; - renewalSettings?: Reseller_v1.Schema.RenewalSettings; + renewalSettings?: AdminReseller.Schema.RenewalSettings; resourceUiUrl?: string; - seats?: Reseller_v1.Schema.Seats; + seats?: AdminReseller.Schema.Seats; skuId?: string; skuName?: string; status?: string; subscriptionId?: string; suspensionReasons?: string[]; - transferInfo?: Reseller_v1.Schema.SubscriptionTransferInfo; - trialSettings?: Reseller_v1.Schema.SubscriptionTrialSettings; + transferInfo?: AdminReseller.Schema.SubscriptionTransferInfo; + trialSettings?: AdminReseller.Schema.SubscriptionTrialSettings; } export interface SubscriptionPlan { - commitmentInterval?: Reseller_v1.Schema.SubscriptionPlanCommitmentInterval; + commitmentInterval?: AdminReseller.Schema.SubscriptionPlanCommitmentInterval; isCommitmentPlan?: boolean; planName?: string; } @@ -145,35 +145,35 @@ declare namespace GoogleAppsScript { export interface Subscriptions { kind?: string; nextPageToken?: string; - subscriptions?: Reseller_v1.Schema.Subscription[]; + subscriptions?: AdminReseller.Schema.Subscription[]; } } } - export interface Reseller_v1 { - Customers?: Reseller_v1.Collection.CustomersCollection; - Resellernotify?: Reseller_v1.Collection.ResellernotifyCollection; - Subscriptions?: Reseller_v1.Collection.SubscriptionsCollection; + export interface AdminReseller { + Customers?: AdminReseller.Collection.CustomersCollection; + Resellernotify?: AdminReseller.Collection.ResellernotifyCollection; + Subscriptions?: AdminReseller.Collection.SubscriptionsCollection; // Create a new instance of Address - newAddress(): Reseller_v1.Schema.Address; + newAddress(): AdminReseller.Schema.Address; // Create a new instance of ChangePlanRequest - newChangePlanRequest(): Reseller_v1.Schema.ChangePlanRequest; + newChangePlanRequest(): AdminReseller.Schema.ChangePlanRequest; // Create a new instance of Customer - newCustomer(): Reseller_v1.Schema.Customer; + newCustomer(): AdminReseller.Schema.Customer; // Create a new instance of RenewalSettings - newRenewalSettings(): Reseller_v1.Schema.RenewalSettings; + newRenewalSettings(): AdminReseller.Schema.RenewalSettings; // Create a new instance of Seats - newSeats(): Reseller_v1.Schema.Seats; + newSeats(): AdminReseller.Schema.Seats; // Create a new instance of Subscription - newSubscription(): Reseller_v1.Schema.Subscription; + newSubscription(): AdminReseller.Schema.Subscription; // Create a new instance of SubscriptionPlan - newSubscriptionPlan(): Reseller_v1.Schema.SubscriptionPlan; + newSubscriptionPlan(): AdminReseller.Schema.SubscriptionPlan; // Create a new instance of SubscriptionPlanCommitmentInterval - newSubscriptionPlanCommitmentInterval(): Reseller_v1.Schema.SubscriptionPlanCommitmentInterval; + newSubscriptionPlanCommitmentInterval(): AdminReseller.Schema.SubscriptionPlanCommitmentInterval; // Create a new instance of SubscriptionTransferInfo - newSubscriptionTransferInfo(): Reseller_v1.Schema.SubscriptionTransferInfo; + newSubscriptionTransferInfo(): AdminReseller.Schema.SubscriptionTransferInfo; // Create a new instance of SubscriptionTrialSettings - newSubscriptionTrialSettings(): Reseller_v1.Schema.SubscriptionTrialSettings; + newSubscriptionTrialSettings(): AdminReseller.Schema.SubscriptionTrialSettings; } } -declare var Reseller_v1: GoogleAppsScript.Reseller_v1; \ No newline at end of file +declare var AdminReseller: GoogleAppsScript.AdminReseller; diff --git a/types/google-apps-script/apis/sheets_v4.d.ts b/types/google-apps-script/apis/sheets_v4.d.ts index 6d65b1aa90..5d2bef8429 100644 --- a/types/google-apps-script/apis/sheets_v4.d.ts +++ b/types/google-apps-script/apis/sheets_v4.d.ts @@ -5,25 +5,25 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Sheets_v4 { + namespace Sheets { namespace Collection { namespace Spreadsheets { export interface DeveloperMetadataCollection { // Returns the developer metadata with the specified ID. // The caller must specify the spreadsheet ID and the developer metadata's // unique metadataId. - get(spreadsheetId: string, metadataId: number): Sheets_v4.Schema.DeveloperMetadata; + get(spreadsheetId: string, metadataId: number): Sheets.Schema.DeveloperMetadata; // Returns all developer metadata matching the specified DataFilter. // If the provided DataFilter represents a DeveloperMetadataLookup object, // this will return all DeveloperMetadata entries selected by it. If the // DataFilter represents a location in a spreadsheet, this will return all // developer metadata associated with locations intersecting that region. - search(resource: Schema.SearchDeveloperMetadataRequest, spreadsheetId: string): Sheets_v4.Schema.SearchDeveloperMetadataResponse; + search(resource: Schema.SearchDeveloperMetadataRequest, spreadsheetId: string): Sheets.Schema.SearchDeveloperMetadataResponse; } export interface SheetsCollection { // Copies a single sheet from a spreadsheet to another spreadsheet. // Returns the properties of the newly created sheet. - copyTo(resource: Schema.CopySheetToAnotherSpreadsheetRequest, spreadsheetId: string, sheetId: number): Sheets_v4.Schema.SheetProperties; + copyTo(resource: Schema.CopySheetToAnotherSpreadsheetRequest, spreadsheetId: string, sheetId: number): Sheets.Schema.SheetProperties; } export interface ValuesCollection { // Appends values to a spreadsheet. The input range is used to search for @@ -39,7 +39,7 @@ declare namespace GoogleAppsScript { // controls how the input data will be added to the sheet (column-wise or // row-wise), it does not influence what cell the data starts being written // to. - append(resource: Schema.ValueRange, spreadsheetId: string, range: string): Sheets_v4.Schema.AppendValuesResponse; + append(resource: Schema.ValueRange, spreadsheetId: string, range: string): Sheets.Schema.AppendValuesResponse; // Appends values to a spreadsheet. The input range is used to search for // existing data and find a "table" within that range. Values will be // appended to the next row of the table, starting with the first column of @@ -53,64 +53,64 @@ declare namespace GoogleAppsScript { // controls how the input data will be added to the sheet (column-wise or // row-wise), it does not influence what cell the data starts being written // to. - append(resource: Schema.ValueRange, spreadsheetId: string, range: string, optionalArgs: object): Sheets_v4.Schema.AppendValuesResponse; + append(resource: Schema.ValueRange, spreadsheetId: string, range: string, optionalArgs: object): Sheets.Schema.AppendValuesResponse; // Clears one or more ranges of values from a spreadsheet. // The caller must specify the spreadsheet ID and one or more ranges. // Only values are cleared -- all other properties of the cell (such as // formatting, data validation, etc..) are kept. - batchClear(resource: Schema.BatchClearValuesRequest, spreadsheetId: string): Sheets_v4.Schema.BatchClearValuesResponse; + batchClear(resource: Schema.BatchClearValuesRequest, spreadsheetId: string): Sheets.Schema.BatchClearValuesResponse; // Clears one or more ranges of values from a spreadsheet. // The caller must specify the spreadsheet ID and one or more // DataFilters. Ranges matching any of the specified data // filters will be cleared. Only values are cleared -- all other properties // of the cell (such as formatting, data validation, etc..) are kept. - batchClearByDataFilter(resource: Schema.BatchClearValuesByDataFilterRequest, spreadsheetId: string): Sheets_v4.Schema.BatchClearValuesByDataFilterResponse; + batchClearByDataFilter(resource: Schema.BatchClearValuesByDataFilterRequest, spreadsheetId: string): Sheets.Schema.BatchClearValuesByDataFilterResponse; // Returns one or more ranges of values from a spreadsheet. // The caller must specify the spreadsheet ID and one or more ranges. - batchGet(spreadsheetId: string): Sheets_v4.Schema.BatchGetValuesResponse; + batchGet(spreadsheetId: string): Sheets.Schema.BatchGetValuesResponse; // Returns one or more ranges of values from a spreadsheet. // The caller must specify the spreadsheet ID and one or more ranges. - batchGet(spreadsheetId: string, optionalArgs: object): Sheets_v4.Schema.BatchGetValuesResponse; + batchGet(spreadsheetId: string, optionalArgs: object): Sheets.Schema.BatchGetValuesResponse; // Returns one or more ranges of values that match the specified data filters. // The caller must specify the spreadsheet ID and one or more // DataFilters. Ranges that match any of the data filters in // the request will be returned. - batchGetByDataFilter(resource: Schema.BatchGetValuesByDataFilterRequest, spreadsheetId: string): Sheets_v4.Schema.BatchGetValuesByDataFilterResponse; + batchGetByDataFilter(resource: Schema.BatchGetValuesByDataFilterRequest, spreadsheetId: string): Sheets.Schema.BatchGetValuesByDataFilterResponse; // Sets values in one or more ranges of a spreadsheet. // The caller must specify the spreadsheet ID, // a valueInputOption, and one or more // ValueRanges. - batchUpdate(resource: Schema.BatchUpdateValuesRequest, spreadsheetId: string): Sheets_v4.Schema.BatchUpdateValuesResponse; + batchUpdate(resource: Schema.BatchUpdateValuesRequest, spreadsheetId: string): Sheets.Schema.BatchUpdateValuesResponse; // Sets values in one or more ranges of a spreadsheet. // The caller must specify the spreadsheet ID, // a valueInputOption, and one or more // DataFilterValueRanges. - batchUpdateByDataFilter(resource: Schema.BatchUpdateValuesByDataFilterRequest, spreadsheetId: string): Sheets_v4.Schema.BatchUpdateValuesByDataFilterResponse; + batchUpdateByDataFilter(resource: Schema.BatchUpdateValuesByDataFilterRequest, spreadsheetId: string): Sheets.Schema.BatchUpdateValuesByDataFilterResponse; // Clears values from a spreadsheet. // The caller must specify the spreadsheet ID and range. // Only values are cleared -- all other properties of the cell (such as // formatting, data validation, etc..) are kept. - clear(resource: any, /* Schema.ClearValuesRequest */ spreadsheetId: string, range: string): Sheets_v4.Schema.ClearValuesResponse; + clear(resource: any, /* Schema.ClearValuesRequest */ spreadsheetId: string, range: string): Sheets.Schema.ClearValuesResponse; // Returns a range of values from a spreadsheet. // The caller must specify the spreadsheet ID and a range. - get(spreadsheetId: string, range: string): Sheets_v4.Schema.ValueRange; + get(spreadsheetId: string, range: string): Sheets.Schema.ValueRange; // Returns a range of values from a spreadsheet. // The caller must specify the spreadsheet ID and a range. - get(spreadsheetId: string, range: string, optionalArgs: object): Sheets_v4.Schema.ValueRange; + get(spreadsheetId: string, range: string, optionalArgs: object): Sheets.Schema.ValueRange; // Sets values in a range of a spreadsheet. // The caller must specify the spreadsheet ID, range, and // a valueInputOption. - update(resource: Schema.ValueRange, spreadsheetId: string, range: string): Sheets_v4.Schema.UpdateValuesResponse; + update(resource: Schema.ValueRange, spreadsheetId: string, range: string): Sheets.Schema.UpdateValuesResponse; // Sets values in a range of a spreadsheet. // The caller must specify the spreadsheet ID, range, and // a valueInputOption. - update(resource: Schema.ValueRange, spreadsheetId: string, range: string, optionalArgs: object): Sheets_v4.Schema.UpdateValuesResponse; + update(resource: Schema.ValueRange, spreadsheetId: string, range: string, optionalArgs: object): Sheets.Schema.UpdateValuesResponse; } } export interface SpreadsheetsCollection { - DeveloperMetadata?: Sheets_v4.Collection.Spreadsheets.DeveloperMetadataCollection; - Sheets?: Sheets_v4.Collection.Spreadsheets.SheetsCollection; - Values?: Sheets_v4.Collection.Spreadsheets.ValuesCollection; + DeveloperMetadata?: Sheets.Collection.Spreadsheets.DeveloperMetadataCollection; + Sheets?: Sheets.Collection.Spreadsheets.SheetsCollection; + Values?: Sheets.Collection.Spreadsheets.ValuesCollection; // Applies one or more updates to the spreadsheet. // Each request is validated before // being applied. If any request is not valid then the entire request will @@ -127,9 +127,9 @@ declare namespace GoogleAppsScript { // applied together atomically. Your changes may be altered with respect to // collaborator changes. If there are no collaborators, the spreadsheet // should reflect your changes. - batchUpdate(resource: Schema.BatchUpdateSpreadsheetRequest, spreadsheetId: string): Sheets_v4.Schema.BatchUpdateSpreadsheetResponse; + batchUpdate(resource: Schema.BatchUpdateSpreadsheetRequest, spreadsheetId: string): Sheets.Schema.BatchUpdateSpreadsheetResponse; // Creates a spreadsheet, returning the newly created spreadsheet. - create(resource: Schema.Spreadsheet): Sheets_v4.Schema.Spreadsheet; + create(resource: Schema.Spreadsheet): Sheets.Schema.Spreadsheet; // Returns the spreadsheet at the given ID. // The caller must specify the spreadsheet ID. // By default, data within grids will not be returned. @@ -146,7 +146,7 @@ declare namespace GoogleAppsScript { // Multiple ranges can be specified. Limiting the range will // return only the portions of the spreadsheet that intersect the requested // ranges. Ranges are specified using A1 notation. - get(spreadsheetId: string): Sheets_v4.Schema.Spreadsheet; + get(spreadsheetId: string): Sheets.Schema.Spreadsheet; // Returns the spreadsheet at the given ID. // The caller must specify the spreadsheet ID. // By default, data within grids will not be returned. @@ -163,7 +163,7 @@ declare namespace GoogleAppsScript { // Multiple ranges can be specified. Limiting the range will // return only the portions of the spreadsheet that intersect the requested // ranges. Ranges are specified using A1 notation. - get(spreadsheetId: string, optionalArgs: object): Sheets_v4.Schema.Spreadsheet; + get(spreadsheetId: string, optionalArgs: object): Sheets.Schema.Spreadsheet; // Returns the spreadsheet at the given ID. // The caller must specify the spreadsheet ID. // This method differs from GetSpreadsheet in that it allows selecting @@ -181,59 +181,59 @@ declare namespace GoogleAppsScript { // parameter is ignored // For large spreadsheets, it is recommended to retrieve only the specific // fields of the spreadsheet that you want. - getByDataFilter(resource: Schema.GetSpreadsheetByDataFilterRequest, spreadsheetId: string): Sheets_v4.Schema.Spreadsheet; + getByDataFilter(resource: Schema.GetSpreadsheetByDataFilterRequest, spreadsheetId: string): Sheets.Schema.Spreadsheet; } } namespace Schema { export interface AddBandingRequest { - bandedRange?: Sheets_v4.Schema.BandedRange; + bandedRange?: Sheets.Schema.BandedRange; } export interface AddBandingResponse { - bandedRange?: Sheets_v4.Schema.BandedRange; + bandedRange?: Sheets.Schema.BandedRange; } export interface AddChartRequest { - chart?: Sheets_v4.Schema.EmbeddedChart; + chart?: Sheets.Schema.EmbeddedChart; } export interface AddChartResponse { - chart?: Sheets_v4.Schema.EmbeddedChart; + chart?: Sheets.Schema.EmbeddedChart; } export interface AddConditionalFormatRuleRequest { index?: number; - rule?: Sheets_v4.Schema.ConditionalFormatRule; + rule?: Sheets.Schema.ConditionalFormatRule; } export interface AddDimensionGroupRequest { - range?: Sheets_v4.Schema.DimensionRange; + range?: Sheets.Schema.DimensionRange; } export interface AddDimensionGroupResponse { - dimensionGroups?: Sheets_v4.Schema.DimensionGroup[]; + dimensionGroups?: Sheets.Schema.DimensionGroup[]; } export interface AddFilterViewRequest { - filter?: Sheets_v4.Schema.FilterView; + filter?: Sheets.Schema.FilterView; } export interface AddFilterViewResponse { - filter?: Sheets_v4.Schema.FilterView; + filter?: Sheets.Schema.FilterView; } export interface AddNamedRangeRequest { - namedRange?: Sheets_v4.Schema.NamedRange; + namedRange?: Sheets.Schema.NamedRange; } export interface AddNamedRangeResponse { - namedRange?: Sheets_v4.Schema.NamedRange; + namedRange?: Sheets.Schema.NamedRange; } export interface AddProtectedRangeRequest { - protectedRange?: Sheets_v4.Schema.ProtectedRange; + protectedRange?: Sheets.Schema.ProtectedRange; } export interface AddProtectedRangeResponse { - protectedRange?: Sheets_v4.Schema.ProtectedRange; + protectedRange?: Sheets.Schema.ProtectedRange; } export interface AddSheetRequest { - properties?: Sheets_v4.Schema.SheetProperties; + properties?: Sheets.Schema.SheetProperties; } export interface AddSheetResponse { - properties?: Sheets_v4.Schema.SheetProperties; + properties?: Sheets.Schema.SheetProperties; } export interface AppendCellsRequest { fields?: string; - rows?: Sheets_v4.Schema.RowData[]; + rows?: Sheets.Schema.RowData[]; sheetId?: number; } export interface AppendDimensionRequest { @@ -244,65 +244,65 @@ declare namespace GoogleAppsScript { export interface AppendValuesResponse { spreadsheetId?: string; tableRange?: string; - updates?: Sheets_v4.Schema.UpdateValuesResponse; + updates?: Sheets.Schema.UpdateValuesResponse; } export interface AutoFillRequest { - range?: Sheets_v4.Schema.GridRange; - sourceAndDestination?: Sheets_v4.Schema.SourceAndDestination; + range?: Sheets.Schema.GridRange; + sourceAndDestination?: Sheets.Schema.SourceAndDestination; useAlternateSeries?: boolean; } export interface AutoResizeDimensionsRequest { - dimensions?: Sheets_v4.Schema.DimensionRange; + dimensions?: Sheets.Schema.DimensionRange; } export interface BandedRange { bandedRangeId?: number; - columnProperties?: Sheets_v4.Schema.BandingProperties; - range?: Sheets_v4.Schema.GridRange; - rowProperties?: Sheets_v4.Schema.BandingProperties; + columnProperties?: Sheets.Schema.BandingProperties; + range?: Sheets.Schema.GridRange; + rowProperties?: Sheets.Schema.BandingProperties; } export interface BandingProperties { - firstBandColor?: Sheets_v4.Schema.Color; - footerColor?: Sheets_v4.Schema.Color; - headerColor?: Sheets_v4.Schema.Color; - secondBandColor?: Sheets_v4.Schema.Color; + firstBandColor?: Sheets.Schema.Color; + footerColor?: Sheets.Schema.Color; + headerColor?: Sheets.Schema.Color; + secondBandColor?: Sheets.Schema.Color; } export interface BasicChartAxis { - format?: Sheets_v4.Schema.TextFormat; + format?: Sheets.Schema.TextFormat; position?: string; title?: string; - titleTextPosition?: Sheets_v4.Schema.TextPosition; + titleTextPosition?: Sheets.Schema.TextPosition; } export interface BasicChartDomain { - domain?: Sheets_v4.Schema.ChartData; + domain?: Sheets.Schema.ChartData; reversed?: boolean; } export interface BasicChartSeries { - color?: Sheets_v4.Schema.Color; - lineStyle?: Sheets_v4.Schema.LineStyle; - series?: Sheets_v4.Schema.ChartData; + color?: Sheets.Schema.Color; + lineStyle?: Sheets.Schema.LineStyle; + series?: Sheets.Schema.ChartData; targetAxis?: string; type?: string; } export interface BasicChartSpec { - axis?: Sheets_v4.Schema.BasicChartAxis[]; + axis?: Sheets.Schema.BasicChartAxis[]; chartType?: string; compareMode?: string; - domains?: Sheets_v4.Schema.BasicChartDomain[]; + domains?: Sheets.Schema.BasicChartDomain[]; headerCount?: number; interpolateNulls?: boolean; legendPosition?: string; lineSmoothing?: boolean; - series?: Sheets_v4.Schema.BasicChartSeries[]; + series?: Sheets.Schema.BasicChartSeries[]; stackedType?: string; threeDimensional?: boolean; } export interface BasicFilter { criteria?: object; - range?: Sheets_v4.Schema.GridRange; - sortSpecs?: Sheets_v4.Schema.SortSpec[]; + range?: Sheets.Schema.GridRange; + sortSpecs?: Sheets.Schema.SortSpec[]; } export interface BatchClearValuesByDataFilterRequest { - dataFilters?: Sheets_v4.Schema.DataFilter[]; + dataFilters?: Sheets.Schema.DataFilter[]; } export interface BatchClearValuesByDataFilterResponse { clearedRanges?: string[]; @@ -316,39 +316,39 @@ declare namespace GoogleAppsScript { spreadsheetId?: string; } export interface BatchGetValuesByDataFilterRequest { - dataFilters?: Sheets_v4.Schema.DataFilter[]; + dataFilters?: Sheets.Schema.DataFilter[]; dateTimeRenderOption?: string; majorDimension?: string; valueRenderOption?: string; } export interface BatchGetValuesByDataFilterResponse { spreadsheetId?: string; - valueRanges?: Sheets_v4.Schema.MatchedValueRange[]; + valueRanges?: Sheets.Schema.MatchedValueRange[]; } export interface BatchGetValuesResponse { spreadsheetId?: string; - valueRanges?: Sheets_v4.Schema.ValueRange[]; + valueRanges?: Sheets.Schema.ValueRange[]; } export interface BatchUpdateSpreadsheetRequest { includeSpreadsheetInResponse?: boolean; - requests?: Sheets_v4.Schema.Request[]; + requests?: Sheets.Schema.Request[]; responseIncludeGridData?: boolean; responseRanges?: string[]; } export interface BatchUpdateSpreadsheetResponse { - replies?: Sheets_v4.Schema.Response[]; + replies?: Sheets.Schema.Response[]; spreadsheetId?: string; - updatedSpreadsheet?: Sheets_v4.Schema.Spreadsheet; + updatedSpreadsheet?: Sheets.Schema.Spreadsheet; } export interface BatchUpdateValuesByDataFilterRequest { - data?: Sheets_v4.Schema.DataFilterValueRange[]; + data?: Sheets.Schema.DataFilterValueRange[]; includeValuesInResponse?: boolean; responseDateTimeRenderOption?: string; responseValueRenderOption?: string; valueInputOption?: string; } export interface BatchUpdateValuesByDataFilterResponse { - responses?: Sheets_v4.Schema.UpdateValuesByDataFilterResponse[]; + responses?: Sheets.Schema.UpdateValuesByDataFilterResponse[]; spreadsheetId?: string; totalUpdatedCells?: number; totalUpdatedColumns?: number; @@ -356,14 +356,14 @@ declare namespace GoogleAppsScript { totalUpdatedSheets?: number; } export interface BatchUpdateValuesRequest { - data?: Sheets_v4.Schema.ValueRange[]; + data?: Sheets.Schema.ValueRange[]; includeValuesInResponse?: boolean; responseDateTimeRenderOption?: string; responseValueRenderOption?: string; valueInputOption?: string; } export interface BatchUpdateValuesResponse { - responses?: Sheets_v4.Schema.UpdateValuesResponse[]; + responses?: Sheets.Schema.UpdateValuesResponse[]; spreadsheetId?: string; totalUpdatedCells?: number; totalUpdatedColumns?: number; @@ -372,104 +372,104 @@ declare namespace GoogleAppsScript { } export interface BooleanCondition { type?: string; - values?: Sheets_v4.Schema.ConditionValue[]; + values?: Sheets.Schema.ConditionValue[]; } export interface BooleanRule { - condition?: Sheets_v4.Schema.BooleanCondition; - format?: Sheets_v4.Schema.CellFormat; + condition?: Sheets.Schema.BooleanCondition; + format?: Sheets.Schema.CellFormat; } export interface Border { - color?: Sheets_v4.Schema.Color; + color?: Sheets.Schema.Color; style?: string; width?: number; } export interface Borders { - bottom?: Sheets_v4.Schema.Border; - left?: Sheets_v4.Schema.Border; - right?: Sheets_v4.Schema.Border; - top?: Sheets_v4.Schema.Border; + bottom?: Sheets.Schema.Border; + left?: Sheets.Schema.Border; + right?: Sheets.Schema.Border; + top?: Sheets.Schema.Border; } export interface BubbleChartSpec { - bubbleBorderColor?: Sheets_v4.Schema.Color; - bubbleLabels?: Sheets_v4.Schema.ChartData; + bubbleBorderColor?: Sheets.Schema.Color; + bubbleLabels?: Sheets.Schema.ChartData; bubbleMaxRadiusSize?: number; bubbleMinRadiusSize?: number; bubbleOpacity?: Number; - bubbleSizes?: Sheets_v4.Schema.ChartData; - bubbleTextStyle?: Sheets_v4.Schema.TextFormat; - domain?: Sheets_v4.Schema.ChartData; - groupIds?: Sheets_v4.Schema.ChartData; + bubbleSizes?: Sheets.Schema.ChartData; + bubbleTextStyle?: Sheets.Schema.TextFormat; + domain?: Sheets.Schema.ChartData; + groupIds?: Sheets.Schema.ChartData; legendPosition?: string; - series?: Sheets_v4.Schema.ChartData; + series?: Sheets.Schema.ChartData; } export interface CandlestickChartSpec { - data?: Sheets_v4.Schema.CandlestickData[]; - domain?: Sheets_v4.Schema.CandlestickDomain; + data?: Sheets.Schema.CandlestickData[]; + domain?: Sheets.Schema.CandlestickDomain; } export interface CandlestickData { - closeSeries?: Sheets_v4.Schema.CandlestickSeries; - highSeries?: Sheets_v4.Schema.CandlestickSeries; - lowSeries?: Sheets_v4.Schema.CandlestickSeries; - openSeries?: Sheets_v4.Schema.CandlestickSeries; + closeSeries?: Sheets.Schema.CandlestickSeries; + highSeries?: Sheets.Schema.CandlestickSeries; + lowSeries?: Sheets.Schema.CandlestickSeries; + openSeries?: Sheets.Schema.CandlestickSeries; } export interface CandlestickDomain { - data?: Sheets_v4.Schema.ChartData; + data?: Sheets.Schema.ChartData; reversed?: boolean; } export interface CandlestickSeries { - data?: Sheets_v4.Schema.ChartData; + data?: Sheets.Schema.ChartData; } export interface CellData { - dataValidation?: Sheets_v4.Schema.DataValidationRule; - effectiveFormat?: Sheets_v4.Schema.CellFormat; - effectiveValue?: Sheets_v4.Schema.ExtendedValue; + dataValidation?: Sheets.Schema.DataValidationRule; + effectiveFormat?: Sheets.Schema.CellFormat; + effectiveValue?: Sheets.Schema.ExtendedValue; formattedValue?: string; hyperlink?: string; note?: string; - pivotTable?: Sheets_v4.Schema.PivotTable; - textFormatRuns?: Sheets_v4.Schema.TextFormatRun[]; - userEnteredFormat?: Sheets_v4.Schema.CellFormat; - userEnteredValue?: Sheets_v4.Schema.ExtendedValue; + pivotTable?: Sheets.Schema.PivotTable; + textFormatRuns?: Sheets.Schema.TextFormatRun[]; + userEnteredFormat?: Sheets.Schema.CellFormat; + userEnteredValue?: Sheets.Schema.ExtendedValue; } export interface CellFormat { - backgroundColor?: Sheets_v4.Schema.Color; - borders?: Sheets_v4.Schema.Borders; + backgroundColor?: Sheets.Schema.Color; + borders?: Sheets.Schema.Borders; horizontalAlignment?: string; hyperlinkDisplayType?: string; - numberFormat?: Sheets_v4.Schema.NumberFormat; - padding?: Sheets_v4.Schema.Padding; + numberFormat?: Sheets.Schema.NumberFormat; + padding?: Sheets.Schema.Padding; textDirection?: string; - textFormat?: Sheets_v4.Schema.TextFormat; - textRotation?: Sheets_v4.Schema.TextRotation; + textFormat?: Sheets.Schema.TextFormat; + textRotation?: Sheets.Schema.TextRotation; verticalAlignment?: string; wrapStrategy?: string; } export interface ChartData { - sourceRange?: Sheets_v4.Schema.ChartSourceRange; + sourceRange?: Sheets.Schema.ChartSourceRange; } export interface ChartSourceRange { - sources?: Sheets_v4.Schema.GridRange[]; + sources?: Sheets.Schema.GridRange[]; } export interface ChartSpec { altText?: string; - backgroundColor?: Sheets_v4.Schema.Color; - basicChart?: Sheets_v4.Schema.BasicChartSpec; - bubbleChart?: Sheets_v4.Schema.BubbleChartSpec; - candlestickChart?: Sheets_v4.Schema.CandlestickChartSpec; + backgroundColor?: Sheets.Schema.Color; + basicChart?: Sheets.Schema.BasicChartSpec; + bubbleChart?: Sheets.Schema.BubbleChartSpec; + candlestickChart?: Sheets.Schema.CandlestickChartSpec; fontName?: string; hiddenDimensionStrategy?: string; - histogramChart?: Sheets_v4.Schema.HistogramChartSpec; + histogramChart?: Sheets.Schema.HistogramChartSpec; maximized?: boolean; - orgChart?: Sheets_v4.Schema.OrgChartSpec; - pieChart?: Sheets_v4.Schema.PieChartSpec; + orgChart?: Sheets.Schema.OrgChartSpec; + pieChart?: Sheets.Schema.PieChartSpec; subtitle?: string; - subtitleTextFormat?: Sheets_v4.Schema.TextFormat; - subtitleTextPosition?: Sheets_v4.Schema.TextPosition; + subtitleTextFormat?: Sheets.Schema.TextFormat; + subtitleTextPosition?: Sheets.Schema.TextPosition; title?: string; - titleTextFormat?: Sheets_v4.Schema.TextFormat; - titleTextPosition?: Sheets_v4.Schema.TextPosition; - treemapChart?: Sheets_v4.Schema.TreemapChartSpec; - waterfallChart?: Sheets_v4.Schema.WaterfallChartSpec; + titleTextFormat?: Sheets.Schema.TextFormat; + titleTextPosition?: Sheets.Schema.TextPosition; + treemapChart?: Sheets.Schema.TreemapChartSpec; + waterfallChart?: Sheets.Schema.WaterfallChartSpec; } export interface ClearBasicFilterRequest { sheetId?: number; @@ -489,42 +489,42 @@ declare namespace GoogleAppsScript { userEnteredValue?: string; } export interface ConditionalFormatRule { - booleanRule?: Sheets_v4.Schema.BooleanRule; - gradientRule?: Sheets_v4.Schema.GradientRule; - ranges?: Sheets_v4.Schema.GridRange[]; + booleanRule?: Sheets.Schema.BooleanRule; + gradientRule?: Sheets.Schema.GradientRule; + ranges?: Sheets.Schema.GridRange[]; } export interface CopyPasteRequest { - destination?: Sheets_v4.Schema.GridRange; + destination?: Sheets.Schema.GridRange; pasteOrientation?: string; pasteType?: string; - source?: Sheets_v4.Schema.GridRange; + source?: Sheets.Schema.GridRange; } export interface CopySheetToAnotherSpreadsheetRequest { destinationSpreadsheetId?: string; } export interface CreateDeveloperMetadataRequest { - developerMetadata?: Sheets_v4.Schema.DeveloperMetadata; + developerMetadata?: Sheets.Schema.DeveloperMetadata; } export interface CreateDeveloperMetadataResponse { - developerMetadata?: Sheets_v4.Schema.DeveloperMetadata; + developerMetadata?: Sheets.Schema.DeveloperMetadata; } export interface CutPasteRequest { - destination?: Sheets_v4.Schema.GridCoordinate; + destination?: Sheets.Schema.GridCoordinate; pasteType?: string; - source?: Sheets_v4.Schema.GridRange; + source?: Sheets.Schema.GridRange; } export interface DataFilter { a1Range?: string; - developerMetadataLookup?: Sheets_v4.Schema.DeveloperMetadataLookup; - gridRange?: Sheets_v4.Schema.GridRange; + developerMetadataLookup?: Sheets.Schema.DeveloperMetadataLookup; + gridRange?: Sheets.Schema.GridRange; } export interface DataFilterValueRange { - dataFilter?: Sheets_v4.Schema.DataFilter; + dataFilter?: Sheets.Schema.DataFilter; majorDimension?: string; values?: Object[][]; } export interface DataValidationRule { - condition?: Sheets_v4.Schema.BooleanCondition; + condition?: Sheets.Schema.BooleanCondition; inputMessage?: string; showCustomUi?: boolean; strict?: boolean; @@ -540,22 +540,22 @@ declare namespace GoogleAppsScript { sheetId?: number; } export interface DeleteConditionalFormatRuleResponse { - rule?: Sheets_v4.Schema.ConditionalFormatRule; + rule?: Sheets.Schema.ConditionalFormatRule; } export interface DeleteDeveloperMetadataRequest { - dataFilter?: Sheets_v4.Schema.DataFilter; + dataFilter?: Sheets.Schema.DataFilter; } export interface DeleteDeveloperMetadataResponse { - deletedDeveloperMetadata?: Sheets_v4.Schema.DeveloperMetadata[]; + deletedDeveloperMetadata?: Sheets.Schema.DeveloperMetadata[]; } export interface DeleteDimensionGroupRequest { - range?: Sheets_v4.Schema.DimensionRange; + range?: Sheets.Schema.DimensionRange; } export interface DeleteDimensionGroupResponse { - dimensionGroups?: Sheets_v4.Schema.DimensionGroup[]; + dimensionGroups?: Sheets.Schema.DimensionGroup[]; } export interface DeleteDimensionRequest { - range?: Sheets_v4.Schema.DimensionRange; + range?: Sheets.Schema.DimensionRange; } export interface DeleteEmbeddedObjectRequest { objectId?: number; @@ -570,21 +570,21 @@ declare namespace GoogleAppsScript { protectedRangeId?: number; } export interface DeleteRangeRequest { - range?: Sheets_v4.Schema.GridRange; + range?: Sheets.Schema.GridRange; shiftDimension?: string; } export interface DeleteSheetRequest { sheetId?: number; } export interface DeveloperMetadata { - location?: Sheets_v4.Schema.DeveloperMetadataLocation; + location?: Sheets.Schema.DeveloperMetadataLocation; metadataId?: number; metadataKey?: string; metadataValue?: string; visibility?: string; } export interface DeveloperMetadataLocation { - dimensionRange?: Sheets_v4.Schema.DimensionRange; + dimensionRange?: Sheets.Schema.DimensionRange; locationType?: string; sheetId?: number; spreadsheet?: boolean; @@ -594,17 +594,17 @@ declare namespace GoogleAppsScript { locationType?: string; metadataId?: number; metadataKey?: string; - metadataLocation?: Sheets_v4.Schema.DeveloperMetadataLocation; + metadataLocation?: Sheets.Schema.DeveloperMetadataLocation; metadataValue?: string; visibility?: string; } export interface DimensionGroup { collapsed?: boolean; depth?: number; - range?: Sheets_v4.Schema.DimensionRange; + range?: Sheets.Schema.DimensionRange; } export interface DimensionProperties { - developerMetadata?: Sheets_v4.Schema.DeveloperMetadata[]; + developerMetadata?: Sheets.Schema.DeveloperMetadata[]; hiddenByFilter?: boolean; hiddenByUser?: boolean; pixelSize?: number; @@ -619,7 +619,7 @@ declare namespace GoogleAppsScript { filterId?: number; } export interface DuplicateFilterViewResponse { - filter?: Sheets_v4.Schema.FilterView; + filter?: Sheets.Schema.FilterView; } export interface DuplicateSheetRequest { insertSheetIndex?: number; @@ -628,7 +628,7 @@ declare namespace GoogleAppsScript { sourceSheetId?: number; } export interface DuplicateSheetResponse { - properties?: Sheets_v4.Schema.SheetProperties; + properties?: Sheets.Schema.SheetProperties; } export interface Editors { domainUsersCanEdit?: boolean; @@ -637,12 +637,12 @@ declare namespace GoogleAppsScript { } export interface EmbeddedChart { chartId?: number; - position?: Sheets_v4.Schema.EmbeddedObjectPosition; - spec?: Sheets_v4.Schema.ChartSpec; + position?: Sheets.Schema.EmbeddedObjectPosition; + spec?: Sheets.Schema.ChartSpec; } export interface EmbeddedObjectPosition { newSheet?: boolean; - overlayPosition?: Sheets_v4.Schema.OverlayPosition; + overlayPosition?: Sheets.Schema.OverlayPosition; sheetId?: number; } export interface ErrorValue { @@ -651,21 +651,21 @@ declare namespace GoogleAppsScript { } export interface ExtendedValue { boolValue?: boolean; - errorValue?: Sheets_v4.Schema.ErrorValue; + errorValue?: Sheets.Schema.ErrorValue; formulaValue?: string; numberValue?: Number; stringValue?: string; } export interface FilterCriteria { - condition?: Sheets_v4.Schema.BooleanCondition; + condition?: Sheets.Schema.BooleanCondition; hiddenValues?: string[]; } export interface FilterView { criteria?: object; filterViewId?: number; namedRangeId?: string; - range?: Sheets_v4.Schema.GridRange; - sortSpecs?: Sheets_v4.Schema.SortSpec[]; + range?: Sheets.Schema.GridRange; + sortSpecs?: Sheets.Schema.SortSpec[]; title?: string; } export interface FindReplaceRequest { @@ -674,7 +674,7 @@ declare namespace GoogleAppsScript { includeFormulas?: boolean; matchCase?: boolean; matchEntireCell?: boolean; - range?: Sheets_v4.Schema.GridRange; + range?: Sheets.Schema.GridRange; replacement?: string; searchByRegex?: boolean; sheetId?: number; @@ -687,13 +687,13 @@ declare namespace GoogleAppsScript { valuesChanged?: number; } export interface GetSpreadsheetByDataFilterRequest { - dataFilters?: Sheets_v4.Schema.DataFilter[]; + dataFilters?: Sheets.Schema.DataFilter[]; includeGridData?: boolean; } export interface GradientRule { - maxpoint?: Sheets_v4.Schema.InterpolationPoint; - midpoint?: Sheets_v4.Schema.InterpolationPoint; - minpoint?: Sheets_v4.Schema.InterpolationPoint; + maxpoint?: Sheets.Schema.InterpolationPoint; + midpoint?: Sheets.Schema.InterpolationPoint; + minpoint?: Sheets.Schema.InterpolationPoint; } export interface GridCoordinate { columnIndex?: number; @@ -701,9 +701,9 @@ declare namespace GoogleAppsScript { sheetId?: number; } export interface GridData { - columnMetadata?: Sheets_v4.Schema.DimensionProperties[]; - rowData?: Sheets_v4.Schema.RowData[]; - rowMetadata?: Sheets_v4.Schema.DimensionProperties[]; + columnMetadata?: Sheets.Schema.DimensionProperties[]; + rowData?: Sheets.Schema.RowData[]; + rowMetadata?: Sheets.Schema.DimensionProperties[]; startColumn?: number; startRow?: number; } @@ -727,7 +727,7 @@ declare namespace GoogleAppsScript { bucketSize?: Number; legendPosition?: string; outlierPercentile?: Number; - series?: Sheets_v4.Schema.HistogramSeries[]; + series?: Sheets.Schema.HistogramSeries[]; showItemDividers?: boolean; } export interface HistogramRule { @@ -736,19 +736,19 @@ declare namespace GoogleAppsScript { start?: Number; } export interface HistogramSeries { - barColor?: Sheets_v4.Schema.Color; - data?: Sheets_v4.Schema.ChartData; + barColor?: Sheets.Schema.Color; + data?: Sheets.Schema.ChartData; } export interface InsertDimensionRequest { inheritFromBefore?: boolean; - range?: Sheets_v4.Schema.DimensionRange; + range?: Sheets.Schema.DimensionRange; } export interface InsertRangeRequest { - range?: Sheets_v4.Schema.GridRange; + range?: Sheets.Schema.GridRange; shiftDimension?: string; } export interface InterpolationPoint { - color?: Sheets_v4.Schema.Color; + color?: Sheets.Schema.Color; type?: string; value?: string; } @@ -761,47 +761,47 @@ declare namespace GoogleAppsScript { width?: number; } export interface ManualRule { - groups?: Sheets_v4.Schema.ManualRuleGroup[]; + groups?: Sheets.Schema.ManualRuleGroup[]; } export interface ManualRuleGroup { - groupName?: Sheets_v4.Schema.ExtendedValue; - items?: Sheets_v4.Schema.ExtendedValue[]; + groupName?: Sheets.Schema.ExtendedValue; + items?: Sheets.Schema.ExtendedValue[]; } export interface MatchedDeveloperMetadata { - dataFilters?: Sheets_v4.Schema.DataFilter[]; - developerMetadata?: Sheets_v4.Schema.DeveloperMetadata; + dataFilters?: Sheets.Schema.DataFilter[]; + developerMetadata?: Sheets.Schema.DeveloperMetadata; } export interface MatchedValueRange { - dataFilters?: Sheets_v4.Schema.DataFilter[]; - valueRange?: Sheets_v4.Schema.ValueRange; + dataFilters?: Sheets.Schema.DataFilter[]; + valueRange?: Sheets.Schema.ValueRange; } export interface MergeCellsRequest { mergeType?: string; - range?: Sheets_v4.Schema.GridRange; + range?: Sheets.Schema.GridRange; } export interface MoveDimensionRequest { destinationIndex?: number; - source?: Sheets_v4.Schema.DimensionRange; + source?: Sheets.Schema.DimensionRange; } export interface NamedRange { name?: string; namedRangeId?: string; - range?: Sheets_v4.Schema.GridRange; + range?: Sheets.Schema.GridRange; } export interface NumberFormat { pattern?: string; type?: string; } export interface OrgChartSpec { - labels?: Sheets_v4.Schema.ChartData; - nodeColor?: Sheets_v4.Schema.Color; + labels?: Sheets.Schema.ChartData; + nodeColor?: Sheets.Schema.Color; nodeSize?: string; - parentLabels?: Sheets_v4.Schema.ChartData; - selectedNodeColor?: Sheets_v4.Schema.Color; - tooltips?: Sheets_v4.Schema.ChartData; + parentLabels?: Sheets.Schema.ChartData; + selectedNodeColor?: Sheets.Schema.Color; + tooltips?: Sheets.Schema.ChartData; } export interface OverlayPosition { - anchorCell?: Sheets_v4.Schema.GridCoordinate; + anchorCell?: Sheets.Schema.GridCoordinate; heightPixels?: number; offsetXPixels?: number; offsetYPixels?: number; @@ -814,52 +814,52 @@ declare namespace GoogleAppsScript { top?: number; } export interface PasteDataRequest { - coordinate?: Sheets_v4.Schema.GridCoordinate; + coordinate?: Sheets.Schema.GridCoordinate; data?: string; delimiter?: string; html?: boolean; type?: string; } export interface PieChartSpec { - domain?: Sheets_v4.Schema.ChartData; + domain?: Sheets.Schema.ChartData; legendPosition?: string; pieHole?: Number; - series?: Sheets_v4.Schema.ChartData; + series?: Sheets.Schema.ChartData; threeDimensional?: boolean; } export interface PivotFilterCriteria { visibleValues?: string[]; } export interface PivotGroup { - groupRule?: Sheets_v4.Schema.PivotGroupRule; + groupRule?: Sheets.Schema.PivotGroupRule; label?: string; repeatHeadings?: boolean; showTotals?: boolean; sortOrder?: string; sourceColumnOffset?: number; - valueBucket?: Sheets_v4.Schema.PivotGroupSortValueBucket; - valueMetadata?: Sheets_v4.Schema.PivotGroupValueMetadata[]; + valueBucket?: Sheets.Schema.PivotGroupSortValueBucket; + valueMetadata?: Sheets.Schema.PivotGroupValueMetadata[]; } export interface PivotGroupRule { - dateTimeRule?: Sheets_v4.Schema.DateTimeRule; - histogramRule?: Sheets_v4.Schema.HistogramRule; - manualRule?: Sheets_v4.Schema.ManualRule; + dateTimeRule?: Sheets.Schema.DateTimeRule; + histogramRule?: Sheets.Schema.HistogramRule; + manualRule?: Sheets.Schema.ManualRule; } export interface PivotGroupSortValueBucket { - buckets?: Sheets_v4.Schema.ExtendedValue[]; + buckets?: Sheets.Schema.ExtendedValue[]; valuesIndex?: number; } export interface PivotGroupValueMetadata { collapsed?: boolean; - value?: Sheets_v4.Schema.ExtendedValue; + value?: Sheets.Schema.ExtendedValue; } export interface PivotTable { - columns?: Sheets_v4.Schema.PivotGroup[]; + columns?: Sheets.Schema.PivotGroup[]; criteria?: object; - rows?: Sheets_v4.Schema.PivotGroup[]; - source?: Sheets_v4.Schema.GridRange; + rows?: Sheets.Schema.PivotGroup[]; + source?: Sheets.Schema.GridRange; valueLayout?: string; - values?: Sheets_v4.Schema.PivotValue[]; + values?: Sheets.Schema.PivotValue[]; } export interface PivotValue { calculatedDisplayType?: string; @@ -870,142 +870,142 @@ declare namespace GoogleAppsScript { } export interface ProtectedRange { description?: string; - editors?: Sheets_v4.Schema.Editors; + editors?: Sheets.Schema.Editors; namedRangeId?: string; protectedRangeId?: number; - range?: Sheets_v4.Schema.GridRange; + range?: Sheets.Schema.GridRange; requestingUserCanEdit?: boolean; - unprotectedRanges?: Sheets_v4.Schema.GridRange[]; + unprotectedRanges?: Sheets.Schema.GridRange[]; warningOnly?: boolean; } export interface RandomizeRangeRequest { - range?: Sheets_v4.Schema.GridRange; + range?: Sheets.Schema.GridRange; } export interface RepeatCellRequest { - cell?: Sheets_v4.Schema.CellData; + cell?: Sheets.Schema.CellData; fields?: string; - range?: Sheets_v4.Schema.GridRange; + range?: Sheets.Schema.GridRange; } export interface Request { - addBanding?: Sheets_v4.Schema.AddBandingRequest; - addChart?: Sheets_v4.Schema.AddChartRequest; - addConditionalFormatRule?: Sheets_v4.Schema.AddConditionalFormatRuleRequest; - addDimensionGroup?: Sheets_v4.Schema.AddDimensionGroupRequest; - addFilterView?: Sheets_v4.Schema.AddFilterViewRequest; - addNamedRange?: Sheets_v4.Schema.AddNamedRangeRequest; - addProtectedRange?: Sheets_v4.Schema.AddProtectedRangeRequest; - addSheet?: Sheets_v4.Schema.AddSheetRequest; - appendCells?: Sheets_v4.Schema.AppendCellsRequest; - appendDimension?: Sheets_v4.Schema.AppendDimensionRequest; - autoFill?: Sheets_v4.Schema.AutoFillRequest; - autoResizeDimensions?: Sheets_v4.Schema.AutoResizeDimensionsRequest; - clearBasicFilter?: Sheets_v4.Schema.ClearBasicFilterRequest; - copyPaste?: Sheets_v4.Schema.CopyPasteRequest; - createDeveloperMetadata?: Sheets_v4.Schema.CreateDeveloperMetadataRequest; - cutPaste?: Sheets_v4.Schema.CutPasteRequest; - deleteBanding?: Sheets_v4.Schema.DeleteBandingRequest; - deleteConditionalFormatRule?: Sheets_v4.Schema.DeleteConditionalFormatRuleRequest; - deleteDeveloperMetadata?: Sheets_v4.Schema.DeleteDeveloperMetadataRequest; - deleteDimension?: Sheets_v4.Schema.DeleteDimensionRequest; - deleteDimensionGroup?: Sheets_v4.Schema.DeleteDimensionGroupRequest; - deleteEmbeddedObject?: Sheets_v4.Schema.DeleteEmbeddedObjectRequest; - deleteFilterView?: Sheets_v4.Schema.DeleteFilterViewRequest; - deleteNamedRange?: Sheets_v4.Schema.DeleteNamedRangeRequest; - deleteProtectedRange?: Sheets_v4.Schema.DeleteProtectedRangeRequest; - deleteRange?: Sheets_v4.Schema.DeleteRangeRequest; - deleteSheet?: Sheets_v4.Schema.DeleteSheetRequest; - duplicateFilterView?: Sheets_v4.Schema.DuplicateFilterViewRequest; - duplicateSheet?: Sheets_v4.Schema.DuplicateSheetRequest; - findReplace?: Sheets_v4.Schema.FindReplaceRequest; - insertDimension?: Sheets_v4.Schema.InsertDimensionRequest; - insertRange?: Sheets_v4.Schema.InsertRangeRequest; - mergeCells?: Sheets_v4.Schema.MergeCellsRequest; - moveDimension?: Sheets_v4.Schema.MoveDimensionRequest; - pasteData?: Sheets_v4.Schema.PasteDataRequest; - randomizeRange?: Sheets_v4.Schema.RandomizeRangeRequest; - repeatCell?: Sheets_v4.Schema.RepeatCellRequest; - setBasicFilter?: Sheets_v4.Schema.SetBasicFilterRequest; - setDataValidation?: Sheets_v4.Schema.SetDataValidationRequest; - sortRange?: Sheets_v4.Schema.SortRangeRequest; - textToColumns?: Sheets_v4.Schema.TextToColumnsRequest; - unmergeCells?: Sheets_v4.Schema.UnmergeCellsRequest; - updateBanding?: Sheets_v4.Schema.UpdateBandingRequest; - updateBorders?: Sheets_v4.Schema.UpdateBordersRequest; - updateCells?: Sheets_v4.Schema.UpdateCellsRequest; - updateChartSpec?: Sheets_v4.Schema.UpdateChartSpecRequest; - updateConditionalFormatRule?: Sheets_v4.Schema.UpdateConditionalFormatRuleRequest; - updateDeveloperMetadata?: Sheets_v4.Schema.UpdateDeveloperMetadataRequest; - updateDimensionGroup?: Sheets_v4.Schema.UpdateDimensionGroupRequest; - updateDimensionProperties?: Sheets_v4.Schema.UpdateDimensionPropertiesRequest; - updateEmbeddedObjectPosition?: Sheets_v4.Schema.UpdateEmbeddedObjectPositionRequest; - updateFilterView?: Sheets_v4.Schema.UpdateFilterViewRequest; - updateNamedRange?: Sheets_v4.Schema.UpdateNamedRangeRequest; - updateProtectedRange?: Sheets_v4.Schema.UpdateProtectedRangeRequest; - updateSheetProperties?: Sheets_v4.Schema.UpdateSheetPropertiesRequest; - updateSpreadsheetProperties?: Sheets_v4.Schema.UpdateSpreadsheetPropertiesRequest; + addBanding?: Sheets.Schema.AddBandingRequest; + addChart?: Sheets.Schema.AddChartRequest; + addConditionalFormatRule?: Sheets.Schema.AddConditionalFormatRuleRequest; + addDimensionGroup?: Sheets.Schema.AddDimensionGroupRequest; + addFilterView?: Sheets.Schema.AddFilterViewRequest; + addNamedRange?: Sheets.Schema.AddNamedRangeRequest; + addProtectedRange?: Sheets.Schema.AddProtectedRangeRequest; + addSheet?: Sheets.Schema.AddSheetRequest; + appendCells?: Sheets.Schema.AppendCellsRequest; + appendDimension?: Sheets.Schema.AppendDimensionRequest; + autoFill?: Sheets.Schema.AutoFillRequest; + autoResizeDimensions?: Sheets.Schema.AutoResizeDimensionsRequest; + clearBasicFilter?: Sheets.Schema.ClearBasicFilterRequest; + copyPaste?: Sheets.Schema.CopyPasteRequest; + createDeveloperMetadata?: Sheets.Schema.CreateDeveloperMetadataRequest; + cutPaste?: Sheets.Schema.CutPasteRequest; + deleteBanding?: Sheets.Schema.DeleteBandingRequest; + deleteConditionalFormatRule?: Sheets.Schema.DeleteConditionalFormatRuleRequest; + deleteDeveloperMetadata?: Sheets.Schema.DeleteDeveloperMetadataRequest; + deleteDimension?: Sheets.Schema.DeleteDimensionRequest; + deleteDimensionGroup?: Sheets.Schema.DeleteDimensionGroupRequest; + deleteEmbeddedObject?: Sheets.Schema.DeleteEmbeddedObjectRequest; + deleteFilterView?: Sheets.Schema.DeleteFilterViewRequest; + deleteNamedRange?: Sheets.Schema.DeleteNamedRangeRequest; + deleteProtectedRange?: Sheets.Schema.DeleteProtectedRangeRequest; + deleteRange?: Sheets.Schema.DeleteRangeRequest; + deleteSheet?: Sheets.Schema.DeleteSheetRequest; + duplicateFilterView?: Sheets.Schema.DuplicateFilterViewRequest; + duplicateSheet?: Sheets.Schema.DuplicateSheetRequest; + findReplace?: Sheets.Schema.FindReplaceRequest; + insertDimension?: Sheets.Schema.InsertDimensionRequest; + insertRange?: Sheets.Schema.InsertRangeRequest; + mergeCells?: Sheets.Schema.MergeCellsRequest; + moveDimension?: Sheets.Schema.MoveDimensionRequest; + pasteData?: Sheets.Schema.PasteDataRequest; + randomizeRange?: Sheets.Schema.RandomizeRangeRequest; + repeatCell?: Sheets.Schema.RepeatCellRequest; + setBasicFilter?: Sheets.Schema.SetBasicFilterRequest; + setDataValidation?: Sheets.Schema.SetDataValidationRequest; + sortRange?: Sheets.Schema.SortRangeRequest; + textToColumns?: Sheets.Schema.TextToColumnsRequest; + unmergeCells?: Sheets.Schema.UnmergeCellsRequest; + updateBanding?: Sheets.Schema.UpdateBandingRequest; + updateBorders?: Sheets.Schema.UpdateBordersRequest; + updateCells?: Sheets.Schema.UpdateCellsRequest; + updateChartSpec?: Sheets.Schema.UpdateChartSpecRequest; + updateConditionalFormatRule?: Sheets.Schema.UpdateConditionalFormatRuleRequest; + updateDeveloperMetadata?: Sheets.Schema.UpdateDeveloperMetadataRequest; + updateDimensionGroup?: Sheets.Schema.UpdateDimensionGroupRequest; + updateDimensionProperties?: Sheets.Schema.UpdateDimensionPropertiesRequest; + updateEmbeddedObjectPosition?: Sheets.Schema.UpdateEmbeddedObjectPositionRequest; + updateFilterView?: Sheets.Schema.UpdateFilterViewRequest; + updateNamedRange?: Sheets.Schema.UpdateNamedRangeRequest; + updateProtectedRange?: Sheets.Schema.UpdateProtectedRangeRequest; + updateSheetProperties?: Sheets.Schema.UpdateSheetPropertiesRequest; + updateSpreadsheetProperties?: Sheets.Schema.UpdateSpreadsheetPropertiesRequest; } export interface Response { - addBanding?: Sheets_v4.Schema.AddBandingResponse; - addChart?: Sheets_v4.Schema.AddChartResponse; - addDimensionGroup?: Sheets_v4.Schema.AddDimensionGroupResponse; - addFilterView?: Sheets_v4.Schema.AddFilterViewResponse; - addNamedRange?: Sheets_v4.Schema.AddNamedRangeResponse; - addProtectedRange?: Sheets_v4.Schema.AddProtectedRangeResponse; - addSheet?: Sheets_v4.Schema.AddSheetResponse; - createDeveloperMetadata?: Sheets_v4.Schema.CreateDeveloperMetadataResponse; - deleteConditionalFormatRule?: Sheets_v4.Schema.DeleteConditionalFormatRuleResponse; - deleteDeveloperMetadata?: Sheets_v4.Schema.DeleteDeveloperMetadataResponse; - deleteDimensionGroup?: Sheets_v4.Schema.DeleteDimensionGroupResponse; - duplicateFilterView?: Sheets_v4.Schema.DuplicateFilterViewResponse; - duplicateSheet?: Sheets_v4.Schema.DuplicateSheetResponse; - findReplace?: Sheets_v4.Schema.FindReplaceResponse; - updateConditionalFormatRule?: Sheets_v4.Schema.UpdateConditionalFormatRuleResponse; - updateDeveloperMetadata?: Sheets_v4.Schema.UpdateDeveloperMetadataResponse; - updateEmbeddedObjectPosition?: Sheets_v4.Schema.UpdateEmbeddedObjectPositionResponse; + addBanding?: Sheets.Schema.AddBandingResponse; + addChart?: Sheets.Schema.AddChartResponse; + addDimensionGroup?: Sheets.Schema.AddDimensionGroupResponse; + addFilterView?: Sheets.Schema.AddFilterViewResponse; + addNamedRange?: Sheets.Schema.AddNamedRangeResponse; + addProtectedRange?: Sheets.Schema.AddProtectedRangeResponse; + addSheet?: Sheets.Schema.AddSheetResponse; + createDeveloperMetadata?: Sheets.Schema.CreateDeveloperMetadataResponse; + deleteConditionalFormatRule?: Sheets.Schema.DeleteConditionalFormatRuleResponse; + deleteDeveloperMetadata?: Sheets.Schema.DeleteDeveloperMetadataResponse; + deleteDimensionGroup?: Sheets.Schema.DeleteDimensionGroupResponse; + duplicateFilterView?: Sheets.Schema.DuplicateFilterViewResponse; + duplicateSheet?: Sheets.Schema.DuplicateSheetResponse; + findReplace?: Sheets.Schema.FindReplaceResponse; + updateConditionalFormatRule?: Sheets.Schema.UpdateConditionalFormatRuleResponse; + updateDeveloperMetadata?: Sheets.Schema.UpdateDeveloperMetadataResponse; + updateEmbeddedObjectPosition?: Sheets.Schema.UpdateEmbeddedObjectPositionResponse; } export interface RowData { - values?: Sheets_v4.Schema.CellData[]; + values?: Sheets.Schema.CellData[]; } export interface SearchDeveloperMetadataRequest { - dataFilters?: Sheets_v4.Schema.DataFilter[]; + dataFilters?: Sheets.Schema.DataFilter[]; } export interface SearchDeveloperMetadataResponse { - matchedDeveloperMetadata?: Sheets_v4.Schema.MatchedDeveloperMetadata[]; + matchedDeveloperMetadata?: Sheets.Schema.MatchedDeveloperMetadata[]; } export interface SetBasicFilterRequest { - filter?: Sheets_v4.Schema.BasicFilter; + filter?: Sheets.Schema.BasicFilter; } export interface SetDataValidationRequest { - range?: Sheets_v4.Schema.GridRange; - rule?: Sheets_v4.Schema.DataValidationRule; + range?: Sheets.Schema.GridRange; + rule?: Sheets.Schema.DataValidationRule; } export interface Sheet { - bandedRanges?: Sheets_v4.Schema.BandedRange[]; - basicFilter?: Sheets_v4.Schema.BasicFilter; - charts?: Sheets_v4.Schema.EmbeddedChart[]; - columnGroups?: Sheets_v4.Schema.DimensionGroup[]; - conditionalFormats?: Sheets_v4.Schema.ConditionalFormatRule[]; - data?: Sheets_v4.Schema.GridData[]; - developerMetadata?: Sheets_v4.Schema.DeveloperMetadata[]; - filterViews?: Sheets_v4.Schema.FilterView[]; - merges?: Sheets_v4.Schema.GridRange[]; - properties?: Sheets_v4.Schema.SheetProperties; - protectedRanges?: Sheets_v4.Schema.ProtectedRange[]; - rowGroups?: Sheets_v4.Schema.DimensionGroup[]; + bandedRanges?: Sheets.Schema.BandedRange[]; + basicFilter?: Sheets.Schema.BasicFilter; + charts?: Sheets.Schema.EmbeddedChart[]; + columnGroups?: Sheets.Schema.DimensionGroup[]; + conditionalFormats?: Sheets.Schema.ConditionalFormatRule[]; + data?: Sheets.Schema.GridData[]; + developerMetadata?: Sheets.Schema.DeveloperMetadata[]; + filterViews?: Sheets.Schema.FilterView[]; + merges?: Sheets.Schema.GridRange[]; + properties?: Sheets.Schema.SheetProperties; + protectedRanges?: Sheets.Schema.ProtectedRange[]; + rowGroups?: Sheets.Schema.DimensionGroup[]; } export interface SheetProperties { - gridProperties?: Sheets_v4.Schema.GridProperties; + gridProperties?: Sheets.Schema.GridProperties; hidden?: boolean; index?: number; rightToLeft?: boolean; sheetId?: number; sheetType?: string; - tabColor?: Sheets_v4.Schema.Color; + tabColor?: Sheets.Schema.Color; title?: string; } export interface SortRangeRequest { - range?: Sheets_v4.Schema.GridRange; - sortSpecs?: Sheets_v4.Schema.SortSpec[]; + range?: Sheets.Schema.GridRange; + sortSpecs?: Sheets.Schema.SortSpec[]; } export interface SortSpec { dimensionIndex?: number; @@ -1014,20 +1014,20 @@ declare namespace GoogleAppsScript { export interface SourceAndDestination { dimension?: string; fillLength?: number; - source?: Sheets_v4.Schema.GridRange; + source?: Sheets.Schema.GridRange; } export interface Spreadsheet { - developerMetadata?: Sheets_v4.Schema.DeveloperMetadata[]; - namedRanges?: Sheets_v4.Schema.NamedRange[]; - properties?: Sheets_v4.Schema.SpreadsheetProperties; - sheets?: Sheets_v4.Schema.Sheet[]; + developerMetadata?: Sheets.Schema.DeveloperMetadata[]; + namedRanges?: Sheets.Schema.NamedRange[]; + properties?: Sheets.Schema.SpreadsheetProperties; + sheets?: Sheets.Schema.Sheet[]; spreadsheetId?: string; spreadsheetUrl?: string; } export interface SpreadsheetProperties { autoRecalc?: string; - defaultFormat?: Sheets_v4.Schema.CellFormat; - iterativeCalculationSettings?: Sheets_v4.Schema.IterativeCalculationSettings; + defaultFormat?: Sheets.Schema.CellFormat; + iterativeCalculationSettings?: Sheets.Schema.IterativeCalculationSettings; locale?: string; timeZone?: string; title?: string; @@ -1036,13 +1036,13 @@ declare namespace GoogleAppsScript { bold?: boolean; fontFamily?: string; fontSize?: number; - foregroundColor?: Sheets_v4.Schema.Color; + foregroundColor?: Sheets.Schema.Color; italic?: boolean; strikethrough?: boolean; underline?: boolean; } export interface TextFormatRun { - format?: Sheets_v4.Schema.TextFormat; + format?: Sheets.Schema.TextFormat; startIndex?: number; } export interface TextPosition { @@ -1055,116 +1055,116 @@ declare namespace GoogleAppsScript { export interface TextToColumnsRequest { delimiter?: string; delimiterType?: string; - source?: Sheets_v4.Schema.GridRange; + source?: Sheets.Schema.GridRange; } export interface TreemapChartColorScale { - maxValueColor?: Sheets_v4.Schema.Color; - midValueColor?: Sheets_v4.Schema.Color; - minValueColor?: Sheets_v4.Schema.Color; - noDataColor?: Sheets_v4.Schema.Color; + maxValueColor?: Sheets.Schema.Color; + midValueColor?: Sheets.Schema.Color; + minValueColor?: Sheets.Schema.Color; + noDataColor?: Sheets.Schema.Color; } export interface TreemapChartSpec { - colorData?: Sheets_v4.Schema.ChartData; - colorScale?: Sheets_v4.Schema.TreemapChartColorScale; - headerColor?: Sheets_v4.Schema.Color; + colorData?: Sheets.Schema.ChartData; + colorScale?: Sheets.Schema.TreemapChartColorScale; + headerColor?: Sheets.Schema.Color; hideTooltips?: boolean; hintedLevels?: number; - labels?: Sheets_v4.Schema.ChartData; + labels?: Sheets.Schema.ChartData; levels?: number; maxValue?: Number; minValue?: Number; - parentLabels?: Sheets_v4.Schema.ChartData; - sizeData?: Sheets_v4.Schema.ChartData; - textFormat?: Sheets_v4.Schema.TextFormat; + parentLabels?: Sheets.Schema.ChartData; + sizeData?: Sheets.Schema.ChartData; + textFormat?: Sheets.Schema.TextFormat; } export interface UnmergeCellsRequest { - range?: Sheets_v4.Schema.GridRange; + range?: Sheets.Schema.GridRange; } export interface UpdateBandingRequest { - bandedRange?: Sheets_v4.Schema.BandedRange; + bandedRange?: Sheets.Schema.BandedRange; fields?: string; } export interface UpdateBordersRequest { - bottom?: Sheets_v4.Schema.Border; - innerHorizontal?: Sheets_v4.Schema.Border; - innerVertical?: Sheets_v4.Schema.Border; - left?: Sheets_v4.Schema.Border; - range?: Sheets_v4.Schema.GridRange; - right?: Sheets_v4.Schema.Border; - top?: Sheets_v4.Schema.Border; + bottom?: Sheets.Schema.Border; + innerHorizontal?: Sheets.Schema.Border; + innerVertical?: Sheets.Schema.Border; + left?: Sheets.Schema.Border; + range?: Sheets.Schema.GridRange; + right?: Sheets.Schema.Border; + top?: Sheets.Schema.Border; } export interface UpdateCellsRequest { fields?: string; - range?: Sheets_v4.Schema.GridRange; - rows?: Sheets_v4.Schema.RowData[]; - start?: Sheets_v4.Schema.GridCoordinate; + range?: Sheets.Schema.GridRange; + rows?: Sheets.Schema.RowData[]; + start?: Sheets.Schema.GridCoordinate; } export interface UpdateChartSpecRequest { chartId?: number; - spec?: Sheets_v4.Schema.ChartSpec; + spec?: Sheets.Schema.ChartSpec; } export interface UpdateConditionalFormatRuleRequest { index?: number; newIndex?: number; - rule?: Sheets_v4.Schema.ConditionalFormatRule; + rule?: Sheets.Schema.ConditionalFormatRule; sheetId?: number; } export interface UpdateConditionalFormatRuleResponse { newIndex?: number; - newRule?: Sheets_v4.Schema.ConditionalFormatRule; + newRule?: Sheets.Schema.ConditionalFormatRule; oldIndex?: number; - oldRule?: Sheets_v4.Schema.ConditionalFormatRule; + oldRule?: Sheets.Schema.ConditionalFormatRule; } export interface UpdateDeveloperMetadataRequest { - dataFilters?: Sheets_v4.Schema.DataFilter[]; - developerMetadata?: Sheets_v4.Schema.DeveloperMetadata; + dataFilters?: Sheets.Schema.DataFilter[]; + developerMetadata?: Sheets.Schema.DeveloperMetadata; fields?: string; } export interface UpdateDeveloperMetadataResponse { - developerMetadata?: Sheets_v4.Schema.DeveloperMetadata[]; + developerMetadata?: Sheets.Schema.DeveloperMetadata[]; } export interface UpdateDimensionGroupRequest { - dimensionGroup?: Sheets_v4.Schema.DimensionGroup; + dimensionGroup?: Sheets.Schema.DimensionGroup; fields?: string; } export interface UpdateDimensionPropertiesRequest { fields?: string; - properties?: Sheets_v4.Schema.DimensionProperties; - range?: Sheets_v4.Schema.DimensionRange; + properties?: Sheets.Schema.DimensionProperties; + range?: Sheets.Schema.DimensionRange; } export interface UpdateEmbeddedObjectPositionRequest { fields?: string; - newPosition?: Sheets_v4.Schema.EmbeddedObjectPosition; + newPosition?: Sheets.Schema.EmbeddedObjectPosition; objectId?: number; } export interface UpdateEmbeddedObjectPositionResponse { - position?: Sheets_v4.Schema.EmbeddedObjectPosition; + position?: Sheets.Schema.EmbeddedObjectPosition; } export interface UpdateFilterViewRequest { fields?: string; - filter?: Sheets_v4.Schema.FilterView; + filter?: Sheets.Schema.FilterView; } export interface UpdateNamedRangeRequest { fields?: string; - namedRange?: Sheets_v4.Schema.NamedRange; + namedRange?: Sheets.Schema.NamedRange; } export interface UpdateProtectedRangeRequest { fields?: string; - protectedRange?: Sheets_v4.Schema.ProtectedRange; + protectedRange?: Sheets.Schema.ProtectedRange; } export interface UpdateSheetPropertiesRequest { fields?: string; - properties?: Sheets_v4.Schema.SheetProperties; + properties?: Sheets.Schema.SheetProperties; } export interface UpdateSpreadsheetPropertiesRequest { fields?: string; - properties?: Sheets_v4.Schema.SpreadsheetProperties; + properties?: Sheets.Schema.SpreadsheetProperties; } export interface UpdateValuesByDataFilterResponse { - dataFilter?: Sheets_v4.Schema.DataFilter; + dataFilter?: Sheets.Schema.DataFilter; updatedCells?: number; updatedColumns?: number; - updatedData?: Sheets_v4.Schema.ValueRange; + updatedData?: Sheets.Schema.ValueRange; updatedRange?: string; updatedRows?: number; } @@ -1172,7 +1172,7 @@ declare namespace GoogleAppsScript { spreadsheetId?: string; updatedCells?: number; updatedColumns?: number; - updatedData?: Sheets_v4.Schema.ValueRange; + updatedData?: Sheets.Schema.ValueRange; updatedRange?: string; updatedRows?: number; } @@ -1182,7 +1182,7 @@ declare namespace GoogleAppsScript { values?: Object[][]; } export interface WaterfallChartColumnStyle { - color?: Sheets_v4.Schema.Color; + color?: Sheets.Schema.Color; label?: string; } export interface WaterfallChartCustomSubtotal { @@ -1191,334 +1191,334 @@ declare namespace GoogleAppsScript { subtotalIndex?: number; } export interface WaterfallChartDomain { - data?: Sheets_v4.Schema.ChartData; + data?: Sheets.Schema.ChartData; reversed?: boolean; } export interface WaterfallChartSeries { - customSubtotals?: Sheets_v4.Schema.WaterfallChartCustomSubtotal[]; - data?: Sheets_v4.Schema.ChartData; + customSubtotals?: Sheets.Schema.WaterfallChartCustomSubtotal[]; + data?: Sheets.Schema.ChartData; hideTrailingSubtotal?: boolean; - negativeColumnsStyle?: Sheets_v4.Schema.WaterfallChartColumnStyle; - positiveColumnsStyle?: Sheets_v4.Schema.WaterfallChartColumnStyle; - subtotalColumnsStyle?: Sheets_v4.Schema.WaterfallChartColumnStyle; + negativeColumnsStyle?: Sheets.Schema.WaterfallChartColumnStyle; + positiveColumnsStyle?: Sheets.Schema.WaterfallChartColumnStyle; + subtotalColumnsStyle?: Sheets.Schema.WaterfallChartColumnStyle; } export interface WaterfallChartSpec { - connectorLineStyle?: Sheets_v4.Schema.LineStyle; - domain?: Sheets_v4.Schema.WaterfallChartDomain; + connectorLineStyle?: Sheets.Schema.LineStyle; + domain?: Sheets.Schema.WaterfallChartDomain; firstValueIsTotal?: boolean; hideConnectorLines?: boolean; - series?: Sheets_v4.Schema.WaterfallChartSeries[]; + series?: Sheets.Schema.WaterfallChartSeries[]; stackedType?: string; } } } - export interface Sheets_v4 { - Spreadsheets?: Sheets_v4.Collection.SpreadsheetsCollection; + export interface Sheets { + Spreadsheets?: Sheets.Collection.SpreadsheetsCollection; // Create a new instance of AddBandingRequest - newAddBandingRequest(): Sheets_v4.Schema.AddBandingRequest; + newAddBandingRequest(): Sheets.Schema.AddBandingRequest; // Create a new instance of AddChartRequest - newAddChartRequest(): Sheets_v4.Schema.AddChartRequest; + newAddChartRequest(): Sheets.Schema.AddChartRequest; // Create a new instance of AddConditionalFormatRuleRequest - newAddConditionalFormatRuleRequest(): Sheets_v4.Schema.AddConditionalFormatRuleRequest; + newAddConditionalFormatRuleRequest(): Sheets.Schema.AddConditionalFormatRuleRequest; // Create a new instance of AddDimensionGroupRequest - newAddDimensionGroupRequest(): Sheets_v4.Schema.AddDimensionGroupRequest; + newAddDimensionGroupRequest(): Sheets.Schema.AddDimensionGroupRequest; // Create a new instance of AddFilterViewRequest - newAddFilterViewRequest(): Sheets_v4.Schema.AddFilterViewRequest; + newAddFilterViewRequest(): Sheets.Schema.AddFilterViewRequest; // Create a new instance of AddNamedRangeRequest - newAddNamedRangeRequest(): Sheets_v4.Schema.AddNamedRangeRequest; + newAddNamedRangeRequest(): Sheets.Schema.AddNamedRangeRequest; // Create a new instance of AddProtectedRangeRequest - newAddProtectedRangeRequest(): Sheets_v4.Schema.AddProtectedRangeRequest; + newAddProtectedRangeRequest(): Sheets.Schema.AddProtectedRangeRequest; // Create a new instance of AddSheetRequest - newAddSheetRequest(): Sheets_v4.Schema.AddSheetRequest; + newAddSheetRequest(): Sheets.Schema.AddSheetRequest; // Create a new instance of AppendCellsRequest - newAppendCellsRequest(): Sheets_v4.Schema.AppendCellsRequest; + newAppendCellsRequest(): Sheets.Schema.AppendCellsRequest; // Create a new instance of AppendDimensionRequest - newAppendDimensionRequest(): Sheets_v4.Schema.AppendDimensionRequest; + newAppendDimensionRequest(): Sheets.Schema.AppendDimensionRequest; // Create a new instance of AutoFillRequest - newAutoFillRequest(): Sheets_v4.Schema.AutoFillRequest; + newAutoFillRequest(): Sheets.Schema.AutoFillRequest; // Create a new instance of AutoResizeDimensionsRequest - newAutoResizeDimensionsRequest(): Sheets_v4.Schema.AutoResizeDimensionsRequest; + newAutoResizeDimensionsRequest(): Sheets.Schema.AutoResizeDimensionsRequest; // Create a new instance of BandedRange - newBandedRange(): Sheets_v4.Schema.BandedRange; + newBandedRange(): Sheets.Schema.BandedRange; // Create a new instance of BandingProperties - newBandingProperties(): Sheets_v4.Schema.BandingProperties; + newBandingProperties(): Sheets.Schema.BandingProperties; // Create a new instance of BasicChartAxis - newBasicChartAxis(): Sheets_v4.Schema.BasicChartAxis; + newBasicChartAxis(): Sheets.Schema.BasicChartAxis; // Create a new instance of BasicChartDomain - newBasicChartDomain(): Sheets_v4.Schema.BasicChartDomain; + newBasicChartDomain(): Sheets.Schema.BasicChartDomain; // Create a new instance of BasicChartSeries - newBasicChartSeries(): Sheets_v4.Schema.BasicChartSeries; + newBasicChartSeries(): Sheets.Schema.BasicChartSeries; // Create a new instance of BasicChartSpec - newBasicChartSpec(): Sheets_v4.Schema.BasicChartSpec; + newBasicChartSpec(): Sheets.Schema.BasicChartSpec; // Create a new instance of BasicFilter - newBasicFilter(): Sheets_v4.Schema.BasicFilter; + newBasicFilter(): Sheets.Schema.BasicFilter; // Create a new instance of BatchClearValuesByDataFilterRequest - newBatchClearValuesByDataFilterRequest(): Sheets_v4.Schema.BatchClearValuesByDataFilterRequest; + newBatchClearValuesByDataFilterRequest(): Sheets.Schema.BatchClearValuesByDataFilterRequest; // Create a new instance of BatchClearValuesRequest - newBatchClearValuesRequest(): Sheets_v4.Schema.BatchClearValuesRequest; + newBatchClearValuesRequest(): Sheets.Schema.BatchClearValuesRequest; // Create a new instance of BatchGetValuesByDataFilterRequest - newBatchGetValuesByDataFilterRequest(): Sheets_v4.Schema.BatchGetValuesByDataFilterRequest; + newBatchGetValuesByDataFilterRequest(): Sheets.Schema.BatchGetValuesByDataFilterRequest; // Create a new instance of BatchUpdateSpreadsheetRequest - newBatchUpdateSpreadsheetRequest(): Sheets_v4.Schema.BatchUpdateSpreadsheetRequest; + newBatchUpdateSpreadsheetRequest(): Sheets.Schema.BatchUpdateSpreadsheetRequest; // Create a new instance of BatchUpdateValuesByDataFilterRequest - newBatchUpdateValuesByDataFilterRequest(): Sheets_v4.Schema.BatchUpdateValuesByDataFilterRequest; + newBatchUpdateValuesByDataFilterRequest(): Sheets.Schema.BatchUpdateValuesByDataFilterRequest; // Create a new instance of BatchUpdateValuesRequest - newBatchUpdateValuesRequest(): Sheets_v4.Schema.BatchUpdateValuesRequest; + newBatchUpdateValuesRequest(): Sheets.Schema.BatchUpdateValuesRequest; // Create a new instance of BooleanCondition - newBooleanCondition(): Sheets_v4.Schema.BooleanCondition; + newBooleanCondition(): Sheets.Schema.BooleanCondition; // Create a new instance of BooleanRule - newBooleanRule(): Sheets_v4.Schema.BooleanRule; + newBooleanRule(): Sheets.Schema.BooleanRule; // Create a new instance of Border - newBorder(): Sheets_v4.Schema.Border; + newBorder(): Sheets.Schema.Border; // Create a new instance of Borders - newBorders(): Sheets_v4.Schema.Borders; + newBorders(): Sheets.Schema.Borders; // Create a new instance of BubbleChartSpec - newBubbleChartSpec(): Sheets_v4.Schema.BubbleChartSpec; + newBubbleChartSpec(): Sheets.Schema.BubbleChartSpec; // Create a new instance of CandlestickChartSpec - newCandlestickChartSpec(): Sheets_v4.Schema.CandlestickChartSpec; + newCandlestickChartSpec(): Sheets.Schema.CandlestickChartSpec; // Create a new instance of CandlestickData - newCandlestickData(): Sheets_v4.Schema.CandlestickData; + newCandlestickData(): Sheets.Schema.CandlestickData; // Create a new instance of CandlestickDomain - newCandlestickDomain(): Sheets_v4.Schema.CandlestickDomain; + newCandlestickDomain(): Sheets.Schema.CandlestickDomain; // Create a new instance of CandlestickSeries - newCandlestickSeries(): Sheets_v4.Schema.CandlestickSeries; + newCandlestickSeries(): Sheets.Schema.CandlestickSeries; // Create a new instance of CellData - newCellData(): Sheets_v4.Schema.CellData; + newCellData(): Sheets.Schema.CellData; // Create a new instance of CellFormat - newCellFormat(): Sheets_v4.Schema.CellFormat; + newCellFormat(): Sheets.Schema.CellFormat; // Create a new instance of ChartData - newChartData(): Sheets_v4.Schema.ChartData; + newChartData(): Sheets.Schema.ChartData; // Create a new instance of ChartSourceRange - newChartSourceRange(): Sheets_v4.Schema.ChartSourceRange; + newChartSourceRange(): Sheets.Schema.ChartSourceRange; // Create a new instance of ChartSpec - newChartSpec(): Sheets_v4.Schema.ChartSpec; + newChartSpec(): Sheets.Schema.ChartSpec; // Create a new instance of ClearBasicFilterRequest - newClearBasicFilterRequest(): Sheets_v4.Schema.ClearBasicFilterRequest; + newClearBasicFilterRequest(): Sheets.Schema.ClearBasicFilterRequest; // Create a new instance of ClearValuesRequest newClearValuesRequest(): any; // Schema.ClearValuesRequest; // Create a new instance of Color - newColor(): Sheets_v4.Schema.Color; + newColor(): Sheets.Schema.Color; // Create a new instance of ConditionValue - newConditionValue(): Sheets_v4.Schema.ConditionValue; + newConditionValue(): Sheets.Schema.ConditionValue; // Create a new instance of ConditionalFormatRule - newConditionalFormatRule(): Sheets_v4.Schema.ConditionalFormatRule; + newConditionalFormatRule(): Sheets.Schema.ConditionalFormatRule; // Create a new instance of CopyPasteRequest - newCopyPasteRequest(): Sheets_v4.Schema.CopyPasteRequest; + newCopyPasteRequest(): Sheets.Schema.CopyPasteRequest; // Create a new instance of CopySheetToAnotherSpreadsheetRequest - newCopySheetToAnotherSpreadsheetRequest(): Sheets_v4.Schema.CopySheetToAnotherSpreadsheetRequest; + newCopySheetToAnotherSpreadsheetRequest(): Sheets.Schema.CopySheetToAnotherSpreadsheetRequest; // Create a new instance of CreateDeveloperMetadataRequest - newCreateDeveloperMetadataRequest(): Sheets_v4.Schema.CreateDeveloperMetadataRequest; + newCreateDeveloperMetadataRequest(): Sheets.Schema.CreateDeveloperMetadataRequest; // Create a new instance of CutPasteRequest - newCutPasteRequest(): Sheets_v4.Schema.CutPasteRequest; + newCutPasteRequest(): Sheets.Schema.CutPasteRequest; // Create a new instance of DataFilter - newDataFilter(): Sheets_v4.Schema.DataFilter; + newDataFilter(): Sheets.Schema.DataFilter; // Create a new instance of DataFilterValueRange - newDataFilterValueRange(): Sheets_v4.Schema.DataFilterValueRange; + newDataFilterValueRange(): Sheets.Schema.DataFilterValueRange; // Create a new instance of DataValidationRule - newDataValidationRule(): Sheets_v4.Schema.DataValidationRule; + newDataValidationRule(): Sheets.Schema.DataValidationRule; // Create a new instance of DateTimeRule - newDateTimeRule(): Sheets_v4.Schema.DateTimeRule; + newDateTimeRule(): Sheets.Schema.DateTimeRule; // Create a new instance of DeleteBandingRequest - newDeleteBandingRequest(): Sheets_v4.Schema.DeleteBandingRequest; + newDeleteBandingRequest(): Sheets.Schema.DeleteBandingRequest; // Create a new instance of DeleteConditionalFormatRuleRequest - newDeleteConditionalFormatRuleRequest(): Sheets_v4.Schema.DeleteConditionalFormatRuleRequest; + newDeleteConditionalFormatRuleRequest(): Sheets.Schema.DeleteConditionalFormatRuleRequest; // Create a new instance of DeleteDeveloperMetadataRequest - newDeleteDeveloperMetadataRequest(): Sheets_v4.Schema.DeleteDeveloperMetadataRequest; + newDeleteDeveloperMetadataRequest(): Sheets.Schema.DeleteDeveloperMetadataRequest; // Create a new instance of DeleteDimensionGroupRequest - newDeleteDimensionGroupRequest(): Sheets_v4.Schema.DeleteDimensionGroupRequest; + newDeleteDimensionGroupRequest(): Sheets.Schema.DeleteDimensionGroupRequest; // Create a new instance of DeleteDimensionRequest - newDeleteDimensionRequest(): Sheets_v4.Schema.DeleteDimensionRequest; + newDeleteDimensionRequest(): Sheets.Schema.DeleteDimensionRequest; // Create a new instance of DeleteEmbeddedObjectRequest - newDeleteEmbeddedObjectRequest(): Sheets_v4.Schema.DeleteEmbeddedObjectRequest; + newDeleteEmbeddedObjectRequest(): Sheets.Schema.DeleteEmbeddedObjectRequest; // Create a new instance of DeleteFilterViewRequest - newDeleteFilterViewRequest(): Sheets_v4.Schema.DeleteFilterViewRequest; + newDeleteFilterViewRequest(): Sheets.Schema.DeleteFilterViewRequest; // Create a new instance of DeleteNamedRangeRequest - newDeleteNamedRangeRequest(): Sheets_v4.Schema.DeleteNamedRangeRequest; + newDeleteNamedRangeRequest(): Sheets.Schema.DeleteNamedRangeRequest; // Create a new instance of DeleteProtectedRangeRequest - newDeleteProtectedRangeRequest(): Sheets_v4.Schema.DeleteProtectedRangeRequest; + newDeleteProtectedRangeRequest(): Sheets.Schema.DeleteProtectedRangeRequest; // Create a new instance of DeleteRangeRequest - newDeleteRangeRequest(): Sheets_v4.Schema.DeleteRangeRequest; + newDeleteRangeRequest(): Sheets.Schema.DeleteRangeRequest; // Create a new instance of DeleteSheetRequest - newDeleteSheetRequest(): Sheets_v4.Schema.DeleteSheetRequest; + newDeleteSheetRequest(): Sheets.Schema.DeleteSheetRequest; // Create a new instance of DeveloperMetadata - newDeveloperMetadata(): Sheets_v4.Schema.DeveloperMetadata; + newDeveloperMetadata(): Sheets.Schema.DeveloperMetadata; // Create a new instance of DeveloperMetadataLocation - newDeveloperMetadataLocation(): Sheets_v4.Schema.DeveloperMetadataLocation; + newDeveloperMetadataLocation(): Sheets.Schema.DeveloperMetadataLocation; // Create a new instance of DeveloperMetadataLookup - newDeveloperMetadataLookup(): Sheets_v4.Schema.DeveloperMetadataLookup; + newDeveloperMetadataLookup(): Sheets.Schema.DeveloperMetadataLookup; // Create a new instance of DimensionGroup - newDimensionGroup(): Sheets_v4.Schema.DimensionGroup; + newDimensionGroup(): Sheets.Schema.DimensionGroup; // Create a new instance of DimensionProperties - newDimensionProperties(): Sheets_v4.Schema.DimensionProperties; + newDimensionProperties(): Sheets.Schema.DimensionProperties; // Create a new instance of DimensionRange - newDimensionRange(): Sheets_v4.Schema.DimensionRange; + newDimensionRange(): Sheets.Schema.DimensionRange; // Create a new instance of DuplicateFilterViewRequest - newDuplicateFilterViewRequest(): Sheets_v4.Schema.DuplicateFilterViewRequest; + newDuplicateFilterViewRequest(): Sheets.Schema.DuplicateFilterViewRequest; // Create a new instance of DuplicateSheetRequest - newDuplicateSheetRequest(): Sheets_v4.Schema.DuplicateSheetRequest; + newDuplicateSheetRequest(): Sheets.Schema.DuplicateSheetRequest; // Create a new instance of Editors - newEditors(): Sheets_v4.Schema.Editors; + newEditors(): Sheets.Schema.Editors; // Create a new instance of EmbeddedChart - newEmbeddedChart(): Sheets_v4.Schema.EmbeddedChart; + newEmbeddedChart(): Sheets.Schema.EmbeddedChart; // Create a new instance of EmbeddedObjectPosition - newEmbeddedObjectPosition(): Sheets_v4.Schema.EmbeddedObjectPosition; + newEmbeddedObjectPosition(): Sheets.Schema.EmbeddedObjectPosition; // Create a new instance of ErrorValue - newErrorValue(): Sheets_v4.Schema.ErrorValue; + newErrorValue(): Sheets.Schema.ErrorValue; // Create a new instance of ExtendedValue - newExtendedValue(): Sheets_v4.Schema.ExtendedValue; + newExtendedValue(): Sheets.Schema.ExtendedValue; // Create a new instance of FilterView - newFilterView(): Sheets_v4.Schema.FilterView; + newFilterView(): Sheets.Schema.FilterView; // Create a new instance of FindReplaceRequest - newFindReplaceRequest(): Sheets_v4.Schema.FindReplaceRequest; + newFindReplaceRequest(): Sheets.Schema.FindReplaceRequest; // Create a new instance of GetSpreadsheetByDataFilterRequest - newGetSpreadsheetByDataFilterRequest(): Sheets_v4.Schema.GetSpreadsheetByDataFilterRequest; + newGetSpreadsheetByDataFilterRequest(): Sheets.Schema.GetSpreadsheetByDataFilterRequest; // Create a new instance of GradientRule - newGradientRule(): Sheets_v4.Schema.GradientRule; + newGradientRule(): Sheets.Schema.GradientRule; // Create a new instance of GridCoordinate - newGridCoordinate(): Sheets_v4.Schema.GridCoordinate; + newGridCoordinate(): Sheets.Schema.GridCoordinate; // Create a new instance of GridData - newGridData(): Sheets_v4.Schema.GridData; + newGridData(): Sheets.Schema.GridData; // Create a new instance of GridProperties - newGridProperties(): Sheets_v4.Schema.GridProperties; + newGridProperties(): Sheets.Schema.GridProperties; // Create a new instance of GridRange - newGridRange(): Sheets_v4.Schema.GridRange; + newGridRange(): Sheets.Schema.GridRange; // Create a new instance of HistogramChartSpec - newHistogramChartSpec(): Sheets_v4.Schema.HistogramChartSpec; + newHistogramChartSpec(): Sheets.Schema.HistogramChartSpec; // Create a new instance of HistogramRule - newHistogramRule(): Sheets_v4.Schema.HistogramRule; + newHistogramRule(): Sheets.Schema.HistogramRule; // Create a new instance of HistogramSeries - newHistogramSeries(): Sheets_v4.Schema.HistogramSeries; + newHistogramSeries(): Sheets.Schema.HistogramSeries; // Create a new instance of InsertDimensionRequest - newInsertDimensionRequest(): Sheets_v4.Schema.InsertDimensionRequest; + newInsertDimensionRequest(): Sheets.Schema.InsertDimensionRequest; // Create a new instance of InsertRangeRequest - newInsertRangeRequest(): Sheets_v4.Schema.InsertRangeRequest; + newInsertRangeRequest(): Sheets.Schema.InsertRangeRequest; // Create a new instance of InterpolationPoint - newInterpolationPoint(): Sheets_v4.Schema.InterpolationPoint; + newInterpolationPoint(): Sheets.Schema.InterpolationPoint; // Create a new instance of IterativeCalculationSettings - newIterativeCalculationSettings(): Sheets_v4.Schema.IterativeCalculationSettings; + newIterativeCalculationSettings(): Sheets.Schema.IterativeCalculationSettings; // Create a new instance of LineStyle - newLineStyle(): Sheets_v4.Schema.LineStyle; + newLineStyle(): Sheets.Schema.LineStyle; // Create a new instance of ManualRule - newManualRule(): Sheets_v4.Schema.ManualRule; + newManualRule(): Sheets.Schema.ManualRule; // Create a new instance of ManualRuleGroup - newManualRuleGroup(): Sheets_v4.Schema.ManualRuleGroup; + newManualRuleGroup(): Sheets.Schema.ManualRuleGroup; // Create a new instance of MergeCellsRequest - newMergeCellsRequest(): Sheets_v4.Schema.MergeCellsRequest; + newMergeCellsRequest(): Sheets.Schema.MergeCellsRequest; // Create a new instance of MoveDimensionRequest - newMoveDimensionRequest(): Sheets_v4.Schema.MoveDimensionRequest; + newMoveDimensionRequest(): Sheets.Schema.MoveDimensionRequest; // Create a new instance of NamedRange - newNamedRange(): Sheets_v4.Schema.NamedRange; + newNamedRange(): Sheets.Schema.NamedRange; // Create a new instance of NumberFormat - newNumberFormat(): Sheets_v4.Schema.NumberFormat; + newNumberFormat(): Sheets.Schema.NumberFormat; // Create a new instance of OrgChartSpec - newOrgChartSpec(): Sheets_v4.Schema.OrgChartSpec; + newOrgChartSpec(): Sheets.Schema.OrgChartSpec; // Create a new instance of OverlayPosition - newOverlayPosition(): Sheets_v4.Schema.OverlayPosition; + newOverlayPosition(): Sheets.Schema.OverlayPosition; // Create a new instance of Padding - newPadding(): Sheets_v4.Schema.Padding; + newPadding(): Sheets.Schema.Padding; // Create a new instance of PasteDataRequest - newPasteDataRequest(): Sheets_v4.Schema.PasteDataRequest; + newPasteDataRequest(): Sheets.Schema.PasteDataRequest; // Create a new instance of PieChartSpec - newPieChartSpec(): Sheets_v4.Schema.PieChartSpec; + newPieChartSpec(): Sheets.Schema.PieChartSpec; // Create a new instance of PivotGroup - newPivotGroup(): Sheets_v4.Schema.PivotGroup; + newPivotGroup(): Sheets.Schema.PivotGroup; // Create a new instance of PivotGroupRule - newPivotGroupRule(): Sheets_v4.Schema.PivotGroupRule; + newPivotGroupRule(): Sheets.Schema.PivotGroupRule; // Create a new instance of PivotGroupSortValueBucket - newPivotGroupSortValueBucket(): Sheets_v4.Schema.PivotGroupSortValueBucket; + newPivotGroupSortValueBucket(): Sheets.Schema.PivotGroupSortValueBucket; // Create a new instance of PivotGroupValueMetadata - newPivotGroupValueMetadata(): Sheets_v4.Schema.PivotGroupValueMetadata; + newPivotGroupValueMetadata(): Sheets.Schema.PivotGroupValueMetadata; // Create a new instance of PivotTable - newPivotTable(): Sheets_v4.Schema.PivotTable; + newPivotTable(): Sheets.Schema.PivotTable; // Create a new instance of PivotValue - newPivotValue(): Sheets_v4.Schema.PivotValue; + newPivotValue(): Sheets.Schema.PivotValue; // Create a new instance of ProtectedRange - newProtectedRange(): Sheets_v4.Schema.ProtectedRange; + newProtectedRange(): Sheets.Schema.ProtectedRange; // Create a new instance of RandomizeRangeRequest - newRandomizeRangeRequest(): Sheets_v4.Schema.RandomizeRangeRequest; + newRandomizeRangeRequest(): Sheets.Schema.RandomizeRangeRequest; // Create a new instance of RepeatCellRequest - newRepeatCellRequest(): Sheets_v4.Schema.RepeatCellRequest; + newRepeatCellRequest(): Sheets.Schema.RepeatCellRequest; // Create a new instance of Request - newRequest(): Sheets_v4.Schema.Request; + newRequest(): Sheets.Schema.Request; // Create a new instance of RowData - newRowData(): Sheets_v4.Schema.RowData; + newRowData(): Sheets.Schema.RowData; // Create a new instance of SearchDeveloperMetadataRequest - newSearchDeveloperMetadataRequest(): Sheets_v4.Schema.SearchDeveloperMetadataRequest; + newSearchDeveloperMetadataRequest(): Sheets.Schema.SearchDeveloperMetadataRequest; // Create a new instance of SetBasicFilterRequest - newSetBasicFilterRequest(): Sheets_v4.Schema.SetBasicFilterRequest; + newSetBasicFilterRequest(): Sheets.Schema.SetBasicFilterRequest; // Create a new instance of SetDataValidationRequest - newSetDataValidationRequest(): Sheets_v4.Schema.SetDataValidationRequest; + newSetDataValidationRequest(): Sheets.Schema.SetDataValidationRequest; // Create a new instance of Sheet - newSheet(): Sheets_v4.Schema.Sheet; + newSheet(): Sheets.Schema.Sheet; // Create a new instance of SheetProperties - newSheetProperties(): Sheets_v4.Schema.SheetProperties; + newSheetProperties(): Sheets.Schema.SheetProperties; // Create a new instance of SortRangeRequest - newSortRangeRequest(): Sheets_v4.Schema.SortRangeRequest; + newSortRangeRequest(): Sheets.Schema.SortRangeRequest; // Create a new instance of SortSpec - newSortSpec(): Sheets_v4.Schema.SortSpec; + newSortSpec(): Sheets.Schema.SortSpec; // Create a new instance of SourceAndDestination - newSourceAndDestination(): Sheets_v4.Schema.SourceAndDestination; + newSourceAndDestination(): Sheets.Schema.SourceAndDestination; // Create a new instance of Spreadsheet - newSpreadsheet(): Sheets_v4.Schema.Spreadsheet; + newSpreadsheet(): Sheets.Schema.Spreadsheet; // Create a new instance of SpreadsheetProperties - newSpreadsheetProperties(): Sheets_v4.Schema.SpreadsheetProperties; + newSpreadsheetProperties(): Sheets.Schema.SpreadsheetProperties; // Create a new instance of TextFormat - newTextFormat(): Sheets_v4.Schema.TextFormat; + newTextFormat(): Sheets.Schema.TextFormat; // Create a new instance of TextFormatRun - newTextFormatRun(): Sheets_v4.Schema.TextFormatRun; + newTextFormatRun(): Sheets.Schema.TextFormatRun; // Create a new instance of TextPosition - newTextPosition(): Sheets_v4.Schema.TextPosition; + newTextPosition(): Sheets.Schema.TextPosition; // Create a new instance of TextRotation - newTextRotation(): Sheets_v4.Schema.TextRotation; + newTextRotation(): Sheets.Schema.TextRotation; // Create a new instance of TextToColumnsRequest - newTextToColumnsRequest(): Sheets_v4.Schema.TextToColumnsRequest; + newTextToColumnsRequest(): Sheets.Schema.TextToColumnsRequest; // Create a new instance of TreemapChartColorScale - newTreemapChartColorScale(): Sheets_v4.Schema.TreemapChartColorScale; + newTreemapChartColorScale(): Sheets.Schema.TreemapChartColorScale; // Create a new instance of TreemapChartSpec - newTreemapChartSpec(): Sheets_v4.Schema.TreemapChartSpec; + newTreemapChartSpec(): Sheets.Schema.TreemapChartSpec; // Create a new instance of UnmergeCellsRequest - newUnmergeCellsRequest(): Sheets_v4.Schema.UnmergeCellsRequest; + newUnmergeCellsRequest(): Sheets.Schema.UnmergeCellsRequest; // Create a new instance of UpdateBandingRequest - newUpdateBandingRequest(): Sheets_v4.Schema.UpdateBandingRequest; + newUpdateBandingRequest(): Sheets.Schema.UpdateBandingRequest; // Create a new instance of UpdateBordersRequest - newUpdateBordersRequest(): Sheets_v4.Schema.UpdateBordersRequest; + newUpdateBordersRequest(): Sheets.Schema.UpdateBordersRequest; // Create a new instance of UpdateCellsRequest - newUpdateCellsRequest(): Sheets_v4.Schema.UpdateCellsRequest; + newUpdateCellsRequest(): Sheets.Schema.UpdateCellsRequest; // Create a new instance of UpdateChartSpecRequest - newUpdateChartSpecRequest(): Sheets_v4.Schema.UpdateChartSpecRequest; + newUpdateChartSpecRequest(): Sheets.Schema.UpdateChartSpecRequest; // Create a new instance of UpdateConditionalFormatRuleRequest - newUpdateConditionalFormatRuleRequest(): Sheets_v4.Schema.UpdateConditionalFormatRuleRequest; + newUpdateConditionalFormatRuleRequest(): Sheets.Schema.UpdateConditionalFormatRuleRequest; // Create a new instance of UpdateDeveloperMetadataRequest - newUpdateDeveloperMetadataRequest(): Sheets_v4.Schema.UpdateDeveloperMetadataRequest; + newUpdateDeveloperMetadataRequest(): Sheets.Schema.UpdateDeveloperMetadataRequest; // Create a new instance of UpdateDimensionGroupRequest - newUpdateDimensionGroupRequest(): Sheets_v4.Schema.UpdateDimensionGroupRequest; + newUpdateDimensionGroupRequest(): Sheets.Schema.UpdateDimensionGroupRequest; // Create a new instance of UpdateDimensionPropertiesRequest - newUpdateDimensionPropertiesRequest(): Sheets_v4.Schema.UpdateDimensionPropertiesRequest; + newUpdateDimensionPropertiesRequest(): Sheets.Schema.UpdateDimensionPropertiesRequest; // Create a new instance of UpdateEmbeddedObjectPositionRequest - newUpdateEmbeddedObjectPositionRequest(): Sheets_v4.Schema.UpdateEmbeddedObjectPositionRequest; + newUpdateEmbeddedObjectPositionRequest(): Sheets.Schema.UpdateEmbeddedObjectPositionRequest; // Create a new instance of UpdateFilterViewRequest - newUpdateFilterViewRequest(): Sheets_v4.Schema.UpdateFilterViewRequest; + newUpdateFilterViewRequest(): Sheets.Schema.UpdateFilterViewRequest; // Create a new instance of UpdateNamedRangeRequest - newUpdateNamedRangeRequest(): Sheets_v4.Schema.UpdateNamedRangeRequest; + newUpdateNamedRangeRequest(): Sheets.Schema.UpdateNamedRangeRequest; // Create a new instance of UpdateProtectedRangeRequest - newUpdateProtectedRangeRequest(): Sheets_v4.Schema.UpdateProtectedRangeRequest; + newUpdateProtectedRangeRequest(): Sheets.Schema.UpdateProtectedRangeRequest; // Create a new instance of UpdateSheetPropertiesRequest - newUpdateSheetPropertiesRequest(): Sheets_v4.Schema.UpdateSheetPropertiesRequest; + newUpdateSheetPropertiesRequest(): Sheets.Schema.UpdateSheetPropertiesRequest; // Create a new instance of UpdateSpreadsheetPropertiesRequest - newUpdateSpreadsheetPropertiesRequest(): Sheets_v4.Schema.UpdateSpreadsheetPropertiesRequest; + newUpdateSpreadsheetPropertiesRequest(): Sheets.Schema.UpdateSpreadsheetPropertiesRequest; // Create a new instance of ValueRange - newValueRange(): Sheets_v4.Schema.ValueRange; + newValueRange(): Sheets.Schema.ValueRange; // Create a new instance of WaterfallChartColumnStyle - newWaterfallChartColumnStyle(): Sheets_v4.Schema.WaterfallChartColumnStyle; + newWaterfallChartColumnStyle(): Sheets.Schema.WaterfallChartColumnStyle; // Create a new instance of WaterfallChartCustomSubtotal - newWaterfallChartCustomSubtotal(): Sheets_v4.Schema.WaterfallChartCustomSubtotal; + newWaterfallChartCustomSubtotal(): Sheets.Schema.WaterfallChartCustomSubtotal; // Create a new instance of WaterfallChartDomain - newWaterfallChartDomain(): Sheets_v4.Schema.WaterfallChartDomain; + newWaterfallChartDomain(): Sheets.Schema.WaterfallChartDomain; // Create a new instance of WaterfallChartSeries - newWaterfallChartSeries(): Sheets_v4.Schema.WaterfallChartSeries; + newWaterfallChartSeries(): Sheets.Schema.WaterfallChartSeries; // Create a new instance of WaterfallChartSpec - newWaterfallChartSpec(): Sheets_v4.Schema.WaterfallChartSpec; + newWaterfallChartSpec(): Sheets.Schema.WaterfallChartSpec; } } -declare var Sheets_v4: GoogleAppsScript.Sheets_v4; \ No newline at end of file +declare var Sheets: GoogleAppsScript.Sheets; diff --git a/types/google-apps-script/apis/slides_v1.d.ts b/types/google-apps-script/apis/slides_v1.d.ts index 2999ab5c5b..dfe7e5321d 100644 --- a/types/google-apps-script/apis/slides_v1.d.ts +++ b/types/google-apps-script/apis/slides_v1.d.ts @@ -5,26 +5,26 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Slides_v1 { + namespace Slides { namespace Collection { namespace Presentations { export interface PagesCollection { // Gets the latest version of the specified page in the presentation. - get(presentationId: string, pageObjectId: string): Slides_v1.Schema.Page; + get(presentationId: string, pageObjectId: string): Slides.Schema.Page; // Generates a thumbnail of the latest version of the specified page in the // presentation and returns a URL to the thumbnail image. // This request counts as an [expensive read request](/slides/limits) for // quota purposes. - getThumbnail(presentationId: string, pageObjectId: string): Slides_v1.Schema.Thumbnail; + getThumbnail(presentationId: string, pageObjectId: string): Slides.Schema.Thumbnail; // Generates a thumbnail of the latest version of the specified page in the // presentation and returns a URL to the thumbnail image. // This request counts as an [expensive read request](/slides/limits) for // quota purposes. - getThumbnail(presentationId: string, pageObjectId: string, optionalArgs: object): Slides_v1.Schema.Thumbnail; + getThumbnail(presentationId: string, pageObjectId: string, optionalArgs: object): Slides.Schema.Thumbnail; } } export interface PresentationsCollection { - Pages?: Slides_v1.Collection.Presentations.PagesCollection; + Pages?: Slides.Collection.Presentations.PagesCollection; // Applies one or more updates to the presentation. // Each request is validated before // being applied. If any request is not valid, then the entire request will @@ -42,15 +42,15 @@ declare namespace GoogleAppsScript { // collaborators, the presentation should reflect your changes. In any case, // the updates in your request are guaranteed to be applied together // atomically. - batchUpdate(resource: Schema.BatchUpdatePresentationRequest, presentationId: string): Slides_v1.Schema.BatchUpdatePresentationResponse; + batchUpdate(resource: Schema.BatchUpdatePresentationRequest, presentationId: string): Slides.Schema.BatchUpdatePresentationResponse; // Creates a blank presentation using the title given in the request. If a // `presentationId` is provided, it is used as the ID of the new presentation. // Otherwise, a new ID is generated. Other fields in the request, including // any provided content, are ignored. // Returns the created presentation. - create(resource: Schema.Presentation): Slides_v1.Schema.Presentation; + create(resource: Schema.Presentation): Slides.Schema.Presentation; // Gets the latest version of the specified presentation. - get(presentationId: string): Slides_v1.Schema.Presentation; + get(presentationId: string): Slides.Schema.Presentation; } } namespace Schema { @@ -65,34 +65,34 @@ declare namespace GoogleAppsScript { } export interface AutoText { content?: string; - style?: Slides_v1.Schema.TextStyle; + style?: Slides.Schema.TextStyle; type?: string; } export interface BatchUpdatePresentationRequest { - requests?: Slides_v1.Schema.Request[]; - writeControl?: Slides_v1.Schema.WriteControl; + requests?: Slides.Schema.Request[]; + writeControl?: Slides.Schema.WriteControl; } export interface BatchUpdatePresentationResponse { presentationId?: string; - replies?: Slides_v1.Schema.Response[]; - writeControl?: Slides_v1.Schema.WriteControl; + replies?: Slides.Schema.Response[]; + writeControl?: Slides.Schema.WriteControl; } export interface Bullet { - bulletStyle?: Slides_v1.Schema.TextStyle; + bulletStyle?: Slides.Schema.TextStyle; glyph?: string; listId?: string; nestingLevel?: number; } export interface ColorScheme { - colors?: Slides_v1.Schema.ThemeColorPair[]; + colors?: Slides.Schema.ThemeColorPair[]; } export interface ColorStop { alpha?: Number; - color?: Slides_v1.Schema.OpaqueColor; + color?: Slides.Schema.OpaqueColor; position?: Number; } export interface CreateImageRequest { - elementProperties?: Slides_v1.Schema.PageElementProperties; + elementProperties?: Slides.Schema.PageElementProperties; objectId?: string; url?: string; } @@ -101,7 +101,7 @@ declare namespace GoogleAppsScript { } export interface CreateLineRequest { category?: string; - elementProperties?: Slides_v1.Schema.PageElementProperties; + elementProperties?: Slides.Schema.PageElementProperties; lineCategory?: string; objectId?: string; } @@ -110,12 +110,12 @@ declare namespace GoogleAppsScript { } export interface CreateParagraphBulletsRequest { bulletPreset?: string; - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; objectId?: string; - textRange?: Slides_v1.Schema.Range; + textRange?: Slides.Schema.Range; } export interface CreateShapeRequest { - elementProperties?: Slides_v1.Schema.PageElementProperties; + elementProperties?: Slides.Schema.PageElementProperties; objectId?: string; shapeType?: string; } @@ -124,7 +124,7 @@ declare namespace GoogleAppsScript { } export interface CreateSheetsChartRequest { chartId?: number; - elementProperties?: Slides_v1.Schema.PageElementProperties; + elementProperties?: Slides.Schema.PageElementProperties; linkingMode?: string; objectId?: string; spreadsheetId?: string; @@ -135,15 +135,15 @@ declare namespace GoogleAppsScript { export interface CreateSlideRequest { insertionIndex?: number; objectId?: string; - placeholderIdMappings?: Slides_v1.Schema.LayoutPlaceholderIdMapping[]; - slideLayoutReference?: Slides_v1.Schema.LayoutReference; + placeholderIdMappings?: Slides.Schema.LayoutPlaceholderIdMapping[]; + slideLayoutReference?: Slides.Schema.LayoutReference; } export interface CreateSlideResponse { objectId?: string; } export interface CreateTableRequest { columns?: number; - elementProperties?: Slides_v1.Schema.PageElementProperties; + elementProperties?: Slides.Schema.PageElementProperties; objectId?: string; rows?: number; } @@ -151,7 +151,7 @@ declare namespace GoogleAppsScript { objectId?: string; } export interface CreateVideoRequest { - elementProperties?: Slides_v1.Schema.PageElementProperties; + elementProperties?: Slides.Schema.PageElementProperties; id?: string; objectId?: string; source?: string; @@ -170,22 +170,22 @@ declare namespace GoogleAppsScript { objectId?: string; } export interface DeleteParagraphBulletsRequest { - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; objectId?: string; - textRange?: Slides_v1.Schema.Range; + textRange?: Slides.Schema.Range; } export interface DeleteTableColumnRequest { - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; tableObjectId?: string; } export interface DeleteTableRowRequest { - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; tableObjectId?: string; } export interface DeleteTextRequest { - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; objectId?: string; - textRange?: Slides_v1.Schema.Range; + textRange?: Slides.Schema.Range; } export interface Dimension { magnitude?: Number; @@ -199,7 +199,7 @@ declare namespace GoogleAppsScript { objectId?: string; } export interface Group { - children?: Slides_v1.Schema.PageElement[]; + children?: Slides.Schema.PageElement[]; } export interface GroupObjectsRequest { childrenObjectIds?: string[]; @@ -210,39 +210,39 @@ declare namespace GoogleAppsScript { } export interface Image { contentUrl?: string; - imageProperties?: Slides_v1.Schema.ImageProperties; + imageProperties?: Slides.Schema.ImageProperties; sourceUrl?: string; } export interface ImageProperties { brightness?: Number; contrast?: Number; - cropProperties?: Slides_v1.Schema.CropProperties; - link?: Slides_v1.Schema.Link; - outline?: Slides_v1.Schema.Outline; - recolor?: Slides_v1.Schema.Recolor; - shadow?: Slides_v1.Schema.Shadow; + cropProperties?: Slides.Schema.CropProperties; + link?: Slides.Schema.Link; + outline?: Slides.Schema.Outline; + recolor?: Slides.Schema.Recolor; + shadow?: Slides.Schema.Shadow; transparency?: Number; } export interface InsertTableColumnsRequest { - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; insertRight?: boolean; number?: number; tableObjectId?: string; } export interface InsertTableRowsRequest { - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; insertBelow?: boolean; number?: number; tableObjectId?: string; } export interface InsertTextRequest { - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; insertionIndex?: number; objectId?: string; text?: string; } export interface LayoutPlaceholderIdMapping { - layoutPlaceholder?: Slides_v1.Schema.Placeholder; + layoutPlaceholder?: Slides.Schema.Placeholder; layoutPlaceholderObjectId?: string; objectId?: string; } @@ -257,7 +257,7 @@ declare namespace GoogleAppsScript { } export interface Line { lineCategory?: string; - lineProperties?: Slides_v1.Schema.LineProperties; + lineProperties?: Slides.Schema.LineProperties; lineType?: string; } export interface LineConnection { @@ -265,17 +265,17 @@ declare namespace GoogleAppsScript { connectionSiteIndex?: number; } export interface LineFill { - solidFill?: Slides_v1.Schema.SolidFill; + solidFill?: Slides.Schema.SolidFill; } export interface LineProperties { dashStyle?: string; endArrow?: string; - endConnection?: Slides_v1.Schema.LineConnection; - lineFill?: Slides_v1.Schema.LineFill; - link?: Slides_v1.Schema.Link; + endConnection?: Slides.Schema.LineConnection; + lineFill?: Slides.Schema.LineFill; + link?: Slides.Schema.Link; startArrow?: string; - startConnection?: Slides_v1.Schema.LineConnection; - weight?: Slides_v1.Schema.Dimension; + startConnection?: Slides.Schema.LineConnection; + weight?: Slides.Schema.Dimension; } export interface Link { pageObjectId?: string; @@ -292,83 +292,83 @@ declare namespace GoogleAppsScript { } export interface MergeTableCellsRequest { objectId?: string; - tableRange?: Slides_v1.Schema.TableRange; + tableRange?: Slides.Schema.TableRange; } export interface NestingLevel { - bulletStyle?: Slides_v1.Schema.TextStyle; + bulletStyle?: Slides.Schema.TextStyle; } export interface NotesProperties { speakerNotesObjectId?: string; } export interface OpaqueColor { - rgbColor?: Slides_v1.Schema.RgbColor; + rgbColor?: Slides.Schema.RgbColor; themeColor?: string; } export interface OptionalColor { - opaqueColor?: Slides_v1.Schema.OpaqueColor; + opaqueColor?: Slides.Schema.OpaqueColor; } export interface Outline { dashStyle?: string; - outlineFill?: Slides_v1.Schema.OutlineFill; + outlineFill?: Slides.Schema.OutlineFill; propertyState?: string; - weight?: Slides_v1.Schema.Dimension; + weight?: Slides.Schema.Dimension; } export interface OutlineFill { - solidFill?: Slides_v1.Schema.SolidFill; + solidFill?: Slides.Schema.SolidFill; } export interface Page { - layoutProperties?: Slides_v1.Schema.LayoutProperties; - masterProperties?: Slides_v1.Schema.MasterProperties; - notesProperties?: Slides_v1.Schema.NotesProperties; + layoutProperties?: Slides.Schema.LayoutProperties; + masterProperties?: Slides.Schema.MasterProperties; + notesProperties?: Slides.Schema.NotesProperties; objectId?: string; - pageElements?: Slides_v1.Schema.PageElement[]; - pageProperties?: Slides_v1.Schema.PageProperties; + pageElements?: Slides.Schema.PageElement[]; + pageProperties?: Slides.Schema.PageProperties; pageType?: string; revisionId?: string; - slideProperties?: Slides_v1.Schema.SlideProperties; + slideProperties?: Slides.Schema.SlideProperties; } export interface PageBackgroundFill { propertyState?: string; - solidFill?: Slides_v1.Schema.SolidFill; - stretchedPictureFill?: Slides_v1.Schema.StretchedPictureFill; + solidFill?: Slides.Schema.SolidFill; + stretchedPictureFill?: Slides.Schema.StretchedPictureFill; } export interface PageElement { description?: string; - elementGroup?: Slides_v1.Schema.Group; - image?: Slides_v1.Schema.Image; - line?: Slides_v1.Schema.Line; + elementGroup?: Slides.Schema.Group; + image?: Slides.Schema.Image; + line?: Slides.Schema.Line; objectId?: string; - shape?: Slides_v1.Schema.Shape; - sheetsChart?: Slides_v1.Schema.SheetsChart; - size?: Slides_v1.Schema.Size; - table?: Slides_v1.Schema.Table; + shape?: Slides.Schema.Shape; + sheetsChart?: Slides.Schema.SheetsChart; + size?: Slides.Schema.Size; + table?: Slides.Schema.Table; title?: string; - transform?: Slides_v1.Schema.AffineTransform; - video?: Slides_v1.Schema.Video; - wordArt?: Slides_v1.Schema.WordArt; + transform?: Slides.Schema.AffineTransform; + video?: Slides.Schema.Video; + wordArt?: Slides.Schema.WordArt; } export interface PageElementProperties { pageObjectId?: string; - size?: Slides_v1.Schema.Size; - transform?: Slides_v1.Schema.AffineTransform; + size?: Slides.Schema.Size; + transform?: Slides.Schema.AffineTransform; } export interface PageProperties { - colorScheme?: Slides_v1.Schema.ColorScheme; - pageBackgroundFill?: Slides_v1.Schema.PageBackgroundFill; + colorScheme?: Slides.Schema.ColorScheme; + pageBackgroundFill?: Slides.Schema.PageBackgroundFill; } export interface ParagraphMarker { - bullet?: Slides_v1.Schema.Bullet; - style?: Slides_v1.Schema.ParagraphStyle; + bullet?: Slides.Schema.Bullet; + style?: Slides.Schema.ParagraphStyle; } export interface ParagraphStyle { alignment?: string; direction?: string; - indentEnd?: Slides_v1.Schema.Dimension; - indentFirstLine?: Slides_v1.Schema.Dimension; - indentStart?: Slides_v1.Schema.Dimension; + indentEnd?: Slides.Schema.Dimension; + indentFirstLine?: Slides.Schema.Dimension; + indentStart?: Slides.Schema.Dimension; lineSpacing?: Number; - spaceAbove?: Slides_v1.Schema.Dimension; - spaceBelow?: Slides_v1.Schema.Dimension; + spaceAbove?: Slides.Schema.Dimension; + spaceBelow?: Slides.Schema.Dimension; spacingMode?: string; } export interface Placeholder { @@ -377,14 +377,14 @@ declare namespace GoogleAppsScript { type?: string; } export interface Presentation { - layouts?: Slides_v1.Schema.Page[]; + layouts?: Slides.Schema.Page[]; locale?: string; - masters?: Slides_v1.Schema.Page[]; - notesMaster?: Slides_v1.Schema.Page; - pageSize?: Slides_v1.Schema.Size; + masters?: Slides.Schema.Page[]; + notesMaster?: Slides.Schema.Page; + pageSize?: Slides.Schema.Size; presentationId?: string; revisionId?: string; - slides?: Slides_v1.Schema.Page[]; + slides?: Slides.Schema.Page[]; title?: string; } export interface Range { @@ -394,13 +394,13 @@ declare namespace GoogleAppsScript { } export interface Recolor { name?: string; - recolorStops?: Slides_v1.Schema.ColorStop[]; + recolorStops?: Slides.Schema.ColorStop[]; } export interface RefreshSheetsChartRequest { objectId?: string; } export interface ReplaceAllShapesWithImageRequest { - containsText?: Slides_v1.Schema.SubstringMatchCriteria; + containsText?: Slides.Schema.SubstringMatchCriteria; imageReplaceMethod?: string; imageUrl?: string; pageObjectIds?: string[]; @@ -411,7 +411,7 @@ declare namespace GoogleAppsScript { } export interface ReplaceAllShapesWithSheetsChartRequest { chartId?: number; - containsText?: Slides_v1.Schema.SubstringMatchCriteria; + containsText?: Slides.Schema.SubstringMatchCriteria; linkingMode?: string; pageObjectIds?: string[]; spreadsheetId?: string; @@ -420,7 +420,7 @@ declare namespace GoogleAppsScript { occurrencesChanged?: number; } export interface ReplaceAllTextRequest { - containsText?: Slides_v1.Schema.SubstringMatchCriteria; + containsText?: Slides.Schema.SubstringMatchCriteria; pageObjectIds?: string[]; replaceText?: string; } @@ -433,66 +433,66 @@ declare namespace GoogleAppsScript { url?: string; } export interface Request { - createImage?: Slides_v1.Schema.CreateImageRequest; - createLine?: Slides_v1.Schema.CreateLineRequest; - createParagraphBullets?: Slides_v1.Schema.CreateParagraphBulletsRequest; - createShape?: Slides_v1.Schema.CreateShapeRequest; - createSheetsChart?: Slides_v1.Schema.CreateSheetsChartRequest; - createSlide?: Slides_v1.Schema.CreateSlideRequest; - createTable?: Slides_v1.Schema.CreateTableRequest; - createVideo?: Slides_v1.Schema.CreateVideoRequest; - deleteObject?: Slides_v1.Schema.DeleteObjectRequest; - deleteParagraphBullets?: Slides_v1.Schema.DeleteParagraphBulletsRequest; - deleteTableColumn?: Slides_v1.Schema.DeleteTableColumnRequest; - deleteTableRow?: Slides_v1.Schema.DeleteTableRowRequest; - deleteText?: Slides_v1.Schema.DeleteTextRequest; - duplicateObject?: Slides_v1.Schema.DuplicateObjectRequest; - groupObjects?: Slides_v1.Schema.GroupObjectsRequest; - insertTableColumns?: Slides_v1.Schema.InsertTableColumnsRequest; - insertTableRows?: Slides_v1.Schema.InsertTableRowsRequest; - insertText?: Slides_v1.Schema.InsertTextRequest; - mergeTableCells?: Slides_v1.Schema.MergeTableCellsRequest; - refreshSheetsChart?: Slides_v1.Schema.RefreshSheetsChartRequest; - replaceAllShapesWithImage?: Slides_v1.Schema.ReplaceAllShapesWithImageRequest; - replaceAllShapesWithSheetsChart?: Slides_v1.Schema.ReplaceAllShapesWithSheetsChartRequest; - replaceAllText?: Slides_v1.Schema.ReplaceAllTextRequest; - replaceImage?: Slides_v1.Schema.ReplaceImageRequest; - rerouteLine?: Slides_v1.Schema.RerouteLineRequest; - ungroupObjects?: Slides_v1.Schema.UngroupObjectsRequest; - unmergeTableCells?: Slides_v1.Schema.UnmergeTableCellsRequest; - updateImageProperties?: Slides_v1.Schema.UpdateImagePropertiesRequest; - updateLineCategory?: Slides_v1.Schema.UpdateLineCategoryRequest; - updateLineProperties?: Slides_v1.Schema.UpdateLinePropertiesRequest; - updatePageElementAltText?: Slides_v1.Schema.UpdatePageElementAltTextRequest; - updatePageElementTransform?: Slides_v1.Schema.UpdatePageElementTransformRequest; - updatePageElementsZOrder?: Slides_v1.Schema.UpdatePageElementsZOrderRequest; - updatePageProperties?: Slides_v1.Schema.UpdatePagePropertiesRequest; - updateParagraphStyle?: Slides_v1.Schema.UpdateParagraphStyleRequest; - updateShapeProperties?: Slides_v1.Schema.UpdateShapePropertiesRequest; - updateSlidesPosition?: Slides_v1.Schema.UpdateSlidesPositionRequest; - updateTableBorderProperties?: Slides_v1.Schema.UpdateTableBorderPropertiesRequest; - updateTableCellProperties?: Slides_v1.Schema.UpdateTableCellPropertiesRequest; - updateTableColumnProperties?: Slides_v1.Schema.UpdateTableColumnPropertiesRequest; - updateTableRowProperties?: Slides_v1.Schema.UpdateTableRowPropertiesRequest; - updateTextStyle?: Slides_v1.Schema.UpdateTextStyleRequest; - updateVideoProperties?: Slides_v1.Schema.UpdateVideoPropertiesRequest; + createImage?: Slides.Schema.CreateImageRequest; + createLine?: Slides.Schema.CreateLineRequest; + createParagraphBullets?: Slides.Schema.CreateParagraphBulletsRequest; + createShape?: Slides.Schema.CreateShapeRequest; + createSheetsChart?: Slides.Schema.CreateSheetsChartRequest; + createSlide?: Slides.Schema.CreateSlideRequest; + createTable?: Slides.Schema.CreateTableRequest; + createVideo?: Slides.Schema.CreateVideoRequest; + deleteObject?: Slides.Schema.DeleteObjectRequest; + deleteParagraphBullets?: Slides.Schema.DeleteParagraphBulletsRequest; + deleteTableColumn?: Slides.Schema.DeleteTableColumnRequest; + deleteTableRow?: Slides.Schema.DeleteTableRowRequest; + deleteText?: Slides.Schema.DeleteTextRequest; + duplicateObject?: Slides.Schema.DuplicateObjectRequest; + groupObjects?: Slides.Schema.GroupObjectsRequest; + insertTableColumns?: Slides.Schema.InsertTableColumnsRequest; + insertTableRows?: Slides.Schema.InsertTableRowsRequest; + insertText?: Slides.Schema.InsertTextRequest; + mergeTableCells?: Slides.Schema.MergeTableCellsRequest; + refreshSheetsChart?: Slides.Schema.RefreshSheetsChartRequest; + replaceAllShapesWithImage?: Slides.Schema.ReplaceAllShapesWithImageRequest; + replaceAllShapesWithSheetsChart?: Slides.Schema.ReplaceAllShapesWithSheetsChartRequest; + replaceAllText?: Slides.Schema.ReplaceAllTextRequest; + replaceImage?: Slides.Schema.ReplaceImageRequest; + rerouteLine?: Slides.Schema.RerouteLineRequest; + ungroupObjects?: Slides.Schema.UngroupObjectsRequest; + unmergeTableCells?: Slides.Schema.UnmergeTableCellsRequest; + updateImageProperties?: Slides.Schema.UpdateImagePropertiesRequest; + updateLineCategory?: Slides.Schema.UpdateLineCategoryRequest; + updateLineProperties?: Slides.Schema.UpdateLinePropertiesRequest; + updatePageElementAltText?: Slides.Schema.UpdatePageElementAltTextRequest; + updatePageElementTransform?: Slides.Schema.UpdatePageElementTransformRequest; + updatePageElementsZOrder?: Slides.Schema.UpdatePageElementsZOrderRequest; + updatePageProperties?: Slides.Schema.UpdatePagePropertiesRequest; + updateParagraphStyle?: Slides.Schema.UpdateParagraphStyleRequest; + updateShapeProperties?: Slides.Schema.UpdateShapePropertiesRequest; + updateSlidesPosition?: Slides.Schema.UpdateSlidesPositionRequest; + updateTableBorderProperties?: Slides.Schema.UpdateTableBorderPropertiesRequest; + updateTableCellProperties?: Slides.Schema.UpdateTableCellPropertiesRequest; + updateTableColumnProperties?: Slides.Schema.UpdateTableColumnPropertiesRequest; + updateTableRowProperties?: Slides.Schema.UpdateTableRowPropertiesRequest; + updateTextStyle?: Slides.Schema.UpdateTextStyleRequest; + updateVideoProperties?: Slides.Schema.UpdateVideoPropertiesRequest; } export interface RerouteLineRequest { objectId?: string; } export interface Response { - createImage?: Slides_v1.Schema.CreateImageResponse; - createLine?: Slides_v1.Schema.CreateLineResponse; - createShape?: Slides_v1.Schema.CreateShapeResponse; - createSheetsChart?: Slides_v1.Schema.CreateSheetsChartResponse; - createSlide?: Slides_v1.Schema.CreateSlideResponse; - createTable?: Slides_v1.Schema.CreateTableResponse; - createVideo?: Slides_v1.Schema.CreateVideoResponse; - duplicateObject?: Slides_v1.Schema.DuplicateObjectResponse; - groupObjects?: Slides_v1.Schema.GroupObjectsResponse; - replaceAllShapesWithImage?: Slides_v1.Schema.ReplaceAllShapesWithImageResponse; - replaceAllShapesWithSheetsChart?: Slides_v1.Schema.ReplaceAllShapesWithSheetsChartResponse; - replaceAllText?: Slides_v1.Schema.ReplaceAllTextResponse; + createImage?: Slides.Schema.CreateImageResponse; + createLine?: Slides.Schema.CreateLineResponse; + createShape?: Slides.Schema.CreateShapeResponse; + createSheetsChart?: Slides.Schema.CreateSheetsChartResponse; + createSlide?: Slides.Schema.CreateSlideResponse; + createTable?: Slides.Schema.CreateTableResponse; + createVideo?: Slides.Schema.CreateVideoResponse; + duplicateObject?: Slides.Schema.DuplicateObjectResponse; + groupObjects?: Slides.Schema.GroupObjectsResponse; + replaceAllShapesWithImage?: Slides.Schema.ReplaceAllShapesWithImageResponse; + replaceAllShapesWithSheetsChart?: Slides.Schema.ReplaceAllShapesWithSheetsChartResponse; + replaceAllText?: Slides.Schema.ReplaceAllTextResponse; } export interface RgbColor { blue?: Number; @@ -502,55 +502,55 @@ declare namespace GoogleAppsScript { export interface Shadow { alignment?: string; alpha?: Number; - blurRadius?: Slides_v1.Schema.Dimension; - color?: Slides_v1.Schema.OpaqueColor; + blurRadius?: Slides.Schema.Dimension; + color?: Slides.Schema.OpaqueColor; propertyState?: string; rotateWithShape?: boolean; - transform?: Slides_v1.Schema.AffineTransform; + transform?: Slides.Schema.AffineTransform; type?: string; } export interface Shape { - placeholder?: Slides_v1.Schema.Placeholder; - shapeProperties?: Slides_v1.Schema.ShapeProperties; + placeholder?: Slides.Schema.Placeholder; + shapeProperties?: Slides.Schema.ShapeProperties; shapeType?: string; - text?: Slides_v1.Schema.TextContent; + text?: Slides.Schema.TextContent; } export interface ShapeBackgroundFill { propertyState?: string; - solidFill?: Slides_v1.Schema.SolidFill; + solidFill?: Slides.Schema.SolidFill; } export interface ShapeProperties { contentAlignment?: string; - link?: Slides_v1.Schema.Link; - outline?: Slides_v1.Schema.Outline; - shadow?: Slides_v1.Schema.Shadow; - shapeBackgroundFill?: Slides_v1.Schema.ShapeBackgroundFill; + link?: Slides.Schema.Link; + outline?: Slides.Schema.Outline; + shadow?: Slides.Schema.Shadow; + shapeBackgroundFill?: Slides.Schema.ShapeBackgroundFill; } export interface SheetsChart { chartId?: number; contentUrl?: string; - sheetsChartProperties?: Slides_v1.Schema.SheetsChartProperties; + sheetsChartProperties?: Slides.Schema.SheetsChartProperties; spreadsheetId?: string; } export interface SheetsChartProperties { - chartImageProperties?: Slides_v1.Schema.ImageProperties; + chartImageProperties?: Slides.Schema.ImageProperties; } export interface Size { - height?: Slides_v1.Schema.Dimension; - width?: Slides_v1.Schema.Dimension; + height?: Slides.Schema.Dimension; + width?: Slides.Schema.Dimension; } export interface SlideProperties { layoutObjectId?: string; masterObjectId?: string; - notesPage?: Slides_v1.Schema.Page; + notesPage?: Slides.Schema.Page; } export interface SolidFill { alpha?: Number; - color?: Slides_v1.Schema.OpaqueColor; + color?: Slides.Schema.OpaqueColor; } export interface StretchedPictureFill { contentUrl?: string; - size?: Slides_v1.Schema.Size; + size?: Slides.Schema.Size; } export interface SubstringMatchCriteria { matchCase?: boolean; @@ -558,37 +558,37 @@ declare namespace GoogleAppsScript { } export interface Table { columns?: number; - horizontalBorderRows?: Slides_v1.Schema.TableBorderRow[]; + horizontalBorderRows?: Slides.Schema.TableBorderRow[]; rows?: number; - tableColumns?: Slides_v1.Schema.TableColumnProperties[]; - tableRows?: Slides_v1.Schema.TableRow[]; - verticalBorderRows?: Slides_v1.Schema.TableBorderRow[]; + tableColumns?: Slides.Schema.TableColumnProperties[]; + tableRows?: Slides.Schema.TableRow[]; + verticalBorderRows?: Slides.Schema.TableBorderRow[]; } export interface TableBorderCell { - location?: Slides_v1.Schema.TableCellLocation; - tableBorderProperties?: Slides_v1.Schema.TableBorderProperties; + location?: Slides.Schema.TableCellLocation; + tableBorderProperties?: Slides.Schema.TableBorderProperties; } export interface TableBorderFill { - solidFill?: Slides_v1.Schema.SolidFill; + solidFill?: Slides.Schema.SolidFill; } export interface TableBorderProperties { dashStyle?: string; - tableBorderFill?: Slides_v1.Schema.TableBorderFill; - weight?: Slides_v1.Schema.Dimension; + tableBorderFill?: Slides.Schema.TableBorderFill; + weight?: Slides.Schema.Dimension; } export interface TableBorderRow { - tableBorderCells?: Slides_v1.Schema.TableBorderCell[]; + tableBorderCells?: Slides.Schema.TableBorderCell[]; } export interface TableCell { columnSpan?: number; - location?: Slides_v1.Schema.TableCellLocation; + location?: Slides.Schema.TableCellLocation; rowSpan?: number; - tableCellProperties?: Slides_v1.Schema.TableCellProperties; - text?: Slides_v1.Schema.TextContent; + tableCellProperties?: Slides.Schema.TableCellProperties; + text?: Slides.Schema.TextContent; } export interface TableCellBackgroundFill { propertyState?: string; - solidFill?: Slides_v1.Schema.SolidFill; + solidFill?: Slides.Schema.SolidFill; } export interface TableCellLocation { columnIndex?: number; @@ -596,55 +596,55 @@ declare namespace GoogleAppsScript { } export interface TableCellProperties { contentAlignment?: string; - tableCellBackgroundFill?: Slides_v1.Schema.TableCellBackgroundFill; + tableCellBackgroundFill?: Slides.Schema.TableCellBackgroundFill; } export interface TableColumnProperties { - columnWidth?: Slides_v1.Schema.Dimension; + columnWidth?: Slides.Schema.Dimension; } export interface TableRange { columnSpan?: number; - location?: Slides_v1.Schema.TableCellLocation; + location?: Slides.Schema.TableCellLocation; rowSpan?: number; } export interface TableRow { - rowHeight?: Slides_v1.Schema.Dimension; - tableCells?: Slides_v1.Schema.TableCell[]; - tableRowProperties?: Slides_v1.Schema.TableRowProperties; + rowHeight?: Slides.Schema.Dimension; + tableCells?: Slides.Schema.TableCell[]; + tableRowProperties?: Slides.Schema.TableRowProperties; } export interface TableRowProperties { - minRowHeight?: Slides_v1.Schema.Dimension; + minRowHeight?: Slides.Schema.Dimension; } export interface TextContent { lists?: object; - textElements?: Slides_v1.Schema.TextElement[]; + textElements?: Slides.Schema.TextElement[]; } export interface TextElement { - autoText?: Slides_v1.Schema.AutoText; + autoText?: Slides.Schema.AutoText; endIndex?: number; - paragraphMarker?: Slides_v1.Schema.ParagraphMarker; + paragraphMarker?: Slides.Schema.ParagraphMarker; startIndex?: number; - textRun?: Slides_v1.Schema.TextRun; + textRun?: Slides.Schema.TextRun; } export interface TextRun { content?: string; - style?: Slides_v1.Schema.TextStyle; + style?: Slides.Schema.TextStyle; } export interface TextStyle { - backgroundColor?: Slides_v1.Schema.OptionalColor; + backgroundColor?: Slides.Schema.OptionalColor; baselineOffset?: string; bold?: boolean; fontFamily?: string; - fontSize?: Slides_v1.Schema.Dimension; - foregroundColor?: Slides_v1.Schema.OptionalColor; + fontSize?: Slides.Schema.Dimension; + foregroundColor?: Slides.Schema.OptionalColor; italic?: boolean; - link?: Slides_v1.Schema.Link; + link?: Slides.Schema.Link; smallCaps?: boolean; strikethrough?: boolean; underline?: boolean; - weightedFontFamily?: Slides_v1.Schema.WeightedFontFamily; + weightedFontFamily?: Slides.Schema.WeightedFontFamily; } export interface ThemeColorPair { - color?: Slides_v1.Schema.RgbColor; + color?: Slides.Schema.RgbColor; type?: string; } export interface Thumbnail { @@ -657,11 +657,11 @@ declare namespace GoogleAppsScript { } export interface UnmergeTableCellsRequest { objectId?: string; - tableRange?: Slides_v1.Schema.TableRange; + tableRange?: Slides.Schema.TableRange; } export interface UpdateImagePropertiesRequest { fields?: string; - imageProperties?: Slides_v1.Schema.ImageProperties; + imageProperties?: Slides.Schema.ImageProperties; objectId?: string; } export interface UpdateLineCategoryRequest { @@ -670,7 +670,7 @@ declare namespace GoogleAppsScript { } export interface UpdateLinePropertiesRequest { fields?: string; - lineProperties?: Slides_v1.Schema.LineProperties; + lineProperties?: Slides.Schema.LineProperties; objectId?: string; } export interface UpdatePageElementAltTextRequest { @@ -681,7 +681,7 @@ declare namespace GoogleAppsScript { export interface UpdatePageElementTransformRequest { applyMode?: string; objectId?: string; - transform?: Slides_v1.Schema.AffineTransform; + transform?: Slides.Schema.AffineTransform; } export interface UpdatePageElementsZOrderRequest { operation?: string; @@ -690,19 +690,19 @@ declare namespace GoogleAppsScript { export interface UpdatePagePropertiesRequest { fields?: string; objectId?: string; - pageProperties?: Slides_v1.Schema.PageProperties; + pageProperties?: Slides.Schema.PageProperties; } export interface UpdateParagraphStyleRequest { - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; fields?: string; objectId?: string; - style?: Slides_v1.Schema.ParagraphStyle; - textRange?: Slides_v1.Schema.Range; + style?: Slides.Schema.ParagraphStyle; + textRange?: Slides.Schema.Range; } export interface UpdateShapePropertiesRequest { fields?: string; objectId?: string; - shapeProperties?: Slides_v1.Schema.ShapeProperties; + shapeProperties?: Slides.Schema.ShapeProperties; } export interface UpdateSlidesPositionRequest { insertionIndex?: number; @@ -712,50 +712,50 @@ declare namespace GoogleAppsScript { borderPosition?: string; fields?: string; objectId?: string; - tableBorderProperties?: Slides_v1.Schema.TableBorderProperties; - tableRange?: Slides_v1.Schema.TableRange; + tableBorderProperties?: Slides.Schema.TableBorderProperties; + tableRange?: Slides.Schema.TableRange; } export interface UpdateTableCellPropertiesRequest { fields?: string; objectId?: string; - tableCellProperties?: Slides_v1.Schema.TableCellProperties; - tableRange?: Slides_v1.Schema.TableRange; + tableCellProperties?: Slides.Schema.TableCellProperties; + tableRange?: Slides.Schema.TableRange; } export interface UpdateTableColumnPropertiesRequest { columnIndices?: number[]; fields?: string; objectId?: string; - tableColumnProperties?: Slides_v1.Schema.TableColumnProperties; + tableColumnProperties?: Slides.Schema.TableColumnProperties; } export interface UpdateTableRowPropertiesRequest { fields?: string; objectId?: string; rowIndices?: number[]; - tableRowProperties?: Slides_v1.Schema.TableRowProperties; + tableRowProperties?: Slides.Schema.TableRowProperties; } export interface UpdateTextStyleRequest { - cellLocation?: Slides_v1.Schema.TableCellLocation; + cellLocation?: Slides.Schema.TableCellLocation; fields?: string; objectId?: string; - style?: Slides_v1.Schema.TextStyle; - textRange?: Slides_v1.Schema.Range; + style?: Slides.Schema.TextStyle; + textRange?: Slides.Schema.Range; } export interface UpdateVideoPropertiesRequest { fields?: string; objectId?: string; - videoProperties?: Slides_v1.Schema.VideoProperties; + videoProperties?: Slides.Schema.VideoProperties; } export interface Video { id?: string; source?: string; url?: string; - videoProperties?: Slides_v1.Schema.VideoProperties; + videoProperties?: Slides.Schema.VideoProperties; } export interface VideoProperties { autoPlay?: boolean; end?: number; mute?: boolean; - outline?: Slides_v1.Schema.Outline; + outline?: Slides.Schema.Outline; start?: number; } export interface WeightedFontFamily { @@ -770,239 +770,239 @@ declare namespace GoogleAppsScript { } } } - export interface Slides_v1 { - Presentations?: Slides_v1.Collection.PresentationsCollection; + export interface Slides { + Presentations?: Slides.Collection.PresentationsCollection; // Create a new instance of AffineTransform - newAffineTransform(): Slides_v1.Schema.AffineTransform; + newAffineTransform(): Slides.Schema.AffineTransform; // Create a new instance of AutoText - newAutoText(): Slides_v1.Schema.AutoText; + newAutoText(): Slides.Schema.AutoText; // Create a new instance of BatchUpdatePresentationRequest - newBatchUpdatePresentationRequest(): Slides_v1.Schema.BatchUpdatePresentationRequest; + newBatchUpdatePresentationRequest(): Slides.Schema.BatchUpdatePresentationRequest; // Create a new instance of Bullet - newBullet(): Slides_v1.Schema.Bullet; + newBullet(): Slides.Schema.Bullet; // Create a new instance of ColorScheme - newColorScheme(): Slides_v1.Schema.ColorScheme; + newColorScheme(): Slides.Schema.ColorScheme; // Create a new instance of ColorStop - newColorStop(): Slides_v1.Schema.ColorStop; + newColorStop(): Slides.Schema.ColorStop; // Create a new instance of CreateImageRequest - newCreateImageRequest(): Slides_v1.Schema.CreateImageRequest; + newCreateImageRequest(): Slides.Schema.CreateImageRequest; // Create a new instance of CreateLineRequest - newCreateLineRequest(): Slides_v1.Schema.CreateLineRequest; + newCreateLineRequest(): Slides.Schema.CreateLineRequest; // Create a new instance of CreateParagraphBulletsRequest - newCreateParagraphBulletsRequest(): Slides_v1.Schema.CreateParagraphBulletsRequest; + newCreateParagraphBulletsRequest(): Slides.Schema.CreateParagraphBulletsRequest; // Create a new instance of CreateShapeRequest - newCreateShapeRequest(): Slides_v1.Schema.CreateShapeRequest; + newCreateShapeRequest(): Slides.Schema.CreateShapeRequest; // Create a new instance of CreateSheetsChartRequest - newCreateSheetsChartRequest(): Slides_v1.Schema.CreateSheetsChartRequest; + newCreateSheetsChartRequest(): Slides.Schema.CreateSheetsChartRequest; // Create a new instance of CreateSlideRequest - newCreateSlideRequest(): Slides_v1.Schema.CreateSlideRequest; + newCreateSlideRequest(): Slides.Schema.CreateSlideRequest; // Create a new instance of CreateTableRequest - newCreateTableRequest(): Slides_v1.Schema.CreateTableRequest; + newCreateTableRequest(): Slides.Schema.CreateTableRequest; // Create a new instance of CreateVideoRequest - newCreateVideoRequest(): Slides_v1.Schema.CreateVideoRequest; + newCreateVideoRequest(): Slides.Schema.CreateVideoRequest; // Create a new instance of CropProperties - newCropProperties(): Slides_v1.Schema.CropProperties; + newCropProperties(): Slides.Schema.CropProperties; // Create a new instance of DeleteObjectRequest - newDeleteObjectRequest(): Slides_v1.Schema.DeleteObjectRequest; + newDeleteObjectRequest(): Slides.Schema.DeleteObjectRequest; // Create a new instance of DeleteParagraphBulletsRequest - newDeleteParagraphBulletsRequest(): Slides_v1.Schema.DeleteParagraphBulletsRequest; + newDeleteParagraphBulletsRequest(): Slides.Schema.DeleteParagraphBulletsRequest; // Create a new instance of DeleteTableColumnRequest - newDeleteTableColumnRequest(): Slides_v1.Schema.DeleteTableColumnRequest; + newDeleteTableColumnRequest(): Slides.Schema.DeleteTableColumnRequest; // Create a new instance of DeleteTableRowRequest - newDeleteTableRowRequest(): Slides_v1.Schema.DeleteTableRowRequest; + newDeleteTableRowRequest(): Slides.Schema.DeleteTableRowRequest; // Create a new instance of DeleteTextRequest - newDeleteTextRequest(): Slides_v1.Schema.DeleteTextRequest; + newDeleteTextRequest(): Slides.Schema.DeleteTextRequest; // Create a new instance of Dimension - newDimension(): Slides_v1.Schema.Dimension; + newDimension(): Slides.Schema.Dimension; // Create a new instance of DuplicateObjectRequest - newDuplicateObjectRequest(): Slides_v1.Schema.DuplicateObjectRequest; + newDuplicateObjectRequest(): Slides.Schema.DuplicateObjectRequest; // Create a new instance of Group - newGroup(): Slides_v1.Schema.Group; + newGroup(): Slides.Schema.Group; // Create a new instance of GroupObjectsRequest - newGroupObjectsRequest(): Slides_v1.Schema.GroupObjectsRequest; + newGroupObjectsRequest(): Slides.Schema.GroupObjectsRequest; // Create a new instance of Image - newImage(): Slides_v1.Schema.Image; + newImage(): Slides.Schema.Image; // Create a new instance of ImageProperties - newImageProperties(): Slides_v1.Schema.ImageProperties; + newImageProperties(): Slides.Schema.ImageProperties; // Create a new instance of InsertTableColumnsRequest - newInsertTableColumnsRequest(): Slides_v1.Schema.InsertTableColumnsRequest; + newInsertTableColumnsRequest(): Slides.Schema.InsertTableColumnsRequest; // Create a new instance of InsertTableRowsRequest - newInsertTableRowsRequest(): Slides_v1.Schema.InsertTableRowsRequest; + newInsertTableRowsRequest(): Slides.Schema.InsertTableRowsRequest; // Create a new instance of InsertTextRequest - newInsertTextRequest(): Slides_v1.Schema.InsertTextRequest; + newInsertTextRequest(): Slides.Schema.InsertTextRequest; // Create a new instance of LayoutPlaceholderIdMapping - newLayoutPlaceholderIdMapping(): Slides_v1.Schema.LayoutPlaceholderIdMapping; + newLayoutPlaceholderIdMapping(): Slides.Schema.LayoutPlaceholderIdMapping; // Create a new instance of LayoutProperties - newLayoutProperties(): Slides_v1.Schema.LayoutProperties; + newLayoutProperties(): Slides.Schema.LayoutProperties; // Create a new instance of LayoutReference - newLayoutReference(): Slides_v1.Schema.LayoutReference; + newLayoutReference(): Slides.Schema.LayoutReference; // Create a new instance of Line - newLine(): Slides_v1.Schema.Line; + newLine(): Slides.Schema.Line; // Create a new instance of LineConnection - newLineConnection(): Slides_v1.Schema.LineConnection; + newLineConnection(): Slides.Schema.LineConnection; // Create a new instance of LineFill - newLineFill(): Slides_v1.Schema.LineFill; + newLineFill(): Slides.Schema.LineFill; // Create a new instance of LineProperties - newLineProperties(): Slides_v1.Schema.LineProperties; + newLineProperties(): Slides.Schema.LineProperties; // Create a new instance of Link - newLink(): Slides_v1.Schema.Link; + newLink(): Slides.Schema.Link; // Create a new instance of MasterProperties - newMasterProperties(): Slides_v1.Schema.MasterProperties; + newMasterProperties(): Slides.Schema.MasterProperties; // Create a new instance of MergeTableCellsRequest - newMergeTableCellsRequest(): Slides_v1.Schema.MergeTableCellsRequest; + newMergeTableCellsRequest(): Slides.Schema.MergeTableCellsRequest; // Create a new instance of NotesProperties - newNotesProperties(): Slides_v1.Schema.NotesProperties; + newNotesProperties(): Slides.Schema.NotesProperties; // Create a new instance of OpaqueColor - newOpaqueColor(): Slides_v1.Schema.OpaqueColor; + newOpaqueColor(): Slides.Schema.OpaqueColor; // Create a new instance of OptionalColor - newOptionalColor(): Slides_v1.Schema.OptionalColor; + newOptionalColor(): Slides.Schema.OptionalColor; // Create a new instance of Outline - newOutline(): Slides_v1.Schema.Outline; + newOutline(): Slides.Schema.Outline; // Create a new instance of OutlineFill - newOutlineFill(): Slides_v1.Schema.OutlineFill; + newOutlineFill(): Slides.Schema.OutlineFill; // Create a new instance of Page - newPage(): Slides_v1.Schema.Page; + newPage(): Slides.Schema.Page; // Create a new instance of PageBackgroundFill - newPageBackgroundFill(): Slides_v1.Schema.PageBackgroundFill; + newPageBackgroundFill(): Slides.Schema.PageBackgroundFill; // Create a new instance of PageElement - newPageElement(): Slides_v1.Schema.PageElement; + newPageElement(): Slides.Schema.PageElement; // Create a new instance of PageElementProperties - newPageElementProperties(): Slides_v1.Schema.PageElementProperties; + newPageElementProperties(): Slides.Schema.PageElementProperties; // Create a new instance of PageProperties - newPageProperties(): Slides_v1.Schema.PageProperties; + newPageProperties(): Slides.Schema.PageProperties; // Create a new instance of ParagraphMarker - newParagraphMarker(): Slides_v1.Schema.ParagraphMarker; + newParagraphMarker(): Slides.Schema.ParagraphMarker; // Create a new instance of ParagraphStyle - newParagraphStyle(): Slides_v1.Schema.ParagraphStyle; + newParagraphStyle(): Slides.Schema.ParagraphStyle; // Create a new instance of Placeholder - newPlaceholder(): Slides_v1.Schema.Placeholder; + newPlaceholder(): Slides.Schema.Placeholder; // Create a new instance of Presentation - newPresentation(): Slides_v1.Schema.Presentation; + newPresentation(): Slides.Schema.Presentation; // Create a new instance of Range - newRange(): Slides_v1.Schema.Range; + newRange(): Slides.Schema.Range; // Create a new instance of Recolor - newRecolor(): Slides_v1.Schema.Recolor; + newRecolor(): Slides.Schema.Recolor; // Create a new instance of RefreshSheetsChartRequest - newRefreshSheetsChartRequest(): Slides_v1.Schema.RefreshSheetsChartRequest; + newRefreshSheetsChartRequest(): Slides.Schema.RefreshSheetsChartRequest; // Create a new instance of ReplaceAllShapesWithImageRequest - newReplaceAllShapesWithImageRequest(): Slides_v1.Schema.ReplaceAllShapesWithImageRequest; + newReplaceAllShapesWithImageRequest(): Slides.Schema.ReplaceAllShapesWithImageRequest; // Create a new instance of ReplaceAllShapesWithSheetsChartRequest - newReplaceAllShapesWithSheetsChartRequest(): Slides_v1.Schema.ReplaceAllShapesWithSheetsChartRequest; + newReplaceAllShapesWithSheetsChartRequest(): Slides.Schema.ReplaceAllShapesWithSheetsChartRequest; // Create a new instance of ReplaceAllTextRequest - newReplaceAllTextRequest(): Slides_v1.Schema.ReplaceAllTextRequest; + newReplaceAllTextRequest(): Slides.Schema.ReplaceAllTextRequest; // Create a new instance of ReplaceImageRequest - newReplaceImageRequest(): Slides_v1.Schema.ReplaceImageRequest; + newReplaceImageRequest(): Slides.Schema.ReplaceImageRequest; // Create a new instance of Request - newRequest(): Slides_v1.Schema.Request; + newRequest(): Slides.Schema.Request; // Create a new instance of RerouteLineRequest - newRerouteLineRequest(): Slides_v1.Schema.RerouteLineRequest; + newRerouteLineRequest(): Slides.Schema.RerouteLineRequest; // Create a new instance of RgbColor - newRgbColor(): Slides_v1.Schema.RgbColor; + newRgbColor(): Slides.Schema.RgbColor; // Create a new instance of Shadow - newShadow(): Slides_v1.Schema.Shadow; + newShadow(): Slides.Schema.Shadow; // Create a new instance of Shape - newShape(): Slides_v1.Schema.Shape; + newShape(): Slides.Schema.Shape; // Create a new instance of ShapeBackgroundFill - newShapeBackgroundFill(): Slides_v1.Schema.ShapeBackgroundFill; + newShapeBackgroundFill(): Slides.Schema.ShapeBackgroundFill; // Create a new instance of ShapeProperties - newShapeProperties(): Slides_v1.Schema.ShapeProperties; + newShapeProperties(): Slides.Schema.ShapeProperties; // Create a new instance of SheetsChart - newSheetsChart(): Slides_v1.Schema.SheetsChart; + newSheetsChart(): Slides.Schema.SheetsChart; // Create a new instance of SheetsChartProperties - newSheetsChartProperties(): Slides_v1.Schema.SheetsChartProperties; + newSheetsChartProperties(): Slides.Schema.SheetsChartProperties; // Create a new instance of Size - newSize(): Slides_v1.Schema.Size; + newSize(): Slides.Schema.Size; // Create a new instance of SlideProperties - newSlideProperties(): Slides_v1.Schema.SlideProperties; + newSlideProperties(): Slides.Schema.SlideProperties; // Create a new instance of SolidFill - newSolidFill(): Slides_v1.Schema.SolidFill; + newSolidFill(): Slides.Schema.SolidFill; // Create a new instance of StretchedPictureFill - newStretchedPictureFill(): Slides_v1.Schema.StretchedPictureFill; + newStretchedPictureFill(): Slides.Schema.StretchedPictureFill; // Create a new instance of SubstringMatchCriteria - newSubstringMatchCriteria(): Slides_v1.Schema.SubstringMatchCriteria; + newSubstringMatchCriteria(): Slides.Schema.SubstringMatchCriteria; // Create a new instance of Table - newTable(): Slides_v1.Schema.Table; + newTable(): Slides.Schema.Table; // Create a new instance of TableBorderCell - newTableBorderCell(): Slides_v1.Schema.TableBorderCell; + newTableBorderCell(): Slides.Schema.TableBorderCell; // Create a new instance of TableBorderFill - newTableBorderFill(): Slides_v1.Schema.TableBorderFill; + newTableBorderFill(): Slides.Schema.TableBorderFill; // Create a new instance of TableBorderProperties - newTableBorderProperties(): Slides_v1.Schema.TableBorderProperties; + newTableBorderProperties(): Slides.Schema.TableBorderProperties; // Create a new instance of TableBorderRow - newTableBorderRow(): Slides_v1.Schema.TableBorderRow; + newTableBorderRow(): Slides.Schema.TableBorderRow; // Create a new instance of TableCell - newTableCell(): Slides_v1.Schema.TableCell; + newTableCell(): Slides.Schema.TableCell; // Create a new instance of TableCellBackgroundFill - newTableCellBackgroundFill(): Slides_v1.Schema.TableCellBackgroundFill; + newTableCellBackgroundFill(): Slides.Schema.TableCellBackgroundFill; // Create a new instance of TableCellLocation - newTableCellLocation(): Slides_v1.Schema.TableCellLocation; + newTableCellLocation(): Slides.Schema.TableCellLocation; // Create a new instance of TableCellProperties - newTableCellProperties(): Slides_v1.Schema.TableCellProperties; + newTableCellProperties(): Slides.Schema.TableCellProperties; // Create a new instance of TableColumnProperties - newTableColumnProperties(): Slides_v1.Schema.TableColumnProperties; + newTableColumnProperties(): Slides.Schema.TableColumnProperties; // Create a new instance of TableRange - newTableRange(): Slides_v1.Schema.TableRange; + newTableRange(): Slides.Schema.TableRange; // Create a new instance of TableRow - newTableRow(): Slides_v1.Schema.TableRow; + newTableRow(): Slides.Schema.TableRow; // Create a new instance of TableRowProperties - newTableRowProperties(): Slides_v1.Schema.TableRowProperties; + newTableRowProperties(): Slides.Schema.TableRowProperties; // Create a new instance of TextContent - newTextContent(): Slides_v1.Schema.TextContent; + newTextContent(): Slides.Schema.TextContent; // Create a new instance of TextElement - newTextElement(): Slides_v1.Schema.TextElement; + newTextElement(): Slides.Schema.TextElement; // Create a new instance of TextRun - newTextRun(): Slides_v1.Schema.TextRun; + newTextRun(): Slides.Schema.TextRun; // Create a new instance of TextStyle - newTextStyle(): Slides_v1.Schema.TextStyle; + newTextStyle(): Slides.Schema.TextStyle; // Create a new instance of ThemeColorPair - newThemeColorPair(): Slides_v1.Schema.ThemeColorPair; + newThemeColorPair(): Slides.Schema.ThemeColorPair; // Create a new instance of UngroupObjectsRequest - newUngroupObjectsRequest(): Slides_v1.Schema.UngroupObjectsRequest; + newUngroupObjectsRequest(): Slides.Schema.UngroupObjectsRequest; // Create a new instance of UnmergeTableCellsRequest - newUnmergeTableCellsRequest(): Slides_v1.Schema.UnmergeTableCellsRequest; + newUnmergeTableCellsRequest(): Slides.Schema.UnmergeTableCellsRequest; // Create a new instance of UpdateImagePropertiesRequest - newUpdateImagePropertiesRequest(): Slides_v1.Schema.UpdateImagePropertiesRequest; + newUpdateImagePropertiesRequest(): Slides.Schema.UpdateImagePropertiesRequest; // Create a new instance of UpdateLineCategoryRequest - newUpdateLineCategoryRequest(): Slides_v1.Schema.UpdateLineCategoryRequest; + newUpdateLineCategoryRequest(): Slides.Schema.UpdateLineCategoryRequest; // Create a new instance of UpdateLinePropertiesRequest - newUpdateLinePropertiesRequest(): Slides_v1.Schema.UpdateLinePropertiesRequest; + newUpdateLinePropertiesRequest(): Slides.Schema.UpdateLinePropertiesRequest; // Create a new instance of UpdatePageElementAltTextRequest - newUpdatePageElementAltTextRequest(): Slides_v1.Schema.UpdatePageElementAltTextRequest; + newUpdatePageElementAltTextRequest(): Slides.Schema.UpdatePageElementAltTextRequest; // Create a new instance of UpdatePageElementTransformRequest - newUpdatePageElementTransformRequest(): Slides_v1.Schema.UpdatePageElementTransformRequest; + newUpdatePageElementTransformRequest(): Slides.Schema.UpdatePageElementTransformRequest; // Create a new instance of UpdatePageElementsZOrderRequest - newUpdatePageElementsZOrderRequest(): Slides_v1.Schema.UpdatePageElementsZOrderRequest; + newUpdatePageElementsZOrderRequest(): Slides.Schema.UpdatePageElementsZOrderRequest; // Create a new instance of UpdatePagePropertiesRequest - newUpdatePagePropertiesRequest(): Slides_v1.Schema.UpdatePagePropertiesRequest; + newUpdatePagePropertiesRequest(): Slides.Schema.UpdatePagePropertiesRequest; // Create a new instance of UpdateParagraphStyleRequest - newUpdateParagraphStyleRequest(): Slides_v1.Schema.UpdateParagraphStyleRequest; + newUpdateParagraphStyleRequest(): Slides.Schema.UpdateParagraphStyleRequest; // Create a new instance of UpdateShapePropertiesRequest - newUpdateShapePropertiesRequest(): Slides_v1.Schema.UpdateShapePropertiesRequest; + newUpdateShapePropertiesRequest(): Slides.Schema.UpdateShapePropertiesRequest; // Create a new instance of UpdateSlidesPositionRequest - newUpdateSlidesPositionRequest(): Slides_v1.Schema.UpdateSlidesPositionRequest; + newUpdateSlidesPositionRequest(): Slides.Schema.UpdateSlidesPositionRequest; // Create a new instance of UpdateTableBorderPropertiesRequest - newUpdateTableBorderPropertiesRequest(): Slides_v1.Schema.UpdateTableBorderPropertiesRequest; + newUpdateTableBorderPropertiesRequest(): Slides.Schema.UpdateTableBorderPropertiesRequest; // Create a new instance of UpdateTableCellPropertiesRequest - newUpdateTableCellPropertiesRequest(): Slides_v1.Schema.UpdateTableCellPropertiesRequest; + newUpdateTableCellPropertiesRequest(): Slides.Schema.UpdateTableCellPropertiesRequest; // Create a new instance of UpdateTableColumnPropertiesRequest - newUpdateTableColumnPropertiesRequest(): Slides_v1.Schema.UpdateTableColumnPropertiesRequest; + newUpdateTableColumnPropertiesRequest(): Slides.Schema.UpdateTableColumnPropertiesRequest; // Create a new instance of UpdateTableRowPropertiesRequest - newUpdateTableRowPropertiesRequest(): Slides_v1.Schema.UpdateTableRowPropertiesRequest; + newUpdateTableRowPropertiesRequest(): Slides.Schema.UpdateTableRowPropertiesRequest; // Create a new instance of UpdateTextStyleRequest - newUpdateTextStyleRequest(): Slides_v1.Schema.UpdateTextStyleRequest; + newUpdateTextStyleRequest(): Slides.Schema.UpdateTextStyleRequest; // Create a new instance of UpdateVideoPropertiesRequest - newUpdateVideoPropertiesRequest(): Slides_v1.Schema.UpdateVideoPropertiesRequest; + newUpdateVideoPropertiesRequest(): Slides.Schema.UpdateVideoPropertiesRequest; // Create a new instance of Video - newVideo(): Slides_v1.Schema.Video; + newVideo(): Slides.Schema.Video; // Create a new instance of VideoProperties - newVideoProperties(): Slides_v1.Schema.VideoProperties; + newVideoProperties(): Slides.Schema.VideoProperties; // Create a new instance of WeightedFontFamily - newWeightedFontFamily(): Slides_v1.Schema.WeightedFontFamily; + newWeightedFontFamily(): Slides.Schema.WeightedFontFamily; // Create a new instance of WordArt - newWordArt(): Slides_v1.Schema.WordArt; + newWordArt(): Slides.Schema.WordArt; // Create a new instance of WriteControl - newWriteControl(): Slides_v1.Schema.WriteControl; + newWriteControl(): Slides.Schema.WriteControl; } } -declare var Slides_v1: GoogleAppsScript.Slides_v1; \ No newline at end of file +declare var Slides: GoogleAppsScript.Slides; diff --git a/types/google-apps-script/apis/tagmanager_v2.d.ts b/types/google-apps-script/apis/tagmanager_v2.d.ts index 95bfe51acb..c96308812e 100644 --- a/types/google-apps-script/apis/tagmanager_v2.d.ts +++ b/types/google-apps-script/apis/tagmanager_v2.d.ts @@ -5,42 +5,42 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Tagmanager_v2 { + namespace TagManager { namespace Collection { namespace Accounts { namespace Containers { namespace Workspaces { export interface Built_in_variablesCollection { // Creates one or more GTM Built-In Variables. - create(parent: string): Tagmanager_v2.Schema.CreateBuiltInVariableResponse; + create(parent: string): TagManager.Schema.CreateBuiltInVariableResponse; // Creates one or more GTM Built-In Variables. - create(parent: string, optionalArgs: object): Tagmanager_v2.Schema.CreateBuiltInVariableResponse; + create(parent: string, optionalArgs: object): TagManager.Schema.CreateBuiltInVariableResponse; // Lists all the enabled Built-In Variables of a GTM Container. - list(parent: string): Tagmanager_v2.Schema.ListEnabledBuiltInVariablesResponse; + list(parent: string): TagManager.Schema.ListEnabledBuiltInVariablesResponse; // Lists all the enabled Built-In Variables of a GTM Container. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListEnabledBuiltInVariablesResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListEnabledBuiltInVariablesResponse; // Deletes one or more GTM Built-In Variables. remove(path: string): void; // Deletes one or more GTM Built-In Variables. remove(path: string, optionalArgs: object): void; // Reverts changes to a GTM Built-In Variables in a GTM Workspace. - revert(path: string): Tagmanager_v2.Schema.RevertBuiltInVariableResponse; + revert(path: string): TagManager.Schema.RevertBuiltInVariableResponse; // Reverts changes to a GTM Built-In Variables in a GTM Workspace. - revert(path: string, optionalArgs: object): Tagmanager_v2.Schema.RevertBuiltInVariableResponse; + revert(path: string, optionalArgs: object): TagManager.Schema.RevertBuiltInVariableResponse; } export interface FoldersCollection { // Creates a GTM Folder. - create(resource: Schema.Folder, parent: string): Tagmanager_v2.Schema.Folder; + create(resource: Schema.Folder, parent: string): TagManager.Schema.Folder; // List all entities in a GTM Folder. - entities(path: string): Tagmanager_v2.Schema.FolderEntities; + entities(path: string): TagManager.Schema.FolderEntities; // List all entities in a GTM Folder. - entities(path: string, optionalArgs: object): Tagmanager_v2.Schema.FolderEntities; + entities(path: string, optionalArgs: object): TagManager.Schema.FolderEntities; // Gets a GTM Folder. - get(path: string): Tagmanager_v2.Schema.Folder; + get(path: string): TagManager.Schema.Folder; // Lists all GTM Folders of a Container. - list(parent: string): Tagmanager_v2.Schema.ListFoldersResponse; + list(parent: string): TagManager.Schema.ListFoldersResponse; // Lists all GTM Folders of a Container. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListFoldersResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListFoldersResponse; // Moves entities to a GTM Folder. move_entities_to_folder(resource: Schema.Folder, path: string): void; // Moves entities to a GTM Folder. @@ -48,164 +48,164 @@ declare namespace GoogleAppsScript { // Deletes a GTM Folder. remove(path: string): void; // Reverts changes to a GTM Folder in a GTM Workspace. - revert(path: string): Tagmanager_v2.Schema.RevertFolderResponse; + revert(path: string): TagManager.Schema.RevertFolderResponse; // Reverts changes to a GTM Folder in a GTM Workspace. - revert(path: string, optionalArgs: object): Tagmanager_v2.Schema.RevertFolderResponse; + revert(path: string, optionalArgs: object): TagManager.Schema.RevertFolderResponse; // Updates a GTM Folder. - update(resource: Schema.Folder, path: string): Tagmanager_v2.Schema.Folder; + update(resource: Schema.Folder, path: string): TagManager.Schema.Folder; // Updates a GTM Folder. - update(resource: Schema.Folder, path: string, optionalArgs: object): Tagmanager_v2.Schema.Folder; + update(resource: Schema.Folder, path: string, optionalArgs: object): TagManager.Schema.Folder; } export interface TagsCollection { // Creates a GTM Tag. - create(resource: Schema.Tag, parent: string): Tagmanager_v2.Schema.Tag; + create(resource: Schema.Tag, parent: string): TagManager.Schema.Tag; // Gets a GTM Tag. - get(path: string): Tagmanager_v2.Schema.Tag; + get(path: string): TagManager.Schema.Tag; // Lists all GTM Tags of a Container. - list(parent: string): Tagmanager_v2.Schema.ListTagsResponse; + list(parent: string): TagManager.Schema.ListTagsResponse; // Lists all GTM Tags of a Container. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListTagsResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListTagsResponse; // Deletes a GTM Tag. remove(path: string): void; // Reverts changes to a GTM Tag in a GTM Workspace. - revert(path: string): Tagmanager_v2.Schema.RevertTagResponse; + revert(path: string): TagManager.Schema.RevertTagResponse; // Reverts changes to a GTM Tag in a GTM Workspace. - revert(path: string, optionalArgs: object): Tagmanager_v2.Schema.RevertTagResponse; + revert(path: string, optionalArgs: object): TagManager.Schema.RevertTagResponse; // Updates a GTM Tag. - update(resource: Schema.Tag, path: string): Tagmanager_v2.Schema.Tag; + update(resource: Schema.Tag, path: string): TagManager.Schema.Tag; // Updates a GTM Tag. - update(resource: Schema.Tag, path: string, optionalArgs: object): Tagmanager_v2.Schema.Tag; + update(resource: Schema.Tag, path: string, optionalArgs: object): TagManager.Schema.Tag; } export interface TriggersCollection { // Creates a GTM Trigger. - create(resource: Schema.Trigger, parent: string): Tagmanager_v2.Schema.Trigger; + create(resource: Schema.Trigger, parent: string): TagManager.Schema.Trigger; // Gets a GTM Trigger. - get(path: string): Tagmanager_v2.Schema.Trigger; + get(path: string): TagManager.Schema.Trigger; // Lists all GTM Triggers of a Container. - list(parent: string): Tagmanager_v2.Schema.ListTriggersResponse; + list(parent: string): TagManager.Schema.ListTriggersResponse; // Lists all GTM Triggers of a Container. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListTriggersResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListTriggersResponse; // Deletes a GTM Trigger. remove(path: string): void; // Reverts changes to a GTM Trigger in a GTM Workspace. - revert(path: string): Tagmanager_v2.Schema.RevertTriggerResponse; + revert(path: string): TagManager.Schema.RevertTriggerResponse; // Reverts changes to a GTM Trigger in a GTM Workspace. - revert(path: string, optionalArgs: object): Tagmanager_v2.Schema.RevertTriggerResponse; + revert(path: string, optionalArgs: object): TagManager.Schema.RevertTriggerResponse; // Updates a GTM Trigger. - update(resource: Schema.Trigger, path: string): Tagmanager_v2.Schema.Trigger; + update(resource: Schema.Trigger, path: string): TagManager.Schema.Trigger; // Updates a GTM Trigger. - update(resource: Schema.Trigger, path: string, optionalArgs: object): Tagmanager_v2.Schema.Trigger; + update(resource: Schema.Trigger, path: string, optionalArgs: object): TagManager.Schema.Trigger; } export interface VariablesCollection { // Creates a GTM Variable. - create(resource: Schema.Variable, parent: string): Tagmanager_v2.Schema.Variable; + create(resource: Schema.Variable, parent: string): TagManager.Schema.Variable; // Gets a GTM Variable. - get(path: string): Tagmanager_v2.Schema.Variable; + get(path: string): TagManager.Schema.Variable; // Lists all GTM Variables of a Container. - list(parent: string): Tagmanager_v2.Schema.ListVariablesResponse; + list(parent: string): TagManager.Schema.ListVariablesResponse; // Lists all GTM Variables of a Container. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListVariablesResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListVariablesResponse; // Deletes a GTM Variable. remove(path: string): void; // Reverts changes to a GTM Variable in a GTM Workspace. - revert(path: string): Tagmanager_v2.Schema.RevertVariableResponse; + revert(path: string): TagManager.Schema.RevertVariableResponse; // Reverts changes to a GTM Variable in a GTM Workspace. - revert(path: string, optionalArgs: object): Tagmanager_v2.Schema.RevertVariableResponse; + revert(path: string, optionalArgs: object): TagManager.Schema.RevertVariableResponse; // Updates a GTM Variable. - update(resource: Schema.Variable, path: string): Tagmanager_v2.Schema.Variable; + update(resource: Schema.Variable, path: string): TagManager.Schema.Variable; // Updates a GTM Variable. - update(resource: Schema.Variable, path: string, optionalArgs: object): Tagmanager_v2.Schema.Variable; + update(resource: Schema.Variable, path: string, optionalArgs: object): TagManager.Schema.Variable; } export interface ZonesCollection { // Creates a GTM Zone. - create(resource: Schema.Zone, parent: string): Tagmanager_v2.Schema.Zone; + create(resource: Schema.Zone, parent: string): TagManager.Schema.Zone; // Gets a GTM Zone. - get(path: string): Tagmanager_v2.Schema.Zone; + get(path: string): TagManager.Schema.Zone; // Lists all GTM Zones of a GTM container workspace. - list(parent: string): Tagmanager_v2.Schema.ListZonesResponse; + list(parent: string): TagManager.Schema.ListZonesResponse; // Lists all GTM Zones of a GTM container workspace. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListZonesResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListZonesResponse; // Deletes a GTM Zone. remove(path: string): void; // Reverts changes to a GTM Zone in a GTM Workspace. - revert(path: string): Tagmanager_v2.Schema.RevertZoneResponse; + revert(path: string): TagManager.Schema.RevertZoneResponse; // Reverts changes to a GTM Zone in a GTM Workspace. - revert(path: string, optionalArgs: object): Tagmanager_v2.Schema.RevertZoneResponse; + revert(path: string, optionalArgs: object): TagManager.Schema.RevertZoneResponse; // Updates a GTM Zone. - update(resource: Schema.Zone, path: string): Tagmanager_v2.Schema.Zone; + update(resource: Schema.Zone, path: string): TagManager.Schema.Zone; // Updates a GTM Zone. - update(resource: Schema.Zone, path: string, optionalArgs: object): Tagmanager_v2.Schema.Zone; + update(resource: Schema.Zone, path: string, optionalArgs: object): TagManager.Schema.Zone; } } export interface EnvironmentsCollection { // Creates a GTM Environment. - create(resource: Schema.Environment, parent: string): Tagmanager_v2.Schema.Environment; + create(resource: Schema.Environment, parent: string): TagManager.Schema.Environment; // Gets a GTM Environment. - get(path: string): Tagmanager_v2.Schema.Environment; + get(path: string): TagManager.Schema.Environment; // Lists all GTM Environments of a GTM Container. - list(parent: string): Tagmanager_v2.Schema.ListEnvironmentsResponse; + list(parent: string): TagManager.Schema.ListEnvironmentsResponse; // Lists all GTM Environments of a GTM Container. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListEnvironmentsResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListEnvironmentsResponse; // Re-generates the authorization code for a GTM Environment. - reauthorize(resource: Schema.Environment, path: string): Tagmanager_v2.Schema.Environment; + reauthorize(resource: Schema.Environment, path: string): TagManager.Schema.Environment; // Deletes a GTM Environment. remove(path: string): void; // Updates a GTM Environment. - update(resource: Schema.Environment, path: string): Tagmanager_v2.Schema.Environment; + update(resource: Schema.Environment, path: string): TagManager.Schema.Environment; // Updates a GTM Environment. - update(resource: Schema.Environment, path: string, optionalArgs: object): Tagmanager_v2.Schema.Environment; + update(resource: Schema.Environment, path: string, optionalArgs: object): TagManager.Schema.Environment; } export interface Version_headersCollection { // Gets the latest container version header - latest(parent: string): Tagmanager_v2.Schema.ContainerVersionHeader; + latest(parent: string): TagManager.Schema.ContainerVersionHeader; // Lists all Container Versions of a GTM Container. - list(parent: string): Tagmanager_v2.Schema.ListContainerVersionsResponse; + list(parent: string): TagManager.Schema.ListContainerVersionsResponse; // Lists all Container Versions of a GTM Container. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListContainerVersionsResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListContainerVersionsResponse; } export interface VersionsCollection { // Gets a Container Version. - get(path: string): Tagmanager_v2.Schema.ContainerVersion; + get(path: string): TagManager.Schema.ContainerVersion; // Gets a Container Version. - get(path: string, optionalArgs: object): Tagmanager_v2.Schema.ContainerVersion; + get(path: string, optionalArgs: object): TagManager.Schema.ContainerVersion; // Gets the live (i.e. published) container version - live(parent: string): Tagmanager_v2.Schema.ContainerVersion; + live(parent: string): TagManager.Schema.ContainerVersion; // Publishes a Container Version. - publish(path: string): Tagmanager_v2.Schema.PublishContainerVersionResponse; + publish(path: string): TagManager.Schema.PublishContainerVersionResponse; // Publishes a Container Version. - publish(path: string, optionalArgs: object): Tagmanager_v2.Schema.PublishContainerVersionResponse; + publish(path: string, optionalArgs: object): TagManager.Schema.PublishContainerVersionResponse; // Deletes a Container Version. remove(path: string): void; // Sets the latest version used for synchronization of workspaces when detecting conflicts and errors. - set_latest(path: string): Tagmanager_v2.Schema.ContainerVersion; + set_latest(path: string): TagManager.Schema.ContainerVersion; // Undeletes a Container Version. - undelete(path: string): Tagmanager_v2.Schema.ContainerVersion; + undelete(path: string): TagManager.Schema.ContainerVersion; // Updates a Container Version. - update(resource: Schema.ContainerVersion, path: string): Tagmanager_v2.Schema.ContainerVersion; + update(resource: Schema.ContainerVersion, path: string): TagManager.Schema.ContainerVersion; // Updates a Container Version. - update(resource: Schema.ContainerVersion, path: string, optionalArgs: object): Tagmanager_v2.Schema.ContainerVersion; + update(resource: Schema.ContainerVersion, path: string, optionalArgs: object): TagManager.Schema.ContainerVersion; } export interface WorkspacesCollection { - Built_in_variables?: Tagmanager_v2.Collection.Accounts.Containers.Workspaces.Built_in_variablesCollection; - Folders?: Tagmanager_v2.Collection.Accounts.Containers.Workspaces.FoldersCollection; - Tags?: Tagmanager_v2.Collection.Accounts.Containers.Workspaces.TagsCollection; - Triggers?: Tagmanager_v2.Collection.Accounts.Containers.Workspaces.TriggersCollection; - Variables?: Tagmanager_v2.Collection.Accounts.Containers.Workspaces.VariablesCollection; - Zones?: Tagmanager_v2.Collection.Accounts.Containers.Workspaces.ZonesCollection; + Built_in_variables?: TagManager.Collection.Accounts.Containers.Workspaces.Built_in_variablesCollection; + Folders?: TagManager.Collection.Accounts.Containers.Workspaces.FoldersCollection; + Tags?: TagManager.Collection.Accounts.Containers.Workspaces.TagsCollection; + Triggers?: TagManager.Collection.Accounts.Containers.Workspaces.TriggersCollection; + Variables?: TagManager.Collection.Accounts.Containers.Workspaces.VariablesCollection; + Zones?: TagManager.Collection.Accounts.Containers.Workspaces.ZonesCollection; // Creates a Workspace. - create(resource: Schema.Workspace, parent: string): Tagmanager_v2.Schema.Workspace; + create(resource: Schema.Workspace, parent: string): TagManager.Schema.Workspace; // Creates a Container Version from the entities present in the workspace, deletes the workspace, and sets the base container version to the newly created version. - create_version(resource: Schema.CreateContainerVersionRequestVersionOptions, path: string): Tagmanager_v2.Schema.CreateContainerVersionResponse; + create_version(resource: Schema.CreateContainerVersionRequestVersionOptions, path: string): TagManager.Schema.CreateContainerVersionResponse; // Gets a Workspace. - get(path: string): Tagmanager_v2.Schema.Workspace; + get(path: string): TagManager.Schema.Workspace; // Finds conflicting and modified entities in the workspace. - getStatus(path: string): Tagmanager_v2.Schema.GetWorkspaceStatusResponse; + getStatus(path: string): TagManager.Schema.GetWorkspaceStatusResponse; // Lists all Workspaces that belong to a GTM Container. - list(parent: string): Tagmanager_v2.Schema.ListWorkspacesResponse; + list(parent: string): TagManager.Schema.ListWorkspacesResponse; // Lists all Workspaces that belong to a GTM Container. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListWorkspacesResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListWorkspacesResponse; // Quick previews a workspace by creating a fake container version from all entities in the provided workspace. - quick_preview(path: string): Tagmanager_v2.Schema.QuickPreviewResponse; + quick_preview(path: string): TagManager.Schema.QuickPreviewResponse; // Deletes a Workspace. remove(path: string): void; // Resolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request. @@ -213,61 +213,61 @@ declare namespace GoogleAppsScript { // Resolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request. resolve_conflict(resource: Schema.Entity, path: string, optionalArgs: object): void; // Syncs a workspace to the latest container version by updating all unmodified workspace entities and displaying conflicts for modified entities. - sync(path: string): Tagmanager_v2.Schema.SyncWorkspaceResponse; + sync(path: string): TagManager.Schema.SyncWorkspaceResponse; // Updates a Workspace. - update(resource: Schema.Workspace, path: string): Tagmanager_v2.Schema.Workspace; + update(resource: Schema.Workspace, path: string): TagManager.Schema.Workspace; // Updates a Workspace. - update(resource: Schema.Workspace, path: string, optionalArgs: object): Tagmanager_v2.Schema.Workspace; + update(resource: Schema.Workspace, path: string, optionalArgs: object): TagManager.Schema.Workspace; } } export interface ContainersCollection { - Environments?: Tagmanager_v2.Collection.Accounts.Containers.EnvironmentsCollection; - Version_headers?: Tagmanager_v2.Collection.Accounts.Containers.Version_headersCollection; - Versions?: Tagmanager_v2.Collection.Accounts.Containers.VersionsCollection; - Workspaces?: Tagmanager_v2.Collection.Accounts.Containers.WorkspacesCollection; + Environments?: TagManager.Collection.Accounts.Containers.EnvironmentsCollection; + Version_headers?: TagManager.Collection.Accounts.Containers.Version_headersCollection; + Versions?: TagManager.Collection.Accounts.Containers.VersionsCollection; + Workspaces?: TagManager.Collection.Accounts.Containers.WorkspacesCollection; // Creates a Container. - create(resource: Schema.Container, parent: string): Tagmanager_v2.Schema.Container; + create(resource: Schema.Container, parent: string): TagManager.Schema.Container; // Gets a Container. - get(path: string): Tagmanager_v2.Schema.Container; + get(path: string): TagManager.Schema.Container; // Lists all Containers that belongs to a GTM Account. - list(parent: string): Tagmanager_v2.Schema.ListContainersResponse; + list(parent: string): TagManager.Schema.ListContainersResponse; // Lists all Containers that belongs to a GTM Account. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListContainersResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListContainersResponse; // Deletes a Container. remove(path: string): void; // Updates a Container. - update(resource: Schema.Container, path: string): Tagmanager_v2.Schema.Container; + update(resource: Schema.Container, path: string): TagManager.Schema.Container; // Updates a Container. - update(resource: Schema.Container, path: string, optionalArgs: object): Tagmanager_v2.Schema.Container; + update(resource: Schema.Container, path: string, optionalArgs: object): TagManager.Schema.Container; } export interface User_permissionsCollection { // Creates a user's Account & Container access. - create(resource: Schema.UserPermission, parent: string): Tagmanager_v2.Schema.UserPermission; + create(resource: Schema.UserPermission, parent: string): TagManager.Schema.UserPermission; // Gets a user's Account & Container access. - get(path: string): Tagmanager_v2.Schema.UserPermission; + get(path: string): TagManager.Schema.UserPermission; // List all users that have access to the account along with Account and Container user access granted to each of them. - list(parent: string): Tagmanager_v2.Schema.ListUserPermissionsResponse; + list(parent: string): TagManager.Schema.ListUserPermissionsResponse; // List all users that have access to the account along with Account and Container user access granted to each of them. - list(parent: string, optionalArgs: object): Tagmanager_v2.Schema.ListUserPermissionsResponse; + list(parent: string, optionalArgs: object): TagManager.Schema.ListUserPermissionsResponse; // Removes a user from the account, revoking access to it and all of its containers. remove(path: string): void; // Updates a user's Account & Container access. - update(resource: Schema.UserPermission, path: string): Tagmanager_v2.Schema.UserPermission; + update(resource: Schema.UserPermission, path: string): TagManager.Schema.UserPermission; } } export interface AccountsCollection { - Containers?: Tagmanager_v2.Collection.Accounts.ContainersCollection; - User_permissions?: Tagmanager_v2.Collection.Accounts.User_permissionsCollection; + Containers?: TagManager.Collection.Accounts.ContainersCollection; + User_permissions?: TagManager.Collection.Accounts.User_permissionsCollection; // Gets a GTM Account. - get(path: string): Tagmanager_v2.Schema.Account; + get(path: string): TagManager.Schema.Account; // Lists all GTM Accounts that a user has access to. - list(): Tagmanager_v2.Schema.ListAccountsResponse; + list(): TagManager.Schema.ListAccountsResponse; // Lists all GTM Accounts that a user has access to. - list(optionalArgs: object): Tagmanager_v2.Schema.ListAccountsResponse; + list(optionalArgs: object): TagManager.Schema.ListAccountsResponse; // Updates a GTM Account. - update(resource: Schema.Account, path: string): Tagmanager_v2.Schema.Account; + update(resource: Schema.Account, path: string): TagManager.Schema.Account; // Updates a GTM Account. - update(resource: Schema.Account, path: string, optionalArgs: object): Tagmanager_v2.Schema.Account; + update(resource: Schema.Account, path: string, optionalArgs: object): TagManager.Schema.Account; } } namespace Schema { @@ -291,7 +291,7 @@ declare namespace GoogleAppsScript { workspaceId?: string; } export interface Condition { - parameter?: Tagmanager_v2.Schema.Parameter[]; + parameter?: TagManager.Schema.Parameter[]; type?: string; } export interface Container { @@ -312,22 +312,22 @@ declare namespace GoogleAppsScript { } export interface ContainerVersion { accountId?: string; - builtInVariable?: Tagmanager_v2.Schema.BuiltInVariable[]; - container?: Tagmanager_v2.Schema.Container; + builtInVariable?: TagManager.Schema.BuiltInVariable[]; + container?: TagManager.Schema.Container; containerId?: string; containerVersionId?: string; - customTemplate?: Tagmanager_v2.Schema.CustomTemplate[]; + customTemplate?: TagManager.Schema.CustomTemplate[]; deleted?: boolean; description?: string; fingerprint?: string; - folder?: Tagmanager_v2.Schema.Folder[]; + folder?: TagManager.Schema.Folder[]; name?: string; path?: string; - tag?: Tagmanager_v2.Schema.Tag[]; + tag?: TagManager.Schema.Tag[]; tagManagerUrl?: string; - trigger?: Tagmanager_v2.Schema.Trigger[]; - variable?: Tagmanager_v2.Schema.Variable[]; - zone?: Tagmanager_v2.Schema.Zone[]; + trigger?: TagManager.Schema.Trigger[]; + variable?: TagManager.Schema.Variable[]; + zone?: TagManager.Schema.Zone[]; } export interface ContainerVersionHeader { accountId?: string; @@ -345,7 +345,7 @@ declare namespace GoogleAppsScript { path?: string; } export interface CreateBuiltInVariableResponse { - builtInVariable?: Tagmanager_v2.Schema.BuiltInVariable[]; + builtInVariable?: TagManager.Schema.BuiltInVariable[]; } export interface CreateContainerVersionRequestVersionOptions { name?: string; @@ -353,9 +353,9 @@ declare namespace GoogleAppsScript { } export interface CreateContainerVersionResponse { compilerError?: boolean; - containerVersion?: Tagmanager_v2.Schema.ContainerVersion; + containerVersion?: TagManager.Schema.ContainerVersion; newWorkspacePath?: string; - syncStatus?: Tagmanager_v2.Schema.SyncStatus; + syncStatus?: TagManager.Schema.SyncStatus; } export interface CustomTemplate { accountId?: string; @@ -370,15 +370,15 @@ declare namespace GoogleAppsScript { } export interface Entity { changeStatus?: string; - folder?: Tagmanager_v2.Schema.Folder; - tag?: Tagmanager_v2.Schema.Tag; - trigger?: Tagmanager_v2.Schema.Trigger; - variable?: Tagmanager_v2.Schema.Variable; + folder?: TagManager.Schema.Folder; + tag?: TagManager.Schema.Tag; + trigger?: TagManager.Schema.Trigger; + variable?: TagManager.Schema.Variable; } export interface Environment { accountId?: string; authorizationCode?: string; - authorizationTimestamp?: Tagmanager_v2.Schema.Timestamp; + authorizationTimestamp?: TagManager.Schema.Timestamp; containerId?: string; containerVersionId?: string; description?: string; @@ -405,99 +405,99 @@ declare namespace GoogleAppsScript { } export interface FolderEntities { nextPageToken?: string; - tag?: Tagmanager_v2.Schema.Tag[]; - trigger?: Tagmanager_v2.Schema.Trigger[]; - variable?: Tagmanager_v2.Schema.Variable[]; + tag?: TagManager.Schema.Tag[]; + trigger?: TagManager.Schema.Trigger[]; + variable?: TagManager.Schema.Variable[]; } export interface GetWorkspaceStatusResponse { - mergeConflict?: Tagmanager_v2.Schema.MergeConflict[]; - workspaceChange?: Tagmanager_v2.Schema.Entity[]; + mergeConflict?: TagManager.Schema.MergeConflict[]; + workspaceChange?: TagManager.Schema.Entity[]; } export interface ListAccountsResponse { - account?: Tagmanager_v2.Schema.Account[]; + account?: TagManager.Schema.Account[]; nextPageToken?: string; } export interface ListContainerVersionsResponse { - containerVersionHeader?: Tagmanager_v2.Schema.ContainerVersionHeader[]; + containerVersionHeader?: TagManager.Schema.ContainerVersionHeader[]; nextPageToken?: string; } export interface ListContainersResponse { - container?: Tagmanager_v2.Schema.Container[]; + container?: TagManager.Schema.Container[]; nextPageToken?: string; } export interface ListEnabledBuiltInVariablesResponse { - builtInVariable?: Tagmanager_v2.Schema.BuiltInVariable[]; + builtInVariable?: TagManager.Schema.BuiltInVariable[]; nextPageToken?: string; } export interface ListEnvironmentsResponse { - environment?: Tagmanager_v2.Schema.Environment[]; + environment?: TagManager.Schema.Environment[]; nextPageToken?: string; } export interface ListFoldersResponse { - folder?: Tagmanager_v2.Schema.Folder[]; + folder?: TagManager.Schema.Folder[]; nextPageToken?: string; } export interface ListTagsResponse { nextPageToken?: string; - tag?: Tagmanager_v2.Schema.Tag[]; + tag?: TagManager.Schema.Tag[]; } export interface ListTriggersResponse { nextPageToken?: string; - trigger?: Tagmanager_v2.Schema.Trigger[]; + trigger?: TagManager.Schema.Trigger[]; } export interface ListUserPermissionsResponse { nextPageToken?: string; - userPermission?: Tagmanager_v2.Schema.UserPermission[]; + userPermission?: TagManager.Schema.UserPermission[]; } export interface ListVariablesResponse { nextPageToken?: string; - variable?: Tagmanager_v2.Schema.Variable[]; + variable?: TagManager.Schema.Variable[]; } export interface ListWorkspacesResponse { nextPageToken?: string; - workspace?: Tagmanager_v2.Schema.Workspace[]; + workspace?: TagManager.Schema.Workspace[]; } export interface ListZonesResponse { nextPageToken?: string; - zone?: Tagmanager_v2.Schema.Zone[]; + zone?: TagManager.Schema.Zone[]; } export interface MergeConflict { - entityInBaseVersion?: Tagmanager_v2.Schema.Entity; - entityInWorkspace?: Tagmanager_v2.Schema.Entity; + entityInBaseVersion?: TagManager.Schema.Entity; + entityInWorkspace?: TagManager.Schema.Entity; } export interface Parameter { key?: string; - list?: Tagmanager_v2.Schema.Parameter[]; - map?: Tagmanager_v2.Schema.Parameter[]; + list?: TagManager.Schema.Parameter[]; + map?: TagManager.Schema.Parameter[]; type?: string; value?: string; } export interface PublishContainerVersionResponse { compilerError?: boolean; - containerVersion?: Tagmanager_v2.Schema.ContainerVersion; + containerVersion?: TagManager.Schema.ContainerVersion; } export interface QuickPreviewResponse { compilerError?: boolean; - containerVersion?: Tagmanager_v2.Schema.ContainerVersion; - syncStatus?: Tagmanager_v2.Schema.SyncStatus; + containerVersion?: TagManager.Schema.ContainerVersion; + syncStatus?: TagManager.Schema.SyncStatus; } export interface RevertBuiltInVariableResponse { enabled?: boolean; } export interface RevertFolderResponse { - folder?: Tagmanager_v2.Schema.Folder; + folder?: TagManager.Schema.Folder; } export interface RevertTagResponse { - tag?: Tagmanager_v2.Schema.Tag; + tag?: TagManager.Schema.Tag; } export interface RevertTriggerResponse { - trigger?: Tagmanager_v2.Schema.Trigger; + trigger?: TagManager.Schema.Trigger; } export interface RevertVariableResponse { - variable?: Tagmanager_v2.Schema.Variable; + variable?: TagManager.Schema.Variable; } export interface RevertZoneResponse { - zone?: Tagmanager_v2.Schema.Zone; + zone?: TagManager.Schema.Zone; } export interface SetupTag { stopOnSetupFailure?: boolean; @@ -508,8 +508,8 @@ declare namespace GoogleAppsScript { syncError?: boolean; } export interface SyncWorkspaceResponse { - mergeConflict?: Tagmanager_v2.Schema.MergeConflict[]; - syncStatus?: Tagmanager_v2.Schema.SyncStatus; + mergeConflict?: TagManager.Schema.MergeConflict[]; + syncStatus?: TagManager.Schema.SyncStatus; } export interface Tag { accountId?: string; @@ -522,18 +522,18 @@ declare namespace GoogleAppsScript { liveOnly?: boolean; name?: string; notes?: string; - parameter?: Tagmanager_v2.Schema.Parameter[]; + parameter?: TagManager.Schema.Parameter[]; parentFolderId?: string; path?: string; paused?: boolean; - priority?: Tagmanager_v2.Schema.Parameter; + priority?: TagManager.Schema.Parameter; scheduleEndMs?: string; scheduleStartMs?: string; - setupTag?: Tagmanager_v2.Schema.SetupTag[]; + setupTag?: TagManager.Schema.SetupTag[]; tagFiringOption?: string; tagId?: string; tagManagerUrl?: string; - teardownTag?: Tagmanager_v2.Schema.TeardownTag[]; + teardownTag?: TagManager.Schema.TeardownTag[]; type?: string; workspaceId?: string; } @@ -547,42 +547,42 @@ declare namespace GoogleAppsScript { } export interface Trigger { accountId?: string; - autoEventFilter?: Tagmanager_v2.Schema.Condition[]; - checkValidation?: Tagmanager_v2.Schema.Parameter; + autoEventFilter?: TagManager.Schema.Condition[]; + checkValidation?: TagManager.Schema.Parameter; containerId?: string; - continuousTimeMinMilliseconds?: Tagmanager_v2.Schema.Parameter; - customEventFilter?: Tagmanager_v2.Schema.Condition[]; - eventName?: Tagmanager_v2.Schema.Parameter; - filter?: Tagmanager_v2.Schema.Condition[]; + continuousTimeMinMilliseconds?: TagManager.Schema.Parameter; + customEventFilter?: TagManager.Schema.Condition[]; + eventName?: TagManager.Schema.Parameter; + filter?: TagManager.Schema.Condition[]; fingerprint?: string; - horizontalScrollPercentageList?: Tagmanager_v2.Schema.Parameter; - interval?: Tagmanager_v2.Schema.Parameter; - intervalSeconds?: Tagmanager_v2.Schema.Parameter; - limit?: Tagmanager_v2.Schema.Parameter; - maxTimerLengthSeconds?: Tagmanager_v2.Schema.Parameter; + horizontalScrollPercentageList?: TagManager.Schema.Parameter; + interval?: TagManager.Schema.Parameter; + intervalSeconds?: TagManager.Schema.Parameter; + limit?: TagManager.Schema.Parameter; + maxTimerLengthSeconds?: TagManager.Schema.Parameter; name?: string; notes?: string; - parameter?: Tagmanager_v2.Schema.Parameter[]; + parameter?: TagManager.Schema.Parameter[]; parentFolderId?: string; path?: string; - selector?: Tagmanager_v2.Schema.Parameter; + selector?: TagManager.Schema.Parameter; tagManagerUrl?: string; - totalTimeMinMilliseconds?: Tagmanager_v2.Schema.Parameter; + totalTimeMinMilliseconds?: TagManager.Schema.Parameter; triggerId?: string; type?: string; - uniqueTriggerId?: Tagmanager_v2.Schema.Parameter; - verticalScrollPercentageList?: Tagmanager_v2.Schema.Parameter; - visibilitySelector?: Tagmanager_v2.Schema.Parameter; - visiblePercentageMax?: Tagmanager_v2.Schema.Parameter; - visiblePercentageMin?: Tagmanager_v2.Schema.Parameter; - waitForTags?: Tagmanager_v2.Schema.Parameter; - waitForTagsTimeout?: Tagmanager_v2.Schema.Parameter; + uniqueTriggerId?: TagManager.Schema.Parameter; + verticalScrollPercentageList?: TagManager.Schema.Parameter; + visibilitySelector?: TagManager.Schema.Parameter; + visiblePercentageMax?: TagManager.Schema.Parameter; + visiblePercentageMin?: TagManager.Schema.Parameter; + waitForTags?: TagManager.Schema.Parameter; + waitForTagsTimeout?: TagManager.Schema.Parameter; workspaceId?: string; } export interface UserPermission { - accountAccess?: Tagmanager_v2.Schema.AccountAccess; + accountAccess?: TagManager.Schema.AccountAccess; accountId?: string; - containerAccess?: Tagmanager_v2.Schema.ContainerAccess[]; + containerAccess?: TagManager.Schema.ContainerAccess[]; emailAddress?: string; path?: string; } @@ -592,10 +592,10 @@ declare namespace GoogleAppsScript { disablingTriggerId?: string[]; enablingTriggerId?: string[]; fingerprint?: string; - formatValue?: Tagmanager_v2.Schema.VariableFormatValue; + formatValue?: TagManager.Schema.VariableFormatValue; name?: string; notes?: string; - parameter?: Tagmanager_v2.Schema.Parameter[]; + parameter?: TagManager.Schema.Parameter[]; parentFolderId?: string; path?: string; scheduleEndMs?: string; @@ -607,10 +607,10 @@ declare namespace GoogleAppsScript { } export interface VariableFormatValue { caseConversionType?: string; - convertFalseToValue?: Tagmanager_v2.Schema.Parameter; - convertNullToValue?: Tagmanager_v2.Schema.Parameter; - convertTrueToValue?: Tagmanager_v2.Schema.Parameter; - convertUndefinedToValue?: Tagmanager_v2.Schema.Parameter; + convertFalseToValue?: TagManager.Schema.Parameter; + convertNullToValue?: TagManager.Schema.Parameter; + convertTrueToValue?: TagManager.Schema.Parameter; + convertUndefinedToValue?: TagManager.Schema.Parameter; } export interface Workspace { accountId?: string; @@ -624,20 +624,20 @@ declare namespace GoogleAppsScript { } export interface Zone { accountId?: string; - boundary?: Tagmanager_v2.Schema.ZoneBoundary; - childContainer?: Tagmanager_v2.Schema.ZoneChildContainer[]; + boundary?: TagManager.Schema.ZoneBoundary; + childContainer?: TagManager.Schema.ZoneChildContainer[]; containerId?: string; fingerprint?: string; name?: string; notes?: string; path?: string; tagManagerUrl?: string; - typeRestriction?: Tagmanager_v2.Schema.ZoneTypeRestriction; + typeRestriction?: TagManager.Schema.ZoneTypeRestriction; workspaceId?: string; zoneId?: string; } export interface ZoneBoundary { - condition?: Tagmanager_v2.Schema.Condition[]; + condition?: TagManager.Schema.Condition[]; customEvaluationTriggerId?: string[]; } export interface ZoneChildContainer { @@ -650,61 +650,61 @@ declare namespace GoogleAppsScript { } } } - export interface Tagmanager_v2 { - Accounts?: Tagmanager_v2.Collection.AccountsCollection; + export interface TagManager { + Accounts?: TagManager.Collection.AccountsCollection; // Create a new instance of Account - newAccount(): Tagmanager_v2.Schema.Account; + newAccount(): TagManager.Schema.Account; // Create a new instance of AccountAccess - newAccountAccess(): Tagmanager_v2.Schema.AccountAccess; + newAccountAccess(): TagManager.Schema.AccountAccess; // Create a new instance of BuiltInVariable - newBuiltInVariable(): Tagmanager_v2.Schema.BuiltInVariable; + newBuiltInVariable(): TagManager.Schema.BuiltInVariable; // Create a new instance of Condition - newCondition(): Tagmanager_v2.Schema.Condition; + newCondition(): TagManager.Schema.Condition; // Create a new instance of Container - newContainer(): Tagmanager_v2.Schema.Container; + newContainer(): TagManager.Schema.Container; // Create a new instance of ContainerAccess - newContainerAccess(): Tagmanager_v2.Schema.ContainerAccess; + newContainerAccess(): TagManager.Schema.ContainerAccess; // Create a new instance of ContainerVersion - newContainerVersion(): Tagmanager_v2.Schema.ContainerVersion; + newContainerVersion(): TagManager.Schema.ContainerVersion; // Create a new instance of CreateContainerVersionRequestVersionOptions - newCreateContainerVersionRequestVersionOptions(): Tagmanager_v2.Schema.CreateContainerVersionRequestVersionOptions; + newCreateContainerVersionRequestVersionOptions(): TagManager.Schema.CreateContainerVersionRequestVersionOptions; // Create a new instance of CustomTemplate - newCustomTemplate(): Tagmanager_v2.Schema.CustomTemplate; + newCustomTemplate(): TagManager.Schema.CustomTemplate; // Create a new instance of Entity - newEntity(): Tagmanager_v2.Schema.Entity; + newEntity(): TagManager.Schema.Entity; // Create a new instance of Environment - newEnvironment(): Tagmanager_v2.Schema.Environment; + newEnvironment(): TagManager.Schema.Environment; // Create a new instance of Folder - newFolder(): Tagmanager_v2.Schema.Folder; + newFolder(): TagManager.Schema.Folder; // Create a new instance of Parameter - newParameter(): Tagmanager_v2.Schema.Parameter; + newParameter(): TagManager.Schema.Parameter; // Create a new instance of SetupTag - newSetupTag(): Tagmanager_v2.Schema.SetupTag; + newSetupTag(): TagManager.Schema.SetupTag; // Create a new instance of Tag - newTag(): Tagmanager_v2.Schema.Tag; + newTag(): TagManager.Schema.Tag; // Create a new instance of TeardownTag - newTeardownTag(): Tagmanager_v2.Schema.TeardownTag; + newTeardownTag(): TagManager.Schema.TeardownTag; // Create a new instance of Timestamp - newTimestamp(): Tagmanager_v2.Schema.Timestamp; + newTimestamp(): TagManager.Schema.Timestamp; // Create a new instance of Trigger - newTrigger(): Tagmanager_v2.Schema.Trigger; + newTrigger(): TagManager.Schema.Trigger; // Create a new instance of UserPermission - newUserPermission(): Tagmanager_v2.Schema.UserPermission; + newUserPermission(): TagManager.Schema.UserPermission; // Create a new instance of Variable - newVariable(): Tagmanager_v2.Schema.Variable; + newVariable(): TagManager.Schema.Variable; // Create a new instance of VariableFormatValue - newVariableFormatValue(): Tagmanager_v2.Schema.VariableFormatValue; + newVariableFormatValue(): TagManager.Schema.VariableFormatValue; // Create a new instance of Workspace - newWorkspace(): Tagmanager_v2.Schema.Workspace; + newWorkspace(): TagManager.Schema.Workspace; // Create a new instance of Zone - newZone(): Tagmanager_v2.Schema.Zone; + newZone(): TagManager.Schema.Zone; // Create a new instance of ZoneBoundary - newZoneBoundary(): Tagmanager_v2.Schema.ZoneBoundary; + newZoneBoundary(): TagManager.Schema.ZoneBoundary; // Create a new instance of ZoneChildContainer - newZoneChildContainer(): Tagmanager_v2.Schema.ZoneChildContainer; + newZoneChildContainer(): TagManager.Schema.ZoneChildContainer; // Create a new instance of ZoneTypeRestriction - newZoneTypeRestriction(): Tagmanager_v2.Schema.ZoneTypeRestriction; + newZoneTypeRestriction(): TagManager.Schema.ZoneTypeRestriction; } } -declare var Tagmanager_v2: GoogleAppsScript.Tagmanager_v2; \ No newline at end of file +declare var TagManager: GoogleAppsScript.TagManager; diff --git a/types/google-apps-script/apis/tasks_v1.d.ts b/types/google-apps-script/apis/tasks_v1.d.ts index 399a65bfeb..205dc31855 100644 --- a/types/google-apps-script/apis/tasks_v1.d.ts +++ b/types/google-apps-script/apis/tasks_v1.d.ts @@ -5,47 +5,47 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Tasks_v1 { + namespace Tasks { namespace Collection { export interface TasklistsCollection { // Returns the authenticated user's specified task list. - get(tasklist: string): Tasks_v1.Schema.TaskList; + get(tasklist: string): Tasks.Schema.TaskList; // Creates a new task list and adds it to the authenticated user's task lists. - insert(resource: Schema.TaskList): Tasks_v1.Schema.TaskList; + insert(resource: Schema.TaskList): Tasks.Schema.TaskList; // Returns all the authenticated user's task lists. - list(): Tasks_v1.Schema.TaskLists; + list(): Tasks.Schema.TaskLists; // Returns all the authenticated user's task lists. - list(optionalArgs: object): Tasks_v1.Schema.TaskLists; + list(optionalArgs: object): Tasks.Schema.TaskLists; // Updates the authenticated user's specified task list. This method supports patch semantics. - patch(resource: Schema.TaskList, tasklist: string): Tasks_v1.Schema.TaskList; + patch(resource: Schema.TaskList, tasklist: string): Tasks.Schema.TaskList; // Deletes the authenticated user's specified task list. remove(tasklist: string): void; // Updates the authenticated user's specified task list. - update(resource: Schema.TaskList, tasklist: string): Tasks_v1.Schema.TaskList; + update(resource: Schema.TaskList, tasklist: string): Tasks.Schema.TaskList; } export interface TasksCollection { // Clears all completed tasks from the specified task list. The affected tasks will be marked as 'hidden' and no longer be returned by default when retrieving all tasks for a task list. clear(tasklist: string): void; // Returns the specified task. - get(tasklist: string, task: string): Tasks_v1.Schema.Task; + get(tasklist: string, task: string): Tasks.Schema.Task; // Creates a new task on the specified task list. - insert(resource: Schema.Task, tasklist: string): Tasks_v1.Schema.Task; + insert(resource: Schema.Task, tasklist: string): Tasks.Schema.Task; // Creates a new task on the specified task list. - insert(resource: Schema.Task, tasklist: string, optionalArgs: object): Tasks_v1.Schema.Task; + insert(resource: Schema.Task, tasklist: string, optionalArgs: object): Tasks.Schema.Task; // Returns all tasks in the specified task list. - list(tasklist: string): Tasks_v1.Schema.Tasks; + list(tasklist: string): Tasks.Schema.Tasks; // Returns all tasks in the specified task list. - list(tasklist: string, optionalArgs: object): Tasks_v1.Schema.Tasks; + list(tasklist: string, optionalArgs: object): Tasks.Schema.Tasks; // Moves the specified task to another position in the task list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. - move(tasklist: string, task: string): Tasks_v1.Schema.Task; + move(tasklist: string, task: string): Tasks.Schema.Task; // Moves the specified task to another position in the task list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. - move(tasklist: string, task: string, optionalArgs: object): Tasks_v1.Schema.Task; + move(tasklist: string, task: string, optionalArgs: object): Tasks.Schema.Task; // Updates the specified task. This method supports patch semantics. - patch(resource: Schema.Task, tasklist: string, task: string): Tasks_v1.Schema.Task; + patch(resource: Schema.Task, tasklist: string, task: string): Tasks.Schema.Task; // Deletes the specified task from the task list. remove(tasklist: string, task: string): void; // Updates the specified task. - update(resource: Schema.Task, tasklist: string, task: string): Tasks_v1.Schema.Task; + update(resource: Schema.Task, tasklist: string, task: string): Tasks.Schema.Task; } } namespace Schema { @@ -57,7 +57,7 @@ declare namespace GoogleAppsScript { hidden?: boolean; id?: string; kind?: string; - links?: Tasks_v1.Schema.TaskLinks[]; + links?: Tasks.Schema.TaskLinks[]; notes?: string; parent?: string; position?: string; @@ -81,28 +81,28 @@ declare namespace GoogleAppsScript { } export interface TaskLists { etag?: string; - items?: Tasks_v1.Schema.TaskList[]; + items?: Tasks.Schema.TaskList[]; kind?: string; nextPageToken?: string; } export interface Tasks { etag?: string; - items?: Tasks_v1.Schema.Task[]; + items?: Tasks.Schema.Task[]; kind?: string; nextPageToken?: string; } } } - export interface Tasks_v1 { - Tasklists?: Tasks_v1.Collection.TasklistsCollection; - Tasks?: Tasks_v1.Collection.TasksCollection; + export interface Tasks { + Tasklists?: Tasks.Collection.TasklistsCollection; + Tasks?: Tasks.Collection.TasksCollection; // Create a new instance of Task - newTask(): Tasks_v1.Schema.Task; + newTask(): Tasks.Schema.Task; // Create a new instance of TaskLinks - newTaskLinks(): Tasks_v1.Schema.TaskLinks; + newTaskLinks(): Tasks.Schema.TaskLinks; // Create a new instance of TaskList - newTaskList(): Tasks_v1.Schema.TaskList; + newTaskList(): Tasks.Schema.TaskList; } } -declare var Tasks_v1: GoogleAppsScript.Tasks_v1; +declare var Tasks: GoogleAppsScript.Tasks; diff --git a/types/google-apps-script/apis/urlshortener_v1.d.ts b/types/google-apps-script/apis/urlshortener_v1.d.ts index 40d000daed..bb8b5ff7b9 100644 --- a/types/google-apps-script/apis/urlshortener_v1.d.ts +++ b/types/google-apps-script/apis/urlshortener_v1.d.ts @@ -5,43 +5,43 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Urlshortener_v1 { + namespace UrlShortener { namespace Collection { export interface UrlCollection { // Expands a short URL or gets creation time and analytics. - get(shortUrl: string): Urlshortener_v1.Schema.Url; + get(shortUrl: string): UrlShortener.Schema.Url; // Expands a short URL or gets creation time and analytics. - get(shortUrl: string, optionalArgs: object): Urlshortener_v1.Schema.Url; + get(shortUrl: string, optionalArgs: object): UrlShortener.Schema.Url; // Creates a new short URL. - insert(resource: Schema.Url): Urlshortener_v1.Schema.Url; + insert(resource: Schema.Url): UrlShortener.Schema.Url; // Retrieves a list of URLs shortened by a user. - list(): Urlshortener_v1.Schema.UrlHistory; + list(): UrlShortener.Schema.UrlHistory; // Retrieves a list of URLs shortened by a user. - list(optionalArgs: object): Urlshortener_v1.Schema.UrlHistory; + list(optionalArgs: object): UrlShortener.Schema.UrlHistory; } } namespace Schema { export interface AnalyticsSnapshot { - browsers?: Urlshortener_v1.Schema.StringCount[]; - countries?: Urlshortener_v1.Schema.StringCount[]; + browsers?: UrlShortener.Schema.StringCount[]; + countries?: UrlShortener.Schema.StringCount[]; longUrlClicks?: string; - platforms?: Urlshortener_v1.Schema.StringCount[]; - referrers?: Urlshortener_v1.Schema.StringCount[]; + platforms?: UrlShortener.Schema.StringCount[]; + referrers?: UrlShortener.Schema.StringCount[]; shortUrlClicks?: string; } export interface AnalyticsSummary { - allTime?: Urlshortener_v1.Schema.AnalyticsSnapshot; - day?: Urlshortener_v1.Schema.AnalyticsSnapshot; - month?: Urlshortener_v1.Schema.AnalyticsSnapshot; - twoHours?: Urlshortener_v1.Schema.AnalyticsSnapshot; - week?: Urlshortener_v1.Schema.AnalyticsSnapshot; + allTime?: UrlShortener.Schema.AnalyticsSnapshot; + day?: UrlShortener.Schema.AnalyticsSnapshot; + month?: UrlShortener.Schema.AnalyticsSnapshot; + twoHours?: UrlShortener.Schema.AnalyticsSnapshot; + week?: UrlShortener.Schema.AnalyticsSnapshot; } export interface StringCount { count?: string; id?: string; } export interface Url { - analytics?: Urlshortener_v1.Schema.AnalyticsSummary; + analytics?: UrlShortener.Schema.AnalyticsSummary; created?: string; id?: string; kind?: string; @@ -49,7 +49,7 @@ declare namespace GoogleAppsScript { status?: string; } export interface UrlHistory { - items?: Urlshortener_v1.Schema.Url[]; + items?: UrlShortener.Schema.Url[]; itemsPerPage?: number; kind?: string; nextPageToken?: string; @@ -57,17 +57,17 @@ declare namespace GoogleAppsScript { } } } - export interface Urlshortener_v1 { - Url?: Urlshortener_v1.Collection.UrlCollection; + export interface UrlShortener { + Url?: UrlShortener.Collection.UrlCollection; // Create a new instance of AnalyticsSnapshot - newAnalyticsSnapshot(): Urlshortener_v1.Schema.AnalyticsSnapshot; + newAnalyticsSnapshot(): UrlShortener.Schema.AnalyticsSnapshot; // Create a new instance of AnalyticsSummary - newAnalyticsSummary(): Urlshortener_v1.Schema.AnalyticsSummary; + newAnalyticsSummary(): UrlShortener.Schema.AnalyticsSummary; // Create a new instance of StringCount - newStringCount(): Urlshortener_v1.Schema.StringCount; + newStringCount(): UrlShortener.Schema.StringCount; // Create a new instance of Url - newUrl(): Urlshortener_v1.Schema.Url; + newUrl(): UrlShortener.Schema.Url; } } -declare var Urlshortener_v1: GoogleAppsScript.Urlshortener_v1; \ No newline at end of file +declare var UrlShortener: GoogleAppsScript.UrlShortener; diff --git a/types/google-apps-script/apis/youtube_v3.d.ts b/types/google-apps-script/apis/youtube_v3.d.ts index 8c6763b92e..0585a8da07 100644 --- a/types/google-apps-script/apis/youtube_v3.d.ts +++ b/types/google-apps-script/apis/youtube_v3.d.ts @@ -5,16 +5,16 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace Youtube_v3 { + namespace YouTube { namespace Collection { export interface ActivitiesCollection { // Posts a bulletin for a specific channel. (The user submitting the request must be authorized to act on the channel's behalf.) // Note: Even though an activity resource can contain information about actions like a user rating a video or marking a video as a favorite, you need to use other API methods to generate those activity resources. For example, you would use the API's videos.rate() method to rate a video and the playlistItems.insert() method to mark a video as a favorite. - insert(resource: Schema.Activity, part: string): Youtube_v3.Schema.Activity; + insert(resource: Schema.Activity, part: string): YouTube.Schema.Activity; // Returns a list of channel activity events that match the request criteria. For example, you can retrieve events associated with a particular channel, events associated with the user's subscriptions and Google+ friends, or the YouTube home page feed, which is customized for each user. - list(part: string): Youtube_v3.Schema.ActivityListResponse; + list(part: string): YouTube.Schema.ActivityListResponse; // Returns a list of channel activity events that match the request criteria. For example, you can retrieve events associated with a particular channel, events associated with the user's subscriptions and Google+ friends, or the YouTube home page feed, which is customized for each user. - list(part: string, optionalArgs: object): Youtube_v3.Schema.ActivityListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.ActivityListResponse; } export interface CaptionsCollection { // Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter. @@ -22,88 +22,88 @@ declare namespace GoogleAppsScript { // Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter. download(id: string, optionalArgs: object): void; // Uploads a caption track. - insert(resource: Schema.Caption, part: string): Youtube_v3.Schema.Caption; + insert(resource: Schema.Caption, part: string): YouTube.Schema.Caption; // Uploads a caption track. - insert(resource: Schema.Caption, part: string, mediaData: any): Youtube_v3.Schema.Caption; + insert(resource: Schema.Caption, part: string, mediaData: any): YouTube.Schema.Caption; // Uploads a caption track. - insert(resource: Schema.Caption, part: string, mediaData: any, optionalArgs: object): Youtube_v3.Schema.Caption; + insert(resource: Schema.Caption, part: string, mediaData: any, optionalArgs: object): YouTube.Schema.Caption; // Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track. - list(part: string, videoId: string): Youtube_v3.Schema.CaptionListResponse; + list(part: string, videoId: string): YouTube.Schema.CaptionListResponse; // Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track. - list(part: string, videoId: string, optionalArgs: object): Youtube_v3.Schema.CaptionListResponse; + list(part: string, videoId: string, optionalArgs: object): YouTube.Schema.CaptionListResponse; // Deletes a specified caption track. remove(id: string): void; // Deletes a specified caption track. remove(id: string, optionalArgs: object): void; // Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both. - update(resource: Schema.Caption, part: string): Youtube_v3.Schema.Caption; + update(resource: Schema.Caption, part: string): YouTube.Schema.Caption; // Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both. - update(resource: Schema.Caption, part: string, mediaData: any): Youtube_v3.Schema.Caption; + update(resource: Schema.Caption, part: string, mediaData: any): YouTube.Schema.Caption; // Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both. - update(resource: Schema.Caption, part: string, mediaData: any, optionalArgs: object): Youtube_v3.Schema.Caption; + update(resource: Schema.Caption, part: string, mediaData: any, optionalArgs: object): YouTube.Schema.Caption; } export interface ChannelBannersCollection { // Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel: // - Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels. // - Extract the url property's value from the response that the API returns for step 1. // - Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2. - insert(resource: Schema.ChannelBannerResource): Youtube_v3.Schema.ChannelBannerResource; + insert(resource: Schema.ChannelBannerResource): YouTube.Schema.ChannelBannerResource; // Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel: // - Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels. // - Extract the url property's value from the response that the API returns for step 1. // - Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2. - insert(resource: Schema.ChannelBannerResource, mediaData: any): Youtube_v3.Schema.ChannelBannerResource; + insert(resource: Schema.ChannelBannerResource, mediaData: any): YouTube.Schema.ChannelBannerResource; // Uploads a channel banner image to YouTube. This method represents the first two steps in a three-step process to update the banner image for a channel: // - Call the channelBanners.insert method to upload the binary image data to YouTube. The image must have a 16:9 aspect ratio and be at least 2120x1192 pixels. // - Extract the url property's value from the response that the API returns for step 1. // - Call the channels.update method to update the channel's branding settings. Set the brandingSettings.image.bannerExternalUrl property's value to the URL obtained in step 2. - insert(resource: Schema.ChannelBannerResource, mediaData: any, optionalArgs: object): Youtube_v3.Schema.ChannelBannerResource; + insert(resource: Schema.ChannelBannerResource, mediaData: any, optionalArgs: object): YouTube.Schema.ChannelBannerResource; } export interface ChannelSectionsCollection { // Adds a channelSection for the authenticated user's channel. - insert(resource: Schema.ChannelSection, part: string): Youtube_v3.Schema.ChannelSection; + insert(resource: Schema.ChannelSection, part: string): YouTube.Schema.ChannelSection; // Adds a channelSection for the authenticated user's channel. - insert(resource: Schema.ChannelSection, part: string, optionalArgs: object): Youtube_v3.Schema.ChannelSection; + insert(resource: Schema.ChannelSection, part: string, optionalArgs: object): YouTube.Schema.ChannelSection; // Returns channelSection resources that match the API request criteria. - list(part: string): Youtube_v3.Schema.ChannelSectionListResponse; + list(part: string): YouTube.Schema.ChannelSectionListResponse; // Returns channelSection resources that match the API request criteria. - list(part: string, optionalArgs: object): Youtube_v3.Schema.ChannelSectionListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.ChannelSectionListResponse; // Deletes a channelSection. remove(id: string): void; // Deletes a channelSection. remove(id: string, optionalArgs: object): void; // Update a channelSection. - update(resource: Schema.ChannelSection, part: string): Youtube_v3.Schema.ChannelSection; + update(resource: Schema.ChannelSection, part: string): YouTube.Schema.ChannelSection; // Update a channelSection. - update(resource: Schema.ChannelSection, part: string, optionalArgs: object): Youtube_v3.Schema.ChannelSection; + update(resource: Schema.ChannelSection, part: string, optionalArgs: object): YouTube.Schema.ChannelSection; } export interface ChannelsCollection { // Returns a collection of zero or more channel resources that match the request criteria. - list(part: string): Youtube_v3.Schema.ChannelListResponse; + list(part: string): YouTube.Schema.ChannelListResponse; // Returns a collection of zero or more channel resources that match the request criteria. - list(part: string, optionalArgs: object): Youtube_v3.Schema.ChannelListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.ChannelListResponse; // Updates a channel's metadata. Note that this method currently only supports updates to the channel resource's brandingSettings and invideoPromotion objects and their child properties. - update(resource: Schema.Channel, part: string): Youtube_v3.Schema.Channel; + update(resource: Schema.Channel, part: string): YouTube.Schema.Channel; // Updates a channel's metadata. Note that this method currently only supports updates to the channel resource's brandingSettings and invideoPromotion objects and their child properties. - update(resource: Schema.Channel, part: string, optionalArgs: object): Youtube_v3.Schema.Channel; + update(resource: Schema.Channel, part: string, optionalArgs: object): YouTube.Schema.Channel; } export interface CommentThreadsCollection { // Creates a new top-level comment. To add a reply to an existing comment, use the comments.insert method instead. - insert(resource: Schema.CommentThread, part: string): Youtube_v3.Schema.CommentThread; + insert(resource: Schema.CommentThread, part: string): YouTube.Schema.CommentThread; // Returns a list of comment threads that match the API request parameters. - list(part: string): Youtube_v3.Schema.CommentThreadListResponse; + list(part: string): YouTube.Schema.CommentThreadListResponse; // Returns a list of comment threads that match the API request parameters. - list(part: string, optionalArgs: object): Youtube_v3.Schema.CommentThreadListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.CommentThreadListResponse; // Modifies the top-level comment in a comment thread. - update(resource: Schema.CommentThread, part: string): Youtube_v3.Schema.CommentThread; + update(resource: Schema.CommentThread, part: string): YouTube.Schema.CommentThread; } export interface CommentsCollection { // Creates a reply to an existing comment. Note: To create a top-level comment, use the commentThreads.insert method. - insert(resource: Schema.Comment, part: string): Youtube_v3.Schema.Comment; + insert(resource: Schema.Comment, part: string): YouTube.Schema.Comment; // Returns a list of comments that match the API request parameters. - list(part: string): Youtube_v3.Schema.CommentListResponse; + list(part: string): YouTube.Schema.CommentListResponse; // Returns a list of comments that match the API request parameters. - list(part: string, optionalArgs: object): Youtube_v3.Schema.CommentListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.CommentListResponse; // Expresses the caller's opinion that one or more comments should be flagged as spam. markAsSpam(id: string): void; // Deletes a comment. @@ -113,199 +113,199 @@ declare namespace GoogleAppsScript { // Sets the moderation status of one or more comments. The API request must be authorized by the owner of the channel or video associated with the comments. setModerationStatus(id: string, moderationStatus: string, optionalArgs: object): void; // Modifies a comment. - update(resource: Schema.Comment, part: string): Youtube_v3.Schema.Comment; + update(resource: Schema.Comment, part: string): YouTube.Schema.Comment; } export interface GuideCategoriesCollection { // Returns a list of categories that can be associated with YouTube channels. - list(part: string): Youtube_v3.Schema.GuideCategoryListResponse; + list(part: string): YouTube.Schema.GuideCategoryListResponse; // Returns a list of categories that can be associated with YouTube channels. - list(part: string, optionalArgs: object): Youtube_v3.Schema.GuideCategoryListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.GuideCategoryListResponse; } export interface I18nLanguagesCollection { // Returns a list of application languages that the YouTube website supports. - list(part: string): Youtube_v3.Schema.I18nLanguageListResponse; + list(part: string): YouTube.Schema.I18nLanguageListResponse; // Returns a list of application languages that the YouTube website supports. - list(part: string, optionalArgs: object): Youtube_v3.Schema.I18nLanguageListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.I18nLanguageListResponse; } export interface I18nRegionsCollection { // Returns a list of content regions that the YouTube website supports. - list(part: string): Youtube_v3.Schema.I18nRegionListResponse; + list(part: string): YouTube.Schema.I18nRegionListResponse; // Returns a list of content regions that the YouTube website supports. - list(part: string, optionalArgs: object): Youtube_v3.Schema.I18nRegionListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.I18nRegionListResponse; } export interface LiveBroadcastsCollection { // Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a stream. A broadcast can only be bound to one video stream, though a video stream may be bound to more than one broadcast. - bind(id: string, part: string): Youtube_v3.Schema.LiveBroadcast; + bind(id: string, part: string): YouTube.Schema.LiveBroadcast; // Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a stream. A broadcast can only be bound to one video stream, though a video stream may be bound to more than one broadcast. - bind(id: string, part: string, optionalArgs: object): Youtube_v3.Schema.LiveBroadcast; + bind(id: string, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; // Controls the settings for a slate that can be displayed in the broadcast stream. - control(id: string, part: string): Youtube_v3.Schema.LiveBroadcast; + control(id: string, part: string): YouTube.Schema.LiveBroadcast; // Controls the settings for a slate that can be displayed in the broadcast stream. - control(id: string, part: string, optionalArgs: object): Youtube_v3.Schema.LiveBroadcast; + control(id: string, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; // Creates a broadcast. - insert(resource: Schema.LiveBroadcast, part: string): Youtube_v3.Schema.LiveBroadcast; + insert(resource: Schema.LiveBroadcast, part: string): YouTube.Schema.LiveBroadcast; // Creates a broadcast. - insert(resource: Schema.LiveBroadcast, part: string, optionalArgs: object): Youtube_v3.Schema.LiveBroadcast; + insert(resource: Schema.LiveBroadcast, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; // Returns a list of YouTube broadcasts that match the API request parameters. - list(part: string): Youtube_v3.Schema.LiveBroadcastListResponse; + list(part: string): YouTube.Schema.LiveBroadcastListResponse; // Returns a list of YouTube broadcasts that match the API request parameters. - list(part: string, optionalArgs: object): Youtube_v3.Schema.LiveBroadcastListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.LiveBroadcastListResponse; // Deletes a broadcast. remove(id: string): void; // Deletes a broadcast. remove(id: string, optionalArgs: object): void; // Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active. - transition(broadcastStatus: string, id: string, part: string): Youtube_v3.Schema.LiveBroadcast; + transition(broadcastStatus: string, id: string, part: string): YouTube.Schema.LiveBroadcast; // Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream. Before calling this method, you should confirm that the value of the status.streamStatus property for the stream bound to your broadcast is active. - transition(broadcastStatus: string, id: string, part: string, optionalArgs: object): Youtube_v3.Schema.LiveBroadcast; + transition(broadcastStatus: string, id: string, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; // Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcast resource's contentDetails object. - update(resource: Schema.LiveBroadcast, part: string): Youtube_v3.Schema.LiveBroadcast; + update(resource: Schema.LiveBroadcast, part: string): YouTube.Schema.LiveBroadcast; // Updates a broadcast. For example, you could modify the broadcast settings defined in the liveBroadcast resource's contentDetails object. - update(resource: Schema.LiveBroadcast, part: string, optionalArgs: object): Youtube_v3.Schema.LiveBroadcast; + update(resource: Schema.LiveBroadcast, part: string, optionalArgs: object): YouTube.Schema.LiveBroadcast; } export interface LiveChatBansCollection { // Adds a new ban to the chat. - insert(resource: Schema.LiveChatBan, part: string): Youtube_v3.Schema.LiveChatBan; + insert(resource: Schema.LiveChatBan, part: string): YouTube.Schema.LiveChatBan; // Removes a chat ban. remove(id: string): void; } export interface LiveChatMessagesCollection { // Adds a message to a live chat. - insert(resource: Schema.LiveChatMessage, part: string): Youtube_v3.Schema.LiveChatMessage; + insert(resource: Schema.LiveChatMessage, part: string): YouTube.Schema.LiveChatMessage; // Lists live chat messages for a specific chat. - list(liveChatId: string, part: string): Youtube_v3.Schema.LiveChatMessageListResponse; + list(liveChatId: string, part: string): YouTube.Schema.LiveChatMessageListResponse; // Lists live chat messages for a specific chat. - list(liveChatId: string, part: string, optionalArgs: object): Youtube_v3.Schema.LiveChatMessageListResponse; + list(liveChatId: string, part: string, optionalArgs: object): YouTube.Schema.LiveChatMessageListResponse; // Deletes a chat message. remove(id: string): void; } export interface LiveChatModeratorsCollection { // Adds a new moderator for the chat. - insert(resource: Schema.LiveChatModerator, part: string): Youtube_v3.Schema.LiveChatModerator; + insert(resource: Schema.LiveChatModerator, part: string): YouTube.Schema.LiveChatModerator; // Lists moderators for a live chat. - list(liveChatId: string, part: string): Youtube_v3.Schema.LiveChatModeratorListResponse; + list(liveChatId: string, part: string): YouTube.Schema.LiveChatModeratorListResponse; // Lists moderators for a live chat. - list(liveChatId: string, part: string, optionalArgs: object): Youtube_v3.Schema.LiveChatModeratorListResponse; + list(liveChatId: string, part: string, optionalArgs: object): YouTube.Schema.LiveChatModeratorListResponse; // Removes a chat moderator. remove(id: string): void; } export interface LiveStreamsCollection { // Creates a video stream. The stream enables you to send your video to YouTube, which can then broadcast the video to your audience. - insert(resource: Schema.LiveStream, part: string): Youtube_v3.Schema.LiveStream; + insert(resource: Schema.LiveStream, part: string): YouTube.Schema.LiveStream; // Creates a video stream. The stream enables you to send your video to YouTube, which can then broadcast the video to your audience. - insert(resource: Schema.LiveStream, part: string, optionalArgs: object): Youtube_v3.Schema.LiveStream; + insert(resource: Schema.LiveStream, part: string, optionalArgs: object): YouTube.Schema.LiveStream; // Returns a list of video streams that match the API request parameters. - list(part: string): Youtube_v3.Schema.LiveStreamListResponse; + list(part: string): YouTube.Schema.LiveStreamListResponse; // Returns a list of video streams that match the API request parameters. - list(part: string, optionalArgs: object): Youtube_v3.Schema.LiveStreamListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.LiveStreamListResponse; // Deletes a video stream. remove(id: string): void; // Deletes a video stream. remove(id: string, optionalArgs: object): void; // Updates a video stream. If the properties that you want to change cannot be updated, then you need to create a new stream with the proper settings. - update(resource: Schema.LiveStream, part: string): Youtube_v3.Schema.LiveStream; + update(resource: Schema.LiveStream, part: string): YouTube.Schema.LiveStream; // Updates a video stream. If the properties that you want to change cannot be updated, then you need to create a new stream with the proper settings. - update(resource: Schema.LiveStream, part: string, optionalArgs: object): Youtube_v3.Schema.LiveStream; + update(resource: Schema.LiveStream, part: string, optionalArgs: object): YouTube.Schema.LiveStream; } export interface PlaylistItemsCollection { // Adds a resource to a playlist. - insert(resource: Schema.PlaylistItem, part: string): Youtube_v3.Schema.PlaylistItem; + insert(resource: Schema.PlaylistItem, part: string): YouTube.Schema.PlaylistItem; // Adds a resource to a playlist. - insert(resource: Schema.PlaylistItem, part: string, optionalArgs: object): Youtube_v3.Schema.PlaylistItem; + insert(resource: Schema.PlaylistItem, part: string, optionalArgs: object): YouTube.Schema.PlaylistItem; // Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs. - list(part: string): Youtube_v3.Schema.PlaylistItemListResponse; + list(part: string): YouTube.Schema.PlaylistItemListResponse; // Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs. - list(part: string, optionalArgs: object): Youtube_v3.Schema.PlaylistItemListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.PlaylistItemListResponse; // Deletes a playlist item. remove(id: string): void; // Deletes a playlist item. remove(id: string, optionalArgs: object): void; // Modifies a playlist item. For example, you could update the item's position in the playlist. - update(resource: Schema.PlaylistItem, part: string): Youtube_v3.Schema.PlaylistItem; + update(resource: Schema.PlaylistItem, part: string): YouTube.Schema.PlaylistItem; // Modifies a playlist item. For example, you could update the item's position in the playlist. - update(resource: Schema.PlaylistItem, part: string, optionalArgs: object): Youtube_v3.Schema.PlaylistItem; + update(resource: Schema.PlaylistItem, part: string, optionalArgs: object): YouTube.Schema.PlaylistItem; } export interface PlaylistsCollection { // Creates a playlist. - insert(resource: Schema.Playlist, part: string): Youtube_v3.Schema.Playlist; + insert(resource: Schema.Playlist, part: string): YouTube.Schema.Playlist; // Creates a playlist. - insert(resource: Schema.Playlist, part: string, optionalArgs: object): Youtube_v3.Schema.Playlist; + insert(resource: Schema.Playlist, part: string, optionalArgs: object): YouTube.Schema.Playlist; // Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs. - list(part: string): Youtube_v3.Schema.PlaylistListResponse; + list(part: string): YouTube.Schema.PlaylistListResponse; // Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs. - list(part: string, optionalArgs: object): Youtube_v3.Schema.PlaylistListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.PlaylistListResponse; // Deletes a playlist. remove(id: string): void; // Deletes a playlist. remove(id: string, optionalArgs: object): void; // Modifies a playlist. For example, you could change a playlist's title, description, or privacy status. - update(resource: Schema.Playlist, part: string): Youtube_v3.Schema.Playlist; + update(resource: Schema.Playlist, part: string): YouTube.Schema.Playlist; // Modifies a playlist. For example, you could change a playlist's title, description, or privacy status. - update(resource: Schema.Playlist, part: string, optionalArgs: object): Youtube_v3.Schema.Playlist; + update(resource: Schema.Playlist, part: string, optionalArgs: object): YouTube.Schema.Playlist; } export interface SearchCollection { // Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource. - list(part: string): Youtube_v3.Schema.SearchListResponse; + list(part: string): YouTube.Schema.SearchListResponse; // Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource. - list(part: string, optionalArgs: object): Youtube_v3.Schema.SearchListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.SearchListResponse; } export interface SponsorsCollection { // Lists sponsors for a channel. - list(part: string): Youtube_v3.Schema.SponsorListResponse; + list(part: string): YouTube.Schema.SponsorListResponse; // Lists sponsors for a channel. - list(part: string, optionalArgs: object): Youtube_v3.Schema.SponsorListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.SponsorListResponse; } export interface SubscriptionsCollection { // Adds a subscription for the authenticated user's channel. - insert(resource: Schema.Subscription, part: string): Youtube_v3.Schema.Subscription; + insert(resource: Schema.Subscription, part: string): YouTube.Schema.Subscription; // Returns subscription resources that match the API request criteria. - list(part: string): Youtube_v3.Schema.SubscriptionListResponse; + list(part: string): YouTube.Schema.SubscriptionListResponse; // Returns subscription resources that match the API request criteria. - list(part: string, optionalArgs: object): Youtube_v3.Schema.SubscriptionListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.SubscriptionListResponse; // Deletes a subscription. remove(id: string): void; } export interface SuperChatEventsCollection { // Lists Super Chat events for a channel. - list(part: string): Youtube_v3.Schema.SuperChatEventListResponse; + list(part: string): YouTube.Schema.SuperChatEventListResponse; // Lists Super Chat events for a channel. - list(part: string, optionalArgs: object): Youtube_v3.Schema.SuperChatEventListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.SuperChatEventListResponse; } export interface ThumbnailsCollection { // Uploads a custom video thumbnail to YouTube and sets it for a video. - set(videoId: string): Youtube_v3.Schema.ThumbnailSetResponse; + set(videoId: string): YouTube.Schema.ThumbnailSetResponse; // Uploads a custom video thumbnail to YouTube and sets it for a video. - set(videoId: string, mediaData: any): Youtube_v3.Schema.ThumbnailSetResponse; + set(videoId: string, mediaData: any): YouTube.Schema.ThumbnailSetResponse; // Uploads a custom video thumbnail to YouTube and sets it for a video. - set(videoId: string, mediaData: any, optionalArgs: object): Youtube_v3.Schema.ThumbnailSetResponse; + set(videoId: string, mediaData: any, optionalArgs: object): YouTube.Schema.ThumbnailSetResponse; } export interface VideoAbuseReportReasonsCollection { // Returns a list of abuse reasons that can be used for reporting abusive videos. - list(part: string): Youtube_v3.Schema.VideoAbuseReportReasonListResponse; + list(part: string): YouTube.Schema.VideoAbuseReportReasonListResponse; // Returns a list of abuse reasons that can be used for reporting abusive videos. - list(part: string, optionalArgs: object): Youtube_v3.Schema.VideoAbuseReportReasonListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.VideoAbuseReportReasonListResponse; } export interface VideoCategoriesCollection { // Returns a list of categories that can be associated with YouTube videos. - list(part: string): Youtube_v3.Schema.VideoCategoryListResponse; + list(part: string): YouTube.Schema.VideoCategoryListResponse; // Returns a list of categories that can be associated with YouTube videos. - list(part: string, optionalArgs: object): Youtube_v3.Schema.VideoCategoryListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.VideoCategoryListResponse; } export interface VideosCollection { // Retrieves the ratings that the authorized user gave to a list of specified videos. - getRating(id: string): Youtube_v3.Schema.VideoGetRatingResponse; + getRating(id: string): YouTube.Schema.VideoGetRatingResponse; // Retrieves the ratings that the authorized user gave to a list of specified videos. - getRating(id: string, optionalArgs: object): Youtube_v3.Schema.VideoGetRatingResponse; + getRating(id: string, optionalArgs: object): YouTube.Schema.VideoGetRatingResponse; // Uploads a video to YouTube and optionally sets the video's metadata. - insert(resource: Schema.Video, part: string): Youtube_v3.Schema.Video; + insert(resource: Schema.Video, part: string): YouTube.Schema.Video; // Uploads a video to YouTube and optionally sets the video's metadata. - insert(resource: Schema.Video, part: string, mediaData: any): Youtube_v3.Schema.Video; + insert(resource: Schema.Video, part: string, mediaData: any): YouTube.Schema.Video; // Uploads a video to YouTube and optionally sets the video's metadata. - insert(resource: Schema.Video, part: string, mediaData: any, optionalArgs: object): Youtube_v3.Schema.Video; + insert(resource: Schema.Video, part: string, mediaData: any, optionalArgs: object): YouTube.Schema.Video; // Returns a list of videos that match the API request parameters. - list(part: string): Youtube_v3.Schema.VideoListResponse; + list(part: string): YouTube.Schema.VideoListResponse; // Returns a list of videos that match the API request parameters. - list(part: string, optionalArgs: object): Youtube_v3.Schema.VideoListResponse; + list(part: string, optionalArgs: object): YouTube.Schema.VideoListResponse; // Add a like or dislike rating to a video or remove a rating from a video. rate(id: string, rating: string): void; // Deletes a YouTube video. @@ -317,9 +317,9 @@ declare namespace GoogleAppsScript { // Report abuse for a video. reportAbuse(resource: Schema.VideoAbuseReport, optionalArgs: object): void; // Updates a video's metadata. - update(resource: Schema.Video, part: string): Youtube_v3.Schema.Video; + update(resource: Schema.Video, part: string): YouTube.Schema.Video; // Updates a video's metadata. - update(resource: Schema.Video, part: string, optionalArgs: object): Youtube_v3.Schema.Video; + update(resource: Schema.Video, part: string, optionalArgs: object): YouTube.Schema.Video; } export interface WatermarksCollection { // Uploads a watermark image to YouTube and sets it for a channel. @@ -340,44 +340,44 @@ declare namespace GoogleAppsScript { exception?: string[]; } export interface Activity { - contentDetails?: Youtube_v3.Schema.ActivityContentDetails; + contentDetails?: YouTube.Schema.ActivityContentDetails; etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.ActivitySnippet; + snippet?: YouTube.Schema.ActivitySnippet; } export interface ActivityContentDetails { - bulletin?: Youtube_v3.Schema.ActivityContentDetailsBulletin; - channelItem?: Youtube_v3.Schema.ActivityContentDetailsChannelItem; - comment?: Youtube_v3.Schema.ActivityContentDetailsComment; - favorite?: Youtube_v3.Schema.ActivityContentDetailsFavorite; - like?: Youtube_v3.Schema.ActivityContentDetailsLike; - playlistItem?: Youtube_v3.Schema.ActivityContentDetailsPlaylistItem; - promotedItem?: Youtube_v3.Schema.ActivityContentDetailsPromotedItem; - recommendation?: Youtube_v3.Schema.ActivityContentDetailsRecommendation; - social?: Youtube_v3.Schema.ActivityContentDetailsSocial; - subscription?: Youtube_v3.Schema.ActivityContentDetailsSubscription; - upload?: Youtube_v3.Schema.ActivityContentDetailsUpload; + bulletin?: YouTube.Schema.ActivityContentDetailsBulletin; + channelItem?: YouTube.Schema.ActivityContentDetailsChannelItem; + comment?: YouTube.Schema.ActivityContentDetailsComment; + favorite?: YouTube.Schema.ActivityContentDetailsFavorite; + like?: YouTube.Schema.ActivityContentDetailsLike; + playlistItem?: YouTube.Schema.ActivityContentDetailsPlaylistItem; + promotedItem?: YouTube.Schema.ActivityContentDetailsPromotedItem; + recommendation?: YouTube.Schema.ActivityContentDetailsRecommendation; + social?: YouTube.Schema.ActivityContentDetailsSocial; + subscription?: YouTube.Schema.ActivityContentDetailsSubscription; + upload?: YouTube.Schema.ActivityContentDetailsUpload; } export interface ActivityContentDetailsBulletin { - resourceId?: Youtube_v3.Schema.ResourceId; + resourceId?: YouTube.Schema.ResourceId; } export interface ActivityContentDetailsChannelItem { - resourceId?: Youtube_v3.Schema.ResourceId; + resourceId?: YouTube.Schema.ResourceId; } export interface ActivityContentDetailsComment { - resourceId?: Youtube_v3.Schema.ResourceId; + resourceId?: YouTube.Schema.ResourceId; } export interface ActivityContentDetailsFavorite { - resourceId?: Youtube_v3.Schema.ResourceId; + resourceId?: YouTube.Schema.ResourceId; } export interface ActivityContentDetailsLike { - resourceId?: Youtube_v3.Schema.ResourceId; + resourceId?: YouTube.Schema.ResourceId; } export interface ActivityContentDetailsPlaylistItem { playlistId?: string; playlistItemId?: string; - resourceId?: Youtube_v3.Schema.ResourceId; + resourceId?: YouTube.Schema.ResourceId; } export interface ActivityContentDetailsPromotedItem { adTag?: string; @@ -393,18 +393,18 @@ declare namespace GoogleAppsScript { } export interface ActivityContentDetailsRecommendation { reason?: string; - resourceId?: Youtube_v3.Schema.ResourceId; - seedResourceId?: Youtube_v3.Schema.ResourceId; + resourceId?: YouTube.Schema.ResourceId; + seedResourceId?: YouTube.Schema.ResourceId; } export interface ActivityContentDetailsSocial { author?: string; imageUrl?: string; referenceUrl?: string; - resourceId?: Youtube_v3.Schema.ResourceId; + resourceId?: YouTube.Schema.ResourceId; type?: string; } export interface ActivityContentDetailsSubscription { - resourceId?: Youtube_v3.Schema.ResourceId; + resourceId?: YouTube.Schema.ResourceId; } export interface ActivityContentDetailsUpload { videoId?: string; @@ -412,10 +412,10 @@ declare namespace GoogleAppsScript { export interface ActivityListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.Activity[]; + items?: YouTube.Schema.Activity[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -426,7 +426,7 @@ declare namespace GoogleAppsScript { description?: string; groupId?: string; publishedAt?: string; - thumbnails?: Youtube_v3.Schema.ThumbnailDetails; + thumbnails?: YouTube.Schema.ThumbnailDetails; title?: string; type?: string; } @@ -434,12 +434,12 @@ declare namespace GoogleAppsScript { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.CaptionSnippet; + snippet?: YouTube.Schema.CaptionSnippet; } export interface CaptionListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.Caption[]; + items?: YouTube.Schema.Caption[]; kind?: string; visitorId?: string; } @@ -461,25 +461,25 @@ declare namespace GoogleAppsScript { export interface CdnSettings { format?: string; frameRate?: string; - ingestionInfo?: Youtube_v3.Schema.IngestionInfo; + ingestionInfo?: YouTube.Schema.IngestionInfo; ingestionType?: string; resolution?: string; } export interface Channel { - auditDetails?: Youtube_v3.Schema.ChannelAuditDetails; - brandingSettings?: Youtube_v3.Schema.ChannelBrandingSettings; - contentDetails?: Youtube_v3.Schema.ChannelContentDetails; - contentOwnerDetails?: Youtube_v3.Schema.ChannelContentOwnerDetails; - conversionPings?: Youtube_v3.Schema.ChannelConversionPings; + auditDetails?: YouTube.Schema.ChannelAuditDetails; + brandingSettings?: YouTube.Schema.ChannelBrandingSettings; + contentDetails?: YouTube.Schema.ChannelContentDetails; + contentOwnerDetails?: YouTube.Schema.ChannelContentOwnerDetails; + conversionPings?: YouTube.Schema.ChannelConversionPings; etag?: string; id?: string; - invideoPromotion?: Youtube_v3.Schema.InvideoPromotion; + invideoPromotion?: YouTube.Schema.InvideoPromotion; kind?: string; localizations?: object; - snippet?: Youtube_v3.Schema.ChannelSnippet; - statistics?: Youtube_v3.Schema.ChannelStatistics; - status?: Youtube_v3.Schema.ChannelStatus; - topicDetails?: Youtube_v3.Schema.ChannelTopicDetails; + snippet?: YouTube.Schema.ChannelSnippet; + statistics?: YouTube.Schema.ChannelStatistics; + status?: YouTube.Schema.ChannelStatus; + topicDetails?: YouTube.Schema.ChannelTopicDetails; } export interface ChannelAuditDetails { communityGuidelinesGoodStanding?: boolean; @@ -492,13 +492,13 @@ declare namespace GoogleAppsScript { url?: string; } export interface ChannelBrandingSettings { - channel?: Youtube_v3.Schema.ChannelSettings; - hints?: Youtube_v3.Schema.PropertyValue[]; - image?: Youtube_v3.Schema.ImageSettings; - watch?: Youtube_v3.Schema.WatchSettings; + channel?: YouTube.Schema.ChannelSettings; + hints?: YouTube.Schema.PropertyValue[]; + image?: YouTube.Schema.ImageSettings; + watch?: YouTube.Schema.WatchSettings; } export interface ChannelContentDetails { - relatedPlaylists?: Youtube_v3.Schema.ChannelContentDetailsRelatedPlaylists; + relatedPlaylists?: YouTube.Schema.ChannelContentDetailsRelatedPlaylists; } export interface ChannelContentDetailsRelatedPlaylists { favorites?: string; @@ -516,15 +516,15 @@ declare namespace GoogleAppsScript { conversionUrl?: string; } export interface ChannelConversionPings { - pings?: Youtube_v3.Schema.ChannelConversionPing[]; + pings?: YouTube.Schema.ChannelConversionPing[]; } export interface ChannelListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.Channel[]; + items?: YouTube.Schema.Channel[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -540,13 +540,13 @@ declare namespace GoogleAppsScript { profileImageUrl?: string; } export interface ChannelSection { - contentDetails?: Youtube_v3.Schema.ChannelSectionContentDetails; + contentDetails?: YouTube.Schema.ChannelSectionContentDetails; etag?: string; id?: string; kind?: string; localizations?: object; - snippet?: Youtube_v3.Schema.ChannelSectionSnippet; - targeting?: Youtube_v3.Schema.ChannelSectionTargeting; + snippet?: YouTube.Schema.ChannelSectionSnippet; + targeting?: YouTube.Schema.ChannelSectionTargeting; } export interface ChannelSectionContentDetails { channels?: string[]; @@ -555,7 +555,7 @@ declare namespace GoogleAppsScript { export interface ChannelSectionListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.ChannelSection[]; + items?: YouTube.Schema.ChannelSection[]; kind?: string; visitorId?: string; } @@ -565,7 +565,7 @@ declare namespace GoogleAppsScript { export interface ChannelSectionSnippet { channelId?: string; defaultLanguage?: string; - localized?: Youtube_v3.Schema.ChannelSectionLocalization; + localized?: YouTube.Schema.ChannelSectionLocalization; position?: number; style?: string; title?: string; @@ -597,9 +597,9 @@ declare namespace GoogleAppsScript { customUrl?: string; defaultLanguage?: string; description?: string; - localized?: Youtube_v3.Schema.ChannelLocalization; + localized?: YouTube.Schema.ChannelLocalization; publishedAt?: string; - thumbnails?: Youtube_v3.Schema.ThumbnailDetails; + thumbnails?: YouTube.Schema.ThumbnailDetails; title?: string; } export interface ChannelStatistics { @@ -622,15 +622,15 @@ declare namespace GoogleAppsScript { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.CommentSnippet; + snippet?: YouTube.Schema.CommentSnippet; } export interface CommentListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.Comment[]; + items?: YouTube.Schema.Comment[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; } @@ -655,27 +655,27 @@ declare namespace GoogleAppsScript { etag?: string; id?: string; kind?: string; - replies?: Youtube_v3.Schema.CommentThreadReplies; - snippet?: Youtube_v3.Schema.CommentThreadSnippet; + replies?: YouTube.Schema.CommentThreadReplies; + snippet?: YouTube.Schema.CommentThreadSnippet; } export interface CommentThreadListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.CommentThread[]; + items?: YouTube.Schema.CommentThread[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; } export interface CommentThreadReplies { - comments?: Youtube_v3.Schema.Comment[]; + comments?: YouTube.Schema.Comment[]; } export interface CommentThreadSnippet { canReply?: boolean; channelId?: string; isPublic?: boolean; - topLevelComment?: Youtube_v3.Schema.Comment; + topLevelComment?: YouTube.Schema.Comment; totalReplyCount?: number; videoId?: string; } @@ -760,15 +760,15 @@ declare namespace GoogleAppsScript { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.GuideCategorySnippet; + snippet?: YouTube.Schema.GuideCategorySnippet; } export interface GuideCategoryListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.GuideCategory[]; + items?: YouTube.Schema.GuideCategory[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -781,12 +781,12 @@ declare namespace GoogleAppsScript { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.I18nLanguageSnippet; + snippet?: YouTube.Schema.I18nLanguageSnippet; } export interface I18nLanguageListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.I18nLanguage[]; + items?: YouTube.Schema.I18nLanguage[]; kind?: string; visitorId?: string; } @@ -798,12 +798,12 @@ declare namespace GoogleAppsScript { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.I18nRegionSnippet; + snippet?: YouTube.Schema.I18nRegionSnippet; } export interface I18nRegionListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.I18nRegion[]; + items?: YouTube.Schema.I18nRegion[]; kind?: string; visitorId?: string; } @@ -812,7 +812,7 @@ declare namespace GoogleAppsScript { name?: string; } export interface ImageSettings { - backgroundImageUrl?: Youtube_v3.Schema.LocalizedProperty; + backgroundImageUrl?: YouTube.Schema.LocalizedProperty; bannerExternalUrl?: string; bannerImageUrl?: string; bannerMobileExtraHdImageUrl?: string; @@ -828,10 +828,10 @@ declare namespace GoogleAppsScript { bannerTvImageUrl?: string; bannerTvLowImageUrl?: string; bannerTvMediumImageUrl?: string; - largeBrandedBannerImageImapScript?: Youtube_v3.Schema.LocalizedProperty; - largeBrandedBannerImageUrl?: Youtube_v3.Schema.LocalizedProperty; - smallBrandedBannerImageImapScript?: Youtube_v3.Schema.LocalizedProperty; - smallBrandedBannerImageUrl?: Youtube_v3.Schema.LocalizedProperty; + largeBrandedBannerImageImapScript?: YouTube.Schema.LocalizedProperty; + largeBrandedBannerImageUrl?: YouTube.Schema.LocalizedProperty; + smallBrandedBannerImageImapScript?: YouTube.Schema.LocalizedProperty; + smallBrandedBannerImageUrl?: YouTube.Schema.LocalizedProperty; trackingImageUrl?: string; watchIconImageUrl?: string; } @@ -843,18 +843,18 @@ declare namespace GoogleAppsScript { export interface InvideoBranding { imageBytes?: string; imageUrl?: string; - position?: Youtube_v3.Schema.InvideoPosition; + position?: YouTube.Schema.InvideoPosition; targetChannelId?: string; - timing?: Youtube_v3.Schema.InvideoTiming; + timing?: YouTube.Schema.InvideoTiming; } export interface InvideoPosition { cornerPosition?: string; type?: string; } export interface InvideoPromotion { - defaultTiming?: Youtube_v3.Schema.InvideoTiming; - items?: Youtube_v3.Schema.PromotedItem[]; - position?: Youtube_v3.Schema.InvideoPosition; + defaultTiming?: YouTube.Schema.InvideoTiming; + items?: YouTube.Schema.PromotedItem[]; + position?: YouTube.Schema.InvideoPosition; useSmartTiming?: boolean; } export interface InvideoTiming { @@ -866,13 +866,13 @@ declare namespace GoogleAppsScript { value?: string; } export interface LiveBroadcast { - contentDetails?: Youtube_v3.Schema.LiveBroadcastContentDetails; + contentDetails?: YouTube.Schema.LiveBroadcastContentDetails; etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.LiveBroadcastSnippet; - statistics?: Youtube_v3.Schema.LiveBroadcastStatistics; - status?: Youtube_v3.Schema.LiveBroadcastStatus; + snippet?: YouTube.Schema.LiveBroadcastSnippet; + statistics?: YouTube.Schema.LiveBroadcastStatistics; + status?: YouTube.Schema.LiveBroadcastStatus; } export interface LiveBroadcastContentDetails { boundStreamId?: string; @@ -886,7 +886,7 @@ declare namespace GoogleAppsScript { enableLowLatency?: boolean; latencyPreference?: string; mesh?: string; - monitorStream?: Youtube_v3.Schema.MonitorStreamInfo; + monitorStream?: YouTube.Schema.MonitorStreamInfo; projection?: string; recordFromStart?: boolean; startWithSlate?: boolean; @@ -895,10 +895,10 @@ declare namespace GoogleAppsScript { export interface LiveBroadcastListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.LiveBroadcast[]; + items?: YouTube.Schema.LiveBroadcast[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -913,7 +913,7 @@ declare namespace GoogleAppsScript { publishedAt?: string; scheduledEndTime?: string; scheduledStartTime?: string; - thumbnails?: Youtube_v3.Schema.ThumbnailDetails; + thumbnails?: YouTube.Schema.ThumbnailDetails; title?: string; } export interface LiveBroadcastStatistics { @@ -930,11 +930,11 @@ declare namespace GoogleAppsScript { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.LiveChatBanSnippet; + snippet?: YouTube.Schema.LiveChatBanSnippet; } export interface LiveChatBanSnippet { banDurationSeconds?: string; - bannedUserDetails?: Youtube_v3.Schema.ChannelProfileDetails; + bannedUserDetails?: YouTube.Schema.ChannelProfileDetails; liveChatId?: string; type?: string; } @@ -945,11 +945,11 @@ declare namespace GoogleAppsScript { userComment?: string; } export interface LiveChatMessage { - authorDetails?: Youtube_v3.Schema.LiveChatMessageAuthorDetails; + authorDetails?: YouTube.Schema.LiveChatMessageAuthorDetails; etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.LiveChatMessageSnippet; + snippet?: YouTube.Schema.LiveChatMessageSnippet; } export interface LiveChatMessageAuthorDetails { channelId?: string; @@ -967,11 +967,11 @@ declare namespace GoogleAppsScript { export interface LiveChatMessageListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.LiveChatMessage[]; + items?: YouTube.Schema.LiveChatMessage[]; kind?: string; nextPageToken?: string; offlineAt?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; pollingIntervalMillis?: number; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -982,49 +982,49 @@ declare namespace GoogleAppsScript { export interface LiveChatMessageSnippet { authorChannelId?: string; displayMessage?: string; - fanFundingEventDetails?: Youtube_v3.Schema.LiveChatFanFundingEventDetails; + fanFundingEventDetails?: YouTube.Schema.LiveChatFanFundingEventDetails; hasDisplayContent?: boolean; liveChatId?: string; - messageDeletedDetails?: Youtube_v3.Schema.LiveChatMessageDeletedDetails; - messageRetractedDetails?: Youtube_v3.Schema.LiveChatMessageRetractedDetails; - pollClosedDetails?: Youtube_v3.Schema.LiveChatPollClosedDetails; - pollEditedDetails?: Youtube_v3.Schema.LiveChatPollEditedDetails; - pollOpenedDetails?: Youtube_v3.Schema.LiveChatPollOpenedDetails; - pollVotedDetails?: Youtube_v3.Schema.LiveChatPollVotedDetails; + messageDeletedDetails?: YouTube.Schema.LiveChatMessageDeletedDetails; + messageRetractedDetails?: YouTube.Schema.LiveChatMessageRetractedDetails; + pollClosedDetails?: YouTube.Schema.LiveChatPollClosedDetails; + pollEditedDetails?: YouTube.Schema.LiveChatPollEditedDetails; + pollOpenedDetails?: YouTube.Schema.LiveChatPollOpenedDetails; + pollVotedDetails?: YouTube.Schema.LiveChatPollVotedDetails; publishedAt?: string; - superChatDetails?: Youtube_v3.Schema.LiveChatSuperChatDetails; - superStickerDetails?: Youtube_v3.Schema.LiveChatSuperStickerDetails; - textMessageDetails?: Youtube_v3.Schema.LiveChatTextMessageDetails; + superChatDetails?: YouTube.Schema.LiveChatSuperChatDetails; + superStickerDetails?: YouTube.Schema.LiveChatSuperStickerDetails; + textMessageDetails?: YouTube.Schema.LiveChatTextMessageDetails; type?: string; - userBannedDetails?: Youtube_v3.Schema.LiveChatUserBannedMessageDetails; + userBannedDetails?: YouTube.Schema.LiveChatUserBannedMessageDetails; } export interface LiveChatModerator { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.LiveChatModeratorSnippet; + snippet?: YouTube.Schema.LiveChatModeratorSnippet; } export interface LiveChatModeratorListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.LiveChatModerator[]; + items?: YouTube.Schema.LiveChatModerator[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; } export interface LiveChatModeratorSnippet { liveChatId?: string; - moderatorDetails?: Youtube_v3.Schema.ChannelProfileDetails; + moderatorDetails?: YouTube.Schema.ChannelProfileDetails; } export interface LiveChatPollClosedDetails { pollId?: string; } export interface LiveChatPollEditedDetails { id?: string; - items?: Youtube_v3.Schema.LiveChatPollItem[]; + items?: YouTube.Schema.LiveChatPollItem[]; prompt?: string; } export interface LiveChatPollItem { @@ -1033,7 +1033,7 @@ declare namespace GoogleAppsScript { } export interface LiveChatPollOpenedDetails { id?: string; - items?: Youtube_v3.Schema.LiveChatPollItem[]; + items?: YouTube.Schema.LiveChatPollItem[]; prompt?: string; } export interface LiveChatPollVotedDetails { @@ -1051,7 +1051,7 @@ declare namespace GoogleAppsScript { amountDisplayString?: string; amountMicros?: string; currency?: string; - superStickerMetadata?: Youtube_v3.Schema.SuperStickerMetadata; + superStickerMetadata?: YouTube.Schema.SuperStickerMetadata; tier?: number; } export interface LiveChatTextMessageDetails { @@ -1060,16 +1060,16 @@ declare namespace GoogleAppsScript { export interface LiveChatUserBannedMessageDetails { banDurationSeconds?: string; banType?: string; - bannedUserDetails?: Youtube_v3.Schema.ChannelProfileDetails; + bannedUserDetails?: YouTube.Schema.ChannelProfileDetails; } export interface LiveStream { - cdn?: Youtube_v3.Schema.CdnSettings; - contentDetails?: Youtube_v3.Schema.LiveStreamContentDetails; + cdn?: YouTube.Schema.CdnSettings; + contentDetails?: YouTube.Schema.LiveStreamContentDetails; etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.LiveStreamSnippet; - status?: Youtube_v3.Schema.LiveStreamStatus; + snippet?: YouTube.Schema.LiveStreamSnippet; + status?: YouTube.Schema.LiveStreamStatus; } export interface LiveStreamConfigurationIssue { description?: string; @@ -1082,17 +1082,17 @@ declare namespace GoogleAppsScript { isReusable?: boolean; } export interface LiveStreamHealthStatus { - configurationIssues?: Youtube_v3.Schema.LiveStreamConfigurationIssue[]; + configurationIssues?: YouTube.Schema.LiveStreamConfigurationIssue[]; lastUpdateTimeSeconds?: string; status?: string; } export interface LiveStreamListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.LiveStream[]; + items?: YouTube.Schema.LiveStream[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -1105,13 +1105,13 @@ declare namespace GoogleAppsScript { title?: string; } export interface LiveStreamStatus { - healthStatus?: Youtube_v3.Schema.LiveStreamHealthStatus; + healthStatus?: YouTube.Schema.LiveStreamHealthStatus; streamStatus?: string; } export interface LocalizedProperty { default?: string; - defaultLanguage?: Youtube_v3.Schema.LanguageTag; - localized?: Youtube_v3.Schema.LocalizedString[]; + defaultLanguage?: YouTube.Schema.LanguageTag; + localized?: YouTube.Schema.LocalizedString[]; } export interface LocalizedString { language?: string; @@ -1123,7 +1123,7 @@ declare namespace GoogleAppsScript { enableMonitorStream?: boolean; } export interface Nonprofit { - nonprofitId?: Youtube_v3.Schema.NonprofitId; + nonprofitId?: YouTube.Schema.NonprofitId; nonprofitLegalName?: string; } export interface NonprofitId { @@ -1134,25 +1134,25 @@ declare namespace GoogleAppsScript { totalResults?: number; } export interface Playlist { - contentDetails?: Youtube_v3.Schema.PlaylistContentDetails; + contentDetails?: YouTube.Schema.PlaylistContentDetails; etag?: string; id?: string; kind?: string; localizations?: object; - player?: Youtube_v3.Schema.PlaylistPlayer; - snippet?: Youtube_v3.Schema.PlaylistSnippet; - status?: Youtube_v3.Schema.PlaylistStatus; + player?: YouTube.Schema.PlaylistPlayer; + snippet?: YouTube.Schema.PlaylistSnippet; + status?: YouTube.Schema.PlaylistStatus; } export interface PlaylistContentDetails { itemCount?: number; } export interface PlaylistItem { - contentDetails?: Youtube_v3.Schema.PlaylistItemContentDetails; + contentDetails?: YouTube.Schema.PlaylistItemContentDetails; etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.PlaylistItemSnippet; - status?: Youtube_v3.Schema.PlaylistItemStatus; + snippet?: YouTube.Schema.PlaylistItemSnippet; + status?: YouTube.Schema.PlaylistItemStatus; } export interface PlaylistItemContentDetails { endAt?: string; @@ -1164,10 +1164,10 @@ declare namespace GoogleAppsScript { export interface PlaylistItemListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.PlaylistItem[]; + items?: YouTube.Schema.PlaylistItem[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -1179,8 +1179,8 @@ declare namespace GoogleAppsScript { playlistId?: string; position?: number; publishedAt?: string; - resourceId?: Youtube_v3.Schema.ResourceId; - thumbnails?: Youtube_v3.Schema.ThumbnailDetails; + resourceId?: YouTube.Schema.ResourceId; + thumbnails?: YouTube.Schema.ThumbnailDetails; title?: string; } export interface PlaylistItemStatus { @@ -1189,10 +1189,10 @@ declare namespace GoogleAppsScript { export interface PlaylistListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.Playlist[]; + items?: YouTube.Schema.Playlist[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -1209,10 +1209,10 @@ declare namespace GoogleAppsScript { channelTitle?: string; defaultLanguage?: string; description?: string; - localized?: Youtube_v3.Schema.PlaylistLocalization; + localized?: YouTube.Schema.PlaylistLocalization; publishedAt?: string; tags?: string[]; - thumbnails?: Youtube_v3.Schema.ThumbnailDetails; + thumbnails?: YouTube.Schema.ThumbnailDetails; title?: string; } export interface PlaylistStatus { @@ -1220,9 +1220,9 @@ declare namespace GoogleAppsScript { } export interface PromotedItem { customMessage?: string; - id?: Youtube_v3.Schema.PromotedItemId; + id?: YouTube.Schema.PromotedItemId; promotedByContentOwner?: boolean; - timing?: Youtube_v3.Schema.InvideoTiming; + timing?: YouTube.Schema.InvideoTiming; } export interface PromotedItemId { recentlyUploadedBy?: string; @@ -1243,10 +1243,10 @@ declare namespace GoogleAppsScript { export interface SearchListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.SearchResult[]; + items?: YouTube.Schema.SearchResult[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; regionCode?: string; tokenPagination?: any; // Schema.TokenPagination @@ -1254,9 +1254,9 @@ declare namespace GoogleAppsScript { } export interface SearchResult { etag?: string; - id?: Youtube_v3.Schema.ResourceId; + id?: YouTube.Schema.ResourceId; kind?: string; - snippet?: Youtube_v3.Schema.SearchResultSnippet; + snippet?: YouTube.Schema.SearchResultSnippet; } export interface SearchResultSnippet { channelId?: string; @@ -1264,37 +1264,37 @@ declare namespace GoogleAppsScript { description?: string; liveBroadcastContent?: string; publishedAt?: string; - thumbnails?: Youtube_v3.Schema.ThumbnailDetails; + thumbnails?: YouTube.Schema.ThumbnailDetails; title?: string; } export interface Sponsor { etag?: string; kind?: string; - snippet?: Youtube_v3.Schema.SponsorSnippet; + snippet?: YouTube.Schema.SponsorSnippet; } export interface SponsorListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.Sponsor[]; + items?: YouTube.Schema.Sponsor[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; } export interface SponsorSnippet { channelId?: string; cumulativeDurationMonths?: number; - sponsorDetails?: Youtube_v3.Schema.ChannelProfileDetails; + sponsorDetails?: YouTube.Schema.ChannelProfileDetails; sponsorSince?: string; } export interface Subscription { - contentDetails?: Youtube_v3.Schema.SubscriptionContentDetails; + contentDetails?: YouTube.Schema.SubscriptionContentDetails; etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.SubscriptionSnippet; - subscriberSnippet?: Youtube_v3.Schema.SubscriptionSubscriberSnippet; + snippet?: YouTube.Schema.SubscriptionSnippet; + subscriberSnippet?: YouTube.Schema.SubscriptionSubscriberSnippet; } export interface SubscriptionContentDetails { activityType?: string; @@ -1304,10 +1304,10 @@ declare namespace GoogleAppsScript { export interface SubscriptionListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.Subscription[]; + items?: YouTube.Schema.Subscription[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -1317,29 +1317,29 @@ declare namespace GoogleAppsScript { channelTitle?: string; description?: string; publishedAt?: string; - resourceId?: Youtube_v3.Schema.ResourceId; - thumbnails?: Youtube_v3.Schema.ThumbnailDetails; + resourceId?: YouTube.Schema.ResourceId; + thumbnails?: YouTube.Schema.ThumbnailDetails; title?: string; } export interface SubscriptionSubscriberSnippet { channelId?: string; description?: string; - thumbnails?: Youtube_v3.Schema.ThumbnailDetails; + thumbnails?: YouTube.Schema.ThumbnailDetails; title?: string; } export interface SuperChatEvent { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.SuperChatEventSnippet; + snippet?: YouTube.Schema.SuperChatEventSnippet; } export interface SuperChatEventListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.SuperChatEvent[]; + items?: YouTube.Schema.SuperChatEvent[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; } @@ -1353,9 +1353,9 @@ declare namespace GoogleAppsScript { isSuperChatForGood?: boolean; isSuperStickerEvent?: boolean; messageType?: number; - nonprofit?: Youtube_v3.Schema.Nonprofit; - superStickerMetadata?: Youtube_v3.Schema.SuperStickerMetadata; - supporterDetails?: Youtube_v3.Schema.ChannelProfileDetails; + nonprofit?: YouTube.Schema.Nonprofit; + superStickerMetadata?: YouTube.Schema.SuperStickerMetadata; + supporterDetails?: YouTube.Schema.ChannelProfileDetails; } export interface SuperStickerMetadata { altText?: string; @@ -1368,38 +1368,38 @@ declare namespace GoogleAppsScript { width?: number; } export interface ThumbnailDetails { - default?: Youtube_v3.Schema.Thumbnail; - high?: Youtube_v3.Schema.Thumbnail; - maxres?: Youtube_v3.Schema.Thumbnail; - medium?: Youtube_v3.Schema.Thumbnail; - standard?: Youtube_v3.Schema.Thumbnail; + default?: YouTube.Schema.Thumbnail; + high?: YouTube.Schema.Thumbnail; + maxres?: YouTube.Schema.Thumbnail; + medium?: YouTube.Schema.Thumbnail; + standard?: YouTube.Schema.Thumbnail; } export interface ThumbnailSetResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.ThumbnailDetails[]; + items?: YouTube.Schema.ThumbnailDetails[]; kind?: string; visitorId?: string; } export interface Video { - ageGating?: Youtube_v3.Schema.VideoAgeGating; - contentDetails?: Youtube_v3.Schema.VideoContentDetails; + ageGating?: YouTube.Schema.VideoAgeGating; + contentDetails?: YouTube.Schema.VideoContentDetails; etag?: string; - fileDetails?: Youtube_v3.Schema.VideoFileDetails; + fileDetails?: YouTube.Schema.VideoFileDetails; id?: string; kind?: string; - liveStreamingDetails?: Youtube_v3.Schema.VideoLiveStreamingDetails; + liveStreamingDetails?: YouTube.Schema.VideoLiveStreamingDetails; localizations?: object; - monetizationDetails?: Youtube_v3.Schema.VideoMonetizationDetails; - player?: Youtube_v3.Schema.VideoPlayer; - processingDetails?: Youtube_v3.Schema.VideoProcessingDetails; - projectDetails?: Youtube_v3.Schema.VideoProjectDetails; - recordingDetails?: Youtube_v3.Schema.VideoRecordingDetails; - snippet?: Youtube_v3.Schema.VideoSnippet; - statistics?: Youtube_v3.Schema.VideoStatistics; - status?: Youtube_v3.Schema.VideoStatus; - suggestions?: Youtube_v3.Schema.VideoSuggestions; - topicDetails?: Youtube_v3.Schema.VideoTopicDetails; + monetizationDetails?: YouTube.Schema.VideoMonetizationDetails; + player?: YouTube.Schema.VideoPlayer; + processingDetails?: YouTube.Schema.VideoProcessingDetails; + projectDetails?: YouTube.Schema.VideoProjectDetails; + recordingDetails?: YouTube.Schema.VideoRecordingDetails; + snippet?: YouTube.Schema.VideoSnippet; + statistics?: YouTube.Schema.VideoStatistics; + status?: YouTube.Schema.VideoStatus; + suggestions?: YouTube.Schema.VideoSuggestions; + topicDetails?: YouTube.Schema.VideoTopicDetails; } export interface VideoAbuseReport { comments?: string; @@ -1412,18 +1412,18 @@ declare namespace GoogleAppsScript { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.VideoAbuseReportReasonSnippet; + snippet?: YouTube.Schema.VideoAbuseReportReasonSnippet; } export interface VideoAbuseReportReasonListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.VideoAbuseReportReason[]; + items?: YouTube.Schema.VideoAbuseReportReason[]; kind?: string; visitorId?: string; } export interface VideoAbuseReportReasonSnippet { label?: string; - secondaryReasons?: Youtube_v3.Schema.VideoAbuseReportSecondaryReason[]; + secondaryReasons?: YouTube.Schema.VideoAbuseReportSecondaryReason[]; } export interface VideoAbuseReportSecondaryReason { id?: string; @@ -1438,15 +1438,15 @@ declare namespace GoogleAppsScript { etag?: string; id?: string; kind?: string; - snippet?: Youtube_v3.Schema.VideoCategorySnippet; + snippet?: YouTube.Schema.VideoCategorySnippet; } export interface VideoCategoryListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.VideoCategory[]; + items?: YouTube.Schema.VideoCategory[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -1458,22 +1458,22 @@ declare namespace GoogleAppsScript { } export interface VideoContentDetails { caption?: string; - contentRating?: Youtube_v3.Schema.ContentRating; - countryRestriction?: Youtube_v3.Schema.AccessPolicy; + contentRating?: YouTube.Schema.ContentRating; + countryRestriction?: YouTube.Schema.AccessPolicy; definition?: string; dimension?: string; duration?: string; hasCustomThumbnail?: boolean; licensedContent?: boolean; projection?: string; - regionRestriction?: Youtube_v3.Schema.VideoContentDetailsRegionRestriction; + regionRestriction?: YouTube.Schema.VideoContentDetailsRegionRestriction; } export interface VideoContentDetailsRegionRestriction { allowed?: string[]; blocked?: string[]; } export interface VideoFileDetails { - audioStreams?: Youtube_v3.Schema.VideoFileDetailsAudioStream[]; + audioStreams?: YouTube.Schema.VideoFileDetailsAudioStream[]; bitrateBps?: string; container?: string; creationTime?: string; @@ -1481,7 +1481,7 @@ declare namespace GoogleAppsScript { fileName?: string; fileSize?: string; fileType?: string; - videoStreams?: Youtube_v3.Schema.VideoFileDetailsVideoStream[]; + videoStreams?: YouTube.Schema.VideoFileDetailsVideoStream[]; } export interface VideoFileDetailsAudioStream { bitrateBps?: string; @@ -1502,17 +1502,17 @@ declare namespace GoogleAppsScript { export interface VideoGetRatingResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.VideoRating[]; + items?: YouTube.Schema.VideoRating[]; kind?: string; visitorId?: string; } export interface VideoListResponse { etag?: string; eventId?: string; - items?: Youtube_v3.Schema.Video[]; + items?: YouTube.Schema.Video[]; kind?: string; nextPageToken?: string; - pageInfo?: Youtube_v3.Schema.PageInfo; + pageInfo?: YouTube.Schema.PageInfo; prevPageToken?: string; tokenPagination?: any; // Schema.TokenPagination visitorId?: string; @@ -1530,7 +1530,7 @@ declare namespace GoogleAppsScript { title?: string; } export interface VideoMonetizationDetails { - access?: Youtube_v3.Schema.AccessPolicy; + access?: YouTube.Schema.AccessPolicy; } export interface VideoPlayer { embedHeight?: string; @@ -1542,7 +1542,7 @@ declare namespace GoogleAppsScript { fileDetailsAvailability?: string; processingFailureReason?: string; processingIssuesAvailability?: string; - processingProgress?: Youtube_v3.Schema.VideoProcessingDetailsProcessingProgress; + processingProgress?: YouTube.Schema.VideoProcessingDetailsProcessingProgress; processingStatus?: string; tagSuggestionsAvailability?: string; thumbnailsAvailability?: string; @@ -1560,7 +1560,7 @@ declare namespace GoogleAppsScript { videoId?: string; } export interface VideoRecordingDetails { - location?: Youtube_v3.Schema.GeoPoint; + location?: YouTube.Schema.GeoPoint; locationDescription?: string; recordingDate?: string; } @@ -1572,10 +1572,10 @@ declare namespace GoogleAppsScript { defaultLanguage?: string; description?: string; liveBroadcastContent?: string; - localized?: Youtube_v3.Schema.VideoLocalization; + localized?: YouTube.Schema.VideoLocalization; publishedAt?: string; tags?: string[]; - thumbnails?: Youtube_v3.Schema.ThumbnailDetails; + thumbnails?: YouTube.Schema.ThumbnailDetails; title?: string; } export interface VideoStatistics { @@ -1600,7 +1600,7 @@ declare namespace GoogleAppsScript { processingErrors?: string[]; processingHints?: string[]; processingWarnings?: string[]; - tagSuggestions?: Youtube_v3.Schema.VideoSuggestionsTagSuggestion[]; + tagSuggestions?: YouTube.Schema.VideoSuggestionsTagSuggestion[]; } export interface VideoSuggestionsTagSuggestion { categoryRestricts?: string[]; @@ -1618,294 +1618,294 @@ declare namespace GoogleAppsScript { } } } - export interface Youtube_v3 { - Activities?: Youtube_v3.Collection.ActivitiesCollection; - Captions?: Youtube_v3.Collection.CaptionsCollection; - ChannelBanners?: Youtube_v3.Collection.ChannelBannersCollection; - ChannelSections?: Youtube_v3.Collection.ChannelSectionsCollection; - Channels?: Youtube_v3.Collection.ChannelsCollection; - CommentThreads?: Youtube_v3.Collection.CommentThreadsCollection; - Comments?: Youtube_v3.Collection.CommentsCollection; - GuideCategories?: Youtube_v3.Collection.GuideCategoriesCollection; - I18nLanguages?: Youtube_v3.Collection.I18nLanguagesCollection; - I18nRegions?: Youtube_v3.Collection.I18nRegionsCollection; - LiveBroadcasts?: Youtube_v3.Collection.LiveBroadcastsCollection; - LiveChatBans?: Youtube_v3.Collection.LiveChatBansCollection; - LiveChatMessages?: Youtube_v3.Collection.LiveChatMessagesCollection; - LiveChatModerators?: Youtube_v3.Collection.LiveChatModeratorsCollection; - LiveStreams?: Youtube_v3.Collection.LiveStreamsCollection; - PlaylistItems?: Youtube_v3.Collection.PlaylistItemsCollection; - Playlists?: Youtube_v3.Collection.PlaylistsCollection; - Search?: Youtube_v3.Collection.SearchCollection; - Sponsors?: Youtube_v3.Collection.SponsorsCollection; - Subscriptions?: Youtube_v3.Collection.SubscriptionsCollection; - SuperChatEvents?: Youtube_v3.Collection.SuperChatEventsCollection; - Thumbnails?: Youtube_v3.Collection.ThumbnailsCollection; - VideoAbuseReportReasons?: Youtube_v3.Collection.VideoAbuseReportReasonsCollection; - VideoCategories?: Youtube_v3.Collection.VideoCategoriesCollection; - Videos?: Youtube_v3.Collection.VideosCollection; - Watermarks?: Youtube_v3.Collection.WatermarksCollection; + export interface YouTube { + Activities?: YouTube.Collection.ActivitiesCollection; + Captions?: YouTube.Collection.CaptionsCollection; + ChannelBanners?: YouTube.Collection.ChannelBannersCollection; + ChannelSections?: YouTube.Collection.ChannelSectionsCollection; + Channels?: YouTube.Collection.ChannelsCollection; + CommentThreads?: YouTube.Collection.CommentThreadsCollection; + Comments?: YouTube.Collection.CommentsCollection; + GuideCategories?: YouTube.Collection.GuideCategoriesCollection; + I18nLanguages?: YouTube.Collection.I18nLanguagesCollection; + I18nRegions?: YouTube.Collection.I18nRegionsCollection; + LiveBroadcasts?: YouTube.Collection.LiveBroadcastsCollection; + LiveChatBans?: YouTube.Collection.LiveChatBansCollection; + LiveChatMessages?: YouTube.Collection.LiveChatMessagesCollection; + LiveChatModerators?: YouTube.Collection.LiveChatModeratorsCollection; + LiveStreams?: YouTube.Collection.LiveStreamsCollection; + PlaylistItems?: YouTube.Collection.PlaylistItemsCollection; + Playlists?: YouTube.Collection.PlaylistsCollection; + Search?: YouTube.Collection.SearchCollection; + Sponsors?: YouTube.Collection.SponsorsCollection; + Subscriptions?: YouTube.Collection.SubscriptionsCollection; + SuperChatEvents?: YouTube.Collection.SuperChatEventsCollection; + Thumbnails?: YouTube.Collection.ThumbnailsCollection; + VideoAbuseReportReasons?: YouTube.Collection.VideoAbuseReportReasonsCollection; + VideoCategories?: YouTube.Collection.VideoCategoriesCollection; + Videos?: YouTube.Collection.VideosCollection; + Watermarks?: YouTube.Collection.WatermarksCollection; // Create a new instance of AccessPolicy - newAccessPolicy(): Youtube_v3.Schema.AccessPolicy; + newAccessPolicy(): YouTube.Schema.AccessPolicy; // Create a new instance of Activity - newActivity(): Youtube_v3.Schema.Activity; + newActivity(): YouTube.Schema.Activity; // Create a new instance of ActivityContentDetails - newActivityContentDetails(): Youtube_v3.Schema.ActivityContentDetails; + newActivityContentDetails(): YouTube.Schema.ActivityContentDetails; // Create a new instance of ActivityContentDetailsBulletin - newActivityContentDetailsBulletin(): Youtube_v3.Schema.ActivityContentDetailsBulletin; + newActivityContentDetailsBulletin(): YouTube.Schema.ActivityContentDetailsBulletin; // Create a new instance of ActivityContentDetailsChannelItem - newActivityContentDetailsChannelItem(): Youtube_v3.Schema.ActivityContentDetailsChannelItem; + newActivityContentDetailsChannelItem(): YouTube.Schema.ActivityContentDetailsChannelItem; // Create a new instance of ActivityContentDetailsComment - newActivityContentDetailsComment(): Youtube_v3.Schema.ActivityContentDetailsComment; + newActivityContentDetailsComment(): YouTube.Schema.ActivityContentDetailsComment; // Create a new instance of ActivityContentDetailsFavorite - newActivityContentDetailsFavorite(): Youtube_v3.Schema.ActivityContentDetailsFavorite; + newActivityContentDetailsFavorite(): YouTube.Schema.ActivityContentDetailsFavorite; // Create a new instance of ActivityContentDetailsLike - newActivityContentDetailsLike(): Youtube_v3.Schema.ActivityContentDetailsLike; + newActivityContentDetailsLike(): YouTube.Schema.ActivityContentDetailsLike; // Create a new instance of ActivityContentDetailsPlaylistItem - newActivityContentDetailsPlaylistItem(): Youtube_v3.Schema.ActivityContentDetailsPlaylistItem; + newActivityContentDetailsPlaylistItem(): YouTube.Schema.ActivityContentDetailsPlaylistItem; // Create a new instance of ActivityContentDetailsPromotedItem - newActivityContentDetailsPromotedItem(): Youtube_v3.Schema.ActivityContentDetailsPromotedItem; + newActivityContentDetailsPromotedItem(): YouTube.Schema.ActivityContentDetailsPromotedItem; // Create a new instance of ActivityContentDetailsRecommendation - newActivityContentDetailsRecommendation(): Youtube_v3.Schema.ActivityContentDetailsRecommendation; + newActivityContentDetailsRecommendation(): YouTube.Schema.ActivityContentDetailsRecommendation; // Create a new instance of ActivityContentDetailsSocial - newActivityContentDetailsSocial(): Youtube_v3.Schema.ActivityContentDetailsSocial; + newActivityContentDetailsSocial(): YouTube.Schema.ActivityContentDetailsSocial; // Create a new instance of ActivityContentDetailsSubscription - newActivityContentDetailsSubscription(): Youtube_v3.Schema.ActivityContentDetailsSubscription; + newActivityContentDetailsSubscription(): YouTube.Schema.ActivityContentDetailsSubscription; // Create a new instance of ActivityContentDetailsUpload - newActivityContentDetailsUpload(): Youtube_v3.Schema.ActivityContentDetailsUpload; + newActivityContentDetailsUpload(): YouTube.Schema.ActivityContentDetailsUpload; // Create a new instance of ActivitySnippet - newActivitySnippet(): Youtube_v3.Schema.ActivitySnippet; + newActivitySnippet(): YouTube.Schema.ActivitySnippet; // Create a new instance of Caption - newCaption(): Youtube_v3.Schema.Caption; + newCaption(): YouTube.Schema.Caption; // Create a new instance of CaptionSnippet - newCaptionSnippet(): Youtube_v3.Schema.CaptionSnippet; + newCaptionSnippet(): YouTube.Schema.CaptionSnippet; // Create a new instance of CdnSettings - newCdnSettings(): Youtube_v3.Schema.CdnSettings; + newCdnSettings(): YouTube.Schema.CdnSettings; // Create a new instance of Channel - newChannel(): Youtube_v3.Schema.Channel; + newChannel(): YouTube.Schema.Channel; // Create a new instance of ChannelAuditDetails - newChannelAuditDetails(): Youtube_v3.Schema.ChannelAuditDetails; + newChannelAuditDetails(): YouTube.Schema.ChannelAuditDetails; // Create a new instance of ChannelBannerResource - newChannelBannerResource(): Youtube_v3.Schema.ChannelBannerResource; + newChannelBannerResource(): YouTube.Schema.ChannelBannerResource; // Create a new instance of ChannelBrandingSettings - newChannelBrandingSettings(): Youtube_v3.Schema.ChannelBrandingSettings; + newChannelBrandingSettings(): YouTube.Schema.ChannelBrandingSettings; // Create a new instance of ChannelContentDetails - newChannelContentDetails(): Youtube_v3.Schema.ChannelContentDetails; + newChannelContentDetails(): YouTube.Schema.ChannelContentDetails; // Create a new instance of ChannelContentDetailsRelatedPlaylists - newChannelContentDetailsRelatedPlaylists(): Youtube_v3.Schema.ChannelContentDetailsRelatedPlaylists; + newChannelContentDetailsRelatedPlaylists(): YouTube.Schema.ChannelContentDetailsRelatedPlaylists; // Create a new instance of ChannelContentOwnerDetails - newChannelContentOwnerDetails(): Youtube_v3.Schema.ChannelContentOwnerDetails; + newChannelContentOwnerDetails(): YouTube.Schema.ChannelContentOwnerDetails; // Create a new instance of ChannelConversionPing - newChannelConversionPing(): Youtube_v3.Schema.ChannelConversionPing; + newChannelConversionPing(): YouTube.Schema.ChannelConversionPing; // Create a new instance of ChannelConversionPings - newChannelConversionPings(): Youtube_v3.Schema.ChannelConversionPings; + newChannelConversionPings(): YouTube.Schema.ChannelConversionPings; // Create a new instance of ChannelLocalization - newChannelLocalization(): Youtube_v3.Schema.ChannelLocalization; + newChannelLocalization(): YouTube.Schema.ChannelLocalization; // Create a new instance of ChannelProfileDetails - newChannelProfileDetails(): Youtube_v3.Schema.ChannelProfileDetails; + newChannelProfileDetails(): YouTube.Schema.ChannelProfileDetails; // Create a new instance of ChannelSection - newChannelSection(): Youtube_v3.Schema.ChannelSection; + newChannelSection(): YouTube.Schema.ChannelSection; // Create a new instance of ChannelSectionContentDetails - newChannelSectionContentDetails(): Youtube_v3.Schema.ChannelSectionContentDetails; + newChannelSectionContentDetails(): YouTube.Schema.ChannelSectionContentDetails; // Create a new instance of ChannelSectionLocalization - newChannelSectionLocalization(): Youtube_v3.Schema.ChannelSectionLocalization; + newChannelSectionLocalization(): YouTube.Schema.ChannelSectionLocalization; // Create a new instance of ChannelSectionSnippet - newChannelSectionSnippet(): Youtube_v3.Schema.ChannelSectionSnippet; + newChannelSectionSnippet(): YouTube.Schema.ChannelSectionSnippet; // Create a new instance of ChannelSectionTargeting - newChannelSectionTargeting(): Youtube_v3.Schema.ChannelSectionTargeting; + newChannelSectionTargeting(): YouTube.Schema.ChannelSectionTargeting; // Create a new instance of ChannelSettings - newChannelSettings(): Youtube_v3.Schema.ChannelSettings; + newChannelSettings(): YouTube.Schema.ChannelSettings; // Create a new instance of ChannelSnippet - newChannelSnippet(): Youtube_v3.Schema.ChannelSnippet; + newChannelSnippet(): YouTube.Schema.ChannelSnippet; // Create a new instance of ChannelStatistics - newChannelStatistics(): Youtube_v3.Schema.ChannelStatistics; + newChannelStatistics(): YouTube.Schema.ChannelStatistics; // Create a new instance of ChannelStatus - newChannelStatus(): Youtube_v3.Schema.ChannelStatus; + newChannelStatus(): YouTube.Schema.ChannelStatus; // Create a new instance of ChannelTopicDetails - newChannelTopicDetails(): Youtube_v3.Schema.ChannelTopicDetails; + newChannelTopicDetails(): YouTube.Schema.ChannelTopicDetails; // Create a new instance of Comment - newComment(): Youtube_v3.Schema.Comment; + newComment(): YouTube.Schema.Comment; // Create a new instance of CommentSnippet - newCommentSnippet(): Youtube_v3.Schema.CommentSnippet; + newCommentSnippet(): YouTube.Schema.CommentSnippet; // Create a new instance of CommentThread - newCommentThread(): Youtube_v3.Schema.CommentThread; + newCommentThread(): YouTube.Schema.CommentThread; // Create a new instance of CommentThreadReplies - newCommentThreadReplies(): Youtube_v3.Schema.CommentThreadReplies; + newCommentThreadReplies(): YouTube.Schema.CommentThreadReplies; // Create a new instance of CommentThreadSnippet - newCommentThreadSnippet(): Youtube_v3.Schema.CommentThreadSnippet; + newCommentThreadSnippet(): YouTube.Schema.CommentThreadSnippet; // Create a new instance of ContentRating - newContentRating(): Youtube_v3.Schema.ContentRating; + newContentRating(): YouTube.Schema.ContentRating; // Create a new instance of GeoPoint - newGeoPoint(): Youtube_v3.Schema.GeoPoint; + newGeoPoint(): YouTube.Schema.GeoPoint; // Create a new instance of ImageSettings - newImageSettings(): Youtube_v3.Schema.ImageSettings; + newImageSettings(): YouTube.Schema.ImageSettings; // Create a new instance of IngestionInfo - newIngestionInfo(): Youtube_v3.Schema.IngestionInfo; + newIngestionInfo(): YouTube.Schema.IngestionInfo; // Create a new instance of InvideoBranding - newInvideoBranding(): Youtube_v3.Schema.InvideoBranding; + newInvideoBranding(): YouTube.Schema.InvideoBranding; // Create a new instance of InvideoPosition - newInvideoPosition(): Youtube_v3.Schema.InvideoPosition; + newInvideoPosition(): YouTube.Schema.InvideoPosition; // Create a new instance of InvideoPromotion - newInvideoPromotion(): Youtube_v3.Schema.InvideoPromotion; + newInvideoPromotion(): YouTube.Schema.InvideoPromotion; // Create a new instance of InvideoTiming - newInvideoTiming(): Youtube_v3.Schema.InvideoTiming; + newInvideoTiming(): YouTube.Schema.InvideoTiming; // Create a new instance of LanguageTag - newLanguageTag(): Youtube_v3.Schema.LanguageTag; + newLanguageTag(): YouTube.Schema.LanguageTag; // Create a new instance of LiveBroadcast - newLiveBroadcast(): Youtube_v3.Schema.LiveBroadcast; + newLiveBroadcast(): YouTube.Schema.LiveBroadcast; // Create a new instance of LiveBroadcastContentDetails - newLiveBroadcastContentDetails(): Youtube_v3.Schema.LiveBroadcastContentDetails; + newLiveBroadcastContentDetails(): YouTube.Schema.LiveBroadcastContentDetails; // Create a new instance of LiveBroadcastSnippet - newLiveBroadcastSnippet(): Youtube_v3.Schema.LiveBroadcastSnippet; + newLiveBroadcastSnippet(): YouTube.Schema.LiveBroadcastSnippet; // Create a new instance of LiveBroadcastStatistics - newLiveBroadcastStatistics(): Youtube_v3.Schema.LiveBroadcastStatistics; + newLiveBroadcastStatistics(): YouTube.Schema.LiveBroadcastStatistics; // Create a new instance of LiveBroadcastStatus - newLiveBroadcastStatus(): Youtube_v3.Schema.LiveBroadcastStatus; + newLiveBroadcastStatus(): YouTube.Schema.LiveBroadcastStatus; // Create a new instance of LiveChatBan - newLiveChatBan(): Youtube_v3.Schema.LiveChatBan; + newLiveChatBan(): YouTube.Schema.LiveChatBan; // Create a new instance of LiveChatBanSnippet - newLiveChatBanSnippet(): Youtube_v3.Schema.LiveChatBanSnippet; + newLiveChatBanSnippet(): YouTube.Schema.LiveChatBanSnippet; // Create a new instance of LiveChatFanFundingEventDetails - newLiveChatFanFundingEventDetails(): Youtube_v3.Schema.LiveChatFanFundingEventDetails; + newLiveChatFanFundingEventDetails(): YouTube.Schema.LiveChatFanFundingEventDetails; // Create a new instance of LiveChatMessage - newLiveChatMessage(): Youtube_v3.Schema.LiveChatMessage; + newLiveChatMessage(): YouTube.Schema.LiveChatMessage; // Create a new instance of LiveChatMessageAuthorDetails - newLiveChatMessageAuthorDetails(): Youtube_v3.Schema.LiveChatMessageAuthorDetails; + newLiveChatMessageAuthorDetails(): YouTube.Schema.LiveChatMessageAuthorDetails; // Create a new instance of LiveChatMessageDeletedDetails - newLiveChatMessageDeletedDetails(): Youtube_v3.Schema.LiveChatMessageDeletedDetails; + newLiveChatMessageDeletedDetails(): YouTube.Schema.LiveChatMessageDeletedDetails; // Create a new instance of LiveChatMessageRetractedDetails - newLiveChatMessageRetractedDetails(): Youtube_v3.Schema.LiveChatMessageRetractedDetails; + newLiveChatMessageRetractedDetails(): YouTube.Schema.LiveChatMessageRetractedDetails; // Create a new instance of LiveChatMessageSnippet - newLiveChatMessageSnippet(): Youtube_v3.Schema.LiveChatMessageSnippet; + newLiveChatMessageSnippet(): YouTube.Schema.LiveChatMessageSnippet; // Create a new instance of LiveChatModerator - newLiveChatModerator(): Youtube_v3.Schema.LiveChatModerator; + newLiveChatModerator(): YouTube.Schema.LiveChatModerator; // Create a new instance of LiveChatModeratorSnippet - newLiveChatModeratorSnippet(): Youtube_v3.Schema.LiveChatModeratorSnippet; + newLiveChatModeratorSnippet(): YouTube.Schema.LiveChatModeratorSnippet; // Create a new instance of LiveChatPollClosedDetails - newLiveChatPollClosedDetails(): Youtube_v3.Schema.LiveChatPollClosedDetails; + newLiveChatPollClosedDetails(): YouTube.Schema.LiveChatPollClosedDetails; // Create a new instance of LiveChatPollEditedDetails - newLiveChatPollEditedDetails(): Youtube_v3.Schema.LiveChatPollEditedDetails; + newLiveChatPollEditedDetails(): YouTube.Schema.LiveChatPollEditedDetails; // Create a new instance of LiveChatPollItem - newLiveChatPollItem(): Youtube_v3.Schema.LiveChatPollItem; + newLiveChatPollItem(): YouTube.Schema.LiveChatPollItem; // Create a new instance of LiveChatPollOpenedDetails - newLiveChatPollOpenedDetails(): Youtube_v3.Schema.LiveChatPollOpenedDetails; + newLiveChatPollOpenedDetails(): YouTube.Schema.LiveChatPollOpenedDetails; // Create a new instance of LiveChatPollVotedDetails - newLiveChatPollVotedDetails(): Youtube_v3.Schema.LiveChatPollVotedDetails; + newLiveChatPollVotedDetails(): YouTube.Schema.LiveChatPollVotedDetails; // Create a new instance of LiveChatSuperChatDetails - newLiveChatSuperChatDetails(): Youtube_v3.Schema.LiveChatSuperChatDetails; + newLiveChatSuperChatDetails(): YouTube.Schema.LiveChatSuperChatDetails; // Create a new instance of LiveChatSuperStickerDetails - newLiveChatSuperStickerDetails(): Youtube_v3.Schema.LiveChatSuperStickerDetails; + newLiveChatSuperStickerDetails(): YouTube.Schema.LiveChatSuperStickerDetails; // Create a new instance of LiveChatTextMessageDetails - newLiveChatTextMessageDetails(): Youtube_v3.Schema.LiveChatTextMessageDetails; + newLiveChatTextMessageDetails(): YouTube.Schema.LiveChatTextMessageDetails; // Create a new instance of LiveChatUserBannedMessageDetails - newLiveChatUserBannedMessageDetails(): Youtube_v3.Schema.LiveChatUserBannedMessageDetails; + newLiveChatUserBannedMessageDetails(): YouTube.Schema.LiveChatUserBannedMessageDetails; // Create a new instance of LiveStream - newLiveStream(): Youtube_v3.Schema.LiveStream; + newLiveStream(): YouTube.Schema.LiveStream; // Create a new instance of LiveStreamConfigurationIssue - newLiveStreamConfigurationIssue(): Youtube_v3.Schema.LiveStreamConfigurationIssue; + newLiveStreamConfigurationIssue(): YouTube.Schema.LiveStreamConfigurationIssue; // Create a new instance of LiveStreamContentDetails - newLiveStreamContentDetails(): Youtube_v3.Schema.LiveStreamContentDetails; + newLiveStreamContentDetails(): YouTube.Schema.LiveStreamContentDetails; // Create a new instance of LiveStreamHealthStatus - newLiveStreamHealthStatus(): Youtube_v3.Schema.LiveStreamHealthStatus; + newLiveStreamHealthStatus(): YouTube.Schema.LiveStreamHealthStatus; // Create a new instance of LiveStreamSnippet - newLiveStreamSnippet(): Youtube_v3.Schema.LiveStreamSnippet; + newLiveStreamSnippet(): YouTube.Schema.LiveStreamSnippet; // Create a new instance of LiveStreamStatus - newLiveStreamStatus(): Youtube_v3.Schema.LiveStreamStatus; + newLiveStreamStatus(): YouTube.Schema.LiveStreamStatus; // Create a new instance of LocalizedProperty - newLocalizedProperty(): Youtube_v3.Schema.LocalizedProperty; + newLocalizedProperty(): YouTube.Schema.LocalizedProperty; // Create a new instance of LocalizedString - newLocalizedString(): Youtube_v3.Schema.LocalizedString; + newLocalizedString(): YouTube.Schema.LocalizedString; // Create a new instance of MonitorStreamInfo - newMonitorStreamInfo(): Youtube_v3.Schema.MonitorStreamInfo; + newMonitorStreamInfo(): YouTube.Schema.MonitorStreamInfo; // Create a new instance of Playlist - newPlaylist(): Youtube_v3.Schema.Playlist; + newPlaylist(): YouTube.Schema.Playlist; // Create a new instance of PlaylistContentDetails - newPlaylistContentDetails(): Youtube_v3.Schema.PlaylistContentDetails; + newPlaylistContentDetails(): YouTube.Schema.PlaylistContentDetails; // Create a new instance of PlaylistItem - newPlaylistItem(): Youtube_v3.Schema.PlaylistItem; + newPlaylistItem(): YouTube.Schema.PlaylistItem; // Create a new instance of PlaylistItemContentDetails - newPlaylistItemContentDetails(): Youtube_v3.Schema.PlaylistItemContentDetails; + newPlaylistItemContentDetails(): YouTube.Schema.PlaylistItemContentDetails; // Create a new instance of PlaylistItemSnippet - newPlaylistItemSnippet(): Youtube_v3.Schema.PlaylistItemSnippet; + newPlaylistItemSnippet(): YouTube.Schema.PlaylistItemSnippet; // Create a new instance of PlaylistItemStatus - newPlaylistItemStatus(): Youtube_v3.Schema.PlaylistItemStatus; + newPlaylistItemStatus(): YouTube.Schema.PlaylistItemStatus; // Create a new instance of PlaylistLocalization - newPlaylistLocalization(): Youtube_v3.Schema.PlaylistLocalization; + newPlaylistLocalization(): YouTube.Schema.PlaylistLocalization; // Create a new instance of PlaylistPlayer - newPlaylistPlayer(): Youtube_v3.Schema.PlaylistPlayer; + newPlaylistPlayer(): YouTube.Schema.PlaylistPlayer; // Create a new instance of PlaylistSnippet - newPlaylistSnippet(): Youtube_v3.Schema.PlaylistSnippet; + newPlaylistSnippet(): YouTube.Schema.PlaylistSnippet; // Create a new instance of PlaylistStatus - newPlaylistStatus(): Youtube_v3.Schema.PlaylistStatus; + newPlaylistStatus(): YouTube.Schema.PlaylistStatus; // Create a new instance of PromotedItem - newPromotedItem(): Youtube_v3.Schema.PromotedItem; + newPromotedItem(): YouTube.Schema.PromotedItem; // Create a new instance of PromotedItemId - newPromotedItemId(): Youtube_v3.Schema.PromotedItemId; + newPromotedItemId(): YouTube.Schema.PromotedItemId; // Create a new instance of PropertyValue - newPropertyValue(): Youtube_v3.Schema.PropertyValue; + newPropertyValue(): YouTube.Schema.PropertyValue; // Create a new instance of ResourceId - newResourceId(): Youtube_v3.Schema.ResourceId; + newResourceId(): YouTube.Schema.ResourceId; // Create a new instance of Subscription - newSubscription(): Youtube_v3.Schema.Subscription; + newSubscription(): YouTube.Schema.Subscription; // Create a new instance of SubscriptionContentDetails - newSubscriptionContentDetails(): Youtube_v3.Schema.SubscriptionContentDetails; + newSubscriptionContentDetails(): YouTube.Schema.SubscriptionContentDetails; // Create a new instance of SubscriptionSnippet - newSubscriptionSnippet(): Youtube_v3.Schema.SubscriptionSnippet; + newSubscriptionSnippet(): YouTube.Schema.SubscriptionSnippet; // Create a new instance of SubscriptionSubscriberSnippet - newSubscriptionSubscriberSnippet(): Youtube_v3.Schema.SubscriptionSubscriberSnippet; + newSubscriptionSubscriberSnippet(): YouTube.Schema.SubscriptionSubscriberSnippet; // Create a new instance of SuperStickerMetadata - newSuperStickerMetadata(): Youtube_v3.Schema.SuperStickerMetadata; + newSuperStickerMetadata(): YouTube.Schema.SuperStickerMetadata; // Create a new instance of Thumbnail - newThumbnail(): Youtube_v3.Schema.Thumbnail; + newThumbnail(): YouTube.Schema.Thumbnail; // Create a new instance of ThumbnailDetails - newThumbnailDetails(): Youtube_v3.Schema.ThumbnailDetails; + newThumbnailDetails(): YouTube.Schema.ThumbnailDetails; // Create a new instance of Video - newVideo(): Youtube_v3.Schema.Video; + newVideo(): YouTube.Schema.Video; // Create a new instance of VideoAbuseReport - newVideoAbuseReport(): Youtube_v3.Schema.VideoAbuseReport; + newVideoAbuseReport(): YouTube.Schema.VideoAbuseReport; // Create a new instance of VideoAgeGating - newVideoAgeGating(): Youtube_v3.Schema.VideoAgeGating; + newVideoAgeGating(): YouTube.Schema.VideoAgeGating; // Create a new instance of VideoContentDetails - newVideoContentDetails(): Youtube_v3.Schema.VideoContentDetails; + newVideoContentDetails(): YouTube.Schema.VideoContentDetails; // Create a new instance of VideoContentDetailsRegionRestriction - newVideoContentDetailsRegionRestriction(): Youtube_v3.Schema.VideoContentDetailsRegionRestriction; + newVideoContentDetailsRegionRestriction(): YouTube.Schema.VideoContentDetailsRegionRestriction; // Create a new instance of VideoFileDetails - newVideoFileDetails(): Youtube_v3.Schema.VideoFileDetails; + newVideoFileDetails(): YouTube.Schema.VideoFileDetails; // Create a new instance of VideoFileDetailsAudioStream - newVideoFileDetailsAudioStream(): Youtube_v3.Schema.VideoFileDetailsAudioStream; + newVideoFileDetailsAudioStream(): YouTube.Schema.VideoFileDetailsAudioStream; // Create a new instance of VideoFileDetailsVideoStream - newVideoFileDetailsVideoStream(): Youtube_v3.Schema.VideoFileDetailsVideoStream; + newVideoFileDetailsVideoStream(): YouTube.Schema.VideoFileDetailsVideoStream; // Create a new instance of VideoLiveStreamingDetails - newVideoLiveStreamingDetails(): Youtube_v3.Schema.VideoLiveStreamingDetails; + newVideoLiveStreamingDetails(): YouTube.Schema.VideoLiveStreamingDetails; // Create a new instance of VideoLocalization - newVideoLocalization(): Youtube_v3.Schema.VideoLocalization; + newVideoLocalization(): YouTube.Schema.VideoLocalization; // Create a new instance of VideoMonetizationDetails - newVideoMonetizationDetails(): Youtube_v3.Schema.VideoMonetizationDetails; + newVideoMonetizationDetails(): YouTube.Schema.VideoMonetizationDetails; // Create a new instance of VideoPlayer - newVideoPlayer(): Youtube_v3.Schema.VideoPlayer; + newVideoPlayer(): YouTube.Schema.VideoPlayer; // Create a new instance of VideoProcessingDetails - newVideoProcessingDetails(): Youtube_v3.Schema.VideoProcessingDetails; + newVideoProcessingDetails(): YouTube.Schema.VideoProcessingDetails; // Create a new instance of VideoProcessingDetailsProcessingProgress - newVideoProcessingDetailsProcessingProgress(): Youtube_v3.Schema.VideoProcessingDetailsProcessingProgress; + newVideoProcessingDetailsProcessingProgress(): YouTube.Schema.VideoProcessingDetailsProcessingProgress; // Create a new instance of VideoProjectDetails - newVideoProjectDetails(): Youtube_v3.Schema.VideoProjectDetails; + newVideoProjectDetails(): YouTube.Schema.VideoProjectDetails; // Create a new instance of VideoRecordingDetails - newVideoRecordingDetails(): Youtube_v3.Schema.VideoRecordingDetails; + newVideoRecordingDetails(): YouTube.Schema.VideoRecordingDetails; // Create a new instance of VideoSnippet - newVideoSnippet(): Youtube_v3.Schema.VideoSnippet; + newVideoSnippet(): YouTube.Schema.VideoSnippet; // Create a new instance of VideoStatistics - newVideoStatistics(): Youtube_v3.Schema.VideoStatistics; + newVideoStatistics(): YouTube.Schema.VideoStatistics; // Create a new instance of VideoStatus - newVideoStatus(): Youtube_v3.Schema.VideoStatus; + newVideoStatus(): YouTube.Schema.VideoStatus; // Create a new instance of VideoSuggestions - newVideoSuggestions(): Youtube_v3.Schema.VideoSuggestions; + newVideoSuggestions(): YouTube.Schema.VideoSuggestions; // Create a new instance of VideoSuggestionsTagSuggestion - newVideoSuggestionsTagSuggestion(): Youtube_v3.Schema.VideoSuggestionsTagSuggestion; + newVideoSuggestionsTagSuggestion(): YouTube.Schema.VideoSuggestionsTagSuggestion; // Create a new instance of VideoTopicDetails - newVideoTopicDetails(): Youtube_v3.Schema.VideoTopicDetails; + newVideoTopicDetails(): YouTube.Schema.VideoTopicDetails; // Create a new instance of WatchSettings - newWatchSettings(): Youtube_v3.Schema.WatchSettings; + newWatchSettings(): YouTube.Schema.WatchSettings; } } -declare var Youtube_v3: GoogleAppsScript.Youtube_v3; \ No newline at end of file +declare var YouTube: GoogleAppsScript.YouTube; diff --git a/types/google-apps-script/apis/youtubeanalytics_v2.d.ts b/types/google-apps-script/apis/youtubeanalytics_v2.d.ts index df59e7eb33..4b3319a337 100644 --- a/types/google-apps-script/apis/youtubeanalytics_v2.d.ts +++ b/types/google-apps-script/apis/youtubeanalytics_v2.d.ts @@ -5,54 +5,54 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace YoutubeAnalytics_v2 { + namespace YouTubeAnalytics { namespace Collection { export interface GroupItemsCollection { // Creates a group item. - insert(resource: Schema.GroupItem): YoutubeAnalytics_v2.Schema.GroupItem; + insert(resource: Schema.GroupItem): YouTubeAnalytics.Schema.GroupItem; // Creates a group item. - insert(resource: Schema.GroupItem, optionalArgs: object): YoutubeAnalytics_v2.Schema.GroupItem; + insert(resource: Schema.GroupItem, optionalArgs: object): YouTubeAnalytics.Schema.GroupItem; // Returns a collection of group items that match the API request parameters. - list(): YoutubeAnalytics_v2.Schema.ListGroupItemsResponse; + list(): YouTubeAnalytics.Schema.ListGroupItemsResponse; // Returns a collection of group items that match the API request parameters. - list(optionalArgs: object): YoutubeAnalytics_v2.Schema.ListGroupItemsResponse; + list(optionalArgs: object): YouTubeAnalytics.Schema.ListGroupItemsResponse; // Removes an item from a group. - remove(): YoutubeAnalytics_v2.Schema.EmptyResponse; + remove(): YouTubeAnalytics.Schema.EmptyResponse; // Removes an item from a group. - remove(optionalArgs: object): YoutubeAnalytics_v2.Schema.EmptyResponse; + remove(optionalArgs: object): YouTubeAnalytics.Schema.EmptyResponse; } export interface GroupsCollection { // Creates a group. - insert(resource: Schema.Group): YoutubeAnalytics_v2.Schema.Group; + insert(resource: Schema.Group): YouTubeAnalytics.Schema.Group; // Creates a group. - insert(resource: Schema.Group, optionalArgs: object): YoutubeAnalytics_v2.Schema.Group; + insert(resource: Schema.Group, optionalArgs: object): YouTubeAnalytics.Schema.Group; // Returns a collection of groups that match the API request parameters. For // example, you can retrieve all groups that the authenticated user owns, // or you can retrieve one or more groups by their unique IDs. - list(): YoutubeAnalytics_v2.Schema.ListGroupsResponse; + list(): YouTubeAnalytics.Schema.ListGroupsResponse; // Returns a collection of groups that match the API request parameters. For // example, you can retrieve all groups that the authenticated user owns, // or you can retrieve one or more groups by their unique IDs. - list(optionalArgs: object): YoutubeAnalytics_v2.Schema.ListGroupsResponse; + list(optionalArgs: object): YouTubeAnalytics.Schema.ListGroupsResponse; // Deletes a group. - remove(): YoutubeAnalytics_v2.Schema.EmptyResponse; + remove(): YouTubeAnalytics.Schema.EmptyResponse; // Deletes a group. - remove(optionalArgs: object): YoutubeAnalytics_v2.Schema.EmptyResponse; + remove(optionalArgs: object): YouTubeAnalytics.Schema.EmptyResponse; // Modifies a group. For example, you could change a group's title. - update(resource: Schema.Group): YoutubeAnalytics_v2.Schema.Group; + update(resource: Schema.Group): YouTubeAnalytics.Schema.Group; // Modifies a group. For example, you could change a group's title. - update(resource: Schema.Group, optionalArgs: object): YoutubeAnalytics_v2.Schema.Group; + update(resource: Schema.Group, optionalArgs: object): YouTubeAnalytics.Schema.Group; } export interface ReportsCollection { // Retrieve your YouTube Analytics reports. - query(): YoutubeAnalytics_v2.Schema.QueryResponse; + query(): YouTubeAnalytics.Schema.QueryResponse; // Retrieve your YouTube Analytics reports. - query(optionalArgs: object): YoutubeAnalytics_v2.Schema.QueryResponse; + query(optionalArgs: object): YouTubeAnalytics.Schema.QueryResponse; } } namespace Schema { export interface EmptyResponse { - errors?: YoutubeAnalytics_v2.Schema.Errors; + errors?: YouTubeAnalytics.Schema.Errors; } export interface ErrorProto { argument?: string[]; @@ -65,28 +65,28 @@ declare namespace GoogleAppsScript { } export interface Errors { code?: string; - error?: YoutubeAnalytics_v2.Schema.ErrorProto[]; + error?: YouTubeAnalytics.Schema.ErrorProto[]; requestId?: string; } export interface Group { - contentDetails?: YoutubeAnalytics_v2.Schema.GroupContentDetails; - errors?: YoutubeAnalytics_v2.Schema.Errors; + contentDetails?: YouTubeAnalytics.Schema.GroupContentDetails; + errors?: YouTubeAnalytics.Schema.Errors; etag?: string; id?: string; kind?: string; - snippet?: YoutubeAnalytics_v2.Schema.GroupSnippet; + snippet?: YouTubeAnalytics.Schema.GroupSnippet; } export interface GroupContentDetails { itemCount?: string; itemType?: string; } export interface GroupItem { - errors?: YoutubeAnalytics_v2.Schema.Errors; + errors?: YouTubeAnalytics.Schema.Errors; etag?: string; groupId?: string; id?: string; kind?: string; - resource?: YoutubeAnalytics_v2.Schema.GroupItemResource; + resource?: YouTubeAnalytics.Schema.GroupItemResource; } export interface GroupItemResource { id?: string; @@ -97,21 +97,21 @@ declare namespace GoogleAppsScript { title?: string; } export interface ListGroupItemsResponse { - errors?: YoutubeAnalytics_v2.Schema.Errors; + errors?: YouTubeAnalytics.Schema.Errors; etag?: string; - items?: YoutubeAnalytics_v2.Schema.GroupItem[]; + items?: YouTubeAnalytics.Schema.GroupItem[]; kind?: string; } export interface ListGroupsResponse { - errors?: YoutubeAnalytics_v2.Schema.Errors; + errors?: YouTubeAnalytics.Schema.Errors; etag?: string; - items?: YoutubeAnalytics_v2.Schema.Group[]; + items?: YouTubeAnalytics.Schema.Group[]; kind?: string; nextPageToken?: string; } export interface QueryResponse { - columnHeaders?: YoutubeAnalytics_v2.Schema.ResultTableColumnHeader[]; - errors?: YoutubeAnalytics_v2.Schema.Errors; + columnHeaders?: YouTubeAnalytics.Schema.ResultTableColumnHeader[]; + errors?: YouTubeAnalytics.Schema.Errors; kind?: string; rows?: Object[][]; } @@ -122,25 +122,25 @@ declare namespace GoogleAppsScript { } } } - export interface YoutubeAnalytics_v2 { - GroupItems?: YoutubeAnalytics_v2.Collection.GroupItemsCollection; - Groups?: YoutubeAnalytics_v2.Collection.GroupsCollection; - Reports?: YoutubeAnalytics_v2.Collection.ReportsCollection; + export interface YouTubeAnalytics { + GroupItems?: YouTubeAnalytics.Collection.GroupItemsCollection; + Groups?: YouTubeAnalytics.Collection.GroupsCollection; + Reports?: YouTubeAnalytics.Collection.ReportsCollection; // Create a new instance of ErrorProto - newErrorProto(): YoutubeAnalytics_v2.Schema.ErrorProto; + newErrorProto(): YouTubeAnalytics.Schema.ErrorProto; // Create a new instance of Errors - newErrors(): YoutubeAnalytics_v2.Schema.Errors; + newErrors(): YouTubeAnalytics.Schema.Errors; // Create a new instance of Group - newGroup(): YoutubeAnalytics_v2.Schema.Group; + newGroup(): YouTubeAnalytics.Schema.Group; // Create a new instance of GroupContentDetails - newGroupContentDetails(): YoutubeAnalytics_v2.Schema.GroupContentDetails; + newGroupContentDetails(): YouTubeAnalytics.Schema.GroupContentDetails; // Create a new instance of GroupItem - newGroupItem(): YoutubeAnalytics_v2.Schema.GroupItem; + newGroupItem(): YouTubeAnalytics.Schema.GroupItem; // Create a new instance of GroupItemResource - newGroupItemResource(): YoutubeAnalytics_v2.Schema.GroupItemResource; + newGroupItemResource(): YouTubeAnalytics.Schema.GroupItemResource; // Create a new instance of GroupSnippet - newGroupSnippet(): YoutubeAnalytics_v2.Schema.GroupSnippet; + newGroupSnippet(): YouTubeAnalytics.Schema.GroupSnippet; } } -declare var YoutubeAnalytics_v2: GoogleAppsScript.YoutubeAnalytics_v2; \ No newline at end of file +declare var YouTubeAnalytics: GoogleAppsScript.YouTubeAnalytics; diff --git a/types/google-apps-script/apis/youtubepartner_v1.d.ts b/types/google-apps-script/apis/youtubepartner_v1.d.ts index c376e52320..f940cf2268 100644 --- a/types/google-apps-script/apis/youtubepartner_v1.d.ts +++ b/types/google-apps-script/apis/youtubepartner_v1.d.ts @@ -5,41 +5,41 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace GoogleAppsScript { - namespace YoutubePartner_v1 { + namespace YoutubePartner { namespace Collection { export interface AssetLabelsCollection { // Insert an asset label for an owner. - insert(resource: Schema.AssetLabel): YoutubePartner_v1.Schema.AssetLabel; + insert(resource: Schema.AssetLabel): YoutubePartner.Schema.AssetLabel; // Insert an asset label for an owner. - insert(resource: Schema.AssetLabel, optionalArgs: object): YoutubePartner_v1.Schema.AssetLabel; + insert(resource: Schema.AssetLabel, optionalArgs: object): YoutubePartner.Schema.AssetLabel; // Retrieves a list of all asset labels for an owner. - list(): YoutubePartner_v1.Schema.AssetLabelListResponse; + list(): YoutubePartner.Schema.AssetLabelListResponse; // Retrieves a list of all asset labels for an owner. - list(optionalArgs: object): YoutubePartner_v1.Schema.AssetLabelListResponse; + list(optionalArgs: object): YoutubePartner.Schema.AssetLabelListResponse; } export interface AssetMatchPolicyCollection { // Retrieves the match policy assigned to the specified asset by the content owner associated with the authenticated user. This information is only accessible to an owner of the asset. - get(assetId: string): YoutubePartner_v1.Schema.AssetMatchPolicy; + get(assetId: string): YoutubePartner.Schema.AssetMatchPolicy; // Retrieves the match policy assigned to the specified asset by the content owner associated with the authenticated user. This information is only accessible to an owner of the asset. - get(assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.AssetMatchPolicy; + get(assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetMatchPolicy; // Updates the asset's match policy. If an asset has multiple owners, each owner may set its own match policy for the asset. YouTube then computes the match policy that is actually applied for the asset based on the territories where each owner owns the asset. This method supports patch semantics. - patch(resource: Schema.AssetMatchPolicy, assetId: string): YoutubePartner_v1.Schema.AssetMatchPolicy; + patch(resource: Schema.AssetMatchPolicy, assetId: string): YoutubePartner.Schema.AssetMatchPolicy; // Updates the asset's match policy. If an asset has multiple owners, each owner may set its own match policy for the asset. YouTube then computes the match policy that is actually applied for the asset based on the territories where each owner owns the asset. This method supports patch semantics. - patch(resource: Schema.AssetMatchPolicy, assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.AssetMatchPolicy; + patch(resource: Schema.AssetMatchPolicy, assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetMatchPolicy; // Updates the asset's match policy. If an asset has multiple owners, each owner may set its own match policy for the asset. YouTube then computes the match policy that is actually applied for the asset based on the territories where each owner owns the asset. - update(resource: Schema.AssetMatchPolicy, assetId: string): YoutubePartner_v1.Schema.AssetMatchPolicy; + update(resource: Schema.AssetMatchPolicy, assetId: string): YoutubePartner.Schema.AssetMatchPolicy; // Updates the asset's match policy. If an asset has multiple owners, each owner may set its own match policy for the asset. YouTube then computes the match policy that is actually applied for the asset based on the territories where each owner owns the asset. - update(resource: Schema.AssetMatchPolicy, assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.AssetMatchPolicy; + update(resource: Schema.AssetMatchPolicy, assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetMatchPolicy; } export interface AssetRelationshipsCollection { // Creates a relationship that links two assets. - insert(resource: Schema.AssetRelationship): YoutubePartner_v1.Schema.AssetRelationship; + insert(resource: Schema.AssetRelationship): YoutubePartner.Schema.AssetRelationship; // Creates a relationship that links two assets. - insert(resource: Schema.AssetRelationship, optionalArgs: object): YoutubePartner_v1.Schema.AssetRelationship; + insert(resource: Schema.AssetRelationship, optionalArgs: object): YoutubePartner.Schema.AssetRelationship; // Retrieves a list of relationships for a given asset. The list contains relationships where the specified asset is either the parent (embedding) or child (embedded) asset in the relationship. - list(assetId: string): YoutubePartner_v1.Schema.AssetRelationshipListResponse; + list(assetId: string): YoutubePartner.Schema.AssetRelationshipListResponse; // Retrieves a list of relationships for a given asset. The list contains relationships where the specified asset is either the parent (embedding) or child (embedded) asset in the relationship. - list(assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.AssetRelationshipListResponse; + list(assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetRelationshipListResponse; // Deletes a relationship between two assets. remove(assetRelationshipId: string): void; // Deletes a relationship between two assets. @@ -47,325 +47,325 @@ declare namespace GoogleAppsScript { } export interface AssetSearchCollection { // Searches for assets based on asset metadata. The method can retrieve all assets or only assets owned by the content owner. This method mimics the functionality of the advanced search feature on the Assets page in CMS. - list(): YoutubePartner_v1.Schema.AssetSearchResponse; + list(): YoutubePartner.Schema.AssetSearchResponse; // Searches for assets based on asset metadata. The method can retrieve all assets or only assets owned by the content owner. This method mimics the functionality of the advanced search feature on the Assets page in CMS. - list(optionalArgs: object): YoutubePartner_v1.Schema.AssetSearchResponse; + list(optionalArgs: object): YoutubePartner.Schema.AssetSearchResponse; } export interface AssetSharesCollection { // This method either retrieves a list of asset shares the partner owns and that map to a specified asset view ID or it retrieves a list of asset views associated with a specified asset share ID owned by the partner. - list(assetId: string): YoutubePartner_v1.Schema.AssetShareListResponse; + list(assetId: string): YoutubePartner.Schema.AssetShareListResponse; // This method either retrieves a list of asset shares the partner owns and that map to a specified asset view ID or it retrieves a list of asset views associated with a specified asset share ID owned by the partner. - list(assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.AssetShareListResponse; + list(assetId: string, optionalArgs: object): YoutubePartner.Schema.AssetShareListResponse; } export interface AssetsCollection { // Retrieves the metadata for the specified asset. Note that if the request identifies an asset that has been merged with another asset, meaning that YouTube identified the requested asset as a duplicate, then the request retrieves the merged, or synthesized, asset. - get(assetId: string): YoutubePartner_v1.Schema.Asset; + get(assetId: string): YoutubePartner.Schema.Asset; // Retrieves the metadata for the specified asset. Note that if the request identifies an asset that has been merged with another asset, meaning that YouTube identified the requested asset as a duplicate, then the request retrieves the merged, or synthesized, asset. - get(assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.Asset; + get(assetId: string, optionalArgs: object): YoutubePartner.Schema.Asset; // Inserts an asset with the specified metadata. After inserting an asset, you can set its ownership data and match policy. - insert(resource: Schema.Asset): YoutubePartner_v1.Schema.Asset; + insert(resource: Schema.Asset): YoutubePartner.Schema.Asset; // Inserts an asset with the specified metadata. After inserting an asset, you can set its ownership data and match policy. - insert(resource: Schema.Asset, optionalArgs: object): YoutubePartner_v1.Schema.Asset; + insert(resource: Schema.Asset, optionalArgs: object): YoutubePartner.Schema.Asset; // Retrieves a list of assets based on asset metadata. The method can retrieve all assets or only assets owned by the content owner. // Note that in cases where duplicate assets have been merged, the API response only contains the synthesized asset. (It does not contain the constituent assets that were merged into the synthesized asset.) - list(id: string): YoutubePartner_v1.Schema.AssetListResponse; + list(id: string): YoutubePartner.Schema.AssetListResponse; // Retrieves a list of assets based on asset metadata. The method can retrieve all assets or only assets owned by the content owner. // Note that in cases where duplicate assets have been merged, the API response only contains the synthesized asset. (It does not contain the constituent assets that were merged into the synthesized asset.) - list(id: string, optionalArgs: object): YoutubePartner_v1.Schema.AssetListResponse; + list(id: string, optionalArgs: object): YoutubePartner.Schema.AssetListResponse; // Updates the metadata for the specified asset. This method supports patch semantics. - patch(resource: Schema.Asset, assetId: string): YoutubePartner_v1.Schema.Asset; + patch(resource: Schema.Asset, assetId: string): YoutubePartner.Schema.Asset; // Updates the metadata for the specified asset. This method supports patch semantics. - patch(resource: Schema.Asset, assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.Asset; + patch(resource: Schema.Asset, assetId: string, optionalArgs: object): YoutubePartner.Schema.Asset; // Updates the metadata for the specified asset. - update(resource: Schema.Asset, assetId: string): YoutubePartner_v1.Schema.Asset; + update(resource: Schema.Asset, assetId: string): YoutubePartner.Schema.Asset; // Updates the metadata for the specified asset. - update(resource: Schema.Asset, assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.Asset; + update(resource: Schema.Asset, assetId: string, optionalArgs: object): YoutubePartner.Schema.Asset; } export interface CampaignsCollection { // Retrieves a particular campaign for an owner. - get(campaignId: string): YoutubePartner_v1.Schema.Campaign; + get(campaignId: string): YoutubePartner.Schema.Campaign; // Retrieves a particular campaign for an owner. - get(campaignId: string, optionalArgs: object): YoutubePartner_v1.Schema.Campaign; + get(campaignId: string, optionalArgs: object): YoutubePartner.Schema.Campaign; // Insert a new campaign for an owner using the specified campaign data. - insert(resource: Schema.Campaign): YoutubePartner_v1.Schema.Campaign; + insert(resource: Schema.Campaign): YoutubePartner.Schema.Campaign; // Insert a new campaign for an owner using the specified campaign data. - insert(resource: Schema.Campaign, optionalArgs: object): YoutubePartner_v1.Schema.Campaign; + insert(resource: Schema.Campaign, optionalArgs: object): YoutubePartner.Schema.Campaign; // Retrieves a list of campaigns for an owner. - list(): YoutubePartner_v1.Schema.CampaignList; + list(): YoutubePartner.Schema.CampaignList; // Retrieves a list of campaigns for an owner. - list(optionalArgs: object): YoutubePartner_v1.Schema.CampaignList; + list(optionalArgs: object): YoutubePartner.Schema.CampaignList; // Update the data for a specific campaign. This method supports patch semantics. - patch(resource: Schema.Campaign, campaignId: string): YoutubePartner_v1.Schema.Campaign; + patch(resource: Schema.Campaign, campaignId: string): YoutubePartner.Schema.Campaign; // Update the data for a specific campaign. This method supports patch semantics. - patch(resource: Schema.Campaign, campaignId: string, optionalArgs: object): YoutubePartner_v1.Schema.Campaign; + patch(resource: Schema.Campaign, campaignId: string, optionalArgs: object): YoutubePartner.Schema.Campaign; // Deletes a specified campaign for an owner. remove(campaignId: string): void; // Deletes a specified campaign for an owner. remove(campaignId: string, optionalArgs: object): void; // Update the data for a specific campaign. - update(resource: Schema.Campaign, campaignId: string): YoutubePartner_v1.Schema.Campaign; + update(resource: Schema.Campaign, campaignId: string): YoutubePartner.Schema.Campaign; // Update the data for a specific campaign. - update(resource: Schema.Campaign, campaignId: string, optionalArgs: object): YoutubePartner_v1.Schema.Campaign; + update(resource: Schema.Campaign, campaignId: string, optionalArgs: object): YoutubePartner.Schema.Campaign; } export interface ClaimHistoryCollection { // Retrieves the claim history for a specified claim. - get(claimId: string): YoutubePartner_v1.Schema.ClaimHistory; + get(claimId: string): YoutubePartner.Schema.ClaimHistory; // Retrieves the claim history for a specified claim. - get(claimId: string, optionalArgs: object): YoutubePartner_v1.Schema.ClaimHistory; + get(claimId: string, optionalArgs: object): YoutubePartner.Schema.ClaimHistory; } export interface ClaimSearchCollection { // Retrieves a list of claims that match the search criteria. You can search for claims that are associated with a specific asset or video or that match a specified query string. - list(): YoutubePartner_v1.Schema.ClaimSearchResponse; + list(): YoutubePartner.Schema.ClaimSearchResponse; // Retrieves a list of claims that match the search criteria. You can search for claims that are associated with a specific asset or video or that match a specified query string. - list(optionalArgs: object): YoutubePartner_v1.Schema.ClaimSearchResponse; + list(optionalArgs: object): YoutubePartner.Schema.ClaimSearchResponse; } export interface ClaimsCollection { // Retrieves a specific claim by ID. - get(claimId: string): YoutubePartner_v1.Schema.Claim; + get(claimId: string): YoutubePartner.Schema.Claim; // Retrieves a specific claim by ID. - get(claimId: string, optionalArgs: object): YoutubePartner_v1.Schema.Claim; + get(claimId: string, optionalArgs: object): YoutubePartner.Schema.Claim; // Creates a claim. The video being claimed must have been uploaded to a channel associated with the same content owner as the API user sending the request. You can set the claim's policy in any of the following ways: // - Use the claim resource's policy property to identify a saved policy by its unique ID. // - Use the claim resource's policy property to specify a custom set of rules. - insert(resource: Schema.Claim): YoutubePartner_v1.Schema.Claim; + insert(resource: Schema.Claim): YoutubePartner.Schema.Claim; // Creates a claim. The video being claimed must have been uploaded to a channel associated with the same content owner as the API user sending the request. You can set the claim's policy in any of the following ways: // - Use the claim resource's policy property to identify a saved policy by its unique ID. // - Use the claim resource's policy property to specify a custom set of rules. - insert(resource: Schema.Claim, optionalArgs: object): YoutubePartner_v1.Schema.Claim; + insert(resource: Schema.Claim, optionalArgs: object): YoutubePartner.Schema.Claim; // Retrieves a list of claims administered by the content owner associated with the currently authenticated user. Results are sorted in descending order of creation time. - list(): YoutubePartner_v1.Schema.ClaimListResponse; + list(): YoutubePartner.Schema.ClaimListResponse; // Retrieves a list of claims administered by the content owner associated with the currently authenticated user. Results are sorted in descending order of creation time. - list(optionalArgs: object): YoutubePartner_v1.Schema.ClaimListResponse; + list(optionalArgs: object): YoutubePartner.Schema.ClaimListResponse; // Updates an existing claim by either changing its policy or its status. You can update a claim's status from active to inactive to effectively release the claim. This method supports patch semantics. - patch(resource: Schema.Claim, claimId: string): YoutubePartner_v1.Schema.Claim; + patch(resource: Schema.Claim, claimId: string): YoutubePartner.Schema.Claim; // Updates an existing claim by either changing its policy or its status. You can update a claim's status from active to inactive to effectively release the claim. This method supports patch semantics. - patch(resource: Schema.Claim, claimId: string, optionalArgs: object): YoutubePartner_v1.Schema.Claim; + patch(resource: Schema.Claim, claimId: string, optionalArgs: object): YoutubePartner.Schema.Claim; // Updates an existing claim by either changing its policy or its status. You can update a claim's status from active to inactive to effectively release the claim. - update(resource: Schema.Claim, claimId: string): YoutubePartner_v1.Schema.Claim; + update(resource: Schema.Claim, claimId: string): YoutubePartner.Schema.Claim; // Updates an existing claim by either changing its policy or its status. You can update a claim's status from active to inactive to effectively release the claim. - update(resource: Schema.Claim, claimId: string, optionalArgs: object): YoutubePartner_v1.Schema.Claim; + update(resource: Schema.Claim, claimId: string, optionalArgs: object): YoutubePartner.Schema.Claim; } export interface ContentOwnerAdvertisingOptionsCollection { // Retrieves advertising options for the content owner associated with the authenticated user. - get(): YoutubePartner_v1.Schema.ContentOwnerAdvertisingOption; + get(): YoutubePartner.Schema.ContentOwnerAdvertisingOption; // Retrieves advertising options for the content owner associated with the authenticated user. - get(optionalArgs: object): YoutubePartner_v1.Schema.ContentOwnerAdvertisingOption; + get(optionalArgs: object): YoutubePartner.Schema.ContentOwnerAdvertisingOption; // Updates advertising options for the content owner associated with the authenticated API user. This method supports patch semantics. - patch(resource: Schema.ContentOwnerAdvertisingOption): YoutubePartner_v1.Schema.ContentOwnerAdvertisingOption; + patch(resource: Schema.ContentOwnerAdvertisingOption): YoutubePartner.Schema.ContentOwnerAdvertisingOption; // Updates advertising options for the content owner associated with the authenticated API user. This method supports patch semantics. - patch(resource: Schema.ContentOwnerAdvertisingOption, optionalArgs: object): YoutubePartner_v1.Schema.ContentOwnerAdvertisingOption; + patch(resource: Schema.ContentOwnerAdvertisingOption, optionalArgs: object): YoutubePartner.Schema.ContentOwnerAdvertisingOption; // Updates advertising options for the content owner associated with the authenticated API user. - update(resource: Schema.ContentOwnerAdvertisingOption): YoutubePartner_v1.Schema.ContentOwnerAdvertisingOption; + update(resource: Schema.ContentOwnerAdvertisingOption): YoutubePartner.Schema.ContentOwnerAdvertisingOption; // Updates advertising options for the content owner associated with the authenticated API user. - update(resource: Schema.ContentOwnerAdvertisingOption, optionalArgs: object): YoutubePartner_v1.Schema.ContentOwnerAdvertisingOption; + update(resource: Schema.ContentOwnerAdvertisingOption, optionalArgs: object): YoutubePartner.Schema.ContentOwnerAdvertisingOption; } export interface ContentOwnersCollection { // Retrieves information about the specified content owner. - get(contentOwnerId: string): YoutubePartner_v1.Schema.ContentOwner; + get(contentOwnerId: string): YoutubePartner.Schema.ContentOwner; // Retrieves information about the specified content owner. - get(contentOwnerId: string, optionalArgs: object): YoutubePartner_v1.Schema.ContentOwner; + get(contentOwnerId: string, optionalArgs: object): YoutubePartner.Schema.ContentOwner; // Retrieves a list of content owners that match the request criteria. - list(): YoutubePartner_v1.Schema.ContentOwnerListResponse; + list(): YoutubePartner.Schema.ContentOwnerListResponse; // Retrieves a list of content owners that match the request criteria. - list(optionalArgs: object): YoutubePartner_v1.Schema.ContentOwnerListResponse; + list(optionalArgs: object): YoutubePartner.Schema.ContentOwnerListResponse; } export interface LiveCuepointsCollection { // Inserts a cuepoint into a live broadcast. - insert(resource: Schema.LiveCuepoint, channelId: string): YoutubePartner_v1.Schema.LiveCuepoint; + insert(resource: Schema.LiveCuepoint, channelId: string): YoutubePartner.Schema.LiveCuepoint; // Inserts a cuepoint into a live broadcast. - insert(resource: Schema.LiveCuepoint, channelId: string, optionalArgs: object): YoutubePartner_v1.Schema.LiveCuepoint; + insert(resource: Schema.LiveCuepoint, channelId: string, optionalArgs: object): YoutubePartner.Schema.LiveCuepoint; } export interface MetadataHistoryCollection { // Retrieves a list of all metadata provided for an asset, regardless of which content owner provided the data. - list(assetId: string): YoutubePartner_v1.Schema.MetadataHistoryListResponse; + list(assetId: string): YoutubePartner.Schema.MetadataHistoryListResponse; // Retrieves a list of all metadata provided for an asset, regardless of which content owner provided the data. - list(assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.MetadataHistoryListResponse; + list(assetId: string, optionalArgs: object): YoutubePartner.Schema.MetadataHistoryListResponse; } export interface OrdersCollection { // Retrieve the details of an existing order. - get(orderId: string): YoutubePartner_v1.Schema.Order; + get(orderId: string): YoutubePartner.Schema.Order; // Retrieve the details of an existing order. - get(orderId: string, optionalArgs: object): YoutubePartner_v1.Schema.Order; + get(orderId: string, optionalArgs: object): YoutubePartner.Schema.Order; // Creates a new basic order entry in the YouTube premium asset order management system. You must supply at least a country and channel in the new order. - insert(resource: Schema.Order): YoutubePartner_v1.Schema.Order; + insert(resource: Schema.Order): YoutubePartner.Schema.Order; // Creates a new basic order entry in the YouTube premium asset order management system. You must supply at least a country and channel in the new order. - insert(resource: Schema.Order, optionalArgs: object): YoutubePartner_v1.Schema.Order; + insert(resource: Schema.Order, optionalArgs: object): YoutubePartner.Schema.Order; // Return a list of orders, filtered by the parameters below, may return more than a single page of results. - list(): YoutubePartner_v1.Schema.OrderListResponse; + list(): YoutubePartner.Schema.OrderListResponse; // Return a list of orders, filtered by the parameters below, may return more than a single page of results. - list(optionalArgs: object): YoutubePartner_v1.Schema.OrderListResponse; + list(optionalArgs: object): YoutubePartner.Schema.OrderListResponse; // Update the values in an existing order. This method supports patch semantics. - patch(resource: Schema.Order, orderId: string): YoutubePartner_v1.Schema.Order; + patch(resource: Schema.Order, orderId: string): YoutubePartner.Schema.Order; // Update the values in an existing order. This method supports patch semantics. - patch(resource: Schema.Order, orderId: string, optionalArgs: object): YoutubePartner_v1.Schema.Order; + patch(resource: Schema.Order, orderId: string, optionalArgs: object): YoutubePartner.Schema.Order; // Delete an order, which moves orders to inactive state and removes any associated video. remove(orderId: string): void; // Delete an order, which moves orders to inactive state and removes any associated video. remove(orderId: string, optionalArgs: object): void; // Update the values in an existing order. - update(resource: Schema.Order, orderId: string): YoutubePartner_v1.Schema.Order; + update(resource: Schema.Order, orderId: string): YoutubePartner.Schema.Order; // Update the values in an existing order. - update(resource: Schema.Order, orderId: string, optionalArgs: object): YoutubePartner_v1.Schema.Order; + update(resource: Schema.Order, orderId: string, optionalArgs: object): YoutubePartner.Schema.Order; } export interface OwnershipCollection { // Retrieves the ownership data provided for the specified asset by the content owner associated with the authenticated user. - get(assetId: string): YoutubePartner_v1.Schema.RightsOwnership; + get(assetId: string): YoutubePartner.Schema.RightsOwnership; // Retrieves the ownership data provided for the specified asset by the content owner associated with the authenticated user. - get(assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.RightsOwnership; + get(assetId: string, optionalArgs: object): YoutubePartner.Schema.RightsOwnership; // Provides new ownership information for the specified asset. Note that YouTube may receive ownership information from multiple sources. For example, if an asset has multiple owners, each owner might send ownership data for the asset. YouTube algorithmically combines the ownership data received from all of those sources to generate the asset's canonical ownership data, which should provide the most comprehensive and accurate representation of the asset's ownership. This method supports patch semantics. - patch(resource: Schema.RightsOwnership, assetId: string): YoutubePartner_v1.Schema.RightsOwnership; + patch(resource: Schema.RightsOwnership, assetId: string): YoutubePartner.Schema.RightsOwnership; // Provides new ownership information for the specified asset. Note that YouTube may receive ownership information from multiple sources. For example, if an asset has multiple owners, each owner might send ownership data for the asset. YouTube algorithmically combines the ownership data received from all of those sources to generate the asset's canonical ownership data, which should provide the most comprehensive and accurate representation of the asset's ownership. This method supports patch semantics. - patch(resource: Schema.RightsOwnership, assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.RightsOwnership; + patch(resource: Schema.RightsOwnership, assetId: string, optionalArgs: object): YoutubePartner.Schema.RightsOwnership; // Provides new ownership information for the specified asset. Note that YouTube may receive ownership information from multiple sources. For example, if an asset has multiple owners, each owner might send ownership data for the asset. YouTube algorithmically combines the ownership data received from all of those sources to generate the asset's canonical ownership data, which should provide the most comprehensive and accurate representation of the asset's ownership. - update(resource: Schema.RightsOwnership, assetId: string): YoutubePartner_v1.Schema.RightsOwnership; + update(resource: Schema.RightsOwnership, assetId: string): YoutubePartner.Schema.RightsOwnership; // Provides new ownership information for the specified asset. Note that YouTube may receive ownership information from multiple sources. For example, if an asset has multiple owners, each owner might send ownership data for the asset. YouTube algorithmically combines the ownership data received from all of those sources to generate the asset's canonical ownership data, which should provide the most comprehensive and accurate representation of the asset's ownership. - update(resource: Schema.RightsOwnership, assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.RightsOwnership; + update(resource: Schema.RightsOwnership, assetId: string, optionalArgs: object): YoutubePartner.Schema.RightsOwnership; } export interface OwnershipHistoryCollection { // Retrieves a list of the ownership data for an asset, regardless of which content owner provided the data. The list only includes the most recent ownership data for each content owner. However, if the content owner has submitted ownership data through multiple data sources (API, content feeds, etc.), the list will contain the most recent data for each content owner and data source. - list(assetId: string): YoutubePartner_v1.Schema.OwnershipHistoryListResponse; + list(assetId: string): YoutubePartner.Schema.OwnershipHistoryListResponse; // Retrieves a list of the ownership data for an asset, regardless of which content owner provided the data. The list only includes the most recent ownership data for each content owner. However, if the content owner has submitted ownership data through multiple data sources (API, content feeds, etc.), the list will contain the most recent data for each content owner and data source. - list(assetId: string, optionalArgs: object): YoutubePartner_v1.Schema.OwnershipHistoryListResponse; + list(assetId: string, optionalArgs: object): YoutubePartner.Schema.OwnershipHistoryListResponse; } export interface PackageCollection { // Retrieves information for the specified package. - get(packageId: string): YoutubePartner_v1.Schema.Package; + get(packageId: string): YoutubePartner.Schema.Package; // Retrieves information for the specified package. - get(packageId: string, optionalArgs: object): YoutubePartner_v1.Schema.Package; + get(packageId: string, optionalArgs: object): YoutubePartner.Schema.Package; // Inserts a metadata-only package. - insert(resource: Schema.Package): YoutubePartner_v1.Schema.PackageInsertResponse; + insert(resource: Schema.Package): YoutubePartner.Schema.PackageInsertResponse; // Inserts a metadata-only package. - insert(resource: Schema.Package, optionalArgs: object): YoutubePartner_v1.Schema.PackageInsertResponse; + insert(resource: Schema.Package, optionalArgs: object): YoutubePartner.Schema.PackageInsertResponse; } export interface PoliciesCollection { // Retrieves the specified saved policy. - get(policyId: string): YoutubePartner_v1.Schema.Policy; + get(policyId: string): YoutubePartner.Schema.Policy; // Retrieves the specified saved policy. - get(policyId: string, optionalArgs: object): YoutubePartner_v1.Schema.Policy; + get(policyId: string, optionalArgs: object): YoutubePartner.Schema.Policy; // Creates a saved policy. - insert(resource: Schema.Policy): YoutubePartner_v1.Schema.Policy; + insert(resource: Schema.Policy): YoutubePartner.Schema.Policy; // Creates a saved policy. - insert(resource: Schema.Policy, optionalArgs: object): YoutubePartner_v1.Schema.Policy; + insert(resource: Schema.Policy, optionalArgs: object): YoutubePartner.Schema.Policy; // Retrieves a list of the content owner's saved policies. - list(): YoutubePartner_v1.Schema.PolicyList; + list(): YoutubePartner.Schema.PolicyList; // Retrieves a list of the content owner's saved policies. - list(optionalArgs: object): YoutubePartner_v1.Schema.PolicyList; + list(optionalArgs: object): YoutubePartner.Schema.PolicyList; // Updates the specified saved policy. This method supports patch semantics. - patch(resource: Schema.Policy, policyId: string): YoutubePartner_v1.Schema.Policy; + patch(resource: Schema.Policy, policyId: string): YoutubePartner.Schema.Policy; // Updates the specified saved policy. This method supports patch semantics. - patch(resource: Schema.Policy, policyId: string, optionalArgs: object): YoutubePartner_v1.Schema.Policy; + patch(resource: Schema.Policy, policyId: string, optionalArgs: object): YoutubePartner.Schema.Policy; // Updates the specified saved policy. - update(resource: Schema.Policy, policyId: string): YoutubePartner_v1.Schema.Policy; + update(resource: Schema.Policy, policyId: string): YoutubePartner.Schema.Policy; // Updates the specified saved policy. - update(resource: Schema.Policy, policyId: string, optionalArgs: object): YoutubePartner_v1.Schema.Policy; + update(resource: Schema.Policy, policyId: string, optionalArgs: object): YoutubePartner.Schema.Policy; } export interface PublishersCollection { // Retrieves information about the specified publisher. - get(publisherId: string): YoutubePartner_v1.Schema.Publisher; + get(publisherId: string): YoutubePartner.Schema.Publisher; // Retrieves information about the specified publisher. - get(publisherId: string, optionalArgs: object): YoutubePartner_v1.Schema.Publisher; + get(publisherId: string, optionalArgs: object): YoutubePartner.Schema.Publisher; // Retrieves a list of publishers that match the request criteria. This method is analogous to a publisher search function. - list(): YoutubePartner_v1.Schema.PublisherList; + list(): YoutubePartner.Schema.PublisherList; // Retrieves a list of publishers that match the request criteria. This method is analogous to a publisher search function. - list(optionalArgs: object): YoutubePartner_v1.Schema.PublisherList; + list(optionalArgs: object): YoutubePartner.Schema.PublisherList; } export interface ReferenceConflictsCollection { // Retrieves information about the specified reference conflict. - get(referenceConflictId: string): YoutubePartner_v1.Schema.ReferenceConflict; + get(referenceConflictId: string): YoutubePartner.Schema.ReferenceConflict; // Retrieves information about the specified reference conflict. - get(referenceConflictId: string, optionalArgs: object): YoutubePartner_v1.Schema.ReferenceConflict; + get(referenceConflictId: string, optionalArgs: object): YoutubePartner.Schema.ReferenceConflict; // Retrieves a list of unresolved reference conflicts. - list(): YoutubePartner_v1.Schema.ReferenceConflictListResponse; + list(): YoutubePartner.Schema.ReferenceConflictListResponse; // Retrieves a list of unresolved reference conflicts. - list(optionalArgs: object): YoutubePartner_v1.Schema.ReferenceConflictListResponse; + list(optionalArgs: object): YoutubePartner.Schema.ReferenceConflictListResponse; } export interface ReferencesCollection { // Retrieves information about the specified reference. - get(referenceId: string): YoutubePartner_v1.Schema.Reference; + get(referenceId: string): YoutubePartner.Schema.Reference; // Retrieves information about the specified reference. - get(referenceId: string, optionalArgs: object): YoutubePartner_v1.Schema.Reference; + get(referenceId: string, optionalArgs: object): YoutubePartner.Schema.Reference; // Creates a reference in one of the following ways: // - If your request is uploading a reference file, YouTube creates the reference from the provided content. You can provide either a video/audio file or a pre-generated fingerprint. If you are providing a pre-generated fingerprint, set the reference resource's fpDirect property to true in the request body. In this flow, you can use either the multipart or resumable upload flows to provide the reference content. // - If you want to create a reference using a claimed video as the reference content, use the claimId parameter to identify the claim. - insert(resource: Schema.Reference): YoutubePartner_v1.Schema.Reference; + insert(resource: Schema.Reference): YoutubePartner.Schema.Reference; // Creates a reference in one of the following ways: // - If your request is uploading a reference file, YouTube creates the reference from the provided content. You can provide either a video/audio file or a pre-generated fingerprint. If you are providing a pre-generated fingerprint, set the reference resource's fpDirect property to true in the request body. In this flow, you can use either the multipart or resumable upload flows to provide the reference content. // - If you want to create a reference using a claimed video as the reference content, use the claimId parameter to identify the claim. - insert(resource: Schema.Reference, mediaData: any): YoutubePartner_v1.Schema.Reference; + insert(resource: Schema.Reference, mediaData: any): YoutubePartner.Schema.Reference; // Creates a reference in one of the following ways: // - If your request is uploading a reference file, YouTube creates the reference from the provided content. You can provide either a video/audio file or a pre-generated fingerprint. If you are providing a pre-generated fingerprint, set the reference resource's fpDirect property to true in the request body. In this flow, you can use either the multipart or resumable upload flows to provide the reference content. // - If you want to create a reference using a claimed video as the reference content, use the claimId parameter to identify the claim. - insert(resource: Schema.Reference, mediaData: any, optionalArgs: object): YoutubePartner_v1.Schema.Reference; + insert(resource: Schema.Reference, mediaData: any, optionalArgs: object): YoutubePartner.Schema.Reference; // Retrieves a list of references by ID or the list of references for the specified asset. - list(): YoutubePartner_v1.Schema.ReferenceListResponse; + list(): YoutubePartner.Schema.ReferenceListResponse; // Retrieves a list of references by ID or the list of references for the specified asset. - list(optionalArgs: object): YoutubePartner_v1.Schema.ReferenceListResponse; + list(optionalArgs: object): YoutubePartner.Schema.ReferenceListResponse; // Updates a reference. This method supports patch semantics. - patch(resource: Schema.Reference, referenceId: string): YoutubePartner_v1.Schema.Reference; + patch(resource: Schema.Reference, referenceId: string): YoutubePartner.Schema.Reference; // Updates a reference. This method supports patch semantics. - patch(resource: Schema.Reference, referenceId: string, optionalArgs: object): YoutubePartner_v1.Schema.Reference; + patch(resource: Schema.Reference, referenceId: string, optionalArgs: object): YoutubePartner.Schema.Reference; // Updates a reference. - update(resource: Schema.Reference, referenceId: string): YoutubePartner_v1.Schema.Reference; + update(resource: Schema.Reference, referenceId: string): YoutubePartner.Schema.Reference; // Updates a reference. - update(resource: Schema.Reference, referenceId: string, optionalArgs: object): YoutubePartner_v1.Schema.Reference; + update(resource: Schema.Reference, referenceId: string, optionalArgs: object): YoutubePartner.Schema.Reference; } export interface SpreadsheetTemplateCollection { // Retrieves a list of spreadsheet templates for a content owner. - list(): YoutubePartner_v1.Schema.SpreadsheetTemplateListResponse; + list(): YoutubePartner.Schema.SpreadsheetTemplateListResponse; // Retrieves a list of spreadsheet templates for a content owner. - list(optionalArgs: object): YoutubePartner_v1.Schema.SpreadsheetTemplateListResponse; + list(optionalArgs: object): YoutubePartner.Schema.SpreadsheetTemplateListResponse; } export interface UploaderCollection { // Retrieves a list of uploaders for a content owner. - list(): YoutubePartner_v1.Schema.UploaderListResponse; + list(): YoutubePartner.Schema.UploaderListResponse; // Retrieves a list of uploaders for a content owner. - list(optionalArgs: object): YoutubePartner_v1.Schema.UploaderListResponse; + list(optionalArgs: object): YoutubePartner.Schema.UploaderListResponse; } export interface ValidatorCollection { // Validate a metadata file. - validate(resource: Schema.ValidateRequest): YoutubePartner_v1.Schema.ValidateResponse; + validate(resource: Schema.ValidateRequest): YoutubePartner.Schema.ValidateResponse; // Validate a metadata file. - validate(resource: Schema.ValidateRequest, optionalArgs: object): YoutubePartner_v1.Schema.ValidateResponse; + validate(resource: Schema.ValidateRequest, optionalArgs: object): YoutubePartner.Schema.ValidateResponse; // Validate a metadata file asynchronously. - validateAsync(resource: Schema.ValidateAsyncRequest): YoutubePartner_v1.Schema.ValidateAsyncResponse; + validateAsync(resource: Schema.ValidateAsyncRequest): YoutubePartner.Schema.ValidateAsyncResponse; // Validate a metadata file asynchronously. - validateAsync(resource: Schema.ValidateAsyncRequest, optionalArgs: object): YoutubePartner_v1.Schema.ValidateAsyncResponse; + validateAsync(resource: Schema.ValidateAsyncRequest, optionalArgs: object): YoutubePartner.Schema.ValidateAsyncResponse; // Get the asynchronous validation status. - validateAsyncStatus(resource: Schema.ValidateStatusRequest): YoutubePartner_v1.Schema.ValidateStatusResponse; + validateAsyncStatus(resource: Schema.ValidateStatusRequest): YoutubePartner.Schema.ValidateStatusResponse; // Get the asynchronous validation status. - validateAsyncStatus(resource: Schema.ValidateStatusRequest, optionalArgs: object): YoutubePartner_v1.Schema.ValidateStatusResponse; + validateAsyncStatus(resource: Schema.ValidateStatusRequest, optionalArgs: object): YoutubePartner.Schema.ValidateStatusResponse; } export interface VideoAdvertisingOptionsCollection { // Retrieves advertising settings for the specified video. - get(videoId: string): YoutubePartner_v1.Schema.VideoAdvertisingOption; + get(videoId: string): YoutubePartner.Schema.VideoAdvertisingOption; // Retrieves advertising settings for the specified video. - get(videoId: string, optionalArgs: object): YoutubePartner_v1.Schema.VideoAdvertisingOption; + get(videoId: string, optionalArgs: object): YoutubePartner.Schema.VideoAdvertisingOption; // Retrieves details about the types of allowed ads for a specified partner- or user-uploaded video. - getEnabledAds(videoId: string): YoutubePartner_v1.Schema.VideoAdvertisingOptionGetEnabledAdsResponse; + getEnabledAds(videoId: string): YoutubePartner.Schema.VideoAdvertisingOptionGetEnabledAdsResponse; // Retrieves details about the types of allowed ads for a specified partner- or user-uploaded video. - getEnabledAds(videoId: string, optionalArgs: object): YoutubePartner_v1.Schema.VideoAdvertisingOptionGetEnabledAdsResponse; + getEnabledAds(videoId: string, optionalArgs: object): YoutubePartner.Schema.VideoAdvertisingOptionGetEnabledAdsResponse; // Updates the advertising settings for the specified video. This method supports patch semantics. - patch(resource: Schema.VideoAdvertisingOption, videoId: string): YoutubePartner_v1.Schema.VideoAdvertisingOption; + patch(resource: Schema.VideoAdvertisingOption, videoId: string): YoutubePartner.Schema.VideoAdvertisingOption; // Updates the advertising settings for the specified video. This method supports patch semantics. - patch(resource: Schema.VideoAdvertisingOption, videoId: string, optionalArgs: object): YoutubePartner_v1.Schema.VideoAdvertisingOption; + patch(resource: Schema.VideoAdvertisingOption, videoId: string, optionalArgs: object): YoutubePartner.Schema.VideoAdvertisingOption; // Updates the advertising settings for the specified video. - update(resource: Schema.VideoAdvertisingOption, videoId: string): YoutubePartner_v1.Schema.VideoAdvertisingOption; + update(resource: Schema.VideoAdvertisingOption, videoId: string): YoutubePartner.Schema.VideoAdvertisingOption; // Updates the advertising settings for the specified video. - update(resource: Schema.VideoAdvertisingOption, videoId: string, optionalArgs: object): YoutubePartner_v1.Schema.VideoAdvertisingOption; + update(resource: Schema.VideoAdvertisingOption, videoId: string, optionalArgs: object): YoutubePartner.Schema.VideoAdvertisingOption; } export interface WhitelistsCollection { // Retrieves a specific whitelisted channel by ID. - get(id: string): YoutubePartner_v1.Schema.Whitelist; + get(id: string): YoutubePartner.Schema.Whitelist; // Retrieves a specific whitelisted channel by ID. - get(id: string, optionalArgs: object): YoutubePartner_v1.Schema.Whitelist; + get(id: string, optionalArgs: object): YoutubePartner.Schema.Whitelist; // Whitelist a YouTube channel for your content owner. Whitelisted channels are channels that are not owned or managed by you, but you would like to whitelist so that no claims from your assets are placed on videos uploaded to these channels. - insert(resource: Schema.Whitelist): YoutubePartner_v1.Schema.Whitelist; + insert(resource: Schema.Whitelist): YoutubePartner.Schema.Whitelist; // Whitelist a YouTube channel for your content owner. Whitelisted channels are channels that are not owned or managed by you, but you would like to whitelist so that no claims from your assets are placed on videos uploaded to these channels. - insert(resource: Schema.Whitelist, optionalArgs: object): YoutubePartner_v1.Schema.Whitelist; + insert(resource: Schema.Whitelist, optionalArgs: object): YoutubePartner.Schema.Whitelist; // Retrieves a list of whitelisted channels for a content owner. - list(): YoutubePartner_v1.Schema.WhitelistListResponse; + list(): YoutubePartner.Schema.WhitelistListResponse; // Retrieves a list of whitelisted channels for a content owner. - list(optionalArgs: object): YoutubePartner_v1.Schema.WhitelistListResponse; + list(optionalArgs: object): YoutubePartner.Schema.WhitelistListResponse; // Removes a whitelisted channel for a content owner. remove(id: string): void; // Removes a whitelisted channel for a content owner. @@ -376,7 +376,7 @@ declare namespace GoogleAppsScript { export interface AdBreak { midrollSeconds?: number; position?: string; - slot?: YoutubePartner_v1.Schema.AdSlot[]; + slot?: YoutubePartner.Schema.AdSlot[]; } export interface AdSlot { id?: string; @@ -393,16 +393,16 @@ declare namespace GoogleAppsScript { id?: string; kind?: string; label?: string[]; - matchPolicy?: YoutubePartner_v1.Schema.AssetMatchPolicy; - matchPolicyEffective?: YoutubePartner_v1.Schema.AssetMatchPolicy; - matchPolicyMine?: YoutubePartner_v1.Schema.AssetMatchPolicy; - metadata?: YoutubePartner_v1.Schema.Metadata; - metadataEffective?: YoutubePartner_v1.Schema.Metadata; - metadataMine?: YoutubePartner_v1.Schema.Metadata; - ownership?: YoutubePartner_v1.Schema.RightsOwnership; - ownershipConflicts?: YoutubePartner_v1.Schema.OwnershipConflicts; - ownershipEffective?: YoutubePartner_v1.Schema.RightsOwnership; - ownershipMine?: YoutubePartner_v1.Schema.RightsOwnership; + matchPolicy?: YoutubePartner.Schema.AssetMatchPolicy; + matchPolicyEffective?: YoutubePartner.Schema.AssetMatchPolicy; + matchPolicyMine?: YoutubePartner.Schema.AssetMatchPolicy; + metadata?: YoutubePartner.Schema.Metadata; + metadataEffective?: YoutubePartner.Schema.Metadata; + metadataMine?: YoutubePartner.Schema.Metadata; + ownership?: YoutubePartner.Schema.RightsOwnership; + ownershipConflicts?: YoutubePartner.Schema.OwnershipConflicts; + ownershipEffective?: YoutubePartner.Schema.RightsOwnership; + ownershipMine?: YoutubePartner.Schema.RightsOwnership; status?: string; timeCreated?: string; type?: string; @@ -412,17 +412,17 @@ declare namespace GoogleAppsScript { labelName?: string; } export interface AssetLabelListResponse { - items?: YoutubePartner_v1.Schema.AssetLabel[]; + items?: YoutubePartner.Schema.AssetLabel[]; kind?: string; } export interface AssetListResponse { - items?: YoutubePartner_v1.Schema.Asset[]; + items?: YoutubePartner.Schema.Asset[]; kind?: string; } export interface AssetMatchPolicy { kind?: string; policyId?: string; - rules?: YoutubePartner_v1.Schema.PolicyRule[]; + rules?: YoutubePartner.Schema.PolicyRule[]; } export interface AssetRelationship { childAssetId?: string; @@ -431,16 +431,16 @@ declare namespace GoogleAppsScript { parentAssetId?: string; } export interface AssetRelationshipListResponse { - items?: YoutubePartner_v1.Schema.AssetRelationship[]; + items?: YoutubePartner.Schema.AssetRelationship[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; } export interface AssetSearchResponse { - items?: YoutubePartner_v1.Schema.AssetSnippet[]; + items?: YoutubePartner.Schema.AssetSnippet[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; } export interface AssetShare { kind?: string; @@ -448,10 +448,10 @@ declare namespace GoogleAppsScript { viewId?: string; } export interface AssetShareListResponse { - items?: YoutubePartner_v1.Schema.AssetShare[]; + items?: YoutubePartner.Schema.AssetShare[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; } export interface AssetSnippet { customId?: string; @@ -464,7 +464,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface Campaign { - campaignData?: YoutubePartner_v1.Schema.CampaignData; + campaignData?: YoutubePartner.Schema.CampaignData; id?: string; kind?: string; status?: string; @@ -472,14 +472,14 @@ declare namespace GoogleAppsScript { timeLastModified?: string; } export interface CampaignData { - campaignSource?: YoutubePartner_v1.Schema.CampaignSource; + campaignSource?: YoutubePartner.Schema.CampaignSource; expireTime?: string; name?: string; - promotedContent?: YoutubePartner_v1.Schema.PromotedContent[]; + promotedContent?: YoutubePartner.Schema.PromotedContent[]; startTime?: string; } export interface CampaignList { - items?: YoutubePartner_v1.Schema.Campaign[]; + items?: YoutubePartner.Schema.Campaign[]; kind?: string; } export interface CampaignSource { @@ -491,16 +491,16 @@ declare namespace GoogleAppsScript { targetType?: string; } export interface Claim { - appliedPolicy?: YoutubePartner_v1.Schema.Policy; + appliedPolicy?: YoutubePartner.Schema.Policy; assetId?: string; blockOutsideOwnership?: boolean; contentType?: string; id?: string; isPartnerUploaded?: boolean; kind?: string; - matchInfo?: YoutubePartner_v1.Schema.ClaimMatchInfo; - origin?: YoutubePartner_v1.Schema.ClaimOrigin; - policy?: YoutubePartner_v1.Schema.Policy; + matchInfo?: YoutubePartner.Schema.ClaimMatchInfo; + origin?: YoutubePartner.Schema.ClaimOrigin; + policy?: YoutubePartner.Schema.Policy; status?: string; timeCreated?: string; videoId?: string; @@ -508,10 +508,10 @@ declare namespace GoogleAppsScript { export interface ClaimEvent { kind?: string; reason?: string; - source?: YoutubePartner_v1.Schema.ClaimEventSource; + source?: YoutubePartner.Schema.ClaimEventSource; time?: string; type?: string; - typeDetails?: YoutubePartner_v1.Schema.ClaimEventTypeDetails; + typeDetails?: YoutubePartner.Schema.ClaimEventTypeDetails; } export interface ClaimEventSource { contentOwnerId?: string; @@ -525,23 +525,23 @@ declare namespace GoogleAppsScript { updateStatus?: string; } export interface ClaimHistory { - event?: YoutubePartner_v1.Schema.ClaimEvent[]; + event?: YoutubePartner.Schema.ClaimEvent[]; id?: string; kind?: string; uploaderChannelId?: string; } export interface ClaimListResponse { - items?: YoutubePartner_v1.Schema.Claim[]; + items?: YoutubePartner.Schema.Claim[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; previousPageToken?: string; } export interface ClaimMatchInfo { - longestMatch?: YoutubePartner_v1.Schema.ClaimMatchInfoLongestMatch; - matchSegments?: YoutubePartner_v1.Schema.MatchSegment[]; + longestMatch?: YoutubePartner.Schema.ClaimMatchInfoLongestMatch; + matchSegments?: YoutubePartner.Schema.MatchSegment[]; referenceId?: string; - totalMatch?: YoutubePartner_v1.Schema.ClaimMatchInfoTotalMatch; + totalMatch?: YoutubePartner.Schema.ClaimMatchInfoTotalMatch; } export interface ClaimMatchInfoLongestMatch { durationSecs?: string; @@ -556,10 +556,10 @@ declare namespace GoogleAppsScript { source?: string; } export interface ClaimSearchResponse { - items?: YoutubePartner_v1.Schema.ClaimSnippet[]; + items?: YoutubePartner.Schema.ClaimSnippet[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; previousPageToken?: string; } export interface ClaimSnippet { @@ -568,7 +568,7 @@ declare namespace GoogleAppsScript { id?: string; isPartnerUploaded?: boolean; kind?: string; - origin?: YoutubePartner_v1.Schema.ClaimSnippetOrigin; + origin?: YoutubePartner.Schema.ClaimSnippetOrigin; status?: string; thirdPartyClaim?: boolean; timeCreated?: string; @@ -588,11 +588,11 @@ declare namespace GoogleAppsScript { } export interface Conditions { contentMatchType?: string[]; - matchDuration?: YoutubePartner_v1.Schema.IntervalCondition[]; - matchPercent?: YoutubePartner_v1.Schema.IntervalCondition[]; - referenceDuration?: YoutubePartner_v1.Schema.IntervalCondition[]; - referencePercent?: YoutubePartner_v1.Schema.IntervalCondition[]; - requiredTerritories?: YoutubePartner_v1.Schema.TerritoryCondition; + matchDuration?: YoutubePartner.Schema.IntervalCondition[]; + matchPercent?: YoutubePartner.Schema.IntervalCondition[]; + referenceDuration?: YoutubePartner.Schema.IntervalCondition[]; + referencePercent?: YoutubePartner.Schema.IntervalCondition[]; + requiredTerritories?: YoutubePartner.Schema.TerritoryCondition; } export interface ConflictingOwnership { owner?: string; @@ -608,13 +608,13 @@ declare namespace GoogleAppsScript { primaryNotificationEmails?: string[]; } export interface ContentOwnerAdvertisingOption { - allowedOptions?: YoutubePartner_v1.Schema.AllowedAdvertisingOptions; - claimedVideoOptions?: YoutubePartner_v1.Schema.ClaimedVideoDefaults; + allowedOptions?: YoutubePartner.Schema.AllowedAdvertisingOptions; + claimedVideoOptions?: YoutubePartner.Schema.ClaimedVideoDefaults; id?: string; kind?: string; } export interface ContentOwnerListResponse { - items?: YoutubePartner_v1.Schema.ContentOwner[]; + items?: YoutubePartner.Schema.ContentOwner[]; kind?: string; } export interface CountriesRestriction { @@ -633,9 +633,9 @@ declare namespace GoogleAppsScript { year?: number; } export interface DateRange { - end?: YoutubePartner_v1.Schema.Date; + end?: YoutubePartner.Schema.Date; kind?: string; - start?: YoutubePartner_v1.Schema.Date; + start?: YoutubePartner.Schema.Date; } export interface ExcludedInterval { high?: Number; @@ -651,12 +651,12 @@ declare namespace GoogleAppsScript { broadcastId?: string; id?: string; kind?: string; - settings?: YoutubePartner_v1.Schema.CuepointSettings; + settings?: YoutubePartner.Schema.CuepointSettings; } export interface MatchSegment { channel?: string; - reference_segment?: YoutubePartner_v1.Schema.Segment; - video_segment?: YoutubePartner_v1.Schema.Segment; + reference_segment?: YoutubePartner.Schema.Segment; + video_segment?: YoutubePartner.Schema.Segment; } export interface Metadata { actor?: string[]; @@ -665,7 +665,7 @@ declare namespace GoogleAppsScript { broadcaster?: string[]; category?: string; contentType?: string; - copyrightDate?: YoutubePartner_v1.Schema.Date; + copyrightDate?: YoutubePartner.Schema.Date; customId?: string; description?: string; director?: string[]; @@ -685,8 +685,8 @@ declare namespace GoogleAppsScript { notes?: string; originalReleaseMedium?: string; producer?: string[]; - ratings?: YoutubePartner_v1.Schema.Rating[]; - releaseDate?: YoutubePartner_v1.Schema.Date; + ratings?: YoutubePartner.Schema.Rating[]; + releaseDate?: YoutubePartner.Schema.Date; seasonNumber?: string; showCustomId?: string; showTitle?: string; @@ -701,12 +701,12 @@ declare namespace GoogleAppsScript { } export interface MetadataHistory { kind?: string; - metadata?: YoutubePartner_v1.Schema.Metadata; - origination?: YoutubePartner_v1.Schema.Origination; + metadata?: YoutubePartner.Schema.Metadata; + origination?: YoutubePartner.Schema.Origination; timeProvided?: string; } export interface MetadataHistoryListResponse { - items?: YoutubePartner_v1.Schema.MetadataHistory[]; + items?: YoutubePartner.Schema.MetadataHistory[]; kind?: string; } export interface Order { @@ -715,27 +715,27 @@ declare namespace GoogleAppsScript { contentType?: string; country?: string; customId?: string; - dvdReleaseDate?: YoutubePartner_v1.Schema.Date; - estDates?: YoutubePartner_v1.Schema.DateRange; - events?: YoutubePartner_v1.Schema.StateCompleted[]; + dvdReleaseDate?: YoutubePartner.Schema.Date; + estDates?: YoutubePartner.Schema.DateRange; + events?: YoutubePartner.Schema.StateCompleted[]; id?: string; kind?: string; movie?: string; - originalReleaseDate?: YoutubePartner_v1.Schema.Date; + originalReleaseDate?: YoutubePartner.Schema.Date; priority?: string; productionHouse?: string; purchaseOrder?: string; - requirements?: YoutubePartner_v1.Schema.Requirements; - show?: YoutubePartner_v1.Schema.ShowDetails; + requirements?: YoutubePartner.Schema.Requirements; + show?: YoutubePartner.Schema.ShowDetails; status?: string; videoId?: string; - vodDates?: YoutubePartner_v1.Schema.DateRange; + vodDates?: YoutubePartner.Schema.DateRange; } export interface OrderListResponse { - items?: YoutubePartner_v1.Schema.Order[]; + items?: YoutubePartner.Schema.Order[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; previousPageToken?: string; } export interface Origination { @@ -743,14 +743,14 @@ declare namespace GoogleAppsScript { source?: string; } export interface OwnershipConflicts { - general?: YoutubePartner_v1.Schema.TerritoryConflicts[]; + general?: YoutubePartner.Schema.TerritoryConflicts[]; kind?: string; - mechanical?: YoutubePartner_v1.Schema.TerritoryConflicts[]; - performance?: YoutubePartner_v1.Schema.TerritoryConflicts[]; - synchronization?: YoutubePartner_v1.Schema.TerritoryConflicts[]; + mechanical?: YoutubePartner.Schema.TerritoryConflicts[]; + performance?: YoutubePartner.Schema.TerritoryConflicts[]; + synchronization?: YoutubePartner.Schema.TerritoryConflicts[]; } export interface OwnershipHistoryListResponse { - items?: YoutubePartner_v1.Schema.RightsOwnershipHistory[]; + items?: YoutubePartner.Schema.RightsOwnershipHistory[]; kind?: string; } export interface Package { @@ -761,15 +761,15 @@ declare namespace GoogleAppsScript { locale?: string; name?: string; status?: string; - statusReports?: YoutubePartner_v1.Schema.StatusReport[]; + statusReports?: YoutubePartner.Schema.StatusReport[]; timeCreated?: string; type?: string; uploaderName?: string; } export interface PackageInsertResponse { - errors?: YoutubePartner_v1.Schema.ValidateError[]; + errors?: YoutubePartner.Schema.ValidateError[]; kind?: string; - resource?: YoutubePartner_v1.Schema.Package; + resource?: YoutubePartner.Schema.Package; status?: string; } export interface PageInfo { @@ -782,20 +782,20 @@ declare namespace GoogleAppsScript { id?: string; kind?: string; name?: string; - rules?: YoutubePartner_v1.Schema.PolicyRule[]; + rules?: YoutubePartner.Schema.PolicyRule[]; timeUpdated?: string; } export interface PolicyList { - items?: YoutubePartner_v1.Schema.Policy[]; + items?: YoutubePartner.Schema.Policy[]; kind?: string; } export interface PolicyRule { action?: string; - conditions?: YoutubePartner_v1.Schema.Conditions; + conditions?: YoutubePartner.Schema.Conditions; subaction?: string[]; } export interface PromotedContent { - link?: YoutubePartner_v1.Schema.CampaignTargetLink[]; + link?: YoutubePartner.Schema.CampaignTargetLink[]; } export interface Publisher { caeNumber?: string; @@ -805,10 +805,10 @@ declare namespace GoogleAppsScript { name?: string; } export interface PublisherList { - items?: YoutubePartner_v1.Schema.Publisher[]; + items?: YoutubePartner.Schema.Publisher[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; } export interface Rating { rating?: string; @@ -820,14 +820,14 @@ declare namespace GoogleAppsScript { claimId?: string; contentType?: string; duplicateLeader?: string; - excludedIntervals?: YoutubePartner_v1.Schema.ExcludedInterval[]; + excludedIntervals?: YoutubePartner.Schema.ExcludedInterval[]; fpDirect?: boolean; hashCode?: string; id?: string; ignoreFpMatch?: boolean; kind?: string; length?: Number; - origination?: YoutubePartner_v1.Schema.Origination; + origination?: YoutubePartner.Schema.Origination; status?: string; statusReason?: string; urgent?: boolean; @@ -838,15 +838,15 @@ declare namespace GoogleAppsScript { expiryTime?: string; id?: string; kind?: string; - matches?: YoutubePartner_v1.Schema.ReferenceConflictMatch[]; + matches?: YoutubePartner.Schema.ReferenceConflictMatch[]; originalReferenceId?: string; status?: string; } export interface ReferenceConflictListResponse { - items?: YoutubePartner_v1.Schema.ReferenceConflict[]; + items?: YoutubePartner.Schema.ReferenceConflict[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; } export interface ReferenceConflictMatch { conflicting_reference_offset_ms?: string; @@ -855,10 +855,10 @@ declare namespace GoogleAppsScript { type?: string; } export interface ReferenceListResponse { - items?: YoutubePartner_v1.Schema.Reference[]; + items?: YoutubePartner.Schema.Reference[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; } export interface Requirements { caption?: boolean; @@ -869,16 +869,16 @@ declare namespace GoogleAppsScript { trailer?: boolean; } export interface RightsOwnership { - general?: YoutubePartner_v1.Schema.TerritoryOwners[]; + general?: YoutubePartner.Schema.TerritoryOwners[]; kind?: string; - mechanical?: YoutubePartner_v1.Schema.TerritoryOwners[]; - performance?: YoutubePartner_v1.Schema.TerritoryOwners[]; - synchronization?: YoutubePartner_v1.Schema.TerritoryOwners[]; + mechanical?: YoutubePartner.Schema.TerritoryOwners[]; + performance?: YoutubePartner.Schema.TerritoryOwners[]; + synchronization?: YoutubePartner.Schema.TerritoryOwners[]; } export interface RightsOwnershipHistory { kind?: string; - origination?: YoutubePartner_v1.Schema.Origination; - ownership?: YoutubePartner_v1.Schema.RightsOwnership; + origination?: YoutubePartner.Schema.Origination; + ownership?: YoutubePartner.Schema.RightsOwnership; timeProvided?: string; } export interface Segment { @@ -900,7 +900,7 @@ declare namespace GoogleAppsScript { templateType?: string; } export interface SpreadsheetTemplateListResponse { - items?: YoutubePartner_v1.Schema.SpreadsheetTemplate[]; + items?: YoutubePartner.Schema.SpreadsheetTemplate[]; kind?: string; status?: string; } @@ -917,7 +917,7 @@ declare namespace GoogleAppsScript { type?: string; } export interface TerritoryConflicts { - conflictingOwnership?: YoutubePartner_v1.Schema.ConflictingOwnership[]; + conflictingOwnership?: YoutubePartner.Schema.ConflictingOwnership[]; territory?: string; } export interface TerritoryOwners { @@ -932,7 +932,7 @@ declare namespace GoogleAppsScript { uploaderName?: string; } export interface UploaderListResponse { - items?: YoutubePartner_v1.Schema.Uploader[]; + items?: YoutubePartner.Schema.Uploader[]; kind?: string; } export interface ValidateAsyncRequest { @@ -960,7 +960,7 @@ declare namespace GoogleAppsScript { uploaderName?: string; } export interface ValidateResponse { - errors?: YoutubePartner_v1.Schema.ValidateError[]; + errors?: YoutubePartner.Schema.ValidateError[]; kind?: string; status?: string; } @@ -970,13 +970,13 @@ declare namespace GoogleAppsScript { validationId?: string; } export interface ValidateStatusResponse { - errors?: YoutubePartner_v1.Schema.ValidateError[]; + errors?: YoutubePartner.Schema.ValidateError[]; isMetadataOnly?: boolean; kind?: string; status?: string; } export interface VideoAdvertisingOption { - adBreaks?: YoutubePartner_v1.Schema.AdBreak[]; + adBreaks?: YoutubePartner.Schema.AdBreak[]; adFormats?: string[]; autoGeneratedBreaks?: boolean; breakPosition?: string[]; @@ -987,9 +987,9 @@ declare namespace GoogleAppsScript { tpUrlParameters?: string; } export interface VideoAdvertisingOptionGetEnabledAdsResponse { - adBreaks?: YoutubePartner_v1.Schema.AdBreak[]; + adBreaks?: YoutubePartner.Schema.AdBreak[]; adsOnEmbeds?: boolean; - countriesRestriction?: YoutubePartner_v1.Schema.CountriesRestriction[]; + countriesRestriction?: YoutubePartner.Schema.CountriesRestriction[]; id?: string; kind?: string; } @@ -999,144 +999,144 @@ declare namespace GoogleAppsScript { title?: string; } export interface WhitelistListResponse { - items?: YoutubePartner_v1.Schema.Whitelist[]; + items?: YoutubePartner.Schema.Whitelist[]; kind?: string; nextPageToken?: string; - pageInfo?: YoutubePartner_v1.Schema.PageInfo; + pageInfo?: YoutubePartner.Schema.PageInfo; } } } - export interface YoutubePartner_v1 { - AssetLabels?: YoutubePartner_v1.Collection.AssetLabelsCollection; - AssetMatchPolicy?: YoutubePartner_v1.Collection.AssetMatchPolicyCollection; - AssetRelationships?: YoutubePartner_v1.Collection.AssetRelationshipsCollection; - AssetSearch?: YoutubePartner_v1.Collection.AssetSearchCollection; - AssetShares?: YoutubePartner_v1.Collection.AssetSharesCollection; - Assets?: YoutubePartner_v1.Collection.AssetsCollection; - Campaigns?: YoutubePartner_v1.Collection.CampaignsCollection; - ClaimHistory?: YoutubePartner_v1.Collection.ClaimHistoryCollection; - ClaimSearch?: YoutubePartner_v1.Collection.ClaimSearchCollection; - Claims?: YoutubePartner_v1.Collection.ClaimsCollection; - ContentOwnerAdvertisingOptions?: YoutubePartner_v1.Collection.ContentOwnerAdvertisingOptionsCollection; - ContentOwners?: YoutubePartner_v1.Collection.ContentOwnersCollection; - LiveCuepoints?: YoutubePartner_v1.Collection.LiveCuepointsCollection; - MetadataHistory?: YoutubePartner_v1.Collection.MetadataHistoryCollection; - Orders?: YoutubePartner_v1.Collection.OrdersCollection; - Ownership?: YoutubePartner_v1.Collection.OwnershipCollection; - OwnershipHistory?: YoutubePartner_v1.Collection.OwnershipHistoryCollection; - Package?: YoutubePartner_v1.Collection.PackageCollection; - Policies?: YoutubePartner_v1.Collection.PoliciesCollection; - Publishers?: YoutubePartner_v1.Collection.PublishersCollection; - ReferenceConflicts?: YoutubePartner_v1.Collection.ReferenceConflictsCollection; - References?: YoutubePartner_v1.Collection.ReferencesCollection; - SpreadsheetTemplate?: YoutubePartner_v1.Collection.SpreadsheetTemplateCollection; - Uploader?: YoutubePartner_v1.Collection.UploaderCollection; - Validator?: YoutubePartner_v1.Collection.ValidatorCollection; - VideoAdvertisingOptions?: YoutubePartner_v1.Collection.VideoAdvertisingOptionsCollection; - Whitelists?: YoutubePartner_v1.Collection.WhitelistsCollection; + export interface YoutubePartner { + AssetLabels?: YoutubePartner.Collection.AssetLabelsCollection; + AssetMatchPolicy?: YoutubePartner.Collection.AssetMatchPolicyCollection; + AssetRelationships?: YoutubePartner.Collection.AssetRelationshipsCollection; + AssetSearch?: YoutubePartner.Collection.AssetSearchCollection; + AssetShares?: YoutubePartner.Collection.AssetSharesCollection; + Assets?: YoutubePartner.Collection.AssetsCollection; + Campaigns?: YoutubePartner.Collection.CampaignsCollection; + ClaimHistory?: YoutubePartner.Collection.ClaimHistoryCollection; + ClaimSearch?: YoutubePartner.Collection.ClaimSearchCollection; + Claims?: YoutubePartner.Collection.ClaimsCollection; + ContentOwnerAdvertisingOptions?: YoutubePartner.Collection.ContentOwnerAdvertisingOptionsCollection; + ContentOwners?: YoutubePartner.Collection.ContentOwnersCollection; + LiveCuepoints?: YoutubePartner.Collection.LiveCuepointsCollection; + MetadataHistory?: YoutubePartner.Collection.MetadataHistoryCollection; + Orders?: YoutubePartner.Collection.OrdersCollection; + Ownership?: YoutubePartner.Collection.OwnershipCollection; + OwnershipHistory?: YoutubePartner.Collection.OwnershipHistoryCollection; + Package?: YoutubePartner.Collection.PackageCollection; + Policies?: YoutubePartner.Collection.PoliciesCollection; + Publishers?: YoutubePartner.Collection.PublishersCollection; + ReferenceConflicts?: YoutubePartner.Collection.ReferenceConflictsCollection; + References?: YoutubePartner.Collection.ReferencesCollection; + SpreadsheetTemplate?: YoutubePartner.Collection.SpreadsheetTemplateCollection; + Uploader?: YoutubePartner.Collection.UploaderCollection; + Validator?: YoutubePartner.Collection.ValidatorCollection; + VideoAdvertisingOptions?: YoutubePartner.Collection.VideoAdvertisingOptionsCollection; + Whitelists?: YoutubePartner.Collection.WhitelistsCollection; // Create a new instance of AdBreak - newAdBreak(): YoutubePartner_v1.Schema.AdBreak; + newAdBreak(): YoutubePartner.Schema.AdBreak; // Create a new instance of AdSlot - newAdSlot(): YoutubePartner_v1.Schema.AdSlot; + newAdSlot(): YoutubePartner.Schema.AdSlot; // Create a new instance of AllowedAdvertisingOptions - newAllowedAdvertisingOptions(): YoutubePartner_v1.Schema.AllowedAdvertisingOptions; + newAllowedAdvertisingOptions(): YoutubePartner.Schema.AllowedAdvertisingOptions; // Create a new instance of Asset - newAsset(): YoutubePartner_v1.Schema.Asset; + newAsset(): YoutubePartner.Schema.Asset; // Create a new instance of AssetLabel - newAssetLabel(): YoutubePartner_v1.Schema.AssetLabel; + newAssetLabel(): YoutubePartner.Schema.AssetLabel; // Create a new instance of AssetMatchPolicy - newAssetMatchPolicy(): YoutubePartner_v1.Schema.AssetMatchPolicy; + newAssetMatchPolicy(): YoutubePartner.Schema.AssetMatchPolicy; // Create a new instance of AssetRelationship - newAssetRelationship(): YoutubePartner_v1.Schema.AssetRelationship; + newAssetRelationship(): YoutubePartner.Schema.AssetRelationship; // Create a new instance of Campaign - newCampaign(): YoutubePartner_v1.Schema.Campaign; + newCampaign(): YoutubePartner.Schema.Campaign; // Create a new instance of CampaignData - newCampaignData(): YoutubePartner_v1.Schema.CampaignData; + newCampaignData(): YoutubePartner.Schema.CampaignData; // Create a new instance of CampaignSource - newCampaignSource(): YoutubePartner_v1.Schema.CampaignSource; + newCampaignSource(): YoutubePartner.Schema.CampaignSource; // Create a new instance of CampaignTargetLink - newCampaignTargetLink(): YoutubePartner_v1.Schema.CampaignTargetLink; + newCampaignTargetLink(): YoutubePartner.Schema.CampaignTargetLink; // Create a new instance of Claim - newClaim(): YoutubePartner_v1.Schema.Claim; + newClaim(): YoutubePartner.Schema.Claim; // Create a new instance of ClaimMatchInfo - newClaimMatchInfo(): YoutubePartner_v1.Schema.ClaimMatchInfo; + newClaimMatchInfo(): YoutubePartner.Schema.ClaimMatchInfo; // Create a new instance of ClaimMatchInfoLongestMatch - newClaimMatchInfoLongestMatch(): YoutubePartner_v1.Schema.ClaimMatchInfoLongestMatch; + newClaimMatchInfoLongestMatch(): YoutubePartner.Schema.ClaimMatchInfoLongestMatch; // Create a new instance of ClaimMatchInfoTotalMatch - newClaimMatchInfoTotalMatch(): YoutubePartner_v1.Schema.ClaimMatchInfoTotalMatch; + newClaimMatchInfoTotalMatch(): YoutubePartner.Schema.ClaimMatchInfoTotalMatch; // Create a new instance of ClaimOrigin - newClaimOrigin(): YoutubePartner_v1.Schema.ClaimOrigin; + newClaimOrigin(): YoutubePartner.Schema.ClaimOrigin; // Create a new instance of ClaimedVideoDefaults - newClaimedVideoDefaults(): YoutubePartner_v1.Schema.ClaimedVideoDefaults; + newClaimedVideoDefaults(): YoutubePartner.Schema.ClaimedVideoDefaults; // Create a new instance of Conditions - newConditions(): YoutubePartner_v1.Schema.Conditions; + newConditions(): YoutubePartner.Schema.Conditions; // Create a new instance of ConflictingOwnership - newConflictingOwnership(): YoutubePartner_v1.Schema.ConflictingOwnership; + newConflictingOwnership(): YoutubePartner.Schema.ConflictingOwnership; // Create a new instance of ContentOwnerAdvertisingOption - newContentOwnerAdvertisingOption(): YoutubePartner_v1.Schema.ContentOwnerAdvertisingOption; + newContentOwnerAdvertisingOption(): YoutubePartner.Schema.ContentOwnerAdvertisingOption; // Create a new instance of CuepointSettings - newCuepointSettings(): YoutubePartner_v1.Schema.CuepointSettings; + newCuepointSettings(): YoutubePartner.Schema.CuepointSettings; // Create a new instance of Date - newDate(): YoutubePartner_v1.Schema.Date; + newDate(): YoutubePartner.Schema.Date; // Create a new instance of DateRange - newDateRange(): YoutubePartner_v1.Schema.DateRange; + newDateRange(): YoutubePartner.Schema.DateRange; // Create a new instance of ExcludedInterval - newExcludedInterval(): YoutubePartner_v1.Schema.ExcludedInterval; + newExcludedInterval(): YoutubePartner.Schema.ExcludedInterval; // Create a new instance of IntervalCondition - newIntervalCondition(): YoutubePartner_v1.Schema.IntervalCondition; + newIntervalCondition(): YoutubePartner.Schema.IntervalCondition; // Create a new instance of LiveCuepoint - newLiveCuepoint(): YoutubePartner_v1.Schema.LiveCuepoint; + newLiveCuepoint(): YoutubePartner.Schema.LiveCuepoint; // Create a new instance of MatchSegment - newMatchSegment(): YoutubePartner_v1.Schema.MatchSegment; + newMatchSegment(): YoutubePartner.Schema.MatchSegment; // Create a new instance of Metadata - newMetadata(): YoutubePartner_v1.Schema.Metadata; + newMetadata(): YoutubePartner.Schema.Metadata; // Create a new instance of Order - newOrder(): YoutubePartner_v1.Schema.Order; + newOrder(): YoutubePartner.Schema.Order; // Create a new instance of Origination - newOrigination(): YoutubePartner_v1.Schema.Origination; + newOrigination(): YoutubePartner.Schema.Origination; // Create a new instance of OwnershipConflicts - newOwnershipConflicts(): YoutubePartner_v1.Schema.OwnershipConflicts; + newOwnershipConflicts(): YoutubePartner.Schema.OwnershipConflicts; // Create a new instance of Package - newPackage(): YoutubePartner_v1.Schema.Package; + newPackage(): YoutubePartner.Schema.Package; // Create a new instance of Policy - newPolicy(): YoutubePartner_v1.Schema.Policy; + newPolicy(): YoutubePartner.Schema.Policy; // Create a new instance of PolicyRule - newPolicyRule(): YoutubePartner_v1.Schema.PolicyRule; + newPolicyRule(): YoutubePartner.Schema.PolicyRule; // Create a new instance of PromotedContent - newPromotedContent(): YoutubePartner_v1.Schema.PromotedContent; + newPromotedContent(): YoutubePartner.Schema.PromotedContent; // Create a new instance of Rating - newRating(): YoutubePartner_v1.Schema.Rating; + newRating(): YoutubePartner.Schema.Rating; // Create a new instance of Reference - newReference(): YoutubePartner_v1.Schema.Reference; + newReference(): YoutubePartner.Schema.Reference; // Create a new instance of Requirements - newRequirements(): YoutubePartner_v1.Schema.Requirements; + newRequirements(): YoutubePartner.Schema.Requirements; // Create a new instance of RightsOwnership - newRightsOwnership(): YoutubePartner_v1.Schema.RightsOwnership; + newRightsOwnership(): YoutubePartner.Schema.RightsOwnership; // Create a new instance of Segment - newSegment(): YoutubePartner_v1.Schema.Segment; + newSegment(): YoutubePartner.Schema.Segment; // Create a new instance of ShowDetails - newShowDetails(): YoutubePartner_v1.Schema.ShowDetails; + newShowDetails(): YoutubePartner.Schema.ShowDetails; // Create a new instance of StateCompleted - newStateCompleted(): YoutubePartner_v1.Schema.StateCompleted; + newStateCompleted(): YoutubePartner.Schema.StateCompleted; // Create a new instance of StatusReport - newStatusReport(): YoutubePartner_v1.Schema.StatusReport; + newStatusReport(): YoutubePartner.Schema.StatusReport; // Create a new instance of TerritoryCondition - newTerritoryCondition(): YoutubePartner_v1.Schema.TerritoryCondition; + newTerritoryCondition(): YoutubePartner.Schema.TerritoryCondition; // Create a new instance of TerritoryConflicts - newTerritoryConflicts(): YoutubePartner_v1.Schema.TerritoryConflicts; + newTerritoryConflicts(): YoutubePartner.Schema.TerritoryConflicts; // Create a new instance of TerritoryOwners - newTerritoryOwners(): YoutubePartner_v1.Schema.TerritoryOwners; + newTerritoryOwners(): YoutubePartner.Schema.TerritoryOwners; // Create a new instance of ValidateAsyncRequest - newValidateAsyncRequest(): YoutubePartner_v1.Schema.ValidateAsyncRequest; + newValidateAsyncRequest(): YoutubePartner.Schema.ValidateAsyncRequest; // Create a new instance of ValidateRequest - newValidateRequest(): YoutubePartner_v1.Schema.ValidateRequest; + newValidateRequest(): YoutubePartner.Schema.ValidateRequest; // Create a new instance of ValidateStatusRequest - newValidateStatusRequest(): YoutubePartner_v1.Schema.ValidateStatusRequest; + newValidateStatusRequest(): YoutubePartner.Schema.ValidateStatusRequest; // Create a new instance of VideoAdvertisingOption - newVideoAdvertisingOption(): YoutubePartner_v1.Schema.VideoAdvertisingOption; + newVideoAdvertisingOption(): YoutubePartner.Schema.VideoAdvertisingOption; // Create a new instance of Whitelist - newWhitelist(): YoutubePartner_v1.Schema.Whitelist; + newWhitelist(): YoutubePartner.Schema.Whitelist; } } -declare var YoutubePartner_v1: GoogleAppsScript.YoutubePartner_v1; \ No newline at end of file +declare var YoutubePartner: GoogleAppsScript.YoutubePartner; diff --git a/types/google-apps-script/google-apps-script-events.d.ts b/types/google-apps-script/google-apps-script-events.d.ts new file mode 100644 index 0000000000..cfbf8f8b06 --- /dev/null +++ b/types/google-apps-script/google-apps-script-events.d.ts @@ -0,0 +1,67 @@ +// Type definitions for Google Apps Script 2019-04-02 +// Project: https://developers.google.com/apps-script/ +// Definitions by: grant +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// + +declare namespace GoogleAppsScript { + /** + * Google Apps Script Events + * @see https://developers.google.com/apps-script/guides/triggers/events + */ + export module Events { + // Internal interfaces + interface AppsScriptEvent { + authMode: Script.AuthMode, + triggerUid: string, + user: Base.User, + } + + // External interfaces + export interface SheetsOnOpen extends AppsScriptEvent { + source: Spreadsheet.Spreadsheet, + } + + enum SheetsOnChangeChangeType { EDIT, INSERT_ROW, INSERT_COLUMN, REMOVE_ROW, REMOVE_COLUMN, INSERT_GRID, REMOVE_GRID, FORMAT, OTHER } + export interface SheetsOnChange extends AppsScriptEvent { + changeType: SheetsOnChangeChangeType, + } + + export interface SheetsOnEdit extends AppsScriptEvent { + oldValue: string, + range: Spreadsheet.Range, + source: Spreadsheet.Spreadsheet, + value: string, + } + + export interface FormsOnSubmit extends AppsScriptEvent { + namedValues: { [key: string]: string[]; }, + range: Spreadsheet.Range, + values: string[], + } + + export interface DocsOnOpen extends AppsScriptEvent { + source: Document.Document, + } + + export interface SlidesOnOpen extends AppsScriptEvent { + source: Slides.Presentation, + } + + export interface FormsOnOpen extends AppsScriptEvent { + source: Forms.Form, + } + + // TODO: Is there a `user` attribute? + export interface CalendarEventUpdated extends AppsScriptEvent { + calendarId: string, + } + + export interface AddonOnInstall { + authMode: Script.AuthMode, + } + } +} \ No newline at end of file diff --git a/types/google-apps-script/google-apps-script-tests.ts b/types/google-apps-script/google-apps-script-tests.ts index 54248f511d..67a960a87f 100644 --- a/types/google-apps-script/google-apps-script-tests.ts +++ b/types/google-apps-script/google-apps-script-tests.ts @@ -38,17 +38,16 @@ const postTest = (payload: Object): string => { }; // Advanced Services -Slides_v1.Presentations.Pages.getThumbnail('presentationId', 'pageId'); +Slides.Presentations.Pages.getThumbnail('presentationId', 'pageId'); // Calendar (Advanced service) -declare const Calendar: GoogleAppsScript.Calendar_v3; const createEvent = (): void => { const calendarId = 'primary'; const start = new Date(); const end = new Date(); start.setHours(10); end.setHours(11); - let event: GoogleAppsScript.Calendar_v3.Schema.Event = { + let event: GoogleAppsScript.Calendar.Schema.Event = { summary: 'Lunch Meeting', location: 'The Deli', description: 'To discuss our plans for the presentation next week.', @@ -70,11 +69,9 @@ const createEvent = (): void => { } // Admin Directory (Advanced service) -declare const AdminDirectory: GoogleAppsScript.Admin_directory_v1; - const listAllUsers = () => { let pageToken: string; - let page: GoogleAppsScript.Admin_directory_v1.Schema.Users; + let page: GoogleAppsScript.AdminDirectory.Schema.Users; do { page = AdminDirectory.Users.list({ domain: 'example.com', @@ -82,7 +79,7 @@ const listAllUsers = () => { maxResults: 100, pageToken: pageToken }); - const users: GoogleAppsScript.Admin_directory_v1.Schema.User[] = page.users; + const users: GoogleAppsScript.AdminDirectory.Schema.User[] = page.users; if (users) { for (const user of users) { Logger.log('%s (%s)', user.name.fullName, user.primaryEmail); diff --git a/types/google-apps-script/google-apps-script.calendar.d.ts b/types/google-apps-script/google-apps-script.calendar.d.ts index 3665b30e9e..502d34ac52 100644 --- a/types/google-apps-script/google-apps-script.calendar.d.ts +++ b/types/google-apps-script/google-apps-script.calendar.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2018-07-11 +// Type definitions for Google Apps Script 2019-04-09 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/google-apps-script/google-apps-script.card-service.d.ts b/types/google-apps-script/google-apps-script.card-service.d.ts index 64f5194595..76caae381e 100644 --- a/types/google-apps-script/google-apps-script.card-service.d.ts +++ b/types/google-apps-script/google-apps-script.card-service.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2018-12-26 +// Type definitions for Google Apps Script 2019-04-09 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -37,7 +37,6 @@ declare namespace GoogleAppsScript { * // An action that shows a notification. * var actionResponse = CardService.newActionResponseBuilder() * .setNotification(CardService.newNotification() - * .setType(CardService.NotificationType.INFO) * .setText("Some info to display to user")) * .build(); * @@ -255,7 +254,6 @@ declare namespace GoogleAppsScript { Icon: typeof Icon; ImageStyle: typeof ImageStyle; LoadIndicator: typeof LoadIndicator; - NotificationType: typeof NotificationType; OnClose: typeof OnClose; OpenAs: typeof OpenAs; SelectionInputType: typeof SelectionInputType; @@ -438,14 +436,12 @@ declare namespace GoogleAppsScript { * function notificationCallback() { * return CardService.newActionResponseBuilder() * .setNotification(CardService.newNotification() - * .setType(CardService.NotificationType.WARNING) * .setText("Some info to display to user")) * .build(); * } */ export interface Notification { setText(text: string): Notification; - setType(type: NotificationType): Notification; } /** @@ -590,7 +586,8 @@ declare namespace GoogleAppsScript { } /** - * A TextButton with a text label. + * A TextButton with a text label. You can set the background color and disable the button when + * needed. * * var textButton = CardService.newTextButton() * .setText("Open Link") diff --git a/types/google-apps-script/google-apps-script.charts.d.ts b/types/google-apps-script/google-apps-script.charts.d.ts index 5898092bb4..85031a0496 100644 --- a/types/google-apps-script/google-apps-script.charts.d.ts +++ b/types/google-apps-script/google-apps-script.charts.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2018-12-26 +// Type definitions for Google Apps Script 2019-04-09 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -14,7 +14,6 @@ declare namespace GoogleAppsScript { * * Here is an example that shows how to build an area chart. * - * function doGet() { * // Create a data table with some sample data. * var sampleData = Charts.newDataTable() * .addColumn(Charts.ColumnType.STRING, "Month") @@ -43,9 +42,6 @@ declare namespace GoogleAppsScript { * .setColors(['red', 'green']) * .setDataTable(sampleData) * .build(); - * - * return UiApp.createApplication().add(chart); - * } */ export interface AreaChartBuilder { build(): Chart; @@ -80,7 +76,6 @@ declare namespace GoogleAppsScript { * Here is an example that shows how to build a bar chart. The data is imported from a * Google spreadsheet. * - * function doGet() { * // Get sample data from a spreadsheet. * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=B1%3AC11' + * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=0&headers=-1'; @@ -94,8 +89,6 @@ declare namespace GoogleAppsScript { * .setDataSourceUrl(dataSourceUrl); * * var chart = chartBuilder.build(); - * return UiApp.createApplication().add(chart); - * } */ export interface BarChartBuilder { build(): Chart; @@ -128,58 +121,11 @@ declare namespace GoogleAppsScript { * A builder for category filter controls. * * A category filter is a picker to choose one or more between a set of defined values. Given a - * column of type string, this control will filter out the rows that don't match any of the picked + * column of type string, this control filters out the rows that don't match any of the picked * values. * - * Here is an example that creates a table chart a binds a category filter to it. This allows the - * user to filter the data the table displays. - * - * function doGet() { - * var app = UiApp.createApplication(); - * var sampleData = Charts.newDataTable() - * .addColumn(Charts.ColumnType.STRING, "Month") - * .addColumn(Charts.ColumnType.NUMBER, "Dining") - * .addColumn(Charts.ColumnType.NUMBER, "Total") - * .addRow(["Jan", 60, 520]) - * .addRow(["Feb", 50, 430]) - * .addRow(["Mar", 53, 440]) - * .addRow(["Apr", 70, 410]) - * .addRow(["May", 80, 390]) - * .addRow(["Jun", 60, 500]) - * .addRow(["Jul", 100, 450]) - * .addRow(["Aug", 140, 431]) - * .addRow(["Sep", 75, 488]) - * .addRow(["Oct", 70, 521]) - * .addRow(["Nov", 58, 388]) - * .addRow(["Dec", 63, 400]) - * .build(); - * - * var chart = Charts.newTableChart() - * .setDimensions(600, 500) - * .build(); - * - * var categoryFilter = Charts.newCategoryFilter() - * .setFilterColumnLabel("Month") - * .setAllowMultiple(true) - * .setSortValues(true) - * .setLabelStacking(Charts.Orientation.VERTICAL) - * .setCaption('Choose categories...') - * .build(); - * - * var panel = app.createVerticalPanel().setSpacing(10); - * panel.add(categoryFilter).add(chart); - * - * var dashboard = Charts.newDashboardPanel() - * .setDataTable(sampleData) - * .bind(categoryFilter, chart) - * .build(); - * - * dashboard.add(panel); - * app.add(dashboard); - * return app; - * } - * - * documentation + * For more details, see the Gviz + * documentation. */ export interface CategoryFilterBuilder { build(): Control; @@ -305,32 +251,28 @@ declare namespace GoogleAppsScript { * * This example shows how to create a column chart with data from a data table. * - * function doGet() { - * var sampleData = Charts.newDataTable() - * .addColumn(Charts.ColumnType.STRING, "Year") - * .addColumn(Charts.ColumnType.NUMBER, "Sales") - * .addColumn(Charts.ColumnType.NUMBER, "Expenses") - * .addRow(["2004", 1000, 400]) - * .addRow(["2005", 1170, 460]) - * .addRow(["2006", 660, 1120]) - * .addRow(["2007", 1030, 540]) - * .addRow(["2008", 800, 600]) - * .addRow(["2009", 943, 678]) - * .addRow(["2010", 1020, 550]) - * .addRow(["2011", 910, 700]) - * .addRow(["2012", 1230, 840]) - * .build(); + * var sampleData = Charts.newDataTable() + * .addColumn(Charts.ColumnType.STRING, "Year") + * .addColumn(Charts.ColumnType.NUMBER, "Sales") + * .addColumn(Charts.ColumnType.NUMBER, "Expenses") + * .addRow(["2004", 1000, 400]) + * .addRow(["2005", 1170, 460]) + * .addRow(["2006", 660, 1120]) + * .addRow(["2007", 1030, 540]) + * .addRow(["2008", 800, 600]) + * .addRow(["2009", 943, 678]) + * .addRow(["2010", 1020, 550]) + * .addRow(["2011", 910, 700]) + * .addRow(["2012", 1230, 840]) + * .build(); * - * var chart = Charts.newColumnChart() - * .setTitle('Sales vs. Expenses') - * .setXAxisTitle('Year') - * .setYAxisTitle('Amount (USD)') - * .setDimensions(600, 500) - * .setDataTable(sampleData) - * .build(); - * - * return UiApp.createApplication().add(chart); - * } + * var chart = Charts.newColumnChart() + * .setTitle('Sales & Expenses') + * .setXAxisTitle('Year') + * .setYAxisTitle('Amount (USD)') + * .setDimensions(600, 500) + * .setDataTable(sampleData) + * .build(); */ export interface ColumnChartBuilder { build(): Chart; @@ -370,9 +312,9 @@ declare namespace GoogleAppsScript { * pickers, range sliders, autocompleters, etc.) users interact with in order to drive the data * managed by a dashboard and the charts that are part of it. Controls collect user input and use * the information to decide which of the data the dashboard is managing should be made available to - * the charts that are part of it. Given a data table, a control will filter out the data that - * doesn't comply with the conditions implied by its current state, and will expose the filtered - * data table as an output. + * the charts that are part of it. Given a data table, a control filters out the data that doesn't + * comply with the conditions implied by its current state, and exposes the filtered data table as + * an output. * * For more details, see the Gviz documentation. */ @@ -394,8 +336,8 @@ declare namespace GoogleAppsScript { * Controls are user interface widgets (category pickers, range sliders, autocompleters, etc.) * users interact with in order to drive the data managed by a dashboard and the charts that are * part of it. For example, a string filter control is a simple text input field that lets the user - * filter data via string matching. Given a column and matching options, the control will filter out - * the rows that don't match the term that's in the input field. + * filter data via string matching. Given a column and matching options, the control filters out the + * rows that don't match the term that's in the input field. * * The Gviz API defines a dashboard as a set of charts and controls bound together. The bindings * between the different components define the data flow, the state of the controls filters views of @@ -405,50 +347,6 @@ declare namespace GoogleAppsScript { * The dashboard panel has two purposes, one is being a container for the charts and controls * objects that compose the dashboard, and the other is holding the data and use as an interface for * binding controls to charts. - * - * Here's an example of creating a dashboard and showing it in a UI app: - * - * function doGet() { - * // Create a data table with some sample data. - * var data = Charts.newDataTable() - * .addColumn(Charts.ColumnType.STRING, "Name") - * .addColumn(Charts.ColumnType.NUMBER, "Age") - * .addRow(["Michael", 18]) - * .addRow(["Elisa", 12]) - * .addRow(["John", 20]) - * .addRow(["Jessica", 25]) - * .addRow(["Aaron", 14]) - * .addRow(["Margareth", 19]) - * .addRow(["Miranda", 22]) - * .addRow(["May", 20]) - * .build(); - * - * var chart = Charts.newBarChart() - * .setTitle("Ages") - * .build(); - * - * var control = Charts.newStringFilter() - * .setFilterColumnLabel("Name") - * .build(); - * - * // Bind the control to the chart in a dashboard panel. - * var dashboard = Charts.newDashboardPanel() - * .setDataTable(data) - * .bind(control, chart) - * .build(); - * - * var uiApp = UiApp.createApplication().setTitle("My Dashboard"); - * - * var panel = uiApp.createHorizontalPanel() - * .setVerticalAlignment(UiApp.VerticalAlignment.MIDDLE) - * .setSpacing(50); - * - * panel.add(control); - * panel.add(chart); - * dashboard.add(panel); - * uiApp.add(dashboard); - * return uiApp; - * } */ export interface DashboardPanel { getId(): string; @@ -520,9 +418,9 @@ declare namespace GoogleAppsScript { * * Data view definition can be set for charts to visualize a view derived from the given data * table and not the data table itself. For example if the view definition of a chart states that - * the view columns are [0, 3], only the first and the third columns of the data table will be taken - * into consideration when drawing the chart. See DataViewDefinitionBuilder for an example - * on how to define and use a DataViewDefinition. + * the view columns are [0, 3], only the first and the third columns of the data table is taken into + * consideration when drawing the chart. See DataViewDefinitionBuilder for an example on how + * to define and use a DataViewDefinition. */ export interface DataViewDefinition { } @@ -578,7 +476,6 @@ declare namespace GoogleAppsScript { * * Here is an example that shows how to build a line chart. The data is imported from a Google spreadsheet. * - * function doGet() { * // Get sample data from a spreadsheet. * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AG5' + * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=2&headers=-1'; @@ -593,8 +490,6 @@ declare namespace GoogleAppsScript { * .setDataSourceUrl(dataSourceUrl); * * var chart = chartBuilder.build(); - * return UiApp.createApplication().add(chart); - * } */ export interface LineChartBuilder { build(): Chart; @@ -625,8 +520,8 @@ declare namespace GoogleAppsScript { /** * An enumeration of how a string value should be matched. Matching a string is a boolean operation. - * Given a string, a match term (string), and a match type, the operation will output true in the - * following cases: + * Given a string, a match term (string), and a match type, the operation outputs true in + * the following cases: * * If the match type equals EXACT and the match term equals the string. * @@ -644,43 +539,11 @@ declare namespace GoogleAppsScript { * A builder for number range filter controls. * * A number range filter is a slider with two thumbs that lets the user select ranges of numeric - * values. Given a column of type number and matching options, this control will filter out the rows + * values. Given a column of type number and matching options, this control filters out the rows * that don't match the range that was selected. * - * This example creates a table chart bound to a number range filter: - * - * function doGet() { - * var app = UiApp.createApplication(); - * // Get sample data from a spreadsheet. - * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AF' + - * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1'; - * var data = SpreadsheetApp.openByUrl(dataSourceUrl).getSheetByName('US_GDP').getRange("A1:F"); - * - * var chart = Charts.newTableChart() - * .setDimensions(600, 500) - * .build(); - * - * var numberRangeFilter = Charts.newNumberRangeFilter() - * .setFilterColumnLabel("Year") - * .setShowRangeValues(true) - * .setLabel("Restrict year range") - * .build(); - * - * var panel = app.createVerticalPanel().setSpacing(10); - * panel.add(numberRangeFilter).add(chart); - * - * // Create a new dashboard panel to bind the filter and chart together. - * var dashboard = Charts.newDashboardPanel() - * .setDataTable(data) - * .bind(numberRangeFilter, chart) - * .build(); - * - * dashboard.add(panel); - * app.add(dashboard); - * return app; - * } - * - * documentation + * For more details, see the Gviz + * documentation. */ export interface NumberRangeFilterBuilder { build(): Control; @@ -713,7 +576,6 @@ declare namespace GoogleAppsScript { * * Here is an example that shows how to build a pie chart. The data is imported from a Google spreadsheet. * - * function doGet() { * // Get sample data from a spreadsheet. * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AB8' + * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=3&headers=-1'; @@ -725,8 +587,6 @@ declare namespace GoogleAppsScript { * .setDataSourceUrl(dataSourceUrl); * * var chart = chartBuilder.build(); - * return UiApp.createApplication().add(chart); - * } */ export interface PieChartBuilder { build(): Chart; @@ -761,22 +621,19 @@ declare namespace GoogleAppsScript { * * Here is an example that shows how to build a scatter chart. The data is imported from a Google spreadsheet. * - * function doGet() { - * // Get sample data from a spreadsheet. - * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=C1%3AD' + - * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1'; + * // Get sample data from a spreadsheet. + * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=C1%3AD' + + * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1'; * - * var chartBuilder = Charts.newScatterChart() - * .setTitle('Adjusted GDP vs. U.S. Population') - * .setXAxisTitle('U.S. Population (millions)') - * .setYAxisTitle('Adjusted GDP ($ billions)') - * .setDimensions(600, 500) - * .setLegendPosition(Charts.Position.NONE) - * .setDataSourceUrl(dataSourceUrl); + * var chartBuilder = Charts.newScatterChart() + * .setTitle('Adjusted GDP & U.S. Population') + * .setXAxisTitle('U.S. Population (millions)') + * .setYAxisTitle('Adjusted GDP ($ billions)') + * .setDimensions(600, 500) + * .setLegendPosition(Charts.Position.NONE) + * .setDataSourceUrl(dataSourceUrl); * - * var chart = chartBuilder.build(); - * return UiApp.createApplication().add(chart); - * } + * var chart = chartBuilder.build(); */ export interface ScatterChartBuilder { build(): Chart; @@ -809,58 +666,11 @@ declare namespace GoogleAppsScript { * A builder for string filter controls. * * A string filter is a simple text input field that lets the user filter data via string - * matching. Given a column of type string and matching options, this control will filter out the - * rows that don't match the term that's in the input field. + * matching. Given a column of type string and matching options, this control filters out the rows + * that don't match the term that's in the input field. * - * This example creates a table chart and binds it to a string filter. Using the filter, it is - * possible to change the table chart to display a subset of its data. - * - * function doGet() { - * var app = UiApp.createApplication(); - * var sampleData = Charts.newDataTable() - * .addColumn(Charts.ColumnType.STRING, "Month") - * .addColumn(Charts.ColumnType.NUMBER, "Dining") - * .addColumn(Charts.ColumnType.NUMBER, "Total") - * .addRow(["Jan", 60, 520]) - * .addRow(["Feb", 50, 430]) - * .addRow(["Mar", 53, 440]) - * .addRow(["Apr", 70, 410]) - * .addRow(["May", 80, 390]) - * .addRow(["Jun", 60, 500]) - * .addRow(["Jul", 100, 450]) - * .addRow(["Aug", 140, 431]) - * .addRow(["Sep", 75, 488]) - * .addRow(["Oct", 70, 521]) - * .addRow(["Nov", 58, 388]) - * .addRow(["Dec", 63, 400]) - * .build(); - * - * var chart = Charts.newTableChart() - * .setDimensions(600, 500) - * .build(); - * - * var stringFilter = Charts.newStringFilter() - * .setFilterColumnLabel("Month") - * .setRealtimeTrigger(true) - * .setCaseSensitive(true) - * .setLabel("Filter months shown") - * .build(); - * - * var panel = app.createVerticalPanel().setSpacing(10); - * panel.add(stringFilter).add(chart); - * - * // Create a dashboard panel to bind the filter and the chart together. - * var dashboard = Charts.newDashboardPanel() - * .setDataTable(sampleData) - * .bind(stringFilter, chart) - * .build(); - * - * dashboard.add(panel); - * app.add(dashboard); - * return app; - * } - * - * documentation + * For more details, see the Gviz + * documentation. */ export interface StringFilterBuilder { build(): Control; @@ -881,19 +691,16 @@ declare namespace GoogleAppsScript { * * Here is an example that shows how to build a table chart. The data is imported from a Google spreadsheet. * - * function doGet() { - * // Get sample data from a spreadsheet. - * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AF' + - * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1'; + * // Get sample data from a spreadsheet. + * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AF' + + * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1'; * - * var chartBuilder = Charts.newTableChart() - * .setDimensions(600, 500) - * .enablePaging(20) - * .setDataSourceUrl(dataSourceUrl); + * var chartBuilder = Charts.newTableChart() + * .setDimensions(600, 500) + * .enablePaging(20) + * .setDataSourceUrl(dataSourceUrl); * - * var chart = chartBuilder.build(); - * return UiApp.createApplication().add(chart); - * } + * var chart = chartBuilder.build(); */ export interface TableChartBuilder { build(): Chart; @@ -920,7 +727,6 @@ declare namespace GoogleAppsScript { * that accepts it, such as title, horizontal axis, vertical axis, legend and tooltip. * * // This example creates a chart specifying different text styles for the title and axes. - * function doGet() { * var sampleData = Charts.newDataTable() * .addColumn(Charts.ColumnType.STRING, "Seasons") * .addColumn(Charts.ColumnType.NUMBER, "Rainy Days") @@ -946,9 +752,6 @@ declare namespace GoogleAppsScript { * .setYAxisTitle('Number of Rainy Days') * .setDataTable(sampleData) * .build(); - * - * return UiApp.createApplication().add(chart); - * } */ export interface TextStyle { getColor(): string; diff --git a/types/google-apps-script/google-apps-script.data-studio.d.ts b/types/google-apps-script/google-apps-script.data-studio.d.ts index c86bd39447..eb564d3c06 100644 --- a/types/google-apps-script/google-apps-script.data-studio.d.ts +++ b/types/google-apps-script/google-apps-script.data-studio.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-02-27 +// Type definitions for Google Apps Script 2019-04-09 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -10,13 +10,43 @@ declare namespace GoogleAppsScript { /** * An enum that defines the aggregation types that can be set for a Field. */ - export enum AggregationType { NO_AGGREGATION, AVG, COUNT, COUNT_DISTINCT, MAX, MIN, SUM } + export enum AggregationType { AVG, COUNT, COUNT_DISTINCT, MAX, MIN, SUM, AUTO, NO_AGGREGATION } /** * An enum that defines the authentication types that can be set for a connector. */ export enum AuthType { NONE, OAUTH2, USER_PASS, KEY, USER_TOKEN } + /** + * A configuration object for a native BigQuery connector. Return this object from getData() + * for Data Studio to query BigQuery for the connector. + * + * var cc = DataStudioApp.createCommunityConnector(); + * var types = cc.BigQueryParameterType; + * + * var bqConfig = cc.newBigQueryConfig() + * .setBillingProjectId('billingProjectId') + * .setQuery('queryString') + * .setUseStandardSql(true) + * .setAccessToken('accessToken') + * .addQueryParameter('dob', types.STRING, '01011990') + * .build(); + */ + export interface BigQueryConfig { + addQueryParameter(name: string, type: BigQueryParameterType, value: string): BigQueryConfig; + build(): Object; + printJson(): string; + setAccessToken(accessToken: string): BigQueryConfig; + setBillingProjectId(billingProjectId: string): BigQueryConfig; + setQuery(query: string): BigQueryConfig; + setUseStandardSql(useStandardSql: boolean): BigQueryConfig; + } + + /** + * An enum that defines the BigQuery parameter types that you can set. + */ + export enum BigQueryParameterType { STRING, INT64, BOOL, FLOAT64 } + /** * Contains checkbox information for the config. Its properties determine how the checkbox is * displayed in Data Studio. @@ -53,10 +83,12 @@ declare namespace GoogleAppsScript { export interface CommunityConnector { AggregationType: typeof AggregationType; AuthType: typeof AuthType; + BigQueryParameterType: typeof BigQueryParameterType; FieldType: typeof FieldType; getConfig(): Config; getFields(): Fields; newAuthTypeResponse(): GetAuthTypeResponse; + newBigQueryConfig(): BigQueryConfig; newDebugError(): DebugError; newUserError(): UserError; } @@ -279,7 +311,7 @@ declare namespace GoogleAppsScript { * .setLabel("second option label") * .setValue("option_value_2"); * - * var info1 = config.newSelectMultiple() + * var info1 = config.newSelectSingle() * .setId("api_endpoint") * .setName("Data Type") * .setHelpText("Select the data type you're interested in.") diff --git a/types/google-apps-script/google-apps-script.maps.d.ts b/types/google-apps-script/google-apps-script.maps.d.ts index 985def200b..c05e044177 100644 --- a/types/google-apps-script/google-apps-script.maps.d.ts +++ b/types/google-apps-script/google-apps-script.maps.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2018-07-11 +// Type definitions for Google Apps Script 2019-04-09 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -226,35 +226,29 @@ declare namespace GoogleAppsScript { * The example below shows how you can use this class to create a map of New York City's Theatre * District, including nearby train stations, and display it in a simple web app. * - * function doGet(event) { - * // Create a map centered on Times Square. - * var map = Maps.newStaticMap() - * .setSize(600, 600) - * .setCenter('Times Square, New York, NY'); + * // Create a map centered on Times Square. + * var map = Maps.newStaticMap() + * .setSize(600, 600) + * .setCenter('Times Square, New York, NY'); * - * // Add markers for the nearbye train stations. - * map.setMarkerStyle(Maps.StaticMap.MarkerSize.MID, Maps.StaticMap.Color.RED, 'T'); - * map.addMarker('Grand Central Station, New York, NY'); - * map.addMarker('Penn Station, New York, NY'); + * // Add markers for the nearbye train stations. + * map.setMarkerStyle(Maps.StaticMap.MarkerSize.MID, Maps.StaticMap.Color.RED, 'T'); + * map.addMarker('Grand Central Station, New York, NY'); + * map.addMarker('Penn Station, New York, NY'); * - * // Show the boundaries of the Theatre District. - * var corners = [ - * '8th Ave & 53rd St, New York, NY', - * '6th Ave & 53rd St, New York, NY', - * '6th Ave & 40th St, New York, NY', - * '8th Ave & 40th St, New York, NY' - * ]; - * map.setPathStyle(4, Maps.StaticMap.Color.BLACK, Maps.StaticMap.Color.BLUE); - * map.beginPath(); - * for (var i = 0; i < corners.length; i++) { - * map.addAddress(corners[i]); - * } - * - * // Create the user interface and add the map image. - * var app = UiApp.createApplication().setTitle('NYC Theatre District'); - * app.add(app.createImage(map.getMapUrl())); - * return app; + * // Show the boundaries of the Theatre District. + * var corners = [ + * '8th Ave & 53rd St, New York, NY', + * '6th Ave & 53rd St, New York, NY', + * '6th Ave & 40th St, New York, NY', + * '8th Ave & 40th St, New York, NY' + * ]; + * map.setPathStyle(4, Maps.StaticMap.Color.BLACK, Maps.StaticMap.Color.BLUE); + * map.beginPath(); + * for (var i = 0; i < corners.length; i++) { + * map.addAddress(corners[i]); * } + * var url = map.getMapUrl(); * * See also * diff --git a/types/google-apps-script/google-apps-script.slides.d.ts b/types/google-apps-script/google-apps-script.slides.d.ts index 1619d92369..8cbf220b08 100644 --- a/types/google-apps-script/google-apps-script.slides.d.ts +++ b/types/google-apps-script/google-apps-script.slides.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-01-06 +// Type definitions for Google Apps Script 2019-04-09 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -1195,6 +1195,7 @@ declare namespace GoogleAppsScript { SelectionType: typeof SelectionType; ShapeType: typeof ShapeType; SheetsChartEmbedType: typeof SheetsChartEmbedType; + SlideLinkingMode: typeof SlideLinkingMode; SlidePosition: typeof SlidePosition; SpacingMode: typeof SpacingMode; TextBaselineOffset: typeof TextBaselineOffset; diff --git a/types/google-apps-script/google-apps-script.spreadsheet.d.ts b/types/google-apps-script/google-apps-script.spreadsheet.d.ts index ba28d9719c..a67d8409c6 100644 --- a/types/google-apps-script/google-apps-script.spreadsheet.d.ts +++ b/types/google-apps-script/google-apps-script.spreadsheet.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-02-27 +// Type definitions for Google Apps Script 2019-04-09 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -383,6 +383,9 @@ declare namespace GoogleAppsScript { getCriteriaType(): DataValidationCriteria; getCriteriaValues(): Object[]; getHelpText(): string; + requireCheckbox(): DataValidationBuilder; + requireCheckbox(checkedValue: Object): DataValidationBuilder; + requireCheckbox(checkedValue: Object, uncheckedValue: Object): DataValidationBuilder; requireDate(): DataValidationBuilder; requireDateAfter(date: Date): DataValidationBuilder; requireDateBefore(date: Date): DataValidationBuilder; @@ -527,6 +530,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; getChartType(): Charts.ChartType; getContainer(): ContainerInfo; getRanges(): Range[]; @@ -573,6 +577,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; getChartType(): Charts.ChartType; getContainer(): ContainerInfo; getRanges(): Range[]; @@ -633,6 +638,7 @@ declare namespace GoogleAppsScript { export interface EmbeddedChart { getAs(contentType: string): Base.Blob; getBlob(): Base.Blob; + getChartId(): Integer; getContainerInfo(): ContainerInfo; getHiddenDimensionStrategy(): Charts.ChartHiddenDimensionStrategy; getId(): string; @@ -673,6 +679,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; getChartType(): Charts.ChartType; getContainer(): ContainerInfo; getRanges(): Range[]; @@ -702,6 +709,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; getChartType(): Charts.ChartType; getContainer(): ContainerInfo; getRanges(): Range[]; @@ -746,6 +754,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; getChartType(): Charts.ChartType; getContainer(): ContainerInfo; getRanges(): Range[]; @@ -791,6 +800,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; getChartType(): Charts.ChartType; getContainer(): ContainerInfo; getRanges(): Range[]; @@ -836,6 +846,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; getChartType(): Charts.ChartType; getContainer(): ContainerInfo; getRanges(): Range[]; @@ -882,6 +893,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; getChartType(): Charts.ChartType; getContainer(): ContainerInfo; getRanges(): Range[]; @@ -919,6 +931,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; getChartType(): Charts.ChartType; getContainer(): ContainerInfo; getRanges(): Range[]; @@ -964,6 +977,7 @@ declare namespace GoogleAppsScript { asScatterChart(): EmbeddedScatterChartBuilder; asTableChart(): EmbeddedTableChartBuilder; build(): EmbeddedChart; + clearRanges(): EmbeddedChartBuilder; enablePaging(enablePaging: boolean): EmbeddedTableChartBuilder; enablePaging(pageSize: Integer): EmbeddedTableChartBuilder; enablePaging(pageSize: Integer, startPage: Integer): EmbeddedTableChartBuilder; @@ -1367,6 +1381,7 @@ declare namespace GoogleAppsScript { autoFillToNeighbor(series: AutoFillSeries): void; breakApart(): Range; canEdit(): boolean; + check(): Range; clear(): Range; clear(options: Object): Range; clearContent(): Range; @@ -1384,6 +1399,7 @@ declare namespace GoogleAppsScript { createDeveloperMetadataFinder(): DeveloperMetadataFinder; createFilter(): Filter; createPivotTable(sourceData: Range): PivotTable; + createTextFinder(findText: string): TextFinder; deleteCells(shiftDimension: Dimension): void; expandGroups(): Range; getA1Notation(): string; @@ -1392,6 +1408,8 @@ declare namespace GoogleAppsScript { getBandings(): Banding[]; getCell(row: Integer, column: Integer): Range; getColumn(): Integer; + getDataRegion(): Range; + getDataRegion(dimension: Dimension): Range; getDataSourceTables(): DataSourceTable[]; getDataSourceUrl(): string; getDataTable(): Charts.DataTable; @@ -1453,7 +1471,11 @@ declare namespace GoogleAppsScript { getWrapStrategy(): WrapStrategy; getWraps(): boolean[][]; insertCells(shiftDimension: Dimension): Range; + insertCheckboxes(): Range; + insertCheckboxes(checkedValue: Object): Range; + insertCheckboxes(checkedValue: Object, uncheckedValue: Object): Range; isBlank(): boolean; + isChecked(): boolean; isEndColumnBounded(): boolean; isEndRowBounded(): boolean; isPartOfMerge(): boolean; @@ -1468,6 +1490,7 @@ declare namespace GoogleAppsScript { offset(rowOffset: Integer, columnOffset: Integer, numRows: Integer, numColumns: Integer): Range; protect(): Protection; randomize(): Range; + removeCheckboxes(): Range; setBackground(color: string): Range; setBackgroundRGB(red: Integer, green: Integer, blue: Integer): Range; setBackgrounds(color: string[][]): Range; @@ -1522,6 +1545,7 @@ declare namespace GoogleAppsScript { splitTextToColumns(): void; splitTextToColumns(delimiter: string): void; splitTextToColumns(delimiter: TextToColumnsDelimiter): void; + uncheck(): Range; } /** @@ -1531,6 +1555,7 @@ declare namespace GoogleAppsScript { export interface RangeList { activate(): RangeList; breakApart(): RangeList; + check(): RangeList; clear(): RangeList; clear(options: Object): RangeList; clearContent(): RangeList; @@ -1538,6 +1563,10 @@ declare namespace GoogleAppsScript { clearFormat(): RangeList; clearNote(): RangeList; getRanges(): Range[]; + insertCheckboxes(): RangeList; + insertCheckboxes(checkedValue: Object): RangeList; + insertCheckboxes(checkedValue: Object, uncheckedValue: Object): RangeList; + removeCheckboxes(): RangeList; setBackground(color: string): RangeList; setBackgroundRGB(red: Integer, green: Integer, blue: Integer): RangeList; setBorder(top: boolean, left: boolean, bottom: boolean, right: boolean, vertical: boolean, horizontal: boolean): RangeList; @@ -1561,8 +1590,14 @@ declare namespace GoogleAppsScript { setVerticalText(isVertical: boolean): RangeList; setWrap(isWrapEnabled: boolean): RangeList; setWrapStrategy(strategy: WrapStrategy): RangeList; + uncheck(): RangeList; } + /** + * An enumeration representing the possible intervals used in spreadsheet recalculation. + */ + export enum RecalculationInterval { ON_CHANGE, MINUTE, HOUR } + /** * An enumeration representing the relative date options for calculating a value to be used in * date-based BooleanCriteria. @@ -1651,6 +1686,7 @@ declare namespace GoogleAppsScript { collapseAllRowGroups(): Sheet; copyTo(spreadsheet: Spreadsheet): Sheet; createDeveloperMetadataFinder(): DeveloperMetadataFinder; + createTextFinder(findText: string): TextFinder; deleteColumn(columnPosition: Integer): Sheet; deleteColumns(columnPosition: Integer, howMany: Integer): void; deleteRow(rowPosition: Integer): Sheet; @@ -1702,6 +1738,7 @@ declare namespace GoogleAppsScript { getSheetName(): string; getSheetValues(startRow: Integer, startColumn: Integer, numRows: Integer, numColumns: Integer): Object[][]; getTabColor(): string; + getType(): SheetType; hasHiddenGridlines(): boolean; hideColumn(column: Range): void; hideColumns(columnIndex: Integer): void; @@ -1769,6 +1806,11 @@ declare namespace GoogleAppsScript { setSheetProtection(permissions: PageProtection): void; } + /** + * The different types of sheets that can exist in a spreadsheet. + */ + export enum SheetType { GRID, OBJECT } + /** * Access and modify Google Sheets files. Common operations are adding new sheets and adding * collaborators. @@ -1789,6 +1831,7 @@ declare namespace GoogleAppsScript { autoResizeColumn(columnPosition: Integer): Sheet; copy(name: string): Spreadsheet; createDeveloperMetadataFinder(): DeveloperMetadataFinder; + createTextFinder(findText: string): TextFinder; deleteActiveSheet(): Sheet; deleteColumn(columnPosition: Integer): Sheet; deleteColumns(columnPosition: Integer, howMany: Integer): void; @@ -1814,8 +1857,10 @@ declare namespace GoogleAppsScript { getFrozenRows(): Integer; getId(): string; getImages(): OverGridImage[]; + getIterativeCalculationConvergenceThreshold(): Number; getLastColumn(): Integer; getLastRow(): Integer; + getMaxIterativeCalculationCycles(): Integer; getName(): string; getNamedRanges(): NamedRange[]; getNumSheets(): Integer; @@ -1824,6 +1869,7 @@ declare namespace GoogleAppsScript { getRange(a1Notation: string): Range; getRangeByName(name: string): Range; getRangeList(a1Notations: string[]): RangeList; + getRecalculationInterval(): RecalculationInterval; getRowHeight(rowPosition: Integer): Integer; getSelection(): Selection; getSheetByName(name: string): Sheet; @@ -1859,9 +1905,11 @@ declare namespace GoogleAppsScript { insertSheet(sheetName: string, options: Object): Sheet; insertSheetWithDataSourceTable(spec: DataSourceSpec): Sheet; isColumnHiddenByUser(columnPosition: Integer): boolean; + isIterativeCalculationEnabled(): boolean; isRowHiddenByFilter(rowPosition: Integer): boolean; isRowHiddenByUser(rowPosition: Integer): boolean; moveActiveSheet(pos: Integer): void; + moveChartToObjectSheet(chart: EmbeddedChart): Sheet; removeEditor(emailAddress: string): Spreadsheet; removeEditor(user: Base.User): Spreadsheet; removeMenu(name: string): void; @@ -1880,7 +1928,11 @@ declare namespace GoogleAppsScript { setCurrentCell(cell: Range): Range; setFrozenColumns(columns: Integer): void; setFrozenRows(rows: Integer): void; + setIterativeCalculationConvergenceThreshold(minThreshold: Number): Spreadsheet; + setIterativeCalculationEnabled(isEnabled: boolean): Spreadsheet; + setMaxIterativeCalculationCycles(maxIterations: Integer): Spreadsheet; setNamedRange(name: string, range: Range): void; + setRecalculationInterval(recalculationInterval: RecalculationInterval): Spreadsheet; setRowHeight(rowPosition: Integer, height: Integer): Sheet; setSpreadsheetLocale(locale: string): void; setSpreadsheetTimeZone(timezone: string): void; @@ -1923,7 +1975,9 @@ declare namespace GoogleAppsScript { PivotTableSummarizeFunction: typeof PivotTableSummarizeFunction; PivotValueDisplayType: typeof PivotValueDisplayType; ProtectionType: typeof ProtectionType; + RecalculationInterval: typeof RecalculationInterval; RelativeDate: typeof RelativeDate; + SheetType: typeof SheetType; TextDirection: typeof TextDirection; TextToColumnsDelimiter: typeof TextToColumnsDelimiter; WrapStrategy: typeof WrapStrategy; @@ -1962,6 +2016,24 @@ declare namespace GoogleAppsScript { */ export enum TextDirection { LEFT_TO_RIGHT, RIGHT_TO_LEFT } + /** + * Find or replace text within a range, sheet or spreadsheet. Can also specify search options. + */ + export interface TextFinder { + findAll(): Range[]; + findNext(): Range; + findPrevious(): Range; + getCurrentMatch(): Range; + ignoreDiacritics(ignoreDiacritics: boolean): TextFinder; + matchCase(matchCase: boolean): TextFinder; + matchEntireCell(matchEntireCell: boolean): TextFinder; + matchFormulaText(matchFormulaText: boolean): TextFinder; + replaceAllWith(replaceText: string): Integer; + replaceWith(replaceText: string): Integer; + startFrom(startRange: Range): TextFinder; + useRegularExpression(useRegEx: boolean): TextFinder; + } + /** * Access the text rotation settings for a cell. */ diff --git a/types/google-apps-script/google-apps-script.xml-service.d.ts b/types/google-apps-script/google-apps-script.xml-service.d.ts index ff63f961b8..77d9ff10ae 100644 --- a/types/google-apps-script/google-apps-script.xml-service.d.ts +++ b/types/google-apps-script/google-apps-script.xml-service.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2018-07-11 +// Type definitions for Google Apps Script 2019-04-09 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -291,7 +291,7 @@ declare namespace GoogleAppsScript { * var root = document.getRootElement(); * var atom = XmlService.getNamespace('http://www.w3.org/2005/Atom'); * - * var entries = document.getRootElement().getChildren('entry', atom); + * var entries = root.getChildren('entry', atom); * for (var i = 0; i < entries.length; i++) { * var title = entries[i].getChild('title', atom).getText(); * var categoryElements = entries[i].getChildren('category', atom); diff --git a/types/google-apps-script/index.d.ts b/types/google-apps-script/index.d.ts index caefcbb697..c6361f929a 100644 --- a/types/google-apps-script/index.d.ts +++ b/types/google-apps-script/index.d.ts @@ -40,6 +40,9 @@ /// /// +// Events +/// + // API Types (Advanced Google Services) /// /// diff --git a/types/google__maps/index.d.ts b/types/google__maps/index.d.ts index 2745cafe62..9a6b65ec0d 100644 --- a/types/google__maps/index.d.ts +++ b/types/google__maps/index.d.ts @@ -1687,7 +1687,7 @@ export interface PlaceSearchResult { * contains a feature name of a nearby location. Often this feature refers to a street or neighborhood within the given results. * The `vicinity` property is only returned for a Nearby Search. */ - vicinity: number; + vicinity?: string; /** * is a string containing the human-readable address of this place. Often this address is equivalent to the "postal address". * The `formatted_address` property is only returned for a Text Search. diff --git a/types/graphql-api-koa/graphql-api-koa-tests.ts b/types/graphql-api-koa/graphql-api-koa-tests.ts new file mode 100644 index 0000000000..4f8ddca3df --- /dev/null +++ b/types/graphql-api-koa/graphql-api-koa-tests.ts @@ -0,0 +1,21 @@ +import Koa from "koa"; +import { GraphQLSchema, GraphQLObjectType, GraphQLString } from "graphql"; +import { errorHandler, execute } from "graphql-api-koa"; + +const app = new Koa() + .use(errorHandler()) + .use( + execute({ schema: new GraphQLSchema({ + query: new GraphQLObjectType({ + name: "Query", + fields: () => ({ + hello: { + type: GraphQLString, + resolve() { + return "world"; + } + } + }) + }) + }) + })); diff --git a/types/graphql-api-koa/index.d.ts b/types/graphql-api-koa/index.d.ts new file mode 100644 index 0000000000..5ba96fb723 --- /dev/null +++ b/types/graphql-api-koa/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for graphql-api-koa 2.0 +// Project: https://github.com/jaydenseric/graphql-api-koa#readme +// Definitions by: Mike Marcacci +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.3 + +import { GraphQLSchema } from "graphql"; +import { Middleware, ParameterizedContext } from "koa"; + +export interface ExecuteOptions { + schema?: GraphQLSchema; + rootValue?: any; + contextValue?: any; + fieldResolver?: any; +} + +export function errorHandler(): Middleware; + +export function execute( + options: ExecuteOptions & { + override?: (ctx: ParameterizedContext) => ExecuteOptions; + } +): Middleware; diff --git a/types/graphql-api-koa/tsconfig.json b/types/graphql-api-koa/tsconfig.json new file mode 100644 index 0000000000..88980bdfc7 --- /dev/null +++ b/types/graphql-api-koa/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "graphql-api-koa-tests.ts" + ] +} diff --git a/types/is-absolute-url/tslint.json b/types/graphql-api-koa/tslint.json similarity index 100% rename from types/is-absolute-url/tslint.json rename to types/graphql-api-koa/tslint.json diff --git a/types/graphql-react/graphql-react-tests.tsx b/types/graphql-react/graphql-react-tests.tsx new file mode 100644 index 0000000000..a1c80d7995 --- /dev/null +++ b/types/graphql-react/graphql-react-tests.tsx @@ -0,0 +1,47 @@ +import React from "react"; +import { GraphQL, GraphQLContext, useGraphQL } from "graphql-react"; + +const graphql = new GraphQL(); + +function App() { + const { loading, cacheValue } = useGraphQL< + {node: null | {id: string}}, + {id: string} + >({ + fetchOptionsOverride(options) { + options.url = "/graphql"; + }, + operation: { + variables: { + id: "123456" + }, + query: ` + query($id: !String) { + node(id: $id) { + id + } + } + ` + } + }); + + if (loading) { + return
Loading...
; + } + + return ( +
{ + cacheValue && cacheValue.data && cacheValue.data.node + ? "exists" + : "does not exist" + }
+ ); +} + +function Root() { + return ( + + + + ); +} diff --git a/types/graphql-react/index.d.ts b/types/graphql-react/index.d.ts new file mode 100644 index 0000000000..9ee919bd16 --- /dev/null +++ b/types/graphql-react/index.d.ts @@ -0,0 +1,139 @@ +// Type definitions for graphql-react 8.1 +// Project: https://github.com/jaydenseric/graphql-react#readme +// Definitions by: Mike Marcacci +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.3 + +// The no-unnecessary-generics rule is stupid and overrestrictive. It is a +// perfectly valid and often useful to type-constrain a wrapping object. +/* tslint:disable:no-unnecessary-generics */ + +import { ReactNode, Context } from "react"; + +export const GraphQLContext: Context; + +export interface HttpError { + status: number; + statusText: string; +} + +export type GraphQLCacheKey = string; +export interface GraphQLCacheValue { + fetchError: null | string; + httpError: null | HttpError; + parseError: null | string; + graphQLErrors: + | null + | Array<{ + message: string; + path: string[]; + locations: Array<{ column: number; line: number }>; + }>; + data: T; +} + +export interface GraphQLCache { + [key: string]: GraphQLCacheValue; +} + +export interface GraphQLFetchOptions { + url: string; + body: string | FormData; + headers: Headers; + credentials: null | string; +} + +export type GraphQLFetchOptionsOverride = ( + options: GraphQLFetchOptions +) => void; + +export type GraphQLOperation = { + query: string; +} & (V extends undefined ? {} : { variables: V }); + +export interface GraphQLOperationLoading { + cacheKey: GraphQLCacheKey; + cacheValue: undefined | GraphQLCacheValue; + cacheValuePromise: Promise>; +} + +export interface GraphQLOperationStatus { + load: () => void; + loading: boolean; + cacheKey: GraphQLCacheKey; + cacheValue?: GraphQLCacheValue; +} + +export class GraphQL { + constructor(options?: { cache?: GraphQLCache }); + + on( + type: "reset", + handler: (event: { exceptCacheKey: GraphQLCacheKey }) => void + ): void; + + on( + type: "cache", + handler: (event: { + cacheKey: GraphQLCacheKey; + cacheValue: GraphQLCacheValue; + }) => void + ): void; + + on( + type: "fetch", + handler: (event: { + cacheKey: GraphQLCacheKey; + cacheValuePromise: Promise>; + }) => void + ): void; + + off( + type: "reset", + handler: (event: { exceptCacheKey: GraphQLCacheKey }) => void + ): void; + + off( + type: "cache", + handler: (event: { + cacheKey: GraphQLCacheKey; + cacheValue: GraphQLCacheValue; + }) => void + ): void; + + off( + type: "fetch", + handler: (event: { + cacheKey: GraphQLCacheKey; + cacheValuePromise: Promise>; + }) => void + ): void; + + reset(exceptCacheKey?: string): void; + operate(options: { + operation: GraphQLOperation; + fetchOptionsOverride?: GraphQLFetchOptionsOverride; + reloadOnLoad?: boolean; + resetOnLoad?: boolean; + }): GraphQLOperationLoading; + + cache: GraphQLCache; +} + +export function reportCacheErrors(event: any): void; + +export function ssr( + grapphql: GraphQL, + node: ReactNode, + render?: (element: ReactNode) => string +): void; + +export function useGraphQL(options: { + fetchOptionsOverride?: GraphQLFetchOptionsOverride; + loadOnMount?: boolean; + loadOnReload?: boolean; + loadOnReset?: boolean; + reloadOnLoad?: boolean; + resetOnLoad?: boolean; + operation: GraphQLOperation; +}): GraphQLOperationStatus; diff --git a/types/graphql-react/tsconfig.json b/types/graphql-react/tsconfig.json new file mode 100644 index 0000000000..16a784d5cc --- /dev/null +++ b/types/graphql-react/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "graphql-react-tests.tsx" + ] +} diff --git a/types/is-fullwidth-code-point/tslint.json b/types/graphql-react/tslint.json similarity index 100% rename from types/is-fullwidth-code-point/tslint.json rename to types/graphql-react/tslint.json diff --git a/types/grunt/grunt-tests.ts b/types/grunt/grunt-tests.ts index 7dd6dcf47c..001b94a739 100644 --- a/types/grunt/grunt-tests.ts +++ b/types/grunt/grunt-tests.ts @@ -139,3 +139,16 @@ let myTest = function (grunt: IGrunt) { cwd: '.' }, '*.ts'); } +// test to check process function assignment. +let mytest = function(grunt: IGrunt) { + const opt:grunt.file.IFileWriteStringOption = { + encoding: grunt.file.defaultEncoding, + process: (contents: string, srcPath: string, destPath: string): string | boolean => { + grunt.log.writeln('"file source path"' + srcPath); + grunt.log.writeln('"file destination path"' + destPath); + // return false so no actual copying takes place + return false; + } + } + grunt.file.copy('./test.file',"./testcopy.file", opt); +} diff --git a/types/grunt/index.d.ts b/types/grunt/index.d.ts index 15fd9f0959..3a176aaa2a 100644 --- a/types/grunt/index.d.ts +++ b/types/grunt/index.d.ts @@ -320,7 +320,7 @@ declare namespace grunt { * @see IFileWriteBufferOption * @see IFileWriteStringOption */ - interface IFileWriteOptions { + interface IFileWriteOptions extends grunt.file.IFileEncodedOption { /** * These optional globbing patterns will be matched against the filepath * (not the filename) using grunt.file.isMatch. If any specified globbing @@ -349,11 +349,24 @@ declare namespace grunt { */ interface IFileWriteStringOption extends grunt.file.IFileWriteOptions { /** - * The source file contents and file path are passed into this function, - * whose return value will be used as the destination file's contents. If - * this function returns `false`, the file copy will be aborted. - */ - process?: (file: string) => boolean; + * The source file contents, source file path, and destination file path + * are passed into this function, whose return value will be used as the + * destination file's contents. + * If this function returns 'false', the file copy will be aborted. + * @example + ```ts +const copyOptions: grunt.file.IFileWriteStringOption = { + encoding: options.encoding, + process: (contents: string, srcpath: string, destpath: string): string | boolean => { + // some other code + // return the content to be written or return false to cancel + return contents; + }, + noProcess: options.noProcess, +}; + ``` + */ + process?: (contents: string, srcpath: string, destpath: string) => (string | boolean); } /** diff --git a/types/gulp-postcss/gulp-postcss-tests.ts b/types/gulp-postcss/gulp-postcss-tests.ts new file mode 100644 index 0000000000..5bcc61b89f --- /dev/null +++ b/types/gulp-postcss/gulp-postcss-tests.ts @@ -0,0 +1,42 @@ +import * as gulp from 'gulp'; +import * as Vinyl from 'vinyl'; +import postcss = require('gulp-postcss'); +import autoprefixer = require('autoprefixer'); +import sass = require('sass'); + +gulp.task('postCss1', () => { + return gulp.src('./src/*.css') + .pipe(postcss()) + .pipe(gulp.dest('./dest')); +}); + +gulp.task('postCss2', () => { + const postCssPlugins = [ autoprefixer({browsers: ['last 1 version']}) ]; + return gulp.src('./src/*.css') + .pipe(postcss(postCssPlugins)) + .pipe(gulp.dest('./dest')); +}); + +gulp.task('postCss3', () => { + const plugins = [ autoprefixer({browsers: ['last 1 version']}) ]; + return gulp.src('in.sss') + .pipe(postcss(plugins, { parser: sass })) + .pipe(gulp.dest('out')); +}); + +gulp.task('postCss4', () => { + function callback(file: Vinyl) { + return { + plugins: [ + require('postcss-import')({ root: file.dirname }), + require('postcss-modules') + ], + options: { + parser: file.extname === '.sss' ? require('sugarss') : false + } + }; + } + return gulp.src('./src/*.css') + .pipe(postcss(callback)) + .pipe(gulp.dest('./dest')); +}); diff --git a/types/gulp-postcss/index.d.ts b/types/gulp-postcss/index.d.ts new file mode 100644 index 0000000000..8da43d1b15 --- /dev/null +++ b/types/gulp-postcss/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for gulp-postcss 8.0 +// Project: https://github.com/postcss/gulp-postcss +// Definitions by: Takesi Tokugawa +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// +import Vinyl = require('vinyl'); + +declare function GulpPostCss(plugins?: any[], options?: GulpPostCss.Options): NodeJS.ReadWriteStream; +declare function GulpPostCss(callback?: (file: Vinyl) => { plugins?: any[], options?: GulpPostCss.Options }): + NodeJS.ReadWriteStream; + +declare namespace GulpPostCss { + interface Options { + parser?: any; + } +} + +export = GulpPostCss; diff --git a/types/gulp-postcss/tsconfig.json b/types/gulp-postcss/tsconfig.json new file mode 100644 index 0000000000..5b6ff833f8 --- /dev/null +++ b/types/gulp-postcss/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-postcss-tests.ts" + ] +} diff --git a/types/gulp-postcss/tslint.json b/types/gulp-postcss/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/gulp-postcss/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/gulp/test/index.ts b/types/gulp/test/index.ts index 4b096a8704..05934c9a7b 100644 --- a/types/gulp/test/index.ts +++ b/types/gulp/test/index.ts @@ -51,13 +51,13 @@ const someNextTask = () => { gulp.task(someTask); const foo: gulp.TaskFunction = () => { }; -foo.name === 'foo'; // true +foo.displayName === 'foo'; // true const bar: gulp.TaskFunction = () => { }; -bar.name === ''; // true +bar.displayName === ''; // true -bar.name = 'bar'; -bar.name === ''; // true +bar.displayName = 'bar'; +bar.displayName === ''; // true const test: gulp.TaskFunction = (done) => { done(); diff --git a/types/hapi__accept/hapi__accept-tests.ts b/types/hapi__accept/hapi__accept-tests.ts new file mode 100644 index 0000000000..eceaf4f5d6 --- /dev/null +++ b/types/hapi__accept/hapi__accept-tests.ts @@ -0,0 +1,31 @@ +import * as accept from '@hapi/accept'; + +accept.charsets("iso-8859-5, unicode-1-1;q=0.8"); // charset === "iso-8859-5" +accept.charset("iso-8859-5, unicode-1-1;q=0.8", ["unicode-1-1"]); // charset === "unicode-1-1" + +accept.encoding("gzip, deflate, sdch"); // encoding === "gzip" +accept.encoding("gzip, deflate, sdch", ["deflate", "identity"]); + +const encodings = accept.encodings("compress;q=0.5, gzip;q=1.0"); // encodings === ["gzip", "compress", "identity"] +encodings.lastIndexOf(''); + +accept.language("en;q=0.7, en-GB;q=0.8"); +accept.language("en;q=0.7, en-GB;q=0.8", ["en-gb"]); // language === "en-GB" +const languages = accept.languages("da, en;q=0.7, en-GB;q=0.8"); // languages === ["da", "en-GB", "en"] +languages.lastIndexOf(''); + +accept.mediaType("text/plain, application/json;q=0.5, text/html, */*;q=0.1"); +accept.mediaType("text/plain, application/json;q=0.5, text/html, */*;q=0.1", ["application/json", "text/html"]); +const mediaTypes = accept.mediaTypes("text/plain, application/json;q=0.5, text/html, */*;q=0.1"); +// mediaTypes === ["text/plain", "text/html", "application/json", "*/*"] +mediaTypes.lastIndexOf(''); +const headers = { + accept: 'text/plain, application/json;q=0.5, text/html, */*;q=0.1', + 'accept-language': 'da, en;q=0.7, en-GB;q=0.8' +}; + +const all = accept.parseAll(headers); +all.charsets.length; +all.encodings.length; +all.languages.length; +all.mediaTypes.length; diff --git a/types/hapi__accept/index.d.ts b/types/hapi__accept/index.d.ts new file mode 100644 index 0000000000..8c70733115 --- /dev/null +++ b/types/hapi__accept/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for @hapi/accept 3.2 +// Project: https://github.com/hapijs/accept#readme +// Definitions by: feinoujc +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +export function charset(charsetHeader?: string, preferences?: string[]): string; +export function charsets(charsetHeader?: string): string[]; +export function encoding(encodingHeader?: string, preferences?: string[]): string; +export function encodings(encodingHeader?: string): string[]; +export function language(languageHeader?: string, preferences?: string[]): string; +export function languages(languageHeader?: string): string[]; +export function mediaType(mediaTypeHeader?: string, preferences?: string[]): string; +export function mediaTypes(mediaTypeHeader?: string): string[]; +export function parseAll( + headers: Record +): { + charsets: string[]; + encodings: string[]; + languages: string[]; + mediaTypes: string[]; +}; diff --git a/types/sindresorhus__djb2a/tsconfig.json b/types/hapi__accept/tsconfig.json similarity index 81% rename from types/sindresorhus__djb2a/tsconfig.json rename to types/hapi__accept/tsconfig.json index e88751963c..b12e8076ef 100644 --- a/types/sindresorhus__djb2a/tsconfig.json +++ b/types/hapi__accept/tsconfig.json @@ -12,17 +12,17 @@ "typeRoots": [ "../" ], - "types": [], "paths": { - "@sindresorhus/djb2a": [ - "sindresorhus__djb2a" + "@hapi/accept": [ + "hapi__accept" ] }, + "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "sindresorhus__djb2a-tests.ts" + "hapi__accept-tests.ts" ] } diff --git a/types/is-relative-url/tslint.json b/types/hapi__accept/tslint.json similarity index 100% rename from types/is-relative-url/tslint.json rename to types/hapi__accept/tslint.json diff --git a/types/hapi__boom/hapi__boom-tests.ts b/types/hapi__boom/hapi__boom-tests.ts new file mode 100644 index 0000000000..0c421f798d --- /dev/null +++ b/types/hapi__boom/hapi__boom-tests.ts @@ -0,0 +1,209 @@ +import * as Boom from '@hapi/boom'; + +// 4xx and data type + +const badRequestError = Boom.badRequest('message', {some: 'data'}); +badRequestError.data.some; +const badRequestError2: Boom = Boom.badImplementation('message'); + +const unauthorizedError1 = Boom.unauthorized('message', 'scheme', {some: 'attribute'}); +unauthorizedError1.output.payload.attributes === { some: 'attribute', error: 'message' }; +unauthorizedError1.output.headers === { 'WWW-Authenticate': 'scheme some="attribute", error="message"' }; + +const unauthorizedError2 = Boom.unauthorized('message', ['scheme']); +unauthorizedError2.output.payload.attributes === undefined; +unauthorizedError2.output.headers === { 'WWW-Authenticate': 'scheme' }; + +const unauthorizedError3 = Boom.unauthorized(null, 'scheme', 'attribute'); +unauthorizedError3.output.payload.attributes === 'attribute'; +unauthorizedError3.output.headers === { 'WWW-Authenticate': 'scheme attribute' }; + +const unauthorizedError4 = Boom.unauthorized(null, 'scheme', {some: 'attribute'}); +unauthorizedError4.output.payload.attributes === { some: 'attribute' }; +unauthorizedError4.output.headers === { 'WWW-Authenticate': 'scheme some="attribute"' }; + +const paymentRequiredError = Boom.paymentRequired('message', {some: 'data'}); +paymentRequiredError.data.some; +const paymentRequiredError2: Boom = Boom.paymentRequired('message'); + +const forbiddenError = Boom.forbidden('message', {some: 'data'}); +forbiddenError.data.some; +const forbiddenError2: Boom = Boom.forbidden('message'); + +const notFoundError = Boom.notFound('message', {some: 'data'}); +notFoundError.data.some; +const notFoundError2: Boom = Boom.notFound('message'); + +const methodNotAllowedError = Boom.methodNotAllowed('message', {some: 'data'}); +methodNotAllowedError.data.some; +const methodNotAllowedError2: Boom = Boom.methodNotAllowed('message'); + +const notAcceptableError = Boom.notAcceptable('message', {some: 'data'}); +notAcceptableError.data.some; +const notAcceptableError2: Boom = Boom.notAcceptable('message'); + +const proxyAuthRequiredError = Boom.proxyAuthRequired('message', {some: 'data'}); +proxyAuthRequiredError.data.some; +const proxyAuthRequiredError2: Boom = Boom.proxyAuthRequired('message'); + +const clientTimeoutError = Boom.clientTimeout('message', {some: 'data'}); +clientTimeoutError.data.some; +const clientTimeoutError2: Boom = Boom.clientTimeout('message'); + +const conflictError = Boom.conflict('message', {some: 'data'}); +conflictError.data.some; + +const resourceGoneError = Boom.resourceGone('message', {some: 'data'}); +resourceGoneError.data.some; +const resourceGoneError2: Boom = Boom.resourceGone('message'); + +const lengthRequiredError = Boom.lengthRequired('message', {some: 'data'}); +lengthRequiredError.data.some; +const lengthRequiredError2: Boom = Boom.lengthRequired('message'); + +const preconditionFailedError = Boom.preconditionFailed('message', {some: 'data'}); +preconditionFailedError.data.some; +const preconditionFailedError2: Boom = Boom.preconditionFailed('message'); + +const entityTooLargeError = Boom.entityTooLarge('message', {some: 'data'}); +entityTooLargeError.data.some; +const entityTooLargeError2: Boom = Boom.lengthRequired('message'); + +const uriTooLongError = Boom.uriTooLong('message', {some: 'data'}); +uriTooLongError.data.some; +const uriTooLongError2: Boom = Boom.uriTooLong('message'); + +const unsupportedMediaTypeError = Boom.unsupportedMediaType('message', {some: 'data'}); +unsupportedMediaTypeError.data.some; +const unsupportedMediaTypeError2: Boom = Boom.unsupportedMediaType('message'); + +const rangeNotSatisfiableError = Boom.rangeNotSatisfiable('message', {some: 'data'}); +rangeNotSatisfiableError.data.some; +const rangeNotSatisfiableError2: Boom = Boom.rangeNotSatisfiable('message'); + +const expectationFailedError = Boom.expectationFailed('message', {some: 'data'}); +expectationFailedError.data.some; +const expectationFailedError2: Boom = Boom.expectationFailed('message'); + +const teapotError = Boom.teapot('message', {some: 'data'}); +teapotError.data.some; +const teapotError2: Boom = Boom.teapot('message'); + +const badDataError = Boom.badData('message', {some: 'data'}); +badDataError.data.some; +const badDataError2: Boom = Boom.badData('message'); + +const lockedError = Boom.locked('message', {some: 'data'}); +lockedError.data.some; +const lockedError2: Boom = Boom.locked('message'); + +const failedDependencyError = Boom.failedDependency('message', {some: 'data'}); +failedDependencyError.data.some; +const failedDependencyError2: Boom = Boom.failedDependency('message'); + +const preconditionRequiredError = Boom.preconditionRequired('message', {some: 'data'}); +preconditionRequiredError.data.some; +const preconditionRequiredError2: Boom = Boom.preconditionRequired('message'); + +const tooManyRequestsError = Boom.tooManyRequests('message', {some: 'data'}); +tooManyRequestsError.data.some; +const tooManyRequestsError2: Boom = Boom.tooManyRequests('message'); + +const illegalError = Boom.illegal('message', {some: 'data'}); +illegalError.data.some; +const illegalError2: Boom = Boom.illegal('message'); + +// 5xx and data type + +const badImplementationError = Boom.badImplementation('message', {some: 'data'}); +badImplementationError.data.some; +const badImplementationError2: Boom = Boom.badImplementation('message'); + +const internalError = Boom.internal('message', {some: 'data'}); +internalError.data.some; +const internalError2: Boom = Boom.internal('message'); + +const notImplementedError = Boom.notImplemented('message', {some: 'data'}); +notImplementedError.data.some; +const notImplementedError2: Boom = Boom.notImplemented('message'); + +const badGatewayError = Boom.badGateway('message', {some: 'data'}); +badGatewayError.data.some; +const badGatewayError2: Boom = Boom.badGateway('message'); + +const serverUnavailableError = Boom.serverUnavailable('message', {some: 'data'}); +serverUnavailableError.data.some; +const serverUnavailableError2: Boom = Boom.serverUnavailable('message'); + +const gatewayTimeoutError = Boom.gatewayTimeout('message', {some: 'data'}); +gatewayTimeoutError.data.some; +const gatewayTimeoutError2: Boom = Boom.gatewayTimeout('message'); + +// boomify +const boomifiedError = Boom.boomify(new Error('test'), { statusCode: 400, message: 'some message' }); + +// isBoom + +const isBoomError = new Boom('test'); + +Boom.isBoom(isBoomError); + +const maybeBoom = new Boom('test'); +if (Boom.isBoom(maybeBoom)) { + // isBoom is a type guard that allows accessing these properties: + maybeBoom.output.headers; +} + +// constructor + +const constructorError: Boom = new Boom('test'); + +constructorError.message; + +// type widen asserting + +const unauthorizedError = Boom.unauthorized() as Error; + +// status code and reformat + +const error = Boom.badRequest('Cannot feed after midnight'); +error.output.statusCode = 499; // Assign a custom error code +error.reformat(); + +/** + * Add a custom key to the payload + */ + +interface CustomPayload extends Boom.Payload { + custom: string; +} + +(error.output.payload as CustomPayload).custom = 'abc_123'; + +/** + * Test assignment of custom error data: + */ +// tslint:disable-next-line:no-object-literal-type-assertion +const errorWithData = Boom.badImplementation('', { custom1: 'test', customType: 'Custom1', isCustom: true }); +const errorWithNoExplicitDataType: Boom = errorWithData; // can assign to error without explicit data type +const errorWithExplicitType: Boom = errorWithData; // can assign to union data type +const errorWithConcreteCustomData: Boom = errorWithData; // can assign to concrete data type +// assignment to CustomData2 would not be possible +// const errorWithConcreteCustomData2: Boom = errorWithData; + +// Some complex error data types for testing purposes: +interface CustomDataBase { + isCustom: true; +} + +interface CustomData1 extends CustomDataBase { + customType: 'Custom1'; + custom1: string; +} + +interface CustomData2 extends CustomDataBase { + customType: 'Custom2'; + custom2: string; +} + +type CustomData = CustomData1 | CustomData2; diff --git a/types/hapi__boom/index.d.ts b/types/hapi__boom/index.d.ts new file mode 100644 index 0000000000..4b33676dc0 --- /dev/null +++ b/types/hapi__boom/index.d.ts @@ -0,0 +1,372 @@ +// Type definitions for @hapi/boom 7.4 +// Project: https://github.com/hapijs/boom +// Definitions by: Igor Rogatty +// AJP +// Jinesh Shah +// Timon van Spronsen +// Daniel Machado +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + + export = Boom; +/** + * boom provides a set of utilities for returning HTTP errors. Each utility returns a Boom error response object (instance of Error) which includes the following properties: + * @see {@link https://github.com/hapijs/boom#boom} + */ +declare class Boom extends Error { + /** Creates a new Boom object using the provided message and then calling boomify() to decorate the error with the Boom properties. */ + constructor(message?: string | Error, options?: Boom.Options); + /** isBoom - if true, indicates this is a Boom object instance. */ + isBoom: boolean; + /** isServer - convenience bool indicating status code >= 500. */ + isServer: boolean; + /** message - the error message. */ + message: string; + /** output - the formatted response. Can be directly manipulated after object construction to return a custom error response. Allowed root keys: */ + output: Boom.Output; + /** reformat() - rebuilds error.output using the other object properties. */ + reformat(): string; + /** + * "If message is unset, the 'error' segment of the header will not be present and + * isMissing will be true on the error object." mentioned in + * @see {@link https://github.com/hapijs/boom#boomunauthorizedmessage-scheme-attributes} + */ + isMissing?: boolean; + /** https://github.com/hapijs/boom#createstatuscode-message-data and https://github.com/hapijs/boom/blob/v4.3.0/lib/index.js#L99 */ + data: Data; +} +declare namespace Boom { + interface Options { + /** statusCode - the HTTP status code. Defaults to 500 if no status code is already set. */ + statusCode?: number; + /** data - additional error information (assigned to error.data). */ + data?: Data; + /** decorate - an option with extra properties to set on the error object. */ + decorate?: object; + /** ctor - constructor reference used to crop the exception call stack output. */ + ctor?: any; + /** message - error message string. If the error already has a message, the provided message is added as a prefix. Defaults to no message. */ + message?: string; + /** + * override - if false, the err provided is a Boom object, and a statusCode or message are + * provided, the values are ignored. Defaults to true (apply the provided statusCode and + * message options to the error regardless of its type, Error or Boom object). + */ + override?: boolean; + } + + interface Output { + /** statusCode - the HTTP status code (typically 4xx or 5xx). */ + statusCode: number; + /** + * headers - an object containing any HTTP headers where each key is a header name and + * value is the header content. (Limited value type to string + * https://github.com/hapijs/boom/issues/151 ) + */ + headers: {[index: string]: string}; + /** + * payload - the formatted object used as the response payload (stringified). + * Can be directly manipulated but any changes will be lost if reformat() is called. + * Any content allowed and by default includes the following content: + */ + payload: Payload; + } + + interface Payload { + /** statusCode - the HTTP status code, derived from error.output.statusCode. */ + statusCode: number; + /** error - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from statusCode. */ + error: string; + /** message - the error message derived from error.message. */ + message: string; + /** + * "Every key/value pair will be included ... in the response payload under the attributes key." + * [see docs](https://github.com/hapijs/boom#boomunauthorizedmessage-scheme-attributes) + */ + attributes?: any; + // Excluded this to aid typing of the other values. See tests for example casting to a custom interface to manipulate the payload + // [anyContent: string]: any; + } + + /** + * Decorates an error with the boom properties + * @param error the error object to wrap. If error is already a boom object, it defaults to overriding the object with the new status code and message. + * @param options optional additional options + * @see {@link https://github.com/hapijs/boom#boomifyerror-options} + */ + function boomify(error: Error, options?: { statusCode?: number, message?: string, override?: boolean }): Boom; + + /** + * Identifies whether an error is a Boom object. Same as calling instanceof Boom. + * @param error the error object to identify. + */ + function isBoom(error: Error): error is Boom; + + // 4xx + /** + * Returns a 400 Bad Request error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boombadrequestmessage-data} + */ + function badRequest(message?: string, data?: Data): Boom; + + /** + * Returns a 401 Unauthorized error + * @param message optional message. + * @param scheme can be one of the following: + * * an authentication scheme name + * * an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header. + * @param attributes an object of values to use while setting the 'WWW-Authenticate' header. + * This value is only used when scheme is a string, otherwise it is ignored. + * Every key/value pair will be included in the 'WWW-Authenticate' in the format of + * 'key="value"' as well as in the response payload under the attributes key. + * Alternatively value can be a string which is use to set the value of the scheme, + * for example setting the token value for negotiate header. + * If string is used message parameter must be null. + * null and undefined will be replaced with an empty string. If attributes is set, + * message will be used as the 'error' segment of the 'WWW-Authenticate' header. + * If message is unset, the 'error' segment of the header will not be present and isMissing will be true on the error object. + * @see {@link https://github.com/hapijs/boom#boomunauthorizedmessage-scheme-attributes} + */ + function unauthorized(message?: string, scheme?: string, attributes?: {[index: string]: string}): Boom; + function unauthorized(message?: string, scheme?: string[]): Boom; + function unauthorized(message?: null, scheme?: string, attributes?: {[index: string]: string} | string): Boom; + + /** + * Returns a 402 Payment Required error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boompaymentrequiredmessage-data} + */ + function paymentRequired(message?: string, data?: Data): Boom; + + /** + * Returns a 403 Forbidden error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomforbiddenmessage-data} + */ + function forbidden(message?: string, data?: Data): Boom; + + /** + * Returns a 404 Not Found error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomnotfoundmessage-data} + */ + function notFound(message?: string, data?: Data): Boom; + + /** + * Returns a 405 Method Not Allowed error + * @param message optional message. + * @param data optional additional error data. + * @param allow optional string or array of strings (to be combined and separated by ', ') which is set to the 'Allow' header. + * @see {@link https://github.com/hapijs/boom#boommethodnotallowedmessage-data-allow} + */ + function methodNotAllowed(message?: string, data?: Data, allow?: string | string[]): Boom; + + /** + * Returns a 406 Not Acceptable error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomnotacceptablemessage-data} + */ + function notAcceptable(message?: string, data?: Data): Boom; + + /** + * Returns a 407 Proxy Authentication Required error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomproxyauthrequiredmessage-data} + */ + function proxyAuthRequired(message?: string, data?: Data): Boom; + + /** + * Returns a 408 Request Time-out error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomclienttimeoutmessage-data} + */ + function clientTimeout(message?: string, data?: Data): Boom; + + /** + * Returns a 409 Conflict error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomconflictmessage-data} + */ + function conflict(message?: string, data?: Data): Boom; + + /** + * Returns a 410 Gone error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomresourcegonemessage-data} + */ + function resourceGone(message?: string, data?: Data): Boom; + + /** + * Returns a 411 Length Required error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomlengthrequiredmessage-data} + */ + function lengthRequired(message?: string, data?: Data): Boom; + + /** + * Returns a 412 Precondition Failed error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boompreconditionfailedmessage-data} + */ + function preconditionFailed(message?: string, data?: Data): Boom; + + /** + * Returns a 413 Request Entity Too Large error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomentitytoolargemessage-data} + */ + function entityTooLarge(message?: string, data?: Data): Boom; + + /** + * Returns a 414 Request-URI Too Large error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomuritoolongmessage-data} + */ + function uriTooLong(message?: string, data?: Data): Boom; + + /** + * Returns a 415 Unsupported Media Type error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomunsupportedmediatypemessage-data} + */ + function unsupportedMediaType(message?: string, data?: Data): Boom; + + /** + * Returns a 416 Requested Range Not Satisfiable error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomrangenotsatisfiablemessage-data} + */ + function rangeNotSatisfiable(message?: string, data?: Data): Boom; + + /** + * Returns a 417 Expectation Failed error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomexpectationfailedmessage-data} + */ + function expectationFailed(message?: string, data?: Data): Boom; + + /** + * Returns a 418 I'm a Teapot error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomteapotmessage-data} + */ + function teapot(message?: string, data?: Data): Boom; + + /** + * Returns a 422 Unprocessable Entity error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boombaddatamessage-data} + */ + function badData(message?: string, data?: Data): Boom; + + /** + * Returns a 423 Locked error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomlockedmessage-data} + */ + function locked(message?: string, data?: Data): Boom; + + /** + * Returns a 424 Failed Dependency error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomfaileddependencymessage-data} + */ + function failedDependency(message?: string, data?: Data): Boom; + + /** + * Returns a 428 Precondition Required error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boompreconditionrequiredmessage-data} + */ + function preconditionRequired(message?: string, data?: Data): Boom; + + /** + * Returns a 429 Too Many Requests error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomtoomanyrequestsmessage-data} + */ + function tooManyRequests(message?: string, data?: Data): Boom; + + /** + * Returns a 451 Unavailable For Legal Reasons error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomillegalmessage-data} + */ + function illegal(message?: string, data?: Data): Boom; + + // 5xx + /** + * Returns a 500 Internal Server Error error + * Only 500 errors will hide your message from the end user. Your message is recorded in the server log. + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boombadimplementationmessage-data---alias-internal} + */ + function badImplementation(message?: string, data?: Data): Boom; + + /** + * Returns a 500 Internal Server Error error + * Only 500 errors will hide your message from the end user. Your message is recorded in the server log. + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boombadimplementationmessage-data---alias-internal} + */ + function internal(message?: string, data?: Data): Boom; + + /** + * Returns a 501 Not Implemented error with your error message to the user + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomnotimplementedmessage-data} + */ + function notImplemented(message?: string, data?: Data): Boom; + + /** + * Returns a 502 Bad Gateway error with your error message to the user + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boombadgatewaymessage-data} + */ + function badGateway(message?: string, data?: Data): Boom; + + /** + * Returns a 503 Service Unavailable error with your error message to the user + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomserverunavailablemessage-data} + */ + function serverUnavailable(message?: string, data?: Data): Boom; + + /** + * Returns a 504 Gateway Time-out error with your error message to the user + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomgatewaytimeoutmessage-data} + */ + function gatewayTimeout(message?: string, data?: Data): Boom; +} diff --git a/types/sindresorhus__fnv1a/tsconfig.json b/types/hapi__boom/tsconfig.json similarity index 81% rename from types/sindresorhus__fnv1a/tsconfig.json rename to types/hapi__boom/tsconfig.json index 6ac527a578..b578f37298 100644 --- a/types/sindresorhus__fnv1a/tsconfig.json +++ b/types/hapi__boom/tsconfig.json @@ -12,17 +12,17 @@ "typeRoots": [ "../" ], - "types": [], "paths": { - "@sindresorhus/fnv1a": [ - "sindresorhus__fnv1a" + "@hapi/boom": [ + "hapi__boom" ] }, + "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "sindresorhus__fnv1a-tests.ts" + "hapi__boom-tests.ts" ] } diff --git a/types/hapi__boom/tslint.json b/types/hapi__boom/tslint.json new file mode 100644 index 0000000000..1c36270d47 --- /dev/null +++ b/types/hapi__boom/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-angle-bracket-type-assertion": false + } +} diff --git a/types/hapi__catbox-memory/hapi__catbox-memory-tests.ts b/types/hapi__catbox-memory/hapi__catbox-memory-tests.ts new file mode 100644 index 0000000000..f8bbfa7d5d --- /dev/null +++ b/types/hapi__catbox-memory/hapi__catbox-memory-tests.ts @@ -0,0 +1,8 @@ +import * as CatboxMemory from '@hapi/catbox-memory'; + +const client = new CatboxMemory({ + allowMixedContent: true, + cloneBuffersOnGet: false, + maxByteSize: 1024, + minCleanupIntervalMsec: 1000, +}); diff --git a/types/hapi__catbox-memory/index.d.ts b/types/hapi__catbox-memory/index.d.ts new file mode 100644 index 0000000000..695d9da436 --- /dev/null +++ b/types/hapi__catbox-memory/index.d.ts @@ -0,0 +1,48 @@ +// Type definitions for @hapi/catbox-memory 4.1 +// Project: https://github.com/hapijs/catbox-memory#readme +// Definitions by: Simon Schick +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { ClientApi } from '@hapi/catbox'; + +interface CatboxMemory extends ClientApi {} + +// tslint:disable-next-line:no-unnecessary-class +declare class CatboxMemory implements ClientApi { + constructor(options?: CatboxMemory.Options); +} + +declare namespace CatboxMemory { + interface Options { + /** + * Sets an upper limit on the number of bytes that can be stored in the cache. + * Once this limit is reached no additional items will be added to the cache until some expire. + * The utilized memory calculation is a rough approximation and must not be relied on. + * @default 104857600 (100MB). + */ + maxByteSize?: number; + /** + * The minimum number of milliseconds in between each cache cleanup. + * @default 1000 (1 second) + */ + minCleanupIntervalMsec?: number; + /** + * by default, all data is cached as JSON strings, and converted to an object using JSON.parse() on retrieval. + * By setting this option to true, Buffer data can be stored alongside the stringified data. + * Buffers are not stringified, and are copied before storage to prevent the value from changing while in the cache. + * @default false + */ + allowMixedContent?: boolean; + /** + * by default, buffers stored in the cache with allowMixedContent set to true are copied when they are set but not when they are retrieved. + * This means a change to the buffer returned by a get() will change the value in the cache. To prevent this, + * set cloneBuffersOnGet to true to always return a copy of the cached buffer. + * @default false + */ + cloneBuffersOnGet?: boolean; + } +} + +export = CatboxMemory; diff --git a/types/hapi__catbox-memory/tsconfig.json b/types/hapi__catbox-memory/tsconfig.json new file mode 100644 index 0000000000..d558cf1169 --- /dev/null +++ b/types/hapi__catbox-memory/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/catbox": [ + "hapi__catbox" + ], + "@hapi/catbox-memory": [ + "hapi__catbox-memory" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__catbox-memory-tests.ts" + ] +} diff --git a/types/hapi__catbox-memory/tslint.json b/types/hapi__catbox-memory/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/hapi__catbox-memory/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/hapi__catbox/hapi__catbox-tests.ts b/types/hapi__catbox/hapi__catbox-tests.ts new file mode 100644 index 0000000000..5a6ec980a5 --- /dev/null +++ b/types/hapi__catbox/hapi__catbox-tests.ts @@ -0,0 +1,44 @@ +import { Client, Policy, EnginePrototypeOrObject, DecoratedResult, CachedObject } from "@hapi/catbox"; + +const Memory: EnginePrototypeOrObject = { + async start(): Promise {}, + stop(): void {}, + async get(): Promise> { + return { + item: 'asd', + stored: 12, + ttl: 123, + }; + }, + async set(): Promise {}, + async drop(): Promise {}, + isReady(): boolean { return true; }, + validateSegmentName(segment: string): null { return null; }, +}; + +const client = new Client(Memory, { partition: 'cache' }); + +client.start().then(() => {}); +client.stop().then(() => {}); + +const cache = new Policy({ + expiresIn: 5000, +}, client, 'cache'); + +cache.set('foo', 'bar', 5000).then(() => {}); + +cache.get('foo').then(() => {}); + +cache.drop('foo').then(() => {}); + +cache.isReady(); + +cache.stats(); + +const decoratedCache = new Policy({ + getDecoratedValue: true, +}, client, 'cache2'); + +decoratedCache.get('test').then((a: DecoratedResult) => { + const res: string = a.value; +}); diff --git a/types/hapi__catbox/index.d.ts b/types/hapi__catbox/index.d.ts new file mode 100644 index 0000000000..4cc0784ca9 --- /dev/null +++ b/types/hapi__catbox/index.d.ts @@ -0,0 +1,287 @@ +// Type definitions for @hapi/catbox 10.2 +// Project: https://github.com/hapijs/catbox +// Definitions by: Jason Swearingen +// AJP +// Rodrigo Saboya +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/** + * Client + * The Client object provides a low-level cache abstraction. The object is constructed using new Client(engine, options) where: + * engine - is an object or a prototype function implementing the cache strategy: + * * function - a prototype function with the signature function(options). catbox will call new func(options). + * * object - a pre instantiated client implementation object. Does not support passing options. + * options - the strategy configuration object. Each strategy defines its own configuration options with the following common options: + * * partition - the partition name used to isolate the cached results across multiple clients. The partition name is used as the MongoDB database name, + * the Riak bucket, or as a key prefix in Redis and Memcached. To share the cache across multiple clients, use the same partition name. + * @see {@link https://github.com/hapijs/catbox#client} + */ +export class Client implements ClientApi { + constructor(engine: EnginePrototypeOrObject, options: ClientOptions); + + /** start() - creates a connection to the cache server. Must be called before any other method is available. */ + start(): Promise; + /** stop() - terminates the connection to the cache server. */ + stop(): Promise; + /** + * get(key, callback) - retrieve an item from the cache engine if found where: + * * key - a cache key object (see [ICacheKey]). + */ + get(key: CacheKey): Promise>; + /** + * set(key, value, ttl, callback) - store an item in the cache for a specified length of time, where: + * * key - a cache key object (see [ICacheKey]). + * * value - the string or object value to be stored. + * * ttl - a time-to-live value in milliseconds after which the item is automatically removed from the cache (or is marked invalid). + */ + set(key: CacheKey, value: T, ttl: number): Promise; + /** + * drop(key, callback) - remove an item from cache where: + * * key - a cache key object (see [ICacheKey]). + */ + drop(key: CacheKey): Promise; + /** isReady() - returns true if cache engine determines itself as ready, false if it is not ready. */ + isReady(): boolean; + /** validateSegmentName(segment) - returns null if the segment name is valid (see below), otherwise should return an instance of Error with an appropriate message. */ + validateSegmentName(segment: string): null | Error; +} + +export type EnginePrototypeOrObject = EnginePrototype | ClientApi; + +/** + * A prototype CatBox engine function + */ +export interface EnginePrototype { + new(settings: ClientOptions): ClientApi; +} + +/** + * Client API + * The Client object provides the following methods: + * @see {@link https://github.com/hapijs/catbox#api} + */ +export interface ClientApi { + /** start() - creates a connection to the cache server. Must be called before any other method is available. */ + start(): Promise; + /** stop() - terminates the connection to the cache server. */ + stop(): void; + /** + * get(key, callback) - retrieve an item from the cache engine if found where: + * * key - a cache key object (see [ICacheKey]). + */ + get(key: CacheKey): Promise>; + /** + * set(key, value, ttl) - store an item in the cache for a specified length of time, where: + * * key - a cache key object (see [ICacheKey]). + * * value - the string or object value to be stored. + * * ttl - a time-to-live value in milliseconds after which the item is automatically removed from the cache (or is marked invalid). + */ + set(key: CacheKey, value: T, ttl: number): Promise; + /** + * drop(key) - remove an item from cache where: + * * key - a cache key object (see [ICacheKey]). + */ + drop(key: CacheKey): Promise; + /** isReady() - returns true if cache engine determines itself as ready, false if it is not ready. */ + isReady(): boolean; + /** validateSegmentName(segment) - returns null if the segment name is valid (see below), otherwise should return an instance of Error with an appropriate message. */ + validateSegmentName(segment: string): null | Error; +} + +/** + * Any method with a key argument takes an object with the following required properties: + */ +export interface CacheKey { + /** segment - a caching segment name string. Enables using a single cache server for storing different sets of items with overlapping ids. */ + segment: string; + /** id - a unique item identifier string (per segment). Can be an empty string. */ + id: string; +} + +/** Cached object contains the following: */ +export interface CachedObject { + /** item - the value stored in the cache using set(). */ + item: T; + /** stored - the timestamp when the item was stored in the cache (in milliseconds). */ + stored: number; + /** ttl - the remaining time-to-live (not the original value used when storing the object). */ + ttl: number; +} + +export interface ClientOptions { + /** + * this will store items under keys that start with this value. + */ + partition: string; +} + +export type PolicyOptionVariants = PolicyOptions | DecoratedPolicyOptions; + +export type Id = string | { id: string }; + +/** + * The Policy object provides a convenient cache interface by setting a + * global policy which is automatically applied to every storage action. + * The object is constructed using new Policy(options, [cache, segment]) where: + * * options - an object with the IPolicyOptions structure + * * cache - a Client instance (which has already been started). + * * segment - required when cache is provided. The segment name used to + * isolate cached items within the cache partition. + * @see {@link https://github.com/hapijs/catbox#policy} + */ +export class Policy> { + constructor(options: O, cache: Client, segment: string); + /** + * retrieve an item from the cache. If the item is not + * found and the generateFunc method was provided, + * a new value is generated, stored in the cache, and returned. + * Multiple concurrent requests are queued and processed once. The method arguments are: + * @param id the unique item identifier (within the policy segment). + * Can be a string or an object with the required 'id' key. + */ + get(id: Id): Promise ? DecoratedResult : T | null>; + + /** + * store an item in the cache where: + * @param id - the unique item identifier (within the policy segment). + * @param value - the string or object value to be stored. + * @param ttl - a time-to-live override value in milliseconds after which the item is automatically + * removed from the cache (or is marked invalid). + * This should be set to 0 in order to use the caching rules configured when creating the Policy object. + */ + set(id: Id, value: T, ttl?: number): Promise; + /** + * remove the item from cache where: + * @param id the unique item identifier (within the policy segment). + */ + drop(id: Id): Promise; + /** + * given a created timestamp in milliseconds, returns the time-to-live left + * based on the configured rules. + */ + ttl(created: number): number; + /** changes the policy rules after construction (note that items already stored will not be affected) */ + rules(options: PolicyOptions): void; + /** + * returns true if cache engine determines itself as ready, false if it is not ready or if + * here is no cache engine set. + */ + isReady(): boolean; + /** an object with cache statistics */ + stats(): CacheStatisticsObject; +} + +export interface DecoratedResult { + value: T; + cached: PolicyGetCachedOptions; + report: PolicyGetReportLog; +} + +export interface PolicyGetCachedOptions { + /** item - the cached value. */ + item: T; + /** stored - the timestamp when the item was stored in the cache. */ + stored: number; + /** ttl - the cache ttl value for the record. */ + ttl: number; + /** isStale - true if the item is stale. */ + isStale: boolean; +} + +/** + * @see {@link https://github.com/hapijs/catbox#policy} + */ +export interface PolicyOptions { + /** expiresIn - relative expiration expressed in the number of milliseconds since the item was saved in the cache. Cannot be used together with expiresAt. */ + expiresIn?: number; + /** expiresAt - time of day expressed in 24h notation using the 'HH:MM' format, at which point all cache records for the route expire. Uses local time. Cannot be used together with expiresIn. */ + expiresAt?: string; + /** generateFunc - a function used to generate a new cache item if one is not found in the cache when calling get(). The method's signature is function(id, next) where: */ + generateFunc?: GenerateFunc; + /** + * staleIn - number of milliseconds to mark an item stored in cache as stale and attempt to regenerate it when generateFunc is provided. + * Must be less than expiresIn. Alternatively function that returns staleIn value in milliseconds. The function signature is function(stored, ttl) where: + * * stored - the timestamp when the item was stored in the cache (in milliseconds). + * * ttl - the remaining time-to-live (not the original value used when storing the object). + */ + staleIn?: number | ((stored: number, ttl: number) => number); + /** staleTimeout - number of milliseconds to wait before returning a stale value while generateFunc is generating a fresh value. */ + staleTimeout?: number; + /** + * generateTimeout - number of milliseconds to wait before returning a timeout error when the generateFunc function takes too long to return a value. + * When the value is eventually returned, it is stored in the cache for future requests. Required if generateFunc is present. + * Set to false to disable timeouts which may cause all get() requests to get stuck forever. + */ + generateTimeout?: number | false; + /** dropOnError - if true, an error or timeout in the generateFunc causes the stale value to be evicted from the cache. Defaults to true. */ + dropOnError?: boolean; + /** generateOnReadError - if false, an upstream cache read error will stop the get() method from calling the generate function and will instead pass back the cache error. Defaults to true. */ + generateOnReadError?: boolean; + /** generateIgnoreWriteError - if false, an upstream cache write error will be passed back with the generated value when calling the get() method. Defaults to true. */ + generateIgnoreWriteError?: boolean; + /** + * pendingGenerateTimeout - number of milliseconds while generateFunc call is in progress for a given id, before a subsequent generateFunc call is allowed. + * @default 0, no blocking of concurrent generateFunc calls beyond staleTimeout. + */ + pendingGenerateTimeout?: number; +} + +export interface DecoratedPolicyOptions extends PolicyOptions { + /** + * @default false + */ + getDecoratedValue: boolean | undefined; +} + +export interface GenerateFuncFlags { + ttl: number; +} + +/** + * generateFunc + * Is used in PolicyOptions + * A function used to generate a new cache item if one is not found in the cache when calling get(). The method's signature is function(id) + * @param id - the id string or object provided to the get() method. + * @param next - the method called when the new item is returned with the signature function(err, value, ttl) where: + * * err - an error condition. + * * value - the new value generated. + * * ttl - the cache ttl value in milliseconds. Set to 0 to skip storing in the cache. Defaults to the cache global policy. + * @see {@link https://github.com/hapijs/catbox#policy} + */ +export type GenerateFunc = (id: Id, flags: GenerateFuncFlags) => Promise; + +/** + * An object with logging information about the generation operation containing the following keys (as relevant): + */ +export interface PolicyGetReportLog { + /** msec - the cache lookup time in milliseconds. */ + msec: number; + /** stored - the timestamp when the item was stored in the cache. */ + stored: number; + /** isStale - true if the item is stale. */ + isStale: boolean; + /** ttl - the cache ttl value for the record. */ + ttl: number; + /** error - lookup error. */ + error?: Error; +} + +/** + * an object with cache statistics where: + */ +export interface CacheStatisticsObject { + /** sets - number of cache writes. */ + sets: number; + /** gets - number of cache get() requests. */ + gets: number; + /** hits - number of cache get() requests in which the requested id was found in the cache (can be stale). */ + hits: number; + /** stales - number of cache reads with stale requests (only counts the first request in a queued get() operation). */ + stales: number; + /** generates - number of calls to the generate function. */ + generates: number; + /** errors - cache operations errors. TODO check this */ + errors: number; +} diff --git a/types/sindresorhus__string-hash/tsconfig.json b/types/hapi__catbox/tsconfig.json similarity index 79% rename from types/sindresorhus__string-hash/tsconfig.json rename to types/hapi__catbox/tsconfig.json index c0464c0e42..6e01806189 100644 --- a/types/sindresorhus__string-hash/tsconfig.json +++ b/types/hapi__catbox/tsconfig.json @@ -13,8 +13,8 @@ "../" ], "paths": { - "@sindresorhus/string-hash": [ - "sindresorhus__string-hash" + "@hapi/catbox": [ + "hapi__catbox" ] }, "types": [], @@ -23,6 +23,6 @@ }, "files": [ "index.d.ts", - "sindresorhus__string-hash-tests.ts" + "hapi__catbox-tests.ts" ] } diff --git a/types/junk/tslint.json b/types/hapi__catbox/tslint.json similarity index 100% rename from types/junk/tslint.json rename to types/hapi__catbox/tslint.json diff --git a/types/hapi__code/hapi__code-tests.ts b/types/hapi__code/hapi__code-tests.ts new file mode 100644 index 0000000000..78f04046e4 --- /dev/null +++ b/types/hapi__code/hapi__code-tests.ts @@ -0,0 +1,170 @@ +import { expect, settings, fail, count, incomplete, thrownAt } from "@hapi/code"; + +expect(10).to.be.above(5); +expect("abc").to.be.a.string(); +expect([1, 2]).to.be.an.array(); +expect(20).to.be.at.least(20); +expect("abc").to.have.length(3); +expect("abc").to.be.a.string().and.contain(["a", "b"]); +expect(6).to.be.in.range(5, 6); + +expect(10).to.not.be.above(20); +expect([1, 2, 3]).to.shallow.include(3); +expect([1, 1, 2]).to.only.include([1, 2]); +expect([1, 2]).to.once.include([1, 2]); +expect([1, 2, 3]).to.part.include([1, 4]); + +expect(10, "Age").to.be.above(5); + +const func = function() { return arguments; }; // tslint:disable-line only-arrow-functions +expect(func()).to.be.arguments(); + +expect([1, 2]).to.be.an.array(); + +expect(true).to.be.a.boolean(); + +expect(new Date()).to.be.a.date(); + +const err = new Error("Oops an error occured."); +expect(err).to.be.an.error(); +expect(err).to.be.an.error(Error); +expect(err).to.be.an.error("Oops an error occured."); +expect(err).to.be.an.error(Error, /occured/); + +expect(func).to.be.a.function(); + +expect(123).to.be.a.number(); + +expect(/abc/).to.be.a.regexp(); + +expect("abc").to.be.a.string(); + +expect({ a: "1" }).to.be.an.object(); + +expect(true).to.be.true(); + +expect(false).to.be.false(); + +expect(null).to.be.null(); + +expect(undefined).to.be.undefined(); + +expect("abc").to.include("ab"); +expect("abc").to.only.include("abc"); +expect("aaa").to.only.include("a"); +expect("abc").to.once.include("b"); +expect("abc").to.include(["a", "c"]); +expect("abc").to.part.include(["a", "d"]); + +expect([1, 2, 3]).to.include(1); +expect([{ a: 1 }]).to.include({ a: 1 }); +expect([1, 2, 3]).to.include([1, 2]); +expect([{ a: 1 }]).to.include([{ a: 1 }]); +expect([1, 1, 2]).to.only.include([1, 2]); +expect([1, 2]).to.once.include([1, 2]); +expect([1, 2, 3]).to.part.include([1, 4]); +expect([[1], [2]]).to.include([[1]]); + +interface TestType { + a: number; + b?: number; + c?: number; + d?: number; +} + +interface TestType2 { + a: number[]; + b?: number[]; + c: number[]; +} + +expect({ a: 1, b: 2, c: 3 }).to.include("a"); +expect({ a: 1, b: 2, c: 3 }).to.include(["a", "c"]); +expect({ a: 1, b: 2, c: 3 }).to.only.include(["a", "b", "c"]); +expect({ a: 1, b: 2, c: 3 }).to.include({ a: 1 }); +expect({ a: 1, b: 2, c: 3 }).to.include({ a: 1 }); +expect({ a: 1, b: 2, c: 3 }).to.include({ a: 1, c: 3 }); +expect({ a: 1, b: 2, c: 3 }).to.part.include({ a: 1, d: 4 }); +expect({ a: 1, b: 2, c: 3 }).to.part.include({ a: 1, d: 4 }); +expect({ a: 1, b: 2, c: 3 }).to.only.include({ a: 1, b: 2, c: 3 }); +expect({ a: [1], b: [2], c: [3] }).to.include({ a: [1], c: [3] }); +expect({ a: [1], b: [2], c: [3] }).to.include({ a: [1], c: [3] }); + +expect("https://example.org/secure").to.startWith("https://"); + +expect("http://example.org/relative").to.endWith("/relative"); + +expect(4).to.exist(); +expect(null).to.not.exist(); + +expect("abc").to.be.empty(); + +expect("abcd").to.have.length(4); + +expect(5).to.equal(5); +expect({ a: 1 }).to.equal({ a: 1 }); +expect([1, 2, 3]).to.equal([1, 2, 3]); + +expect(Object.create(null)).to.equal({}, { prototype: false }); + +expect(5).to.shallow.equal(5); +expect({ a: 1 }).to.shallow.equal({ a: 1 }); + +expect(10).to.be.above(5); + +expect(10).to.be.at.least(10); + +expect(10).to.be.below(20); + +expect(10).to.be.at.most(10); + +expect(10).to.be.within(10, 20); +expect(20).to.be.within(10, 20); + +expect(15).to.be.between(10, 20); + +expect(10).to.be.about(9, 1); + +expect(new Date()).to.be.an.instanceof(Date); + +expect("a5").to.match(/\w\d/); +expect(["abc", "def"]).to.match(/^[\w\d,]*$/); +expect(1).to.match(/^\d$/); + +expect("x").to.satisfy(value => value === "x"); + +class CustomError extends Error { + call: (message: string) => Error; +} + +const throws = () => { + throw new CustomError("Oh no!"); +}; + +expect(throws).to.throw(CustomError, "Oh no!"); + +fail("This should not occur"); + +expect(count()).to.be.a.number(); + +expect(incomplete() as null).to.be.null().and.not.be.an.array(); + +const error = thrownAt(new Error("oops")); +expect(error).to.not.be.undefined(); +expect(error.column).to.exist(); + +const foo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; +settings.truncateMessages = false; +expect(foo).to.equal([]); + +const bar = Object.create(null); +settings.comparePrototypes = false; +expect(bar).to.equal({}); + +const rejection = Promise.reject(new Error('Oh no!')); +/* await */ expect(rejection).to.reject('Oh no!'); +/* await */ expect(rejection).rejects('Oh no!'); + +const typedRejection = Promise.reject(new CustomError('Oh no!')); +/* await */ expect(typedRejection).to.reject(CustomError, 'Oh no!'); +/* await */ expect(typedRejection).rejects(CustomError, 'Oh no!'); diff --git a/types/hapi__code/index.d.ts b/types/hapi__code/index.d.ts new file mode 100644 index 0000000000..511c3f1628 --- /dev/null +++ b/types/hapi__code/index.d.ts @@ -0,0 +1,195 @@ +// Type definitions for @hapi/code 5.3 +// Project: https://github.com/hapijs/code +// Definitions by: Prashant Tiwari +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** Generates an assertion object. */ +export function expect(value: T | T[], prefix?: string): AssertionChain; +/** Makes the test fail with the given message. */ +export function fail(message: string): void; +/** Returns the total number of assertions created using the expect() method. */ +export function count(): number; +/** Returns an array of the locations where incomplete assertions were declared or null if no incomplete assertions found. */ +export function incomplete(): string[] | null; +/** Returns the filename, line number, and column number of where the error was created. */ +export function thrownAt(error?: Error): CodeError; +/** Configure code. */ +export const settings: Settings; + +export type AssertionChain = Assertion & Expectation; + +export type Assertion = Grammar & Flags; + +export type Expectation = Types & Values; + +export interface Grammar { + /** Connecting word. */ + a: AssertionChain; + /** Connecting word. */ + an: AssertionChain; + /** Connecting word. */ + and: AssertionChain; + /** Connecting word. */ + at: AssertionChain; + /** Connecting word. */ + be: AssertionChain; + /** Connecting word. */ + have: AssertionChain; + /** Connecting word. */ + in: AssertionChain; + /** Connecting word. */ + to: AssertionChain; +} + +export interface Flags { + /** Inverses the expected result of any assertion */ + not: AssertionChain; + /** + * Requires that inclusion matches appear only once in the provided value. + * Used by include(). + */ + once: AssertionChain; + /** + * Requires that only the provided elements appear in the provided value. + * Used by include(). + */ + only: AssertionChain; + /** + * Allows a partial match when asserting inclusion + * Used by include(). Defaults to false. + */ + part: AssertionChain; + /** + * Performs a comparison using strict equality (===). + * Code defaults to deep comparison. Used by equal() and include(). + */ + shallow: AssertionChain; +} + +export interface Types { + /** Asserts that the reference value is an arguments object. */ + arguments(): AssertionChain; + /** Asserts that the reference value is an Array. */ + array(): AssertionChain; + /** Asserts that the reference value is a boolean. */ + boolean(): AssertionChain; + /** Asserts that the reference value is a Buffer. */ + buffer(): AssertionChain; + /** Asserts that the reference value is a Date. */ + date(): AssertionChain; + /** Asserts that the reference value is an error. */ + error(type?: any, message?: string | RegExp): AssertionChain; + /** Asserts that the reference value is a function. */ + function(): AssertionChain; + /** Asserts that the reference value is a number. */ + number(): AssertionChain; + /** Asserts that the reference value is a RegExp. */ + regexp(): AssertionChain; + /** Asserts that the reference value is a string. */ + string(): AssertionChain; + /** Asserts that the reference value is an object (excluding array, buffer, or other native objects). */ + object(): AssertionChain; +} + +export interface Values { + /** Asserts that the reference value is true. */ + true(): AssertionChain; + /** Asserts that the reference value is false. */ + false(): AssertionChain; + /** Asserts that the reference value is null. */ + null(): AssertionChain; + /** Asserts that the reference value is undefined. */ + undefined(): AssertionChain; + /** Asserts that the reference value (a string, array, or object) includes the provided values. */ + include(values: string | string[] | T | T[]): AssertionChain; + /** Asserts that the reference value (a string, array, or object) includes the provided values. */ + includes(values: string | string[] | T | T[]): AssertionChain; + /** Asserts that the reference value (a string, array, or object) includes the provided values. */ + contain(values: string | string[] | T | T[]): AssertionChain; + /** Asserts that the reference value (a string, array, or object) includes the provided values. */ + contains(values: string | string[] | T | T[]): AssertionChain; + /** Asserts that the reference value (a string) starts with the provided value. */ + startWith(value: string): AssertionChain; + /** Asserts that the reference value (a string) starts with the provided value. */ + startsWith(value: string): AssertionChain; + /** Asserts that the reference value (a string) ends with the provided value. */ + endWith(value: string): AssertionChain; + /** Asserts that the reference value (a string) ends with the provided value. */ + endsWith(value: string): AssertionChain; + /** Asserts that the reference value exists (not null or undefined). */ + exist(): AssertionChain; + /** Asserts that the reference value exists (not null or undefined). */ + exists(): AssertionChain; + /** Asserts that the reference value has a length property equal to zero or an object with no keys. */ + empty(): AssertionChain; + /** Asserts that the reference value has a length property matching the provided size or an object with the specified number of keys. */ + length(size: number): AssertionChain; + /** Asserts that the reference value equals the provided value. */ + equal(value: T | T[], options?: any): AssertionChain; + /** Asserts that the reference value equals the provided value. */ + equals(value: T | T[], options?: any): AssertionChain; + /** Asserts that the reference value is greater than (>) the provided value. */ + above(value: T): AssertionChain; + /** Asserts that the reference value is greater than (>) the provided value. */ + greaterThan(value: T): AssertionChain; + /** Asserts that the reference value is at least (>=) the provided value. */ + least(value: T): AssertionChain; + /** Asserts that the reference value is at least (>=) the provided value. */ + min(value: T): AssertionChain; + /** Asserts that the reference value is less than (<) the provided value. */ + below(value: T): AssertionChain; + /** Asserts that the reference value is less than (<) the provided value. */ + lessThan(value: T): AssertionChain; + /** Asserts that the reference value is at most (<=) the provided value. */ + most(value: T): AssertionChain; + /** Asserts that the reference value is at most (<=) the provided value. */ + max(value: T): AssertionChain; + /** Asserts that the reference value is within (from <= value <= to) the provided values. */ + within(from: T, to: T): AssertionChain; + /** Asserts that the reference value is within (from <= value <= to) the provided values. */ + range(from: T, to: T): AssertionChain; + /** Asserts that the reference value is between but not equal (from < value < to) the provided values. */ + between(from: T, to: T): AssertionChain; + /** Asserts that the reference value is about the provided value within a delta margin of difference. */ + about(value: number, delta: number): AssertionChain; + /** Asserts that the reference value has the provided instanceof value. */ + instanceof(type: any): AssertionChain; + /** Asserts that the reference value has the provided instanceof value. */ + instanceOf(type: any): AssertionChain; + /** Asserts that the reference value's toString() representation matches the provided regular expression. */ + match(regex: RegExp): AssertionChain; + /** Asserts that the reference value's toString() representation matches the provided regular expression. */ + matches(regex: RegExp): AssertionChain; + /** Asserts that the Promise reference value rejects with an exception when called */ + reject(type?: any, message?: string | RegExp): AssertionChain; + /** Asserts that the Promise reference value rejects with an exception when called */ + rejects(type?: any, message?: string | RegExp): AssertionChain; + /** Asserts that the reference value satisfies the provided validator function. */ + satisfy(validator: (value: T) => boolean): AssertionChain; + /** Asserts that the reference value satisfies the provided validator function. */ + satisfies(validator: (value: T) => boolean): AssertionChain; + /** Asserts that the function reference value throws an exception when called. */ + throw(type?: any, message?: string | RegExp): AssertionChain; + /** Asserts that the function reference value throws an exception when called. */ + throws(type?: any, message?: string | RegExp): AssertionChain; +} + +export interface Settings { + /** + * Truncate long assertion error messages for readability? + * Defaults to true. + */ + truncateMessages?: boolean; + /** + * Ignore object prototypes when doing a deep comparison? + * Defaults to false. + */ + comparePrototypes?: boolean; +} + +export interface CodeError { + filename: string; + line: string; + column: string; +} diff --git a/types/hapi__code/tsconfig.json b/types/hapi__code/tsconfig.json new file mode 100644 index 0000000000..2578872f5b --- /dev/null +++ b/types/hapi__code/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/code": [ + "hapi__code" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__code-tests.ts" + ] +} diff --git a/types/load-json-file/tslint.json b/types/hapi__code/tslint.json similarity index 100% rename from types/load-json-file/tslint.json rename to types/hapi__code/tslint.json diff --git a/types/hapi__cryptiles/hapi__cryptiles-tests.ts b/types/hapi__cryptiles/hapi__cryptiles-tests.ts new file mode 100644 index 0000000000..e86261421a --- /dev/null +++ b/types/hapi__cryptiles/hapi__cryptiles-tests.ts @@ -0,0 +1,5 @@ +import * as cryptiles from "@hapi/cryptiles"; + +cryptiles.randomString(0); // $ExpectType string +cryptiles.randomDigits(0); // $ExpectType string +cryptiles.fixedTimeComparison("", ""); // $ExpectTpe boolean diff --git a/types/hapi__cryptiles/index.d.ts b/types/hapi__cryptiles/index.d.ts new file mode 100644 index 0000000000..3692fbdd4a --- /dev/null +++ b/types/hapi__cryptiles/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for @hapi/cryptiles 4.2 +// Project: https://github.com/hapijs/cryptiles +// Definitions by: Alex Wendland +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string. + */ +export function randomString(size: number): string; + +/** + * Returns a cryptographically strong pseudo-random data string consisting of only numerical digits (0-9). + * Takes a size argument for the length of the string. + */ +export function randomDigits(size: number): string; + +/** + * Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). + * Returns true if the strings match, false if they differ. + */ +export function fixedTimeComparison(a: string, b: string): boolean; diff --git a/types/sindresorhus__to-milliseconds/tsconfig.json b/types/hapi__cryptiles/tsconfig.json similarity index 77% rename from types/sindresorhus__to-milliseconds/tsconfig.json rename to types/hapi__cryptiles/tsconfig.json index be9b1a9bec..0efb6db692 100644 --- a/types/sindresorhus__to-milliseconds/tsconfig.json +++ b/types/hapi__cryptiles/tsconfig.json @@ -13,8 +13,8 @@ "../" ], "paths": { - "@sindresorhus/to-milliseconds": [ - "sindresorhus__to-milliseconds" + "@hapi/cryptiles": [ + "hapi__cryptiles" ] }, "types": [], @@ -23,6 +23,6 @@ }, "files": [ "index.d.ts", - "sindresorhus__to-milliseconds-tests.ts" + "hapi__cryptiles-tests.ts" ] } diff --git a/types/loud-rejection/tslint.json b/types/hapi__cryptiles/tslint.json similarity index 100% rename from types/loud-rejection/tslint.json rename to types/hapi__cryptiles/tslint.json diff --git a/types/hapi__hapi/index.d.ts b/types/hapi__hapi/index.d.ts new file mode 100644 index 0000000000..d382fafb64 --- /dev/null +++ b/types/hapi__hapi/index.d.ts @@ -0,0 +1,4047 @@ +// Type definitions for @hapi/hapi 18.2 +// Project: https://github.com/hapijs/hapi, https://hapijs.com +// Definitions by: Rafael Souza Fijalkowski +// Justin Simms +// Simon Schick +// Rodrigo Saboya +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WARNING: BACKWARDS INCOMPATIBLE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + +/// + +import * as Boom from '@hapi/boom'; +import * as http from 'http'; +import * as https from 'https'; +import * as Shot from '@hapi/shot'; +import * as stream from 'stream'; +import * as url from 'url'; +import * as zlib from 'zlib'; + +import { MimosOptions } from '@hapi/mimos'; +import { SealOptions, SealOptionsSub } from '@hapi/iron'; +import { ValidationOptions, SchemaMap, Schema } from '@hapi/joi'; +import Podium = require('@hapi/podium'); +import { PolicyOptionVariants, EnginePrototypeOrObject, PolicyOptions, EnginePrototype, Policy, ClientApi, ClientOptions } from '@hapi/catbox'; + +/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Plugin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + +/** + * one of + * a single plugin name string. + * an array of plugin name strings. + * an object where each key is a plugin name and each matching value is a + * {@link https://www.npmjs.com/package/semver version range string} which must match the registered + * plugin version. + */ +export type Dependencies = string | string[] | { + [key: string]: string; +}; + +/** + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverregistrations) + */ + +/* tslint:disable-next-line:no-empty-interface */ +export interface PluginsListRegistered { +} + +/** + * An object of the currently registered plugins where each key is a registered plugin name and the value is an + * object containing: + * * version - the plugin version. + * * name - the plugin name. + * * options - (optional) options passed to the plugin during registration. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverregistrations) + */ +export interface PluginRegistered { + /** + * the plugin version. + */ + version: string; + + /** + * the plugin name. + */ + name: string; + + /** + * options used to register the plugin. + */ + options: object; +} + +/* tslint:disable-next-line:no-empty-interface */ +export interface PluginsStates { +} + +/* tslint:disable-next-line:no-empty-interface */ +export interface PluginSpecificConfiguration { +} + +export interface PluginNameVersion { + /** + * (required) the plugin name string. The name is used as a unique key. Published plugins (e.g. published in the npm + * registry) should use the same name as the name field in their 'package.json' file. Names must be + * unique within each application. + */ + name: string; + + /** + * optional plugin version. The version is only used informatively to enable other plugins to find out the versions loaded. The version should be the same as the one specified in the plugin's + * 'package.json' file. + */ + version?: string; +} + +export interface PluginPackage { + /** + * Alternatively, the name and version can be included via the pkg property containing the 'package.json' file for the module which already has the name and version included + */ + pkg: any; +} + +/** + * Plugins provide a way to organize application code by splitting the server logic into smaller components. Each + * plugin can manipulate the server through the standard server interface, but with the added ability to sandbox + * certain properties. For example, setting a file path in one plugin doesn't affect the file path set + * in another plugin. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#plugins) + * + * The type T is the type of the plugin options. + */ +export interface PluginBase { + /** + * (required) the registration function with the signature async function(server, options) where: + * * server - the server object with a plugin-specific server.realm. + * * options - any options passed to the plugin during registration via server.register(). + */ + register: (server: Server, options: T) => void | Promise; + + /** (optional) if true, allows the plugin to be registered multiple times with the same server. Defaults to false. */ + multiple?: boolean; + + /** (optional) a string or an array of strings indicating a plugin dependency. Same as setting dependencies via server.dependency(). */ + dependencies?: Dependencies; + + /** + * Allows defining semver requirements for node and hapi. + * @default Allows all. + */ + requirements?: { + node?: string; + hapi?: string; + }; + + /** once - (optional) if true, will only register the plugin once per server. If set, overrides the once option passed to server.register(). Defaults to no override. */ + once?: boolean; +} + +export type Plugin = PluginBase & (PluginNameVersion | PluginPackage); + +/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Request + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + +/** + * User extensible types user credentials. + */ +// tslint:disable-next-line:no-empty-interface +export interface UserCredentials { +} + +/** + * User extensible types app credentials. + */ +// tslint:disable-next-line:no-empty-interface +export interface AppCredentials { +} + +/** + * User-extensible type for request.auth credentials. + */ +export interface AuthCredentials { + /** + * The application scopes to be granted. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsauthaccessscope) + */ + scope?: string[]; + /** + * If set, will only work with routes that set `access.entity` to `user`. + */ + user?: UserCredentials; + + /** + * If set, will only work with routes that set `access.entity` to `app`. + */ + app?: AppCredentials; +} + +/** + * Authentication information: + * * artifacts - an artifact object received from the authentication strategy and used in authentication-related actions. + * * credentials - the credential object received during the authentication process. The presence of an object does not mean successful authentication. + * * error - the authentication error is failed and mode set to 'try'. + * * isAuthenticated - true if the request has been successfully authenticated, otherwise false. + * * isAuthorized - true is the request has been successfully authorized against the route authentication access configuration. If the route has not access rules defined or if the request failed + * authorization, set to false. + * * mode - the route authentication mode. + * * strategy - the name of the strategy used. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestauth) + */ +export interface RequestAuth { + /** an artifact object received from the authentication strategy and used in authentication-related actions. */ + artifacts: object; + /** the credential object received during the authentication process. The presence of an object does not mean successful authentication. */ + credentials: AuthCredentials; + /** the authentication error is failed and mode set to 'try'. */ + error: Error; + /** true if the request has been successfully authenticated, otherwise false. */ + isAuthenticated: boolean; + /** + * true is the request has been successfully authorized against the route authentication access configuration. If the route has not access rules defined or if the request failed authorization, + * set to false. + */ + isAuthorized: boolean; + /** the route authentication mode. */ + mode: string; + /** the name of the strategy used. */ + strategy: string; +} + +/** + * 'peek' - emitted for each chunk of payload data read from the client connection. The event method signature is function(chunk, encoding). + * 'finish' - emitted when the request payload finished reading. The event method signature is function (). + * 'disconnect' - emitted when a request errors or aborts unexpectedly. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestevents) + */ +export type RequestEventType = 'peek' | 'finish' | 'disconnect'; + +/** + * Access: read only and the public podium interface. + * The request.events supports the following events: + * * 'peek' - emitted for each chunk of payload data read from the client connection. The event method signature is function(chunk, encoding). + * * 'finish' - emitted when the request payload finished reading. The event method signature is function (). + * * 'disconnect' - emitted when a request errors or aborts unexpectedly. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestevents) + */ +export interface RequestEvents extends Podium { + /** + * Access: read only and the public podium interface. + * The request.events supports the following events: + * * 'peek' - emitted for each chunk of payload data read from the client connection. The event method signature is function(chunk, encoding). + * * 'finish' - emitted when the request payload finished reading. The event method signature is function (). + * * 'disconnect' - emitted when a request errors or aborts unexpectedly. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestevents) + */ + on(criteria: 'peek', listener: PeekListener): void; + + on(criteria: 'finish' | 'disconnect', listener: (data: undefined) => void): void; + + /** + * Access: read only and the public podium interface. + * The request.events supports the following events: + * * 'peek' - emitted for each chunk of payload data read from the client connection. The event method signature is function(chunk, encoding). + * * 'finish' - emitted when the request payload finished reading. The event method signature is function (). + * * 'disconnect' - emitted when a request errors or aborts unexpectedly. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestevents) + */ + once(criteria: 'peek', listener: PeekListener): void; + + once(criteria: 'finish' | 'disconnect', listener: (data: undefined) => void): void; +} + +/** + * Request information: + * * acceptEncoding - the request preferred encoding. + * * cors - if CORS is enabled for the route, contains the following: + * * isOriginMatch - true if the request 'Origin' header matches the configured CORS restrictions. Set to false if no 'Origin' header is found or if it does not match. Note that this is only + * available after the 'onRequest' extension point as CORS is configured per-route and no routing decisions are made at that point in the request lifecycle. + * * host - content of the HTTP 'Host' header (e.g. 'example.com:8080'). + * * hostname - the hostname part of the 'Host' header (e.g. 'example.com'). + * * id - a unique request identifier (using the format '{now}:{connection.info.id}:{5 digits counter}'). + * * received - request reception timestamp. + * * referrer - content of the HTTP 'Referrer' (or 'Referer') header. + * * remoteAddress - remote client IP address. + * * remotePort - remote client port. + * * responded - request response timestamp (0 is not responded yet). + * Note that the request.info object is not meant to be modified. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestinfo) + */ +export interface RequestInfo { + /** the request preferred encoding. */ + acceptEncoding: string; + /** if CORS is enabled for the route, contains the following: */ + cors: { + /** + * true if the request 'Origin' header matches the configured CORS restrictions. Set to false if no 'Origin' header is found or if it does not match. Note that this is only available after + * the 'onRequest' extension point as CORS is configured per-route and no routing decisions are made at that point in the request lifecycle. + */ + isOriginMatch?: boolean; + }; + /** content of the HTTP 'Host' header (e.g. 'example.com:8080'). */ + host: string; + /** the hostname part of the 'Host' header (e.g. 'example.com'). */ + hostname: string; + /** a unique request identifier (using the format '{now}:{connection.info.id}:{5 digits counter}') */ + id: string; + /** request reception timestamp. */ + received: number; + /** content of the HTTP 'Referrer' (or 'Referer') header. */ + referrer: string; + /** remote client IP address. */ + remoteAddress: string; + /** remote client port. */ + remotePort: string; + /** request response timestamp (0 is not responded yet). */ + responded: number; + /** request processing completion timestamp (0 is still processing). */ + completed: number; +} + +/** + * The request route information object, where: + * * method - the route HTTP method. + * * path - the route path. + * * vhost - the route vhost option if configured. + * * realm - the active realm associated with the route. + * * settings - the route options object with all defaults applied. + * * fingerprint - the route internal normalized string representing the normalized path. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestroute) + */ +export interface RequestRoute { + /** the route HTTP method. */ + method: Util.HTTP_METHODS_PARTIAL; + + /** the route path. */ + path: string; + + /** the route vhost option if configured. */ + vhost?: string | string[]; + + /** the active realm associated with the route. */ + realm: ServerRealm; + + /** the route options object with all defaults applied. */ + settings: RouteOptions; + + /** the route internal normalized string representing the normalized path. */ + fingerprint: string; + + auth: { + /** + * Validates a request against the route's authentication access configuration, where: + * @param request - the request object. + * @return Return value: true if the request would have passed the route's access requirements. + * Note that the route's authentication mode and strategies are ignored. The only match is made between the request.auth.credentials scope and entity information and the route access + * configuration. If the route uses dynamic scopes, the scopes are constructed against the request.query, request.params, request.payload, and request.auth.credentials which may or may + * not match between the route and the request's route. If this method is called using a request that has not been authenticated (yet or not at all), it will return false if the route + * requires any authentication. + * [See docs](https://hapijs.com/api/17.0.1#-requestrouteauthaccessrequest) + */ + access(request: Request): boolean; + }; +} + +/** + * An object containing the values of params, query, and payload before any validation modifications made. Only set when input validation is performed. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestorig) + */ +export interface RequestOrig { + params: object; + query: object; + payload: object; +} + +export interface RequestLog { + request: string; + timestamp: number; + tags: string[]; + data: string | object; + channel: string; +} + +export interface RequestQuery { + [key: string]: string | string[]; +} + +/** + * The request object is created internally for each incoming request. It is not the same object received from the node + * HTTP server callback (which is available via [request.raw.req](https://github.com/hapijs/hapi/blob/master/API.md#request.raw)). The request properties change throughout + * the request [lifecycle](https://github.com/hapijs/hapi/blob/master/API.md#request-lifecycle). + */ +export interface Request extends Podium { + /** + * Application-specific state. Provides a safe place to store application data without potential conflicts with the framework. Should not be used by plugins which should use plugins[name]. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestapp) + */ + app: ApplicationState; + + /** + * Authentication information: + * * artifacts - an artifact object received from the authentication strategy and used in authentication-related actions. + * * credentials - the credential object received during the authentication process. The presence of an object does not mean successful authentication. + * * error - the authentication error is failed and mode set to 'try'. + * * isAuthenticated - true if the request has been successfully authenticated, otherwise false. + * * isAuthorized - true is the request has been successfully authorized against the route authentication access configuration. If the route has not access rules defined or if the request failed + * authorization, set to false. + * * mode - the route authentication mode. + * * strategy - the name of the strategy used. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestauth) + */ + readonly auth: RequestAuth; + + /** + * Access: read only and the public podium interface. + * The request.events supports the following events: + * * 'peek' - emitted for each chunk of payload data read from the client connection. The event method signature is function(chunk, encoding). + * * 'finish' - emitted when the request payload finished reading. The event method signature is function (). + * * 'disconnect' - emitted when a request errors or aborts unexpectedly. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestevents) + */ + events: RequestEvents; + + /** + * The raw request headers (references request.raw.req.headers). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestheaders) + */ + readonly headers: Util.Dictionary; + + /** + * Request information: + * * acceptEncoding - the request preferred encoding. + * * cors - if CORS is enabled for the route, contains the following: + * * isOriginMatch - true if the request 'Origin' header matches the configured CORS restrictions. Set to false if no 'Origin' header is found or if it does not match. Note that this is only + * available after the 'onRequest' extension point as CORS is configured per-route and no routing decisions are made at that point in the request lifecycle. + * * host - content of the HTTP 'Host' header (e.g. 'example.com:8080'). + * * hostname - the hostname part of the 'Host' header (e.g. 'example.com'). + * * id - a unique request identifier (using the format '{now}:{connection.info.id}:{5 digits counter}'). + * * received - request reception timestamp. + * * referrer - content of the HTTP 'Referrer' (or 'Referer') header. + * * remoteAddress - remote client IP address. + * * remotePort - remote client port. + * * responded - request response timestamp (0 is not responded yet). + * Note that the request.info object is not meant to be modified. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestinfo) + */ + readonly info: RequestInfo; + + /** + * An array containing the logged request events. + * Note that this array will be empty if route log.collect is set to false. + */ + readonly logs: RequestLog[]; + + /** + * The request method in lower case (e.g. 'get', 'post'). + */ + readonly method: Util.HTTP_METHODS_PARTIAL_LOWERCASE; + + /** + * The parsed content-type header. Only available when payload parsing enabled and no payload error occurred. + */ + readonly mime: string; + + /** + * An object containing the values of params, query, and payload before any validation modifications made. Only set when input validation is performed. + */ + readonly orig: RequestOrig; + + /** + * An object where each key is a path parameter name with matching value as described in [Path parameters](https://github.com/hapijs/hapi/blob/master/API.md#path-parameters). + */ + readonly params: Util.Dictionary; + + /** + * An array containing all the path params values in the order they appeared in the path. + */ + readonly paramsArray: string[]; + + /** + * The request URI's pathname component. + */ + readonly path: string; + + /** + * The request payload based on the route payload.output and payload.parse settings. + * TODO check this typing and add references / links. + */ + readonly payload: stream.Readable | Buffer | string | object; + + /** + * Plugin-specific state. Provides a place to store and pass request-level plugin data. The plugins is an object where each key is a plugin name and the value is the state. + */ + plugins: PluginsStates; + + /** + * An object where each key is the name assigned by a route pre-handler methods function. The values are the raw values provided to the continuation function as argument. For the wrapped response + * object, use responses. + */ + readonly pre: Util.Dictionary; + + /** + * Access: read / write (see limitations below). + * The response object when set. The object can be modified but must not be assigned another object. To replace the response with another from within an extension point, use reply(response) to + * override with a different response. + * In case of an aborted request the status code will be set to `disconnectStatusCode`. + */ + response: ResponseObject | Boom; + + /** + * Same as pre but represented as the response object created by the pre method. + */ + readonly preResponses: Util.Dictionary; + + /** + * By default the object outputted from node's URL parse() method. + */ + readonly query: RequestQuery; + + /** + * An object containing the Node HTTP server objects. Direct interaction with these raw objects is not recommended. + * * req - the node request object. + * * res - the node response object. + */ + readonly raw: { + req: http.IncomingMessage; + res: http.ServerResponse; + }; + + /** + * The request route information object and method + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestroute) + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestrouteauthaccessrequest) + */ + readonly route: RequestRoute; + + /** + * Access: read only and the public server interface. + * The server object. + */ + server: Server; + + /** + * An object containing parsed HTTP state information (cookies) where each key is the cookie name and value is the matching cookie content after processing using any registered cookie definition. + */ + readonly state: Util.Dictionary; + + /** + * The parsed request URI. + */ + readonly url: url.URL; + + /** + * Returns `true` when the request is active and processing should continue and `false` when the + * request terminated early or completed its lifecycle. Useful when request processing is a + * resource-intensive operation and should be terminated early if the request is no longer active + * (e.g. client disconnected or aborted early). + */ + active(): boolean; + + /** + * Returns a response which you can pass into the reply interface where: + * @param source - the value to set as the source of the reply interface, optional. + * @param options - options for the method, optional. + * @return ResponseObject + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestgenerateresponsesource-options) + */ + /* tslint:disable-next-line:max-line-length */ + generateResponse(source: string | object | null, options?: { variety?: string; prepare?: (response: ResponseObject) => Promise; marshal?: (response: ResponseObject) => Promise; close?: (response: ResponseObject) => void; }): ResponseObject; + + /** + * Logs request-specific events. When called, the server emits a 'request' event which can be used by other listeners or plugins. The arguments are: + * @param tags - a string or an array of strings (e.g. ['error', 'database', 'read']) used to identify the event. Tags are used instead of log levels and provide a much more expressive mechanism + * for describing and filtering events. + * @param data - (optional) an message string or object with the application data being logged. If data is a function, the function signature is function() and it called once to generate (return + * value) the actual data emitted to the listeners. Any logs generated by the server internally will be emitted only on the 'request-internal' channel and will include the event.internal flag + * set to true. + * @return void + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-requestlogtags-data) + */ + log(tags: string | string[], data?: string | object | (() => string | object)): void; + + /** + * Changes the request method before the router begins processing the request where: + * @param method - is the request HTTP method (e.g. 'GET'). + * @return void + * Can only be called from an 'onRequest' extension method. + * [See docs](https://hapijs.com/api/17.0.1#-requestsetmethodmethod) + */ + setMethod(method: Util.HTTP_METHODS_PARTIAL): void; + + /** + * Changes the request URI before the router begins processing the request where: + * Can only be called from an 'onRequest' extension method. + * @param url - the new request URI. If url is a string, it is parsed with node's URL parse() method with parseQueryString set to true. url can also be set to an object compatible with node's URL + * parse() method output. + * @param stripTrailingSlash - if true, strip the trailing slash from the path. Defaults to false. + * @return void + * [See docs](https://hapijs.com/api/17.0.1#-requestseturlurl-striptrailingslash) + */ + setUrl(url: string | url.URL, stripTrailingSlash?: boolean): void; +} + +/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Response + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + +/** + * Access: read only and the public podium interface. + * The response.events object supports the following events: + * * 'peek' - emitted for each chunk of data written back to the client connection. The event method signature is function(chunk, encoding). + * * 'finish' - emitted when the response finished writing but before the client response connection is ended. The event method signature is function (). + * [See docs](https://hapijs.com/api/17.0.1#-responseevents) + */ +export interface ResponseEvents extends Podium { + /** + * 'peek' - emitted for each chunk of data written back to the client connection. The event method signature is function(chunk, encoding). + * 'finish' - emitted when the response finished writing but before the client response connection is ended. The event method signature is function (). + */ + on(criteria: 'peek', listener: PeekListener): void; + + on(criteria: 'finish', listener: (data: undefined) => void): void; + + /** + * 'peek' - emitted for each chunk of data written back to the client connection. The event method signature is function(chunk, encoding). + * 'finish' - emitted when the response finished writing but before the client response connection is ended. The event method signature is function (). + */ + once(criteria: 'peek', listener: PeekListener): void; + + once(criteria: 'finish', listener: (data: undefined) => void): void; +} + +/** + * Object where: + * * append - if true, the value is appended to any existing header value using separator. Defaults to false. + * * separator - string used as separator when appending to an existing value. Defaults to ','. + * * override - if false, the header value is not set if an existing value present. Defaults to true. + * * duplicate - if false, the header value is not modified if the provided value is already included. Does not apply when append is false or if the name is 'set-cookie'. Defaults to true. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responseheadername-value-options) + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#response-object) + */ +export interface ResponseObjectHeaderOptions { + append?: boolean; + separator?: string; + override?: boolean; + duplicate?: boolean; +} + +/** + * The response object contains the request response value along with various HTTP headers and flags. When a lifecycle + * method returns a value, the value is wrapped in a response object along with some default flags (e.g. 200 status + * code). In order to customize a response before it is returned, the h.response() method is provided. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#response-object) + * TODO, check extending from Podium is correct. Extending because of "The response object supports the following events" [See docs](https://hapijs.com/api/17.0.1#-responseevents) + */ +export interface ResponseObject extends Podium { + /** + * Default value: {}. + * Application-specific state. Provides a safe place to store application data without potential conflicts with the framework. Should not be used by plugins which should use plugins[name]. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responseapp) + */ + app: ApplicationState; + + /** + * Access: read only and the public podium interface. + * The response.events object supports the following events: + * * 'peek' - emitted for each chunk of data written back to the client connection. The event method signature is function(chunk, encoding). + * * 'finish' - emitted when the response finished writing but before the client response connection is ended. The event method signature is function (). + * [See docs](https://hapijs.com/api/17.0.1#-responseevents) + */ + readonly events: ResponseEvents; + + /** + * Default value: {}. + * An object containing the response headers where each key is a header field name and the value is the string header value or array of string. + * Note that this is an incomplete list of headers to be included with the response. Additional headers will be added once the response is prepared for transmission. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responseheaders) + */ + readonly headers: Util.Dictionary; + + /** + * Default value: {}. + * Plugin-specific state. Provides a place to store and pass request-level plugin data. plugins is an object where each key is a plugin name and the value is the state. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responseplugins) + */ + plugins: PluginsStates; + + /** + * Object containing the response handling flags. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsesettings) + */ + readonly settings: ResponseSettings; + + /** + * The raw value returned by the lifecycle method. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsesource) + */ + readonly source: Lifecycle.ReturnValue; + + /** + * Default value: 200. + * The HTTP response status code. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsestatuscode) + */ + readonly statusCode: number; + + /** + * A string indicating the type of source with available values: + * * 'plain' - a plain response such as string, number, null, or simple object. + * * 'buffer' - a Buffer. + * * 'stream' - a Stream. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsevariety) + */ + readonly variety: 'plain' | 'buffer' | 'stream'; + + /** + * Sets the HTTP 'Content-Length' header (to avoid chunked transfer encoding) where: + * @param length - the header value. Must match the actual payload size. + * @return Return value: the current response object. + * [See docs](https://hapijs.com/api/17.0.1#-responsebyteslength) + */ + bytes(length: number): ResponseObject; + + /** + * Sets the 'Content-Type' HTTP header 'charset' property where: + * @param charset - the charset property value. + * @return Return value: the current response object. + * [See docs](https://hapijs.com/api/17.0.1#-responsecharsetcharset) + */ + charset(charset: string): ResponseObject; + + /** + * Sets the 'Content-Type' HTTP header 'charset' property where: + * $param charset - the charset property value. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsecodestatuscode) + */ + code(statusCode: number): ResponseObject; + + /** + * Sets the HTTP status message where: + * @param httpMessage - the HTTP status message (e.g. 'Ok' for status code 200). + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsemessagehttpmessage) + */ + message(httpMessage: string): ResponseObject; + + /** + * Sets the HTTP status code to Created (201) and the HTTP 'Location' header where: + * @param uri - an absolute or relative URI used as the 'Location' header value. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsecreateduri) + */ + created(uri: string): ResponseObject; + + /** + * Sets the string encoding scheme used to serial data into the HTTP payload where: + * @param encoding the encoding property value (see node Buffer encoding [See docs](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings)). + * * 'ascii' - for 7-bit ASCII data only. This encoding is fast and will strip the high bit if set. + * * 'utf8' - Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8. + * * 'utf16le' - 2 or 4 bytes, little-endian encoded Unicode characters. Surrogate pairs (U+10000 to U+10FFFF) are supported. + * * 'ucs2' - Alias of 'utf16le'. + * * 'base64' - Base64 encoding. When creating a Buffer from a string, this encoding will also correctly accept "URL and Filename Safe Alphabet" as specified in RFC4648, Section 5. + * * 'latin1' - A way of encoding the Buffer into a one-byte encoded string (as defined by the IANA in RFC1345, page 63, to be the Latin-1 supplement block and C0/C1 control codes). + * * 'binary' - Alias for 'latin1'. + * * 'hex' - Encode each byte as two hexadecimal characters. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responseencodingencoding) + */ + encoding(encoding: 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'base64' | 'latin1' | 'binary' | 'hex'): ResponseObject; + + /** + * Sets the representation entity tag where: + * @param tag - the entity tag string without the double-quote. + * @param options - (optional) settings where: + * * weak - if true, the tag will be prefixed with the 'W/' weak signifier. Weak tags will fail to match identical tags for the purpose of determining 304 response status. Defaults to false. + * * vary - if true and content encoding is set or applied to the response (e.g 'gzip' or 'deflate'), the encoding name will be automatically added to the tag at transmission time (separated by + * a '-' character). Ignored when weak is true. Defaults to true. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responseetagtag-options) + */ + etag(tag: string, options?: {weak: boolean, vary: boolean}): ResponseObject; + + /** + * Sets an HTTP header where: + * @param name - the header name. + * @param value - the header value. + * @param options - (optional) object where: + * * append - if true, the value is appended to any existing header value using separator. Defaults to false. + * * separator - string used as separator when appending to an existing value. Defaults to ','. + * * override - if false, the header value is not set if an existing value present. Defaults to true. + * * duplicate - if false, the header value is not modified if the provided value is already included. Does not apply when append is false or if the name is 'set-cookie'. Defaults to true. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responseheadername-value-options) + */ + header(name: string, value: string, options?: ResponseObjectHeaderOptions): ResponseObject; + + /** + * Sets the HTTP 'Location' header where: + * @param uri - an absolute or relative URI used as the 'Location' header value. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responselocationuri) + */ + location(uri: string): ResponseObject; + + /** + * Sets an HTTP redirection response (302) and decorates the response with additional methods, where: + * @param uri - an absolute or relative URI used to redirect the client to another resource. + * @return Return value: the current response object. + * Decorates the response object with the response.temporary(), response.permanent(), and response.rewritable() methods to easily change the default redirection code (302). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responseredirecturi) + */ + redirect(uri: string): ResponseObject; + + /** + * Sets the JSON.stringify() replacer argument where: + * @param method - the replacer function or array. Defaults to none. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsereplacermethod) + */ + replacer(method: Json.StringifyReplacer): ResponseObject; + + /** + * Sets the JSON.stringify() space argument where: + * @param count - the number of spaces to indent nested object keys. Defaults to no indentation. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsespacescount) + */ + spaces(count: number): ResponseObject; + + /** + * Sets an HTTP cookie where: + * @param name - the cookie name. + * @param value - the cookie value. If no options.encoding is defined, must be a string. See server.state() for supported encoding values. + * @param options - (optional) configuration. If the state was previously registered with the server using server.state(), the specified keys in options are merged with the default server + * definition. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsestatename-value-options) + */ + state(name: string, value: object | string, options?: ServerStateCookieOptions): ResponseObject; + + /** + * Sets a string suffix when the response is process via JSON.stringify() where: + * @param suffix - the string suffix. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsesuffixsuffix) + */ + suffix(suffix: string): ResponseObject; + + /** + * Overrides the default route cache expiration rule for this response instance where: + * @param msec - the time-to-live value in milliseconds. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsettlmsec) + */ + ttl(msec: number): ResponseObject; + + /** + * Sets the HTTP 'Content-Type' header where: + * @param mimeType - is the mime type. + * @return Return value: the current response object. + * Should only be used to override the built-in default for each response type. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsetypemimetype) + */ + type(mimeType: string): ResponseObject; + + /** + * Clears the HTTP cookie by setting an expired value where: + * @param name - the cookie name. + * @param options - (optional) configuration for expiring cookie. If the state was previously registered with the server using server.state(), the specified options are merged with the server + * definition. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responseunstatename-options) + */ + unstate(name: string, options?: ServerStateCookieOptions): ResponseObject; + + /** + * Adds the provided header to the list of inputs affected the response generation via the HTTP 'Vary' header where: + * @param header - the HTTP request header name. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsevaryheader) + */ + vary(header: string): ResponseObject; + + /** + * Marks the response object as a takeover response. + * @return Return value: the current response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsetakeover) + */ + takeover(): ResponseObject; + + /** + * Sets the status code to 302 or 307 (based on the response.rewritable() setting) where: + * @param isTemporary - if false, sets status to permanent. Defaults to true. + * @return Return value: the current response object. + * Only available after calling the response.redirect() method. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsetemporaryistemporary) + */ + temporary(isTemporary: boolean): ResponseObject; + + /** + * Sets the status code to 301 or 308 (based on the response.rewritable() setting) where: + * @param isPermanent - if false, sets status to temporary. Defaults to true. + * @return Return value: the current response object. + * Only available after calling the response.redirect() method. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsepermanentispermanent) + */ + permanent(isPermanent: boolean): ResponseObject; + + /** + * Sets the status code to 301/302 for rewritable (allows changing the request method from 'POST' to 'GET') or 307/308 for non-rewritable (does not allow changing the request method from 'POST' + * to 'GET'). Exact code based on the response.temporary() or response.permanent() setting. Arguments: + * @param isRewritable - if false, sets to non-rewritable. Defaults to true. + * @return Return value: the current response object. + * Only available after calling the response.redirect() method. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responserewritableisrewritable) + */ + rewritable(isRewritable: boolean): ResponseObject; +} + +/** + * Object containing the response handling flags. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-responsesettings) + */ +export interface ResponseSettings { + /** + * Defaults value: true. + * If true and source is a Stream, copies the statusCode and headers properties of the stream object to the outbound response. + */ + readonly passThrough: boolean; + + /** + * Default value: null (use route defaults). + * Override the route json options used when source value requires stringification. + */ + readonly stringify: Json.StringifyArguments; + + /** + * Default value: null (use route defaults). + * If set, overrides the route cache with an expiration value in milliseconds. + */ + readonly ttl: number; + + /** + * Default value: false. + * If true, a suffix will be automatically added to the 'ETag' header at transmission time (separated by a '-' character) when the HTTP 'Vary' header is present. + */ + varyEtag: boolean; +} + +/** + * See more about Lifecycle + * https://github.com/hapijs/hapi/blob/master/API.md#request-lifecycle + * + */ + +export type ResponseValue = string | object; + +export interface AuthenticationData { + credentials: AuthCredentials; + artifacts?: object; +} + +export interface Auth { + readonly isAuth: true; + readonly error?: Error | null; + readonly data?: AuthenticationData; +} + +/** + * The response toolkit is a collection of properties and utilities passed to every [lifecycle method](https://github.com/hapijs/hapi/blob/master/API.md#lifecycle-methods) + * It is somewhat hard to define as it provides both utilities for manipulating responses as well as other information. Since the + * toolkit is passed as a function argument, developers can name it whatever they want. For the purpose of this + * document the h notation is used. It is named in the spirit of the RethinkDB r method, with h for hapi. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#response-toolkit) + */ +export interface ResponseToolkit { + /** + * A response symbol. When returned by a lifecycle method, the request lifecycle skips to the finalizing step + * without further interaction with the node response stream. It is the developer's responsibility to write + * and end the response directly via [request.raw.res](https://github.com/hapijs/hapi/blob/master/API.md#request.raw). + */ + readonly abandon: symbol; + + /** + * A response symbol. When returned by a lifecycle method, the request lifecycle skips to the finalizing step after + * calling request.raw.res.end()) to close the the node response stream. + */ + readonly close: symbol; + + /** + * A response symbol. Provides access to the route or server context set via the route [bind](https://github.com/hapijs/hapi/blob/master/API.md#route.options.bind) + * option or [server.bind()](https://github.com/hapijs/hapi/blob/master/API.md#server.bind()). + */ + readonly context: any; + + /** + * A response symbol. When returned by a lifecycle method, the request lifecycle continues without changing the response. + */ + readonly continue: symbol; + + /** + * The [server realm](https://github.com/hapijs/hapi/blob/master/API.md#server.realm) associated with the matching + * route. Defaults to the root server realm in the onRequest step. + */ + readonly realm: ServerRealm; + + /** + * Access: read only and public request interface. + * The [request] object. This is a duplication of the request lifecycle method argument used by + * [toolkit decorations](https://github.com/hapijs/hapi/blob/master/API.md#server.decorate()) to access the current request. + */ + readonly request: Readonly; + + /** + * Used by the [authentication] method to pass back valid credentials where: + * @param data - an object with: + * * credentials - (required) object representing the authenticated entity. + * * artifacts - (optional) authentication artifacts object specific to the authentication scheme. + * @return Return value: an internal authentication object. + */ + authenticated(data: AuthenticationData): Auth; + + /** + * Sets the response 'ETag' and 'Last-Modified' headers and checks for any conditional request headers to decide if + * the response is going to qualify for an HTTP 304 (Not Modified). If the entity values match the request + * conditions, h.entity() returns a response object for the lifecycle method to return as its value which will + * set a 304 response. Otherwise, it sets the provided entity headers and returns undefined. + * The method argumetns are: + * @param options - a required configuration object with: + * * etag - the ETag string. Required if modified is not present. Defaults to no header. + * * modified - the Last-Modified header value. Required if etag is not present. Defaults to no header. + * * vary - same as the response.etag() option. Defaults to true. + * @return Return value: - a response object if the response is unmodified. - undefined if the response has changed. + * If undefined is returned, the developer must return a valid lifecycle method value. If a response is returned, + * it should be used as the return value (but may be customize using the response methods). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-hentityoptions) + */ + entity(options?: {etag?: string, modified?: string, vary?: boolean}): ResponseObject | undefined; + + /** + * Redirects the client to the specified uri. Same as calling h.response().redirect(uri). + * @param url + * @return Returns a response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-hredirecturi) + */ + redirect(uri?: string): ResponseObject; + + /** + * Wraps the provided value and returns a response object which allows customizing the response + * (e.g. setting the HTTP status code, custom headers, etc.), where: + * @param value - (optional) return value. Defaults to null. + * @return Returns a response object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-hresponsevalue) + */ + response(value?: ResponseValue): ResponseObject; + + /** + * Sets a response cookie using the same arguments as response.state(). + * @param name of the cookie + * @param value of the cookie + * @param (optional) ServerStateCookieOptions object. + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-hstatename-value-options) + */ + state(name: string, value: string | object, options?: ServerStateCookieOptions): void; + + /** + * Used by the [authentication] method to indicate authentication failed and pass back the credentials received where: + * @param error - (required) the authentication error. + * @param data - (optional) an object with: + * * credentials - (required) object representing the authenticated entity. + * * artifacts - (optional) authentication artifacts object specific to the authentication scheme. + * @return void. + * The method is used to pass both the authentication error and the credentials. For example, if a request included + * expired credentials, it allows the method to pass back the user information (combined with a 'try' + * authentication mode) for error customization. + * There is no difference between throwing the error or passing it with the h.unauthenticated() method is no credentials are passed, but it might still be helpful for code clarity. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-hunauthenticatederror-data) + */ + unauthenticated(error: Error, data?: AuthenticationData): void; + + /** + * Clears a response cookie using the same arguments as + * @param name of the cookie + * @param options (optional) ServerStateCookieOptions object. + * @return void. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-hunstatename-options) + */ + unstate(name: string, options?: ServerStateCookieOptions): void; +} + +/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Route + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + +export type RouteOptionsAccessScope = false | string | string[]; + +export type RouteOptionsAccessEntity = 'any' | 'user' | 'app'; + +export interface RouteOptionsAccessScopeObject { + scope: RouteOptionsAccessScope; +} + +export interface RouteOptionsAccessEntityObject { + entity: RouteOptionsAccessEntity; +} + +export type RouteOptionsAccessObject = + RouteOptionsAccessScopeObject + | RouteOptionsAccessEntityObject + | (RouteOptionsAccessScopeObject & RouteOptionsAccessEntityObject); + +/** + * Route Authentication Options + */ +export interface RouteOptionsAccess { + /** + * Default value: none. + * An object or array of objects specifying the route access rules. Each rule is evaluated against an incoming request and access is granted if at least one of the rules matches. Each rule object + * must include at least one of scope or entity. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsauthaccess) + */ + access?: RouteOptionsAccessObject | RouteOptionsAccessObject[]; + + /** + * Default value: false (no scope requirements). + * The application scope required to access the route. Value can be a scope string or an array of scope strings. When authenticated, the credentials object scope property must contain at least + * one of the scopes defined to access the route. If a scope string begins with a + character, that scope is required. If a scope string begins with a ! character, that scope is forbidden. For + * example, the scope ['!a', '+b', 'c', 'd'] means the incoming request credentials' scope must not include 'a', must include 'b', and must include one of 'c' or 'd'. You may also access + * properties on the request object (query, params, payload, and credentials) to populate a dynamic scope by using the '{' and '}' characters around the property name, such as 'user-{params.id}'. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsauthaccessscope) + */ + scope?: RouteOptionsAccessScope; + + /** + * Default value: 'any'. + * The required authenticated entity type. If set, must match the entity value of the request authenticated credentials. Available values: + * * 'any' - the authentication can be on behalf of a user or application. + * * 'user' - the authentication must be on behalf of a user which is identified by the presence of a 'user' attribute in the credentials object returned by the authentication strategy. + * * 'app' - the authentication must be on behalf of an application which is identified by the lack of presence of a user attribute in the credentials object returned by the authentication + * strategy. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsauthaccessentity) + */ + entity?: RouteOptionsAccessEntity; + + /** + * Default value: 'required'. + * The authentication mode. Available values: + * * 'required' - authentication is required. + * * 'optional' - authentication is optional - the request must include valid credentials or no credentials at all. + * * 'try' - similar to 'optional', any request credentials are attempted authentication, but if the credentials are invalid, the request proceeds regardless of the authentication error. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsauthmode) + */ + mode?: 'required' | 'optional' | 'try'; + + /** + * Default value: false, unless the scheme requires payload authentication. + * If set, the incoming request payload is authenticated after it is processed. Requires a strategy with payload authentication support (e.g. Hawk). Cannot be set to a value other than 'required' + * when the scheme sets the authentication options.payload to true. Available values: + * * false - no payload authentication. + * * 'required' - payload authentication required. + * * 'optional' - payload authentication performed only when the client includes payload authentication information (e.g. hash attribute in Hawk). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsauthpayload) + */ + payload?: false | 'required' | 'optional'; + + /** + * Default value: the default strategy set via server.auth.default(). + * An array of string strategy names in the order they should be attempted. Cannot be used together with strategy. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsauthstrategies) + */ + strategies?: string[]; + + /** + * Default value: the default strategy set via server.auth.default(). + * A string strategy names. Cannot be used together with strategies. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsauthstrategy) + */ + strategy?: string; +} + +/** + * Values are: + * * * 'default' - no privacy flag. + * * * 'public' - mark the response as suitable for public caching. + * * * 'private' - mark the response as suitable only for private caching. + * * expiresIn - relative expiration expressed in the number of milliseconds since the item was saved in the cache. Cannot be used together with expiresAt. + * * expiresAt - time of day expressed in 24h notation using the 'HH:MM' format, at which point all cache records for the route expire. Cannot be used together with expiresIn. + * * statuses - an array of HTTP response status code numbers (e.g. 200) which are allowed to include a valid caching directive. + * * otherwise - a string with the value of the 'Cache-Control' header when caching is disabled. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionscache) + */ +export type RouteOptionsCache = { + privacy?: 'default' | 'public' | 'private'; + statuses?: number[]; + otherwise?: string; +} & ( + { + expiresIn?: number; + expiresAt?: undefined; + } | { + expiresIn?: undefined; + expiresAt?: string; +} | { + expiresIn?: undefined; + expiresAt?: undefined; +} + ); + +/** + * Default value: false (no CORS headers). + * The Cross-Origin Resource Sharing protocol allows browsers to make cross-origin API calls. CORS is required by web applications running inside a browser which are loaded from a different domain + * than the API server. To enable, set cors to true, or to an object with the following options: + * * origin - an array of allowed origin servers strings ('Access-Control-Allow-Origin'). The array can contain any combination of fully qualified origins along with origin strings containing a + * wildcard '*' character, or a single '*' origin string. If set to 'ignore', any incoming Origin header is ignored (present or not) and the 'Access-Control-Allow-Origin' header is set to '*'. + * Defaults to any origin ['*']. + * * maxAge - number of seconds the browser should cache the CORS response ('Access-Control-Max-Age'). The greater the value, the longer it will take before the browser checks for changes in policy. + * Defaults to 86400 (one day). + * * headers - a strings array of allowed headers ('Access-Control-Allow-Headers'). Defaults to ['Accept', 'Authorization', 'Content-Type', 'If-None-Match']. + * * additionalHeaders - a strings array of additional headers to headers. Use this to keep the default headers in place. + * * exposedHeaders - a strings array of exposed headers ('Access-Control-Expose-Headers'). Defaults to ['WWW-Authenticate', 'Server-Authorization']. + * * additionalExposedHeaders - a strings array of additional headers to exposedHeaders. Use this to keep the default headers in place. + * * credentials - if true, allows user credentials to be sent ('Access-Control-Allow-Credentials'). Defaults to false. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionscors) + */ +export interface RouteOptionsCors { + /** + * an array of allowed origin servers strings ('Access-Control-Allow-Origin'). The array can contain any combination of fully qualified origins along with origin strings containing a wildcard '*' + * character, or a single '*' origin string. If set to 'ignore', any incoming Origin header is ignored (present or not) and the 'Access-Control-Allow-Origin' header is set to '*'. Defaults to any + * origin ['*']. + */ + origin?: string[] | '*' | 'ignore'; + /** + * number of seconds the browser should cache the CORS response ('Access-Control-Max-Age'). The greater the value, the longer it will take before the browser checks for changes in policy. + * Defaults to 86400 (one day). + */ + maxAge?: number; + /** + * a strings array of allowed headers ('Access-Control-Allow-Headers'). Defaults to ['Accept', 'Authorization', 'Content-Type', 'If-None-Match']. + */ + headers?: string[]; + /** + * a strings array of additional headers to headers. Use this to keep the default headers in place. + */ + additionalHeaders?: string[]; + /** + * a strings array of exposed headers ('Access-Control-Expose-Headers'). Defaults to ['WWW-Authenticate', 'Server-Authorization']. + */ + exposedHeaders?: string[]; + /** + * a strings array of additional headers to exposedHeaders. Use this to keep the default headers in place. + */ + additionalExposedHeaders?: string[]; + /** + * if true, allows user credentials to be sent ('Access-Control-Allow-Credentials'). Defaults to false. + */ + credentials?: boolean; +} + +/** + * The value must be one of: + * * 'data' - the incoming payload is read fully into memory. If parse is true, the payload is parsed (JSON, form-decoded, multipart) based on the 'Content-Type' header. If parse is false, a raw + * Buffer is returned. + * * 'stream' - the incoming payload is made available via a Stream.Readable interface. If the payload is 'multipart/form-data' and parse is true, field values are presented as text while files are + * provided as streams. File streams from a 'multipart/form-data' upload will also have a hapi property containing the filename and headers properties. Note that payload streams for multipart + * payloads are a synthetic interface created on top of the entire mutlipart content loaded into memory. To avoid loading large multipart payloads into memory, set parse to false and handle the + * multipart payload in the handler using a streaming parser (e.g. pez). + * * 'file' - the incoming payload is written to temporary file in the directory specified by the uploads settings. If the payload is 'multipart/form-data' and parse is true, field values are + * presented as text while files are saved to disk. Note that it is the sole responsibility of the application to clean up the files generated by the framework. This can be done by keeping track of + * which files are used (e.g. using the request.app object), and listening to the server 'response' event to perform cleanup. For context [See + * docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadoutput) + */ +export type PayloadOutput = 'data' | 'stream' | 'file'; + +/** + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadcompression) + */ +export type PayloadCompressionDecoderSettings = object; + +/** + * Determines how the request payload is processed. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayload) + */ +export interface RouteOptionsPayload { + /** + * Default value: allows parsing of the following mime types: + * * application/json + * * application/*+json + * * application/octet-stream + * * application/x-www-form-urlencoded + * * multipart/form-data + * * text/* + * A string or an array of strings with the allowed mime types for the endpoint. Use this settings to limit the set of allowed mime types. Note that allowing additional mime types not listed + * above will not enable them to be parsed, and if parse is true, the request will result in an error response. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadallow) + */ + allow?: string | string[]; + + /** + * Default value: none. + * An object where each key is a content-encoding name and each value is an object with the desired decoder settings. Note that encoder settings are set in compression. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadcompression) + */ + compression?: Util.Dictionary; + + /** + * Default value: 'application/json'. + * The default content type if the 'Content-Type' request header is missing. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloaddefaultcontenttype) + */ + defaultContentType?: string; + + /** + * Default value: 'error' (return a Bad Request (400) error response). + * A failAction value which determines how to handle payload parsing errors. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadfailaction) + */ + failAction?: Lifecycle.FailAction; + + /** + * Default value: 1048576 (1MB). + * Limits the size of incoming payloads to the specified byte count. Allowing very large payloads may cause the server to run out of memory. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadmaxbytes) + */ + maxBytes?: number; + + /** + * Default value: none. + * Overrides payload processing for multipart requests. Value can be one of: + * * false - disable multipart processing. + * an object with the following required options: + * * output - same as the output option with an additional value option: + * * * annotated - wraps each multipart part in an object with the following keys: // TODO type this? + * * * * headers - the part headers. + * * * * filename - the part file name. + * * * * payload - the processed part payload. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadmultipart) + */ + multipart?: false | { + output: PayloadOutput | 'annotated'; + }; + + /** + * Default value: 'data'. + * The processed payload format. The value must be one of: + * * 'data' - the incoming payload is read fully into memory. If parse is true, the payload is parsed (JSON, form-decoded, multipart) based on the 'Content-Type' header. If parse is false, a raw + * Buffer is returned. + * * 'stream' - the incoming payload is made available via a Stream.Readable interface. If the payload is 'multipart/form-data' and parse is true, field values are presented as text while files + * are provided as streams. File streams from a 'multipart/form-data' upload will also have a hapi property containing the filename and headers properties. Note that payload streams for multipart + * payloads are a synthetic interface created on top of the entire mutlipart content loaded into memory. To avoid loading large multipart payloads into memory, set parse to false and handle the + * multipart payload in the handler using a streaming parser (e.g. pez). + * * 'file' - the incoming payload is written to temporary file in the directory specified by the uploads settings. If the payload is 'multipart/form-data' and parse is true, field values are + * presented as text while files are saved to disk. Note that it is the sole responsibility of the application to clean up the files generated by the framework. This can be done by keeping track + * of which files are used (e.g. using the request.app object), and listening to the server 'response' event to perform cleanup. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadoutput) + */ + output?: PayloadOutput; + + /** + * Default value: none. + * A mime type string overriding the 'Content-Type' header value received. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadoverride) + */ + override?: string; + + /** + * Default value: true. + * Determines if the incoming payload is processed or presented raw. Available values: + * * true - if the request 'Content-Type' matches the allowed mime types set by allow (for the whole payload as well as parts), the payload is converted into an object when possible. If the + * format is unknown, a Bad Request (400) error response is sent. Any known content encoding is decoded. + * * false - the raw payload is returned unmodified. + * * 'gunzip' - the raw payload is returned unmodified after any known content encoding is decoded. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadparse) + */ + parse?: boolean | 'gunzip'; + + /** + * Default value: to 10000 (10 seconds). + * Payload reception timeout in milliseconds. Sets the maximum time allowed for the client to transmit the request payload (body) before giving up and responding with a Request Timeout (408) + * error response. Set to false to disable. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloadtimeout) + */ + timeout?: false | number; + + /** + * Default value: os.tmpdir(). + * The directory used for writing file uploads. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayloaduploads) + */ + uploads?: string; +} + +/** + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspre) + */ +export type RouteOptionsPreArray = RouteOptionsPreAllOptions[]; + +/** + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspre) + */ +export type RouteOptionsPreAllOptions = RouteOptionsPreObject | RouteOptionsPreObject[] | Lifecycle.Method; + +/** + * An object with: + * * method - a lifecycle method. + * * assign - key name used to assign the response of the method to in request.pre and request.preResponses. + * * failAction - A failAction value which determine what to do when a pre-handler method throws an error. If assign is specified and the failAction setting is not 'error', the error will be assigned. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspre) + */ +export interface RouteOptionsPreObject { + /** + * a lifecycle method. + */ + method: Lifecycle.Method; + /** + * key name used to assign the response of the method to in request.pre and request.preResponses. + */ + assign?: string; + /** + * A failAction value which determine what to do when a pre-handler method throws an error. If assign is specified and the failAction setting is not 'error', the error will be assigned. + */ + failAction?: Lifecycle.FailAction; +} + +export type ValidationObject = SchemaMap; + +/** + * * true - any query parameter value allowed (no validation performed). false - no parameter value allowed. + * * a joi validation object. + * * a validation function using the signature async function(value, options) where: + * * * value - the request.* object containing the request parameters. + * * * options - options. + */ +export type RouteOptionsResponseSchema = + boolean + | ValidationObject + | Schema + | ((value: object | Buffer | string, options: ValidationOptions) => Promise); + +/** + * Processing rules for the outgoing response. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponse) + */ +export interface RouteOptionsResponse { + /** + * Default value: 200. + * The default HTTP status code when the payload is considered empty. Value can be 200 or 204. Note that a 200 status code is converted to a 204 only at the time of response transmission (the + * response status code will remain 200 throughout the request lifecycle unless manually set). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponseemptystatuscode) + */ + emptyStatusCode?: 200 | 204; + + /** + * Default value: 'error' (return an Internal Server Error (500) error response). + * A failAction value which defines what to do when a response fails payload validation. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponsefailaction) + */ + failAction?: Lifecycle.FailAction; + + /** + * Default value: false. + * If true, applies the validation rule changes to the response payload. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponsemodify) + */ + modify?: boolean; + + /** + * Default value: none. + * [joi](http://github.com/hapijs/joi) options object pass to the validation function. Useful to set global options such as stripUnknown or abortEarly (the complete list is available here). If a + * custom validation function is defined via schema or status then options can an arbitrary object that will be passed to this function as the second argument. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponseoptions) + */ + options?: ValidationOptions; // TODO needs validation + + /** + * Default value: true. + * If false, payload range support is disabled. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponseranges) + */ + ranges?: boolean; + + /** + * Default value: 100 (all responses). + * The percent of response payloads validated (0 - 100). Set to 0 to disable all validation. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponsesample) + */ + sample?: number; + + /** + * Default value: true (no validation). + * The default response payload validation rules (for all non-error responses) expressed as one of: + * * true - any payload allowed (no validation). + * * false - no payload allowed. + * * a joi validation object. The options along with the request context ({ headers, params, query, payload, app, auth }) are passed to the validation function. + * * a validation function using the signature async function(value, options) where: + * * * value - the pending response payload. + * * * options - The options along with the request context ({ headers, params, query, payload, app, auth }). + * * * if the function returns a value and modify is true, the value is used as the new response. If the original response is an error, the return value is used to override the original error + * output.payload. If an error is thrown, the error is processed according to failAction. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponseschema) + */ + schema?: RouteOptionsResponseSchema; + + /** + * Default value: none. + * Validation schemas for specific HTTP status codes. Responses (excluding errors) not matching the listed status codes are validated using the default schema. + * status is set to an object where each key is a 3 digit HTTP status code and the value has the same definition as schema. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponsestatus) + */ + status?: Util.Dictionary; + + /** + * The default HTTP status code used to set a response error when the request is closed or aborted before the + * response is fully transmitted. + * Value can be any integer greater or equal to 400. + * The default value 499 is based on the non-standard nginx "CLIENT CLOSED REQUEST" error. + * The value is only used for logging as the request has already ended. + * @default 499 + */ + disconnectStatusCode?: number; +} + +/** + * @see https://www.w3.org/TR/referrer-policy/ + */ +export type ReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'unsafe-url' | + 'same-origin' | 'origin' | 'strict-origin' | 'origin-when-cross-origin' | 'strict-origin-when-cross-origin'; + +/** + * Default value: false (security headers disabled). + * Sets common security headers. To enable, set security to true or to an object with the following options: + * * hsts - controls the 'Strict-Transport-Security' header, where: + * * * true - the header will be set to max-age=15768000. This is the default value. + * * * a number - the maxAge parameter will be set to the provided value. + * * * an object with the following fields: + * * * * maxAge - the max-age portion of the header, as a number. Default is 15768000. + * * * * includeSubDomains - a boolean specifying whether to add the includeSubDomains flag to the header. + * * * * preload - a boolean specifying whether to add the 'preload' flag (used to submit domains inclusion in Chrome's HTTP Strict Transport Security (HSTS) preload list) to the header. + * * xframe - controls the 'X-Frame-Options' header, where: + * * * true - the header will be set to 'DENY'. This is the default value. + * * * 'deny' - the headers will be set to 'DENY'. + * * * 'sameorigin' - the headers will be set to 'SAMEORIGIN'. + * * * an object for specifying the 'allow-from' rule, where: + * * * * rule - one of: + * * * * * 'deny' + * * * * * 'sameorigin' + * * * * * 'allow-from' + * * * * source - when rule is 'allow-from' this is used to form the rest of the header, otherwise this field is ignored. If rule is 'allow-from' but source is unset, the rule will be automatically + * changed to 'sameorigin'. + * * xss - boolean that controls the 'X-XSS-PROTECTION' header for Internet Explorer. Defaults to true which sets the header to equal '1; mode=block'. + * Note: this setting can create a security vulnerability in versions of Internet Exploere below 8, as well as unpatched versions of IE8. See here and here for more information. If you actively + * support old versions of IE, it may be wise to explicitly set this flag to false. + * * noOpen - boolean controlling the 'X-Download-Options' header for Internet Explorer, preventing downloads from executing in your context. Defaults to true setting the header to 'noopen'. + * * noSniff - boolean controlling the 'X-Content-Type-Options' header. Defaults to true setting the header to its only and default option, 'nosniff'. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionssecurity) + */ +export interface RouteOptionsSecureObject { + /** + * hsts - controls the 'Strict-Transport-Security' header + */ + hsts?: boolean | number | { + /** + * the max-age portion of the header, as a number. Default is 15768000. + */ + maxAge: number; + /** + * a boolean specifying whether to add the includeSubDomains flag to the header. + */ + includeSubdomains: boolean; + /** + * a boolean specifying whether to add the 'preload' flag (used to submit domains inclusion in Chrome's HTTP Strict Transport Security (HSTS) preload list) to the header. + */ + preload: boolean; + }; + /** + * controls the 'X-Frame-Options' header + */ + xframe?: true | 'deny' | 'sameorigin' | { + /** + * an object for specifying the 'allow-from' rule, + */ + rule: 'deny' | 'sameorigin' | 'allow-from'; + /** + * when rule is 'allow-from' this is used to form the rest of the header, otherwise this field is ignored. If rule is 'allow-from' but source is unset, the rule will be automatically changed + * to 'sameorigin'. + */ + source: string; + }; + /** + * boolean that controls the 'X-XSS-PROTECTION' header for Internet Explorer. Defaults to true which sets the header to equal '1; mode=block'. + * Note: this setting can create a security vulnerability in versions of Internet Exploere below 8, as well as unpatched versions of IE8. See here and here for more information. If you actively + * support old versions of IE, it may be wise to explicitly set this flag to false. + */ + xss: boolean; + /** + * boolean controlling the 'X-Download-Options' header for Internet Explorer, preventing downloads from executing in your context. Defaults to true setting the header to 'noopen'. + */ + noOpen?: boolean; + /** + * boolean controlling the 'X-Content-Type-Options' header. Defaults to true setting the header to its only and default option, 'nosniff'. + */ + noSniff?: boolean; + + /** + * Controls the `Referrer-Policy` header, which has the following possible values. + * @default false Header will not be send. + */ + referrer?: false | ReferrerPolicy; +} + +export type RouteOptionsSecure = boolean | RouteOptionsSecureObject; + +/** + * Default value: { headers: true, params: true, query: true, payload: true, failAction: 'error' }. + * Request input validation rules for various request components. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsvalidate) + */ +export interface RouteOptionsValidate { + /** + * Default value: none. + * An optional object with error fields copied into every validation error response. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsvalidateerrorfields) + */ + errorFields?: object; + + /** + * Default value: 'error' (return a Bad Request (400) error response). + * A failAction value which determines how to handle failed validations. When set to a function, the err argument includes the type of validation error under err.output.payload.validation.source. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsvalidatefailaction) + */ + failAction?: Lifecycle.FailAction; + + /** + * Validation rules for incoming request headers: + * * If a value is returned, the value is used as the new request.headers value and the original value is stored in request.orig.headers. Otherwise, the headers are left unchanged. If an error + * is thrown, the error is handled according to failAction. Note that all header field names must be in lowercase to match the headers normalized by node. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsvalidateheaders) + * @default true + */ + headers?: RouteOptionsResponseSchema; + + /** + * An options object passed to the joi rules or the custom validation methods. Used for setting global options such as stripUnknown or abortEarly (the complete list is available here). + * If a custom validation function (see headers, params, query, or payload above) is defined then options can an arbitrary object that will be passed to this function as the second parameter. + * The values of the other inputs (i.e. headers, query, params, payload, app, and auth) are added to the options object under the validation context (accessible in rules as + * Joi.ref('$query.key')). + * Note that validation is performed in order (i.e. headers, params, query, and payload) and if type casting is used (e.g. converting a string to a number), the value of inputs not yet validated + * will reflect the raw, unvalidated and unmodified values. If the validation rules for headers, params, query, and payload are defined at both the server routes level and at the route level, the + * individual route settings override the routes defaults (the rules are not merged). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsvalidateparams) + * @default true + */ + options?: ValidationOptions | object; + + /** + * Validation rules for incoming request path parameters, after matching the path against the route, extracting any parameters, and storing them in request.params, where: + * * true - any path parameter value allowed (no validation performed). + * * a joi validation object. + * * a validation function using the signature async function(value, options) where: + * * * value - the request.params object containing the request path parameters. + * * * options - options. + * if a value is returned, the value is used as the new request.params value and the original value is stored in request.orig.params. Otherwise, the path parameters are left unchanged. If an + * error is thrown, the error is handled according to failAction. Note that failing to match the validation rules to the route path parameters definition will cause all requests to fail. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsvalidateparams) + * @default true + */ + params?: RouteOptionsResponseSchema; + + /** + * Validation rules for incoming request payload (request body), where: + * * If a value is returned, the value is used as the new request.payload value and the original value is stored in request.orig.payload. Otherwise, the payload is left unchanged. If an error is + * thrown, the error is handled according to failAction. Note that validating large payloads and modifying them will cause memory duplication of the payload (since the original is kept), as well + * as the significant performance cost of validating large amounts of data. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsvalidatepayload) + * @default true + */ + payload?: RouteOptionsResponseSchema; + + /** + * Validation rules for incoming request URI query component (the key-value part of the URI between '?' and '#'). The query is parsed into its individual key-value pairs, decoded, and stored in + * request.query prior to validation. Where: + * * If a value is returned, the value is used as the new request.query value and the original value is stored in request.orig.query. Otherwise, the query parameters are left unchanged. + * If an error + * is thrown, the error is handled according to failAction. Note that changes to the query parameters will not be reflected in request.url. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsvalidatequery) + * @default true + */ + query?: RouteOptionsResponseSchema; + + /** + * Validation rules for incoming cookies. + * The cookie header is parsed and decoded into the request.state prior to validation. + * @default true + */ + state?: RouteOptionsResponseSchema; +} + +/** + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionscompression) + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverencoderencoding-encoder) + */ +export type RouteCompressionEncoderSettings = object; + +/** + * Empty interface to allow for user-defined augmentations. + */ +/* tslint:disable-next-line:no-empty-interface */ +export interface RouteOptionsApp { +} + +/** + * Each route can be customized to change the default behavior of the request lifecycle. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#route-options) + */ +export interface RouteOptions { + /** + * Application-specific route configuration state. Should not be used by plugins which should use options.plugins[name] instead. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsapp) + */ + app?: RouteOptionsApp; + + /** + * Route authentication configuration. Value can be: + * false to disable authentication if a default strategy is set. + * a string with the name of an authentication strategy registered with server.auth.strategy(). The strategy will be set to 'required' mode. + * an authentication configuration object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsapp) + */ + auth?: false | string | RouteOptionsAccess; + + /** + * Default value: null. + * An object passed back to the provided handler (via this) when called. Ignored if the method is an arrow function. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsbind) + */ + bind?: object | null; + + /** + * Default value: { privacy: 'default', statuses: [200], otherwise: 'no-cache' }. + * If the route method is 'GET', the route can be configured to include HTTP caching directives in the response. Caching can be customized using an object with the following options: + * privacy - determines the privacy flag included in client-side caching using the 'Cache-Control' header. Values are: + * * * 'default' - no privacy flag. + * * * 'public' - mark the response as suitable for public caching. + * * * 'private' - mark the response as suitable only for private caching. + * * expiresIn - relative expiration expressed in the number of milliseconds since the item was saved in the cache. Cannot be used together with expiresAt. + * * expiresAt - time of day expressed in 24h notation using the 'HH:MM' format, at which point all cache records for the route expire. Cannot be used together with expiresIn. + * * statuses - an array of HTTP response status code numbers (e.g. 200) which are allowed to include a valid caching directive. + * * otherwise - a string with the value of the 'Cache-Control' header when caching is disabled. + * The default Cache-Control: no-cache header can be disabled by setting cache to false. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionscache) + */ + cache?: false | RouteOptionsCache; + + /** + * An object where each key is a content-encoding name and each value is an object with the desired encoder settings. Note that decoder settings are set in compression. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionscompression) + */ + compression?: Util.Dictionary; + + /** + * Default value: false (no CORS headers). + * The Cross-Origin Resource Sharing protocol allows browsers to make cross-origin API calls. CORS is required by web applications running inside a browser which are loaded from a different + * domain than the API server. To enable, set cors to true, or to an object with the following options: + * * origin - an array of allowed origin servers strings ('Access-Control-Allow-Origin'). The array can contain any combination of fully qualified origins along with origin strings containing a + * wildcard '*' character, or a single '*' origin string. If set to 'ignore', any incoming Origin header is ignored (present or not) and the 'Access-Control-Allow-Origin' header is set to '*'. + * Defaults to any origin ['*']. + * * maxAge - number of seconds the browser should cache the CORS response ('Access-Control-Max-Age'). The greater the value, the longer it will take before the browser checks for changes in + * policy. Defaults to 86400 (one day). + * * headers - a strings array of allowed headers ('Access-Control-Allow-Headers'). Defaults to ['Accept', 'Authorization', 'Content-Type', 'If-None-Match']. + * * additionalHeaders - a strings array of additional headers to headers. Use this to keep the default headers in place. + * * exposedHeaders - a strings array of exposed headers ('Access-Control-Expose-Headers'). Defaults to ['WWW-Authenticate', 'Server-Authorization']. + * * additionalExposedHeaders - a strings array of additional headers to exposedHeaders. Use this to keep the default headers in place. + * * credentials - if true, allows user credentials to be sent ('Access-Control-Allow-Credentials'). Defaults to false. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionscors) + */ + cors?: boolean | RouteOptionsCors; + + /** + * Default value: none. + * Route description used for generating documentation (string). + * This setting is not available when setting server route defaults using server.options.routes. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsdescription) + */ + description?: string; + + /** + * Default value: none. + * Route-level request extension points by setting the option to an object with a key for each of the desired extension points ('onRequest' is not allowed), and the value is the same as the + * server.ext(events) event argument. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsext) + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#request-lifecycle) + */ + ext?: { + [key in RouteRequestExtType]?: RouteExtObject | RouteExtObject[]; + }; + + /** + * Default value: { relativeTo: '.' }. + * Defines the behavior for accessing files: + * * relativeTo - determines the folder relative paths are resolved against. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsfiles) + */ + files?: { + relativeTo: string; + }; + + /** + * Default value: none. + * The route handler function performs the main business logic of the route and sets the response. handler can be assigned: + * * a lifecycle method. + * * an object with a single property using the name of a handler type registred with the server.handler() method. The matching property value is passed as options to the registered handler + * generator. Note: handlers using a fat arrow style function cannot be bound to any bind property. Instead, the bound context is available under h.context. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionshandler) + */ + handler?: Lifecycle.Method | object; + + /** + * Default value: none. + * An optional unique identifier used to look up the route using server.lookup(). Cannot be assigned to routes added with an array of methods. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsid) + */ + id?: string; + + /** + * Default value: false. + * If true, the route cannot be accessed through the HTTP listener but only through the server.inject() interface with the allowInternals option set to true. Used for internal routes that should + * not be accessible to the outside world. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsisinternal) + */ + isInternal?: boolean; + + /** + * Default value: none. + * Optional arguments passed to JSON.stringify() when converting an object or error response to a string payload or escaping it after stringification. Supports the following: + * * replacer - the replacer function or array. Defaults to no action. + * * space - number of spaces to indent nested object keys. Defaults to no indentation. + * * suffix - string suffix added after conversion to JSON string. Defaults to no suffix. + * * escape - calls Hoek.jsonEscape() after conversion to JSON string. Defaults to false. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsjson) + */ + json?: Json.StringifyArguments; + + /** + * Default value: none. + * Enables JSONP support by setting the value to the query parameter name containing the function name used to wrap the response payload. + * For example, if the value is 'callback', a request comes in with 'callback=me', and the JSON response is '{ "a":"b" }', the payload will be 'me({ "a":"b" });'. Cannot be used with stream + * responses. The 'Content-Type' response header is set to 'text/javascript' and the 'X-Content-Type-Options' response header is set to 'nosniff', and will override those headers even if + * explicitly set by response.type(). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsjsonp) + */ + jsonp?: string; + + /** + * Default value: { collect: false }. + * Request logging options: + * collect - if true, request-level logs (both internal and application) are collected and accessible via request.logs. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionslog) + */ + log?: { + collect: boolean; + }; + + /** + * Default value: none. + * Route notes used for generating documentation (string or array of strings). + * This setting is not available when setting server route defaults using server.options.routes. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsnotes) + */ + notes?: string | string[]; + + /** + * Determines how the request payload is processed. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspayload) + */ + payload?: RouteOptionsPayload; + + /** + * Default value: {}. + * Plugin-specific configuration. plugins is an object where each key is a plugin name and the value is the plugin configuration. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsplugins) + */ + plugins?: PluginSpecificConfiguration; + + /** + * Default value: none. + * The pre option allows defining methods for performing actions before the handler is called. These methods allow breaking the handler logic into smaller, reusable components that can be shared + * ascross routes, as well as provide a cleaner error handling of prerequisite operations (e.g. load required reference data from a database). pre is assigned an ordered array of methods which + * are called serially in order. If the pre array contains another array of methods as one of its elements, those methods are called in parallel. Note that during parallel execution, if any of + * the methods error, return a takeover response, or abort signal, the other parallel methods will continue to execute but will be ignored once completed. pre can be assigned a mixed array of: + * * an array containing the elements listed below, which are executed in parallel. + * * an object with: + * * * method - a lifecycle method. + * * * assign - key name used to assign the response of the method to in request.pre and request.preResponses. + * * * failAction - A failAction value which determine what to do when a pre-handler method throws an error. If assign is specified and the failAction setting is not 'error', the error will be + * assigned. + * * a method function - same as including an object with a single method key. + * Note that pre-handler methods do not behave the same way other lifecycle methods do when a value is returned. Instead of the return value becoming the new response payload, the value is used + * to assign the corresponding request.pre and request.preResponses properties. Otherwise, the handling of errors, takeover response response, or abort signal behave the same as any other + * lifecycle methods. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspre) + */ + pre?: RouteOptionsPreArray; + + /** + * Processing rules for the outgoing response. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsresponse) + */ + response?: RouteOptionsResponse; + + /** + * Default value: false (security headers disabled). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionssecurity) + */ + security?: RouteOptionsSecure; + + /** + * Default value: { parse: true, failAction: 'error' }. + * HTTP state management (cookies) allows the server to store information on the client which is sent back to the server with every request (as defined in RFC 6265). state supports the following + * options: parse - determines if incoming 'Cookie' headers are parsed and stored in the request.state object. failAction - A failAction value which determines how to handle cookie parsing + * errors. Defaults to 'error' (return a Bad Request (400) error response). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsstate) + */ + state?: { + parse?: boolean; + failAction?: Lifecycle.FailAction; + }; + + /** + * Default value: none. + * Route tags used for generating documentation (array of strings). + * This setting is not available when setting server route defaults using server.options.routes. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionstags) + */ + tags?: string[]; + + /** + * Default value: { server: false }. + * Timeouts for processing durations. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionstimeout) + */ + timeout?: { + /** + * Response timeout in milliseconds. Sets the maximum time allowed for the server to respond to an incoming request before giving up and responding with a Service Unavailable (503) error + * response. + */ + server?: boolean | number; + + /** + * Default value: none (use node default of 2 minutes). + * By default, node sockets automatically timeout after 2 minutes. Use this option to override this behavior. Set to false to disable socket timeouts. + */ + socket?: boolean | number; + }; + + /** + * Default value: { headers: true, params: true, query: true, payload: true, failAction: 'error' }. + * Request input validation rules for various request components. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsvalidate) + */ + validate?: RouteOptionsValidate; +} + +/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Server + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + +/** + * The scheme options argument passed to server.auth.strategy() when instantiation a strategy. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverauthschemename-scheme) + */ +export type ServerAuthSchemeOptions = object; + +/** + * the method implementing the scheme with signature function(server, options) where: + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverauthschemename-scheme) + * @param server - a reference to the server object the scheme is added to. + * @param options - (optional) the scheme options argument passed to server.auth.strategy() when instantiation a strategy. + */ +export type ServerAuthScheme = (server: Server, options?: ServerAuthSchemeOptions) => ServerAuthSchemeObject; + +/* tslint:disable-next-line:no-empty-interface */ +export interface ServerAuthSchemeObjectApi { +} + +/** + * The scheme method must return an object with the following + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#authentication-scheme) + */ +export interface ServerAuthSchemeObject { + /** + * optional object which is exposed via the [server.auth.api](https://github.com/hapijs/hapi/blob/master/API.md#server.auth.api) object. + */ + api?: ServerAuthSchemeObjectApi; + + /** + * A lifecycle method function called for each incoming request configured with the authentication scheme. The + * method is provided with two special toolkit methods for returning an authenticated or an unauthenticate result: + * * h.authenticated() - indicate request authenticated successfully. + * * h.unauthenticated() - indicate request failed to authenticate. + * @param request the request object. + * @param h the ResponseToolkit + * @return the Lifecycle.ReturnValue + */ + authenticate(request: Request, h: ResponseToolkit): Lifecycle.ReturnValue; + + /** + * A lifecycle method to authenticate the request payload. + * When the scheme payload() method returns an error with a message, it means payload validation failed due to bad + * payload. If the error has no message but includes a scheme name (e.g. Boom.unauthorized(null, 'Custom')), + * authentication may still be successful if the route auth.payload configuration is set to 'optional'. + * @param request the request object. + * @param h the ResponseToolkit + * @return the Lifecycle.ReturnValue + */ + payload?(request: Request, h: ResponseToolkit): Lifecycle.ReturnValue; + + /** + * A lifecycle method to decorate the response with authentication headers before the response headers or payload is written. + * @param request the request object. + * @param h the ResponseToolkit + * @return the Lifecycle.ReturnValue + */ + response?(request: Request, h: ResponseToolkit): Lifecycle.ReturnValue; + + /** + * a method used to verify the authentication credentials provided + * are still valid (e.g. not expired or revoked after the initial authentication). + * the method throws an `Error` when the credentials passed are no longer valid (e.g. expired or + * revoked). Note that the method does not have access to the original request, only to the + * credentials and artifacts produced by the `authenticate()` method. + */ + verify?(auth: RequestAuth): Promise; + + /** + * An object with the following keys: + * * payload + */ + options?: { + /** + * if true, requires payload validation as part of the scheme and forbids routes from disabling payload auth validation. Defaults to false. + */ + payload?: boolean; + }; +} + +/** + * An authentication configuration object using the same format as the route auth handler options. + * For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverauthdefaultoptions) + */ +/* tslint:disable-next-line:no-empty-interface */ +export interface ServerAuthConfig extends RouteOptionsAccess { +} + +export interface ServerAuth { + /** + * An object where each key is an authentication strategy name and the value is the exposed strategy API. + * Available only when the authentication scheme exposes an API by returning an api key in the object + * returned from its implementation function. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverauthapi) + */ + api: Util.Dictionary; + + /** + * Contains the default authentication configuration is a default strategy was set via + * [server.auth.default()](https://github.com/hapijs/hapi/blob/master/API.md#server.auth.default()). + */ + readonly settings: { + default: ServerAuthConfig; + }; + + /** + * Sets a default strategy which is applied to every route where: + * @param options - one of: + * * a string with the default strategy name + * * an authentication configuration object using the same format as the route auth handler options. + * @return void. + * The default does not apply when a route config specifies auth as false, or has an authentication strategy + * configured (contains the strategy or strategies authentication settings). Otherwise, the route authentication + * config is applied to the defaults. + * Note that if the route has authentication configured, the default only applies at the time of adding the route, + * not at runtime. This means that calling server.auth.default() after adding a route with some authentication + * config will have no impact on the routes added prior. However, the default will apply to routes added + * before server.auth.default() is called if those routes lack any authentication config. + * The default auth strategy configuration can be accessed via server.auth.settings.default. To obtain the active + * authentication configuration of a route, use server.auth.lookup(request.route). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverauthdefaultoptions) + */ + default(options: string | ServerAuthConfig): void; + + /** + * Registers an authentication scheme where: + * @param name the scheme name. + * @param scheme - the method implementing the scheme with signature function(server, options) where: + * * server - a reference to the server object the scheme is added to. + * * options - (optional) the scheme options argument passed to server.auth.strategy() when instantiation a strategy. + * @return void. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverauthschemename-scheme) + */ + scheme(name: string, scheme: ServerAuthScheme): void; + + /** + * Registers an authentication strategy where: + * @param name - the strategy name. + * @param scheme - the scheme name (must be previously registered using server.auth.scheme()). + * @param options - scheme options based on the scheme requirements. + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverauthstrategyname-scheme-options) + */ + strategy(name: string, scheme: string, options?: object): void; + + /** + * Tests a request against an authentication strategy where: + * @param strategy - the strategy name registered with server.auth.strategy(). + * @param request - the request object. + * @return an object containing the authentication credentials and artifacts if authentication was successful, otherwise throws an error. + * Note that the test() method does not take into account the route authentication configuration. It also does not + * perform payload authentication. It is limited to the basic strategy authentication execution. It does not + * include verifying scope, entity, or other route properties. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverauthteststrategy-request) + */ + test(strategy: string, request: Request): Promise; + + /** + * Verify a request's authentication credentials against an authentication strategy. + * Returns nothing if verification was successful, otherwise throws an error. + * + * Note that the `verify()` method does not take into account the route authentication configuration + * or any other information from the request other than the `request.auth` object. It also does not + * perform payload authentication. It is limited to verifying that the previously valid credentials + * are still valid (e.g. have not been revoked or expired). It does not include verifying scope, + * entity, or other route properties. + */ + verify(request: Request): Promise; +} + +export type CachePolicyOptions = PolicyOptionVariants & { + /** + * @default '_default' + */ + cache?: string; + segment?: string; +}; + +/** + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servercacheoptions) + */ +export interface ServerCache { + /** + * Provisions a cache segment within the server cache facility where: + * @param options - [catbox policy](https://github.com/hapijs/catbox#policy) configuration where: + * * expiresIn - relative expiration expressed in the number of milliseconds since the item was saved in the cache. Cannot be used together with expiresAt. + * * expiresAt - time of day expressed in 24h notation using the 'HH:MM' format, at which point all cache records expire. Uses local time. Cannot be used together with expiresIn. + * * generateFunc - a function used to generate a new cache item if one is not found in the cache when calling get(). The method's signature is async function(id, flags) where: + * - `id` - the `id` string or object provided to the `get()` method. + * - `flags` - an object used to pass back additional flags to the cache where: + * - `ttl` - the cache ttl value in milliseconds. Set to `0` to skip storing in the cache. Defaults to the cache global policy. + * * staleIn - number of milliseconds to mark an item stored in cache as stale and attempt to regenerate it when generateFunc is provided. Must be less than expiresIn. + * * staleTimeout - number of milliseconds to wait before checking if an item is stale. + * * generateTimeout - number of milliseconds to wait before returning a timeout error when the generateFunc function takes too long to return a value. When the value is eventually returned, it + * is stored in the cache for future requests. Required if generateFunc is present. Set to false to disable timeouts which may cause all get() requests to get stuck forever. + * * generateOnReadError - if false, an upstream cache read error will stop the cache.get() method from calling the generate function and will instead pass back the cache error. Defaults to true. + * * generateIgnoreWriteError - if false, an upstream cache write error when calling cache.get() will be passed back with the generated value when calling. Defaults to true. + * * dropOnError - if true, an error or timeout in the generateFunc causes the stale value to be evicted from the cache. Defaults to true. + * * pendingGenerateTimeout - number of milliseconds while generateFunc call is in progress for a given id, before a subsequent generateFunc call is allowed. Defaults to 0 (no blocking of + * concurrent generateFunc calls beyond staleTimeout). + * * cache - the cache name configured in server.cache. Defaults to the default cache. + * * segment - string segment name, used to isolate cached items within the cache partition. When called within a plugin, defaults to '!name' where 'name' is the plugin name. When called within a + * server method, defaults to '#name' where 'name' is the server method name. Required when called outside of a plugin. + * * shared - if true, allows multiple cache provisions to share the same segment. Default to false. + * @return Catbox Policy. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servercacheoptions) + */ + = CachePolicyOptions>(options: O): Policy; + + /** + * Provisions a server cache as described in server.cache where: + * @param options - same as the server cache configuration options. + * @return Return value: none. + * Note that if the server has been initialized or started, the cache will be automatically started to match the state of any other provisioned server cache. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-servercacheprovisionoptions) + */ + provision(options: ServerOptionsCache): Promise; +} + +/** + * an event name string. + * an event options object. + * a podium emitter object. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servereventevents) + */ +export type ServerEventsApplication = string | ServerEventsApplicationObject | Podium; + +/** + * Object that it will be used in Event + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servereventevents) + */ +export interface ServerEventsApplicationObject { + /** the event name string (required). */ + name: string; + /** a string or array of strings specifying the event channels available. Defaults to no channel restrictions (event updates can specify a channel or not). */ + channels?: string | string[]; + /** + * if true, the data object passed to server.events.emit() is cloned before it is passed to the listeners (unless an override specified by each listener). Defaults to false (data is passed as-is). + */ + clone?: boolean; + /** + * if true, the data object passed to server.event.emit() must be an array and the listener method is called with each array element passed as a separate argument (unless an override specified + * by each listener). This should only be used when the emitted data structure is known and predictable. Defaults to false (data is emitted as a single argument regardless of its type). + */ + spread?: boolean; + /** + * if true and the criteria object passed to server.event.emit() includes tags, the tags are mapped to an object (where each tag string is the key and the value is true) which is appended to + * the arguments list at the end. A configuration override can be set by each listener. Defaults to false. + */ + tags?: boolean; + /** + * if true, the same event name can be registered multiple times where the second registration is ignored. Note that if the registration config is changed between registrations, only the first + * configuration is used. Defaults to false (a duplicate registration will throw an error). + */ + shared?: boolean; +} + +/** + * A criteria object with the following optional keys (unless noted otherwise): + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servereventsoncriteria-listener) + * + * The type parameter T is the type of the name of the event. + */ +export interface ServerEventCriteria { + /** (required) the event name string. */ + name: T; + /** + * a string or array of strings specifying the event channels to subscribe to. If the event registration specified a list of allowed channels, the channels array must match the allowed + * channels. If channels are specified, event updates without any channel designation will not be included in the subscription. Defaults to no channels filter. + */ + channels?: string | string[]; + /** if true, the data object passed to server.event.emit() is cloned before it is passed to the listener method. Defaults to the event registration option (which defaults to false). */ + clone?: boolean; + /** + * a positive integer indicating the number of times the listener can be called after which the subscription is automatically removed. A count of 1 is the same as calling server.events.once(). + * Defaults to no limit. + */ + count?: number; + /** + * filter - the event tags (if present) to subscribe to which can be one of: + * * a tag string. + * * an array of tag strings. + * * an object with the following: + * * * tags - a tag string or array of tag strings. + * * * all - if true, all tags must be present for the event update to match the subscription. Defaults to false (at least one matching tag). + */ + filter?: string | string[] | {tags: string | string[], all?: boolean}; + /** + * if true, and the data object passed to server.event.emit() is an array, the listener method is called with each array element passed as a separate argument. This should only be used + * when the emitted data structure is known and predictable. Defaults to the event registration option (which defaults to false). + */ + spread?: boolean; + /** + * if true and the criteria object passed to server.event.emit() includes tags, the tags are mapped to an object (where each tag string is the key and the value is true) which is appended + * to the arguments list at the end. Defaults to the event registration option (which defaults to false). + */ + tags?: boolean; +} + +export interface LogEvent { + /** the event timestamp. */ + timestamp: string; + /** an array of tags identifying the event (e.g. ['error', 'http']) */ + tags: string[]; + /** set to 'internal' for internally generated events, otherwise 'app' for events generated by server.log() */ + channel: 'internal' | 'app'; + /** the request identifier. */ + request: string; + /** event-specific information. Available when event data was provided and is not an error. Errors are passed via error. */ + data: object; + /** the error object related to the event if applicable. Cannot appear together with data */ + error: object; +} + +export interface RequestEvent { + /** the event timestamp. */ + timestamp: string; + /** an array of tags identifying the event (e.g. ['error', 'http']) */ + tags: string[]; + /** set to 'internal' for internally generated events, otherwise 'app' for events generated by server.log() */ + channel: 'internal' | 'app' | 'error'; + /** event-specific information. Available when event data was provided and is not an error. Errors are passed via error. */ + data: object; + /** the error object related to the event if applicable. Cannot appear together with data */ + error: object; +} + +export type LogEventHandler = (event: LogEvent, tags: { [key: string]: true }) => void; +export type RequestEventHandler = (request: Request, event: RequestEvent, tags: { [key: string]: true }) => void; +export type ResponseEventHandler = (request: Request) => void; +export type RouteEventHandler = (route: RequestRoute) => void; +export type StartEventHandler = () => void; +export type StopEventHandler = () => void; + +export interface PodiumEvent { + emit(criteria: K, listener: (value: T) => void): void; + + on(criteria: K, listener: (value: T) => void): void; + + once(criteria: K, listener: (value: T) => void): void; + + once(criteria: K): Promise; + + removeListener(criteria: K, listener: Podium.Listener): this; + + removeAllListeners(criteria: K): this; + + hasListeners(criteria: K): this; +} + +/** + * Access: podium public interface. + * The server events emitter. Utilizes the podium with support for event criteria validation, channels, and filters. + * Use the following methods to interact with server.events: + * [server.event(events)](https://github.com/hapijs/hapi/blob/master/API.md#server.event()) - register application events. + * [server.events.emit(criteria, data)](https://github.com/hapijs/hapi/blob/master/API.md#server.events.emit()) - emit server events. + * [server.events.on(criteria, listener)](https://github.com/hapijs/hapi/blob/master/API.md#server.events.on()) - subscribe to all events. + * [server.events.once(criteria, listener)](https://github.com/hapijs/hapi/blob/master/API.md#server.events.once()) - subscribe to + * Other methods include: server.events.removeListener(name, listener), server.events.removeAllListeners(name), and server.events.hasListeners(name). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverevents) + */ +export interface ServerEvents extends Podium { + /** + * Subscribe to an event where: + * @param criteria - the subscription criteria which must be one of: + * * event name string which can be any of the built-in server events + * * a custom application event registered with server.event(). + * * a criteria object + * @param listener - the handler method set to receive event updates. The function signature depends on the event argument, and the spread and tags options. + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servereventsoncriteria-listener) + * See ['log' event](https://github.com/hapijs/hapi/blob/master/API.md#-log-event) + * See ['request' event](https://github.com/hapijs/hapi/blob/master/API.md#-request-event) + * See ['response' event](https://github.com/hapijs/hapi/blob/master/API.md#-response-event) + * See ['route' event](https://github.com/hapijs/hapi/blob/master/API.md#-route-event) + * See ['start' event](https://github.com/hapijs/hapi/blob/master/API.md#-start-event) + * See ['stop' event](https://github.com/hapijs/hapi/blob/master/API.md#-stop-event) + */ + on(criteria: 'log' | ServerEventCriteria<'log'>, listener: LogEventHandler): void; + + on(criteria: 'request' | ServerEventCriteria<'request'>, listener: RequestEventHandler): void; + + on(criteria: 'response' | ServerEventCriteria<'response'>, listener: ResponseEventHandler): void; + + on(criteria: 'route' | ServerEventCriteria<'route'>, listener: RouteEventHandler): void; + + on(criteria: 'start' | ServerEventCriteria<'start'>, listener: StartEventHandler): void; + + on(criteria: 'stop' | ServerEventCriteria<'stop'>, listener: StopEventHandler): void; + + /** + * Same as calling [server.events.on()](https://github.com/hapijs/hapi/blob/master/API.md#server.events.on()) with the count option set to 1. + * @param criteria - the subscription criteria which must be one of: + * * event name string which can be any of the built-in server events + * * a custom application event registered with server.event(). + * * a criteria object + * @param listener - the handler method set to receive event updates. The function signature depends on the event argument, and the spread and tags options. + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servereventsoncecriteria-listener) + */ + once(criteria: 'log' | ServerEventCriteria<'log'>, listener: LogEventHandler): void; + + once(criteria: 'request' | ServerEventCriteria<'request'>, listener: RequestEventHandler): void; + + once(criteria: 'response' | ServerEventCriteria<'response'>, listener: ResponseEventHandler): void; + + once(criteria: 'route' | ServerEventCriteria<'route'>, listener: RouteEventHandler): void; + + once(criteria: 'start' | ServerEventCriteria<'start'>, listener: StartEventHandler): void; + + once(criteria: 'stop' | ServerEventCriteria<'stop'>, listener: StopEventHandler): void; + + /** + * Same as calling server.events.on() with the count option set to 1. + * @param criteria - the subscription criteria which must be one of: + * * event name string which can be any of the built-in server events + * * a custom application event registered with server.event(). + * * a criteria object + * @return Return value: a promise that resolves when the event is emitted. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-servereventsoncecriteria) + */ + once(criteria: string | ServerEventCriteria): Promise; + + /** + * The follow method is only mentioned in Hapi API. The doc about that method can be found [here](https://github.com/hapijs/podium/blob/master/API.md#podiumremovelistenername-listener) + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverevents) + */ + removeListener(name: string, listener: Podium.Listener): Podium; + + /** + * The follow method is only mentioned in Hapi API. The doc about that method can be found [here](https://github.com/hapijs/podium/blob/master/API.md#podiumremovealllistenersname) + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverevents) + */ + removeAllListeners(name: string): Podium; + + /** + * The follow method is only mentioned in Hapi API. The doc about that method can be found [here](https://github.com/hapijs/podium/blob/master/API.md#podiumhaslistenersname) + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverevents) + */ + hasListeners(name: string): boolean; +} + +/** + * The extension point event name. The available extension points include the request extension points as well as the following server extension points: + * 'onPreStart' - called before the connection listeners are started. + * 'onPostStart' - called after the connection listeners are started. + * 'onPreStop' - called before the connection listeners are stopped. + * 'onPostStop' - called after the connection listeners are stopped. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverextevents) + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#request-lifecycle) + */ +export type ServerExtType = 'onPreStart' | 'onPostStart' | 'onPreStop' | 'onPostStop'; +export type RouteRequestExtType = 'onPreAuth' + | 'onCredentials' + | 'onPostAuth' + | 'onPreHandler' + | 'onPostHandler' + | 'onPreResponse'; + +export type ServerRequestExtType = + RouteRequestExtType + | 'onRequest'; + +/** + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverextevents) + * Registers an extension function in one of the request lifecycle extension points where: + * @param events - an object or array of objects with the following: + * * type - (required) the extension point event name. The available extension points include the request extension points as well as the following server extension points: + * * * 'onPreStart' - called before the connection listeners are started. + * * * 'onPostStart' - called after the connection listeners are started. + * * * 'onPreStop' - called before the connection listeners are stopped. + * * * 'onPostStop' - called after the connection listeners are stopped. + * * method - (required) a function or an array of functions to be executed at a specified point during request processing. The required extension function signature is: + * * * server extension points: async function(server) where: + * * * * server - the server object. + * * * * this - the object provided via options.bind or the current active context set with server.bind(). + * * * request extension points: a lifecycle method. + * * options - (optional) an object with the following: + * * * before - a string or array of strings of plugin names this method must execute before (on the same event). Otherwise, extension methods are executed in the order added. + * * * after - a string or array of strings of plugin names this method must execute after (on the same event). Otherwise, extension methods are executed in the order added. + * * * bind - a context object passed back to the provided method (via this) when called. Ignored if the method is an arrow function. + * * * sandbox - if set to 'plugin' when adding a request extension points the extension is only added to routes defined by the current plugin. Not allowed when configuring route-level extensions, or + * when adding server extensions. Defaults to 'server' which applies to any route added to the server the extension is added to. + * @return void + */ +export interface ServerExtEventsObject { + /** + * (required) the extension point event name. The available extension points include the request extension points as well as the following server extension points: + * * 'onPreStart' - called before the connection listeners are started. + * * 'onPostStart' - called after the connection listeners are started. + * * 'onPreStop' - called before the connection listeners are stopped. + */ + type: ServerExtType; + /** + * (required) a function or an array of functions to be executed at a specified point during request processing. The required extension function signature is: + * * server extension points: async function(server) where: + * * * server - the server object. + * * * this - the object provided via options.bind or the current active context set with server.bind(). + * * request extension points: a lifecycle method. + */ + method: ServerExtPointFunction | ServerExtPointFunction[]; + options?: ServerExtOptions; +} + +export interface RouteExtObject { + method: Lifecycle.Method; + options?: ServerExtOptions; +} + +/** + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverextevents) + * Registers an extension function in one of the request lifecycle extension points where: + * @param events - an object or array of objects with the following: + * * type - (required) the extension point event name. The available extension points include the request extension points as well as the following server extension points: + * * * 'onPreStart' - called before the connection listeners are started. + * * * 'onPostStart' - called after the connection listeners are started. + * * * 'onPreStop' - called before the connection listeners are stopped. + * * * 'onPostStop' - called after the connection listeners are stopped. + * * method - (required) a function or an array of functions to be executed at a specified point during request processing. The required extension function signature is: + * * * server extension points: async function(server) where: + * * * * server - the server object. + * * * * this - the object provided via options.bind or the current active context set with server.bind(). + * * * request extension points: a lifecycle method. + * * options - (optional) an object with the following: + * * * before - a string or array of strings of plugin names this method must execute before (on the same event). Otherwise, extension methods are executed in the order added. + * * * after - a string or array of strings of plugin names this method must execute after (on the same event). Otherwise, extension methods are executed in the order added. + * * * bind - a context object passed back to the provided method (via this) when called. Ignored if the method is an arrow function. + * * * sandbox - if set to 'plugin' when adding a request extension points the extension is only added to routes defined by the current plugin. Not allowed when configuring route-level extensions, or + * when adding server extensions. Defaults to 'server' which applies to any route added to the server the extension is added to. + * @return void + */ +export interface ServerExtEventsRequestObject { + /** + * (required) the extension point event name. The available extension points include the request extension points as well as the following server extension points: + * * 'onPreStart' - called before the connection listeners are started. + * * 'onPostStart' - called after the connection listeners are started. + * * 'onPreStop' - called before the connection listeners are stopped. + * * 'onPostStop' - called after the connection listeners are stopped. + */ + type: ServerRequestExtType; + /** + * (required) a function or an array of functions to be executed at a specified point during request processing. The required extension function signature is: + * * server extension points: async function(server) where: + * * * server - the server object. + * * * this - the object provided via options.bind or the current active context set with server.bind(). + * * request extension points: a lifecycle method. + */ + method: Lifecycle.Method | Lifecycle.Method[]; + /** + * (optional) an object with the following: + * * before - a string or array of strings of plugin names this method must execute before (on the same event). Otherwise, extension methods are executed in the order added. + * * after - a string or array of strings of plugin names this method must execute after (on the same event). Otherwise, extension methods are executed in the order added. + * * bind - a context object passed back to the provided method (via this) when called. Ignored if the method is an arrow function. + * * sandbox - if set to 'plugin' when adding a request extension points the extension is only added to routes defined by the current plugin. Not allowed when configuring route-level extensions, + * or when adding server extensions. Defaults to 'server' which applies to any route added to the server the extension is added to. + */ + options?: ServerExtOptions; +} + +export type ServerExtPointFunction = (server: Server) => void; + +/** + * An object with the following: + * * before - a string or array of strings of plugin names this method must execute before (on the same event). Otherwise, extension methods are executed in the order added. + * * after - a string or array of strings of plugin names this method must execute after (on the same event). Otherwise, extension methods are executed in the order added. + * * bind - a context object passed back to the provided method (via this) when called. Ignored if the method is an arrow function. + * * sandbox - if set to 'plugin' when adding a request extension points the extension is only added to routes defined by the current plugin. Not allowed when configuring route-level extensions, or + * when adding server extensions. Defaults to 'server' which applies to any route added to the server the extension is added to. For context [See + * docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverextevents) + */ +export interface ServerExtOptions { + /** + * a string or array of strings of plugin names this method must execute before (on the same event). Otherwise, extension methods are executed in the order added. + */ + before?: string | string[]; + /** + * a string or array of strings of plugin names this method must execute after (on the same event). Otherwise, extension methods are executed in the order added. + */ + after?: string | string[]; + /** + * a context object passed back to the provided method (via this) when called. Ignored if the method is an arrow function. + */ + bind?: object; + /** + * if set to 'plugin' when adding a request extension points the extension is only added to routes defined by the current plugin. Not allowed when configuring route-level extensions, or when + * adding server extensions. Defaults to 'server' which applies to any route added to the server the extension is added to. + */ + sandbox?: 'server' | 'plugin'; +} + +/** + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverinfo) + * An object containing information about the server where: + */ +export interface ServerInfo { + /** + * a unique server identifier (using the format '{hostname}:{pid}:{now base36}'). + */ + id: string; + + /** + * server creation timestamp. + */ + created: number; + + /** + * server start timestamp (0 when stopped). + */ + started: number; + + /** + * the connection [port](https://github.com/hapijs/hapi/blob/master/API.md#server.options.port) based on the following rules: + * * before the server has been started: the configured port value. + * * after the server has been started: the actual port assigned when no port is configured or was set to 0. + */ + port: number | string; + + /** + * The [host](https://github.com/hapijs/hapi/blob/master/API.md#server.options.host) configuration value. + */ + host: string; + + /** + * the active IP address the connection was bound to after starting. Set to undefined until the server has been + * started or when using a non TCP port (e.g. UNIX domain socket). + */ + address: undefined | string; + + /** + * the protocol used: + * * 'http' - HTTP. + * * 'https' - HTTPS. + * * 'socket' - UNIX domain socket or Windows named pipe. + */ + protocol: 'http' | 'https' | 'socket'; + + /** + * a string representing the connection (e.g. 'http://example.com:8080' or 'socket:/unix/domain/socket/path'). Contains + * the uri value if set, otherwise constructed from the available settings. If no port is configured or is set + * to 0, the uri will not include a port component until the server is started. + */ + uri: string; +} + +/** + * An object with: + * * method - (optional) the request HTTP method (e.g. 'POST'). Defaults to 'GET'. + * * url - (required) the request URL. If the URI includes an authority (e.g. 'example.com:8080'), it is used to automatically set an HTTP 'Host' header, unless one was specified in headers. + * * headers - (optional) an object with optional request headers where each key is the header name and the value is the header content. Defaults to no additions to the default shot headers. + * * payload - (optional) an string, buffer or object containing the request payload. In case of an object it will be converted to a string for you. Defaults to no payload. Note that payload + * processing defaults to 'application/json' if no 'Content-Type' header provided. + * * credentials - (optional) an credentials object containing authentication information. The credentials are used to bypass the default authentication strategies, and are validated directly as if + * they were received via an authentication scheme. Defaults to no credentials. + * * artifacts - (optional) an artifacts object containing authentication artifact information. The artifacts are used to bypass the default authentication strategies, and are validated directly as + * if they were received via an authentication scheme. Ignored if set without credentials. Defaults to no artifacts. + * * app - (optional) sets the initial value of request.app, defaults to {}. + * * plugins - (optional) sets the initial value of request.plugins, defaults to {}. + * * allowInternals - (optional) allows access to routes with config.isInternal set to true. Defaults to false. + * * remoteAddress - (optional) sets the remote address for the incoming connection. + * * simulate - (optional) an object with options used to simulate client request stream conditions for testing: + * * error - if true, emits an 'error' event after payload transmission (if any). Defaults to false. + * * close - if true, emits a 'close' event after payload transmission (if any). Defaults to false. + * * end - if false, does not end the stream. Defaults to true. + * * split - indicates whether the request payload will be split into chunks. Defaults to undefined, meaning payload will not be chunked. + * * validate - (optional) if false, the options inputs are not validated. This is recommended for run-time usage of inject() to make it perform faster where input validation can be tested + * separately. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverinjectoptions) + * For context [Shot module](https://github.com/hapijs/shot) + */ +export interface ServerInjectOptions extends Shot.RequestOptions { + /** + * Authentication bypass options. + */ + auth?: { + /** + * The authentication strategy name matching the provided credentials. + */ + strategy: string; + /** + * The credentials are used to bypass the default authentication strategies, + * and are validated directly as if they were received via an authentication scheme. + */ + credentials: AuthCredentials; + /** + * The artifacts are used to bypass the default authentication strategies, + * and are validated directly as if they were received via an authentication scheme. Defaults to no artifacts. + */ + artifacts?: object; + }; + /** + * sets the initial value of request.app, defaults to {}. + */ + app?: ApplicationState; + /** + * sets the initial value of request.plugins, defaults to {}. + */ + plugins?: PluginsStates; + /** + * allows access to routes with config.isInternal set to true. Defaults to false. + */ + allowInternals?: boolean; +} + +/** + * A response object with the following properties: + * * statusCode - the HTTP status code. + * * headers - an object containing the headers set. + * * payload - the response payload string. + * * rawPayload - the raw response payload buffer. + * * raw - an object with the injection request and response objects: + * * req - the simulated node request object. + * * res - the simulated node response object. + * * result - the raw handler response (e.g. when not a stream or a view) before it is serialized for transmission. If not available, the value is set to payload. Useful for inspection and reuse of + * the internal objects returned (instead of parsing the response string). + * * request - the request object. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverinjectoptions) + * For context [Shot module](https://github.com/hapijs/shot) + */ +export interface ServerInjectResponse extends Shot.ResponseObject { + /** + * the raw handler response (e.g. when not a stream or a view) before it is serialized for transmission. If not available, the value is set to payload. Useful for inspection and reuse of the + * internal objects returned (instead of parsing the response string). + */ + result: object | undefined; + /** + * the request object. + */ + request: Request; +} + +/** + * The method function with a signature async function(...args, [flags]) where: + * * ...args - the method function arguments (can be any number of arguments or none). + * * flags - when caching is enabled, an object used to set optional method result flags: + * * * ttl - 0 if result is valid but cannot be cached. Defaults to cache policy. + * For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethodname-method-options) + */ +export type ServerMethod = (...args: any[]) => any; + +/** + * The same cache configuration used in server.cache(). + * The generateTimeout option is required. + * For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethodname-method-options) + * For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servercacheoptions) + */ +export interface ServerMethodCache extends PolicyOptions { + generateTimeout: number | false; +} + +/** + * Configuration object: + * * bind - a context object passed back to the method function (via this) when called. Defaults to active context (set via server.bind() when the method is registered. Ignored if the method is an + * arrow function. + * * cache - the same cache configuration used in server.cache(). The generateTimeout option is required. + * * generateKey - a function used to generate a unique key (for caching) from the arguments passed to the method function (the flags argument is not passed as input). The server will automatically + * generate a unique key if the function's arguments are all of types 'string', 'number', or 'boolean'. However if the method uses other types of arguments, a key generation function must be provided + * which takes the same arguments as the function and returns a unique string (or null if no key can be generated). For reference [See + * docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethodname-method-options) + */ +export interface ServerMethodOptions { + /** + * a context object passed back to the method function (via this) when called. Defaults to active context (set via server.bind() when the method is registered. Ignored if the method is an arrow + * function. + */ + bind?: object; + /** + * the same cache configuration used in server.cache(). The generateTimeout option is required. + */ + cache?: ServerMethodCache; + /** + * a function used to generate a unique key (for caching) from the arguments passed to the method function (the flags argument is not passed as input). The server will automatically generate a + * unique key if the function's arguments are all of types 'string', 'number', or 'boolean'. However if the method uses other types of arguments, a key generation function must be provided which + * takes the same arguments as the function and returns a unique string (or null if no key can be generated). + */ + generateKey?(...args: any[]): string | null; +} + +/** + * An object or an array of objects where each one contains: + * * name - the method name. + * * method - the method function. + * * options - (optional) settings. + * For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethodmethods) + */ +export interface ServerMethodConfigurationObject { + /** + * the method name. + */ + name: string; + /** + * the method function. + */ + method: ServerMethod; + /** + * (optional) settings. + */ + options?: ServerMethodOptions; +} + +export type CacheProvider = EnginePrototype | { + constructor: EnginePrototype; + options?: T; +}; + +/** + * hapi uses catbox for its cache implementation which includes support for common storage solutions (e.g. Redis, + * MongoDB, Memcached, Riak, among others). Caching is only utilized if methods and plugins explicitly store their state in the cache. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-cache) + */ +export interface ServerOptionsCache extends PolicyOptions { + /** catbox engine object. */ + engine?: ClientApi; + + /** + * a class or a prototype function + */ + provider?: CacheProvider; + + /** + * an identifier used later when provisioning or configuring caching for server methods or plugins. Each cache name must be unique. A single item may omit the name option which defines + * the default cache. If every cache includes a name, a default memory cache is provisioned as well. + */ + name?: string; + + /** if true, allows multiple cache users to share the same segment (e.g. multiple methods using the same cache storage container). Default to false. */ + shared?: boolean; + + /** (optional) string used to isolate cached data. Defaults to 'hapi-cache'. */ + partition?: string; + + /** other options passed to the catbox strategy used. Other options are only passed to catbox when engine above is a class or function and ignored if engine is a catbox engine object). */ + [s: string]: any; +} + +export interface ServerOptionsCompression { + minBytes: number; +} + +/** + * Empty interface to allow for custom augmentation. + */ +/* tslint:disable-next-line:no-empty-interface */ +export interface ServerOptionsApp { +} + +/** + * The server options control the behavior of the server object. Note that the options object is deeply cloned + * (with the exception of listener which is shallowly copied) and should not contain any values that are unsafe to perform deep copy on. + * All options are optionals. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-server-options) + */ +export interface ServerOptions { + /** + * Default value: '0.0.0.0' (all available network interfaces). + * Sets the hostname or IP address the server will listen on. If not configured, defaults to host if present, otherwise to all available network interfaces. Set to '127.0.0.1' or 'localhost' to + * restrict the server to only those coming from the same host. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serveroptionsaddress) + */ + address?: string; + + /** + * Default value: {}. + * Provides application-specific configuration which can later be accessed via server.settings.app. The framework does not interact with this object. It is simply a reference made available + * anywhere a server reference is provided. Note the difference between server.settings.app which is used to store static configuration values and server.app which is meant for storing run-time + * state. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serveroptionsapp) + */ + app?: ServerOptionsApp; + + /** + * Default value: true. + * Used to disable the automatic initialization of the listener. When false, indicates that the listener will be started manually outside the framework. + * Cannot be set to true along with a port value. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serveroptionsautolisten) + */ + autoListen?: boolean; + + /** + * Default value: { engine: require('@hapi/catbox-memory' }. + * Sets up server-side caching providers. Every server includes a default cache for storing application state. By default, a simple memory-based cache is created which has limited capacity and + * capabilities. hapi uses catbox for its cache implementation which includes support for common storage solutions (e.g. Redis, MongoDB, Memcached, Riak, among others). Caching is only utilized + * if methods and plugins explicitly store their state in the cache. The server cache configuration only defines the storage container itself. The configuration can be assigned one or more + * (array): + * * a class or prototype function (usually obtained by calling require() on a catbox strategy such as require('@hapi/catbox-redis')). A new catbox client will be created internally using this + * function. + * * a configuration object with the following: + * * * engine - a class, a prototype function, or a catbox engine object. + * * * name - an identifier used later when provisioning or configuring caching for server methods or plugins. Each cache name must be unique. A single item may omit the name option which defines + * the default cache. If every cache includes a name, a default memory cache is provisioned as well. + * * * shared - if true, allows multiple cache users to share the same segment (e.g. multiple methods using the same cache storage container). Default to false. + * * * partition - (optional) string used to isolate cached data. Defaults to 'hapi-cache'. + * * * other options passed to the catbox strategy used. Other options are only passed to catbox when engine above is a class or function and ignored if engine is a catbox engine object). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serveroptionscache) + */ + cache?: CacheProvider | ServerOptionsCache | ServerOptionsCache[]; + + /** + * Default value: { minBytes: 1024 }. + * Defines server handling of content encoding requests. If false, response content encoding is disabled and no compression is performed by the server. + */ + compression?: boolean | ServerOptionsCompression; + + /** + * Default value: { request: ['implementation'] }. + * Determines which logged events are sent to the console. This should only be used for development and does not affect which events are actually logged internally and recorded. Set to false to + * disable all console logging, or to an object with: + * * log - a string array of server log tags to be displayed via console.error() when the events are logged via server.log() as well as internally generated server logs. Defaults to no output. + * * request - a string array of request log tags to be displayed via console.error() when the events are logged via request.log() as well as internally generated request logs. For example, to + * display all errors, set the option to ['error']. To turn off all console debug messages set it to false. To display all request logs, set it to '*'. Defaults to uncaught errors thrown in + * external code (these errors are handled automatically and result in an Internal Server Error response) or runtime errors due to developer error. For example, to display all errors, set the log + * or request to ['error']. To turn off all output set the log or request to false. To display all server logs, set the log or request to '*'. To disable all debug information, set debug to + * false. + */ + debug?: false | { + log?: string[] | false; + request?: string[] | false; + }; + + /** + * Default value: the operating system hostname and if not available, to 'localhost'. + * The public hostname or IP address. Used to set server.info.host and server.info.uri and as address is none provided. + */ + host?: string; + + /** + * Default value: none. + * An optional node HTTP (or HTTPS) http.Server object (or an object with a compatible interface). + * If the listener needs to be manually started, set autoListen to false. + * If the listener uses TLS, set tls to true. + */ + listener?: http.Server; + + /** + * Default value: { sampleInterval: 0 }. + * Server excessive load handling limits where: + * * sampleInterval - the frequency of sampling in milliseconds. When set to 0, the other load options are ignored. Defaults to 0 (no sampling). + * * maxHeapUsedBytes - maximum V8 heap size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). + * * maxRssBytes - maximum process RSS size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). + * * maxEventLoopDelay - maximum event loop delay duration in milliseconds over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). + */ + load?: { + /** the frequency of sampling in milliseconds. When set to 0, the other load options are ignored. Defaults to 0 (no sampling). */ + sampleInterval?: number; + + /** + * Max concurrent requests. + */ + concurrent?: number; + + /** maximum V8 heap size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ + maxHeapUsedBytes?: number; + /** + * maximum process RSS size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). + */ + maxRssBytes?: number; + /** + * maximum event loop delay duration in milliseconds over which incoming requests are rejected with an HTTP Server Timeout (503) response. + * Defaults to 0 (no limit). + */ + maxEventLoopDelay?: number; + }; + + /** + * Default value: none. + * Options passed to the mimos module when generating the mime database used by the server (and accessed via server.mime): + * * override - an object hash that is merged into the built in mime information specified here. Each key value pair represents a single mime object. Each override value must contain: + * * key - the lower-cased mime-type string (e.g. 'application/javascript'). + * * value - an object following the specifications outlined here. Additional values include: + * * * type - specify the type value of result objects, defaults to key. + * * * predicate - method with signature function(mime) when this mime type is found in the database, this function will execute to allows customizations. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serveroptionsmime) + */ + mime?: MimosOptions; + + /** + * Default value: {}. + * Plugin-specific configuration which can later be accessed via server.settings.plugins. plugins is an object where each key is a plugin name and the value is the configuration. Note the + * difference between server.settings.plugins which is used to store static configuration values and server.plugins which is meant for storing run-time state. + */ + plugins?: PluginSpecificConfiguration; + + /** + * Default value: 0 (an ephemeral port). + * The TCP port the server will listen to. Defaults the next available port when the server is started (and assigned to server.info.port). + * If port is a string containing a '/' character, it is used as a UNIX domain socket path. If it starts with '\.\pipe', it is used as a Windows named pipe. + */ + port?: number | string; + + /** + * Default value: { isCaseSensitive: true, stripTrailingSlash: false }. + * Controls how incoming request URIs are matched against the routing table: + * * isCaseSensitive - determines whether the paths '/example' and '/EXAMPLE' are considered different resources. Defaults to true. + * * stripTrailingSlash - removes trailing slashes on incoming paths. Defaults to false. + */ + router?: { + isCaseSensitive?: boolean; + stripTrailingSlash?: boolean; + }; + + /** + * Default value: none. + * A route options object used as the default configuration for every route. + */ + routes?: RouteOptions; + + /** + * Default value: + * { + * strictHeader: true, + * ignoreErrors: false, + * isSecure: true, + * isHttpOnly: true, + * isSameSite: 'Strict', + * encoding: 'none' + * } + * Sets the default configuration for every state (cookie) set explicitly via server.state() or implicitly (without definition) using the state configuration object. + */ + // TODO I am not sure if I need to use all the server.state() definition (like the default value) OR only the options below. The v16 use "any" here. + // state?: ServerStateCookieOptions; + state?: { + strictHeader?: boolean, + ignoreErrors?: boolean, + isSecure?: boolean, + isHttpOnly?: boolean, + isSameSite?: false | 'Strict' | 'Lax', + encoding?: 'none' | 'base64' | 'base64json' | 'form' | 'iron' + }; + + /** + * Default value: none. + * Used to create an HTTPS connection. The tls object is passed unchanged to the node HTTPS server as described in the node HTTPS documentation. + */ + tls?: boolean | https.ServerOptions; + + /** + * Default value: constructed from runtime server information. + * The full public URI without the path (e.g. 'http://example.com:8080'). If present, used as the server server.info.uri, otherwise constructed from the server settings. + */ + uri?: string; + + /** + * Query parameter configuration. + */ + query?: { + /** + * the method must return an object where each key is a parameter and matching value is the parameter value. + * If the method throws, the error is used as the response or returned when `request.setUrl` is called. + */ + parser(raw: Util.Dictionary): Util.Dictionary; + }; +} + +/** + * The realm object contains sandboxed server settings specific to each plugin or authentication strategy. When registering a plugin or an authentication scheme, a server object reference is provided + * with a new server.realm container specific to that registration. It allows each plugin to maintain its own settings without leaking and affecting other plugins. For example, a plugin can set a + * default file path for local resources without breaking other plugins' configured paths. When calling server.bind(), the active realm's settings.bind property is set which is then used by routes + * and extensions added at the same level (server root or plugin). + * + * https://github.com/hapijs/hapi/blob/master/API.md#server.realm + */ +export interface ServerRealm { + /** when the server object is provided as an argument to the plugin register() method, modifiers provides the registration preferences passed the server.register() method and includes: */ + modifiers: { + /** routes preferences: */ + route: { + /** + * the route path prefix used by any calls to server.route() from the server. Note that if a prefix is used and the route path is set to '/', the resulting path will not include + * the trailing slash. + */ + prefix: string; + /** the route virtual host settings used by any calls to server.route() from the server. */ + vhost: string; + } + }; + /** the realm of the parent server object, or null for the root server. */ + parent: ServerRealm | null; + /** the active plugin name (empty string if at the server root). */ + plugin: string; + /** the plugin options object passed at registration. */ + pluginOptions: object; + /** plugin-specific state to be shared only among activities sharing the same active state. plugins is an object where each key is a plugin name and the value is the plugin state. */ + plugins: PluginsStates; + /** settings overrides */ + settings: { + files: { + relativeTo: string; + }; + bind: object; + }; +} + +/** + * Registration options (different from the options passed to the registration function): + * * once - if true, subsequent registrations of the same plugin are skipped without error. Cannot be used with plugin options. Defaults to false. If not set to true, an error will be thrown the + * second time a plugin is registered on the server. + * * routes - modifiers applied to each route added by the plugin: + * * * prefix - string added as prefix to any route path (must begin with '/'). If a plugin registers a child plugin the prefix is passed on to the child or is added in front of the child-specific + * prefix. + * * * vhost - virtual host string (or array of strings) applied to every route. The outer-most vhost overrides the any nested configuration. + * For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverregisterplugins-options) + */ +export interface ServerRegisterOptions { + /** + * if true, subsequent registrations of the same plugin are skipped without error. Cannot be used with plugin options. Defaults to false. If not set to true, an error will be thrown the second + * time a plugin is registered on the server. + */ + once?: boolean; + /** + * modifiers applied to each route added by the plugin: + */ + routes?: { + /** + * string added as prefix to any route path (must begin with '/'). If a plugin registers a child plugin the prefix is passed on to the child or is added in front of the child-specific prefix. + */ + prefix: string; + /** + * virtual host string (or array of strings) applied to every route. The outer-most vhost overrides the any nested configuration. + */ + vhost?: string | string[]; + }; +} + +/** + * An object with the following: + * * plugin - a plugin object. + * * options - (optional) options passed to the plugin during registration. + * * once - if true, subsequent registrations of the same plugin are skipped without error. Cannot be used with plugin options. Defaults to false. If not set to true, an error will be thrown the + * second time a plugin is registered on the server. + * * routes - modifiers applied to each route added by the plugin: + * * * prefix - string added as prefix to any route path (must begin with '/'). If a plugin registers a child plugin the prefix is passed on to the child or is added in front of the child-specific + * prefix. + * * * vhost - virtual host string (or array of strings) applied to every route. The outer-most vhost overrides the any nested configuration. + * For reference [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverregisterplugins-options) + * + * The type parameter T is the type of the plugin configuration options. + */ +export interface ServerRegisterPluginObject extends ServerRegisterOptions { + /** + * a plugin object. + */ + plugin: Plugin; + /** + * options passed to the plugin during registration. + */ + options?: T; +} + +export interface ServerRegisterPluginObjectArray extends Array + | ServerRegisterPluginObject + | ServerRegisterPluginObject + | ServerRegisterPluginObject + | ServerRegisterPluginObject + | ServerRegisterPluginObject + | ServerRegisterPluginObject + | undefined> { + 0: ServerRegisterPluginObject; + 1?: ServerRegisterPluginObject; + 2?: ServerRegisterPluginObject; + 3?: ServerRegisterPluginObject; + 4?: ServerRegisterPluginObject; + 5?: ServerRegisterPluginObject; + 6?: ServerRegisterPluginObject; +} + +/* tslint:disable-next-line:no-empty-interface */ +export interface HandlerDecorations { +} + +/** + * A route configuration object or an array of configuration objects where each object contains: + * * path - (required) the absolute path used to match incoming requests (must begin with '/'). Incoming requests are compared to the configured paths based on the server's router configuration. The + * path can include named parameters enclosed in {} which will be matched against literal values in the request as described in Path parameters. + * * method - (required) the HTTP method. Typically one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', or 'OPTIONS'. Any HTTP method is allowed, except for 'HEAD'. Use '*' to match against any HTTP + * method (only when an exact match was not found, and any match with a specific method will be given a higher priority over a wildcard match). Can be assigned an array of methods which has the same + * result as adding the same route with different methods manually. + * * vhost - (optional) a domain string or an array of domain strings for limiting the route to only requests with a matching host header field. Matching is done against the hostname part of the + * header only (excluding the port). Defaults to all hosts. + * * handler - (required when handler is not set) the route handler function called to generate the response after successful authentication and validation. + * * options - additional route options. The options value can be an object or a function that returns an object using the signature function(server) where server is the server the route is being + * added to and this is bound to the current realm's bind option. + * * rules - route custom rules object. The object is passed to each rules processor registered with server.rules(). Cannot be used if route.options.rules is defined. + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverrouteroute) + */ +export interface ServerRoute { + /** + * (required) the absolute path used to match incoming requests (must begin with '/'). Incoming requests are compared to the configured paths based on the server's router configuration. The path + * can include named parameters enclosed in {} which will be matched against literal values in the request as described in Path parameters. For context [See + * docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverrouteroute) For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#path-parameters) + */ + path: string; + + /** + * (required) the HTTP method. Typically one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', or 'OPTIONS'. Any HTTP method is allowed, except for 'HEAD'. Use '*' to match against any HTTP method + * (only when an exact match was not found, and any match with a specific method will be given a higher priority over a wildcard match). Can be assigned an array of methods which has the same + * result as adding the same route with different methods manually. + */ + method: Util.HTTP_METHODS_PARTIAL | Util.HTTP_METHODS_PARTIAL[] | string | string[]; + + /** + * (optional) a domain string or an array of domain strings for limiting the route to only requests with a matching host header field. Matching is done against the hostname part of the header + * only (excluding the port). Defaults to all hosts. + */ + vhost?: string | string[]; + + /** + * (required when handler is not set) the route handler function called to generate the response after successful authentication and validation. + */ + handler?: Lifecycle.Method | HandlerDecorations; + + /** + * additional route options. The options value can be an object or a function that returns an object using the signature function(server) where server is the server the route is being added to + * and this is bound to the current realm's bind option. + */ + options?: RouteOptions | ((server: Server) => RouteOptions); + + /** + * route custom rules object. The object is passed to each rules processor registered with server.rules(). Cannot be used if route.options.rules is defined. + */ + rules?: object; +} + +/** + * Optional cookie settings + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverstatename-options) + */ +export interface ServerStateCookieOptions { + /** time-to-live in milliseconds. Defaults to null (session time-life - cookies are deleted when the browser is closed). */ + ttl?: number | null; + /** sets the 'Secure' flag. Defaults to true. */ + isSecure?: boolean; + /** sets the 'HttpOnly' flag. Defaults to true. */ + isHttpOnly?: boolean; + /** + * sets the 'SameSite' flag. The value must be one of: + * * false - no flag. + * * 'Strict' - sets the value to 'Strict' (this is the default value). + * * 'Lax' - sets the value to 'Lax'. + */ + isSameSite?: false | 'Strict' | 'Lax'; + /** the path scope. Defaults to null (no path). */ + path?: string | null; + /** the domain scope. Defaults to null (no domain). */ + domain?: string | null; + + /** + * if present and the cookie was not received from the client or explicitly set by the route handler, the + * cookie is automatically added to the response with the provided value. The value can be + * a function with signature async function(request) where: + */ + autoValue?(request: Request): void; + + /** + * encoding performs on the provided value before serialization. Options are: + * * 'none' - no encoding. When used, the cookie value must be a string. This is the default value. + * * 'base64' - string value is encoded using Base64. + * * 'base64json' - object value is JSON-stringified then encoded using Base64. + * * 'form' - object value is encoded using the x-www-form-urlencoded method. + * * 'iron' - Encrypts and sign the value using iron. + */ + encoding?: 'none' | 'base64' | 'base64json' | 'form' | 'iron'; + /** + * an object used to calculate an HMAC for cookie integrity validation. This does not provide privacy, only a mean + * to verify that the cookie value was generated by the server. Redundant when 'iron' encoding is used. Options are: + * * integrity - algorithm options. Defaults to require('@hapi/iron').defaults.integrity. + * * password - password used for HMAC key generation (must be at least 32 characters long). + */ + sign?: { + integrity?: SealOptionsSub; + password: string; + }; + /** password used for 'iron' encoding (must be at least 32 characters long). */ + password?: string; + /** options for 'iron' encoding. Defaults to require('@hapi/iron').defaults. */ + iron?: SealOptions; + /** if true, errors are ignored and treated as missing cookies. */ + ignoreErrors?: boolean; + /** if true, automatically instruct the client to remove invalid cookies. Defaults to false. */ + clearInvalid?: boolean; + /** if false, allows any cookie value including values in violation of RFC 6265. Defaults to true. */ + strictHeader?: boolean; + /** used by proxy plugins (e.g. h2o2). */ + passThrough?: any; +} + +/** + * A single object or an array of object where each contains: + * * name - the cookie name. + * * value - the cookie value. + * * options - cookie configuration to override the server settings. + */ +export interface ServerStateFormat { + name: string; + value: string; + options: ServerStateCookieOptions; +} + +/** + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverstatename-options) + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serveroptionsstate) + */ +export interface ServerState { + /** + * The server cookies manager. + * Access: read only and statehood public interface. + */ + readonly states: object; + + /** + * The server cookies manager settings. The settings are based on the values configured in [server.options.state](https://github.com/hapijs/hapi/blob/master/API.md#server.options.state). + */ + readonly settings: ServerStateCookieOptions; + + /** + * An object containing the configuration of each cookie added via [server.state()](https://github.com/hapijs/hapi/blob/master/API.md#server.state()) where each key is the + * cookie name and value is the configuration object. + */ + readonly cookies: { + [key: string]: ServerStateCookieOptions; + }; + + /** + * An array containing the names of all configued cookies. + */ + readonly names: string[]; + + /** + * Same as calling [server.state()](https://github.com/hapijs/hapi/blob/master/API.md#server.state()). + */ + add(name: string, options?: ServerStateCookieOptions): void; + + /** + * Formats an HTTP 'Set-Cookie' header based on the server.options.state where: + * @param cookies - a single object or an array of object where each contains: + * * name - the cookie name. + * * value - the cookie value. + * * options - cookie configuration to override the server settings. + * @return Return value: a header string. + * Note that this utility uses the server configuration but does not change the server state. It is provided for manual cookie formating (e.g. when headers are set manually). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-async-serverstatesformatcookies) + */ + format(cookies: ServerStateFormat | ServerStateFormat[]): Promise; + + /** + * Parses an HTTP 'Cookies' header based on the server.options.state where: + * @param header - the HTTP header. + * @return Return value: an object where each key is a cookie name and value is the parsed cookie. + * Note that this utility uses the server configuration but does not change the server state. It is provided for manual cookie parsing (e.g. when server parsing is disabled). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-async-serverstatesparseheader) + */ + parse(header: string): Promise>; +} + +/** + * The method function can have a defaults object or function property. If the property is set to an object, that object is used as the default route config for routes using this handler. + * If the property is set to a function, the function uses the signature function(method) and returns the route default configuration. + */ +export interface HandlerDecorationMethod { + (route: RouteOptions, options: any): Lifecycle.Method; + defaults?: RouteOptions | ((method: any) => RouteOptions); +} + +/** + * The general case for decorators added via server.decorate. + */ +export type DecorationMethod = (this: T, ...args: any[]) => any; + +/** + * An empty interface to allow typings of custom plugin properties. + */ +/* tslint:disable-next-line:no-empty-interface */ +export interface PluginProperties { +} + +export type DecorateName = string | symbol; + +/** + * The server object is the main application container. The server manages all incoming requests along with all + * the facilities provided by the framework. Each server supports a single connection (e.g. listen to port 80). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#server) + */ +export class Server { + /** + * Creates a new server object + * @param options server configuration object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serveroptions) + */ + constructor(options?: ServerOptions); + + /** + * Provides a safe place to store server-specific run-time application data without potential conflicts with + * the framework internals. The data can be accessed whenever the server is accessible. + * Initialized with an empty object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverapp) + */ + app: ApplicationState; + + /** + * Server Auth: properties and methods + */ + readonly auth: ServerAuth; + + /** + * Links another server to the initialize/start/stop state of the current server by calling the + * controlled server `initialize()`/`start()`/`stop()` methods whenever the current server methods + * are called, where: + */ + control(server: Server): void; + + /** + * Provides access to the decorations already applied to various framework interfaces. The object must not be + * modified directly, but only through server.decorate. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverdecorations) + */ + readonly decorations: { + /** + * decorations on the request object. + */ + request: string[], + /** + * decorations on the response toolkit. + */ + toolkit: string[], + /** + * decorations on the server object. + */ + server: string[] + }; + + /** + * Register custom application events where: + * @param events must be one of: + * * an event name string. + * * an event options object with the following optional keys (unless noted otherwise): + * * * name - the event name string (required). + * * * channels - a string or array of strings specifying the event channels available. Defaults to no channel restrictions (event updates can specify a channel or not). + * * * clone - if true, the data object passed to server.events.emit() is cloned before it is passed to the listeners (unless an override specified by each listener). Defaults to false (data is + * passed as-is). + * * * spread - if true, the data object passed to server.event.emit() must be an array and the listener method is called with each array element passed as a separate argument (unless an override + * specified by each listener). This should only be used when the emitted data structure is known and predictable. Defaults to false (data is emitted as a single argument regardless of its + * type). + * * * tags - if true and the criteria object passed to server.event.emit() includes tags, the tags are mapped to an object (where each tag string is the key and the value is true) which is + * appended to the arguments list at the end. A configuration override can be set by each listener. Defaults to false. + * * * shared - if true, the same event name can be registered multiple times where the second registration is ignored. Note that if the registration config is changed between registrations, only + * the first configuration is used. Defaults to false (a duplicate registration will throw an error). + * * a podium emitter object. + * * an array containing any of the above. + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverevents) + */ + event(events: ServerEventsApplication | ServerEventsApplication[]): void; + + /** + * Access: podium public interface. + * The server events emitter. Utilizes the podium with support for event criteria validation, channels, and filters. + * Use the following methods to interact with server.events: + * [server.events.emit(criteria, data)](https://github.com/hapijs/hapi/blob/master/API.md#server.events.emit()) - emit server events. + * [server.events.on(criteria, listener)](https://github.com/hapijs/hapi/blob/master/API.md#server.events.on()) - subscribe to all events. + * [server.events.once(criteria, listener)](https://github.com/hapijs/hapi/blob/master/API.md#server.events.once()) - subscribe to + * Other methods include: server.events.removeListener(name, listener), server.events.removeAllListeners(name), and server.events.hasListeners(name). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverevents) + */ + events: ServerEvents; + + /** + * An object containing information about the server where: + * * id - a unique server identifier (using the format '{hostname}:{pid}:{now base36}'). + * * created - server creation timestamp. + * * started - server start timestamp (0 when stopped). + * * port - the connection port based on the following rules: + * * host - The host configuration value. + * * address - the active IP address the connection was bound to after starting. Set to undefined until the server has been started or when using a non TCP port (e.g. UNIX domain socket). + * * protocol - the protocol used: + * * 'http' - HTTP. + * * 'https' - HTTPS. + * * 'socket' - UNIX domain socket or Windows named pipe. + * * uri - a string representing the connection (e.g. 'http://example.com:8080' or 'socket:/unix/domain/socket/path'). Contains the uri value if set, otherwise constructed from the available + * settings. If no port is configured or is set to 0, the uri will not include a port component until the server is started. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverinfo) + */ + readonly info: ServerInfo; + + /** + * Access: read only and listener public interface. + * The node HTTP server object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverlistener) + */ + listener: http.Server; + + /** + * An object containing the process load metrics (when load.sampleInterval is enabled): + * * eventLoopDelay - event loop delay milliseconds. + * * heapUsed - V8 heap usage. + * * rss - RSS memory usage. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverload) + */ + readonly load: { + /** + * event loop delay milliseconds. + */ + eventLoopDelay: number; + + /** + * Max concurrent requests. + */ + concurrent: number + /** + * V8 heap usage. + */ + heapUsed: number; + /** + * RSS memory usage. + */ + rss: number; + }; + + /** + * Server methods are functions registered with the server and used throughout the application as a common utility. + * Their advantage is in the ability to configure them to use the built-in cache and share across multiple request + * handlers without having to create a common module. + * sever.methods is an object which provides access to the methods registered via server.method() where each + * server method name is an object property. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethods + */ + readonly methods: Util.Dictionary; + + /** + * Provides access to the server MIME database used for setting content-type information. The object must not be + * modified directly but only through the [mime](https://github.com/hapijs/hapi/blob/master/API.md#server.options.mime) server setting. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermime) + */ + mime: any; + + /** + * An object containing the values exposed by each registered plugin where each key is a plugin name and the values + * are the exposed properties by each plugin using server.expose(). Plugins may set the value of + * the server.plugins[name] object directly or via the server.expose() method. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverplugins) + */ + plugins: PluginProperties; + + /** + * The realm object contains sandboxed server settings specific to each plugin or authentication strategy. When + * registering a plugin or an authentication scheme, a server object reference is provided with a new server.realm + * container specific to that registration. It allows each plugin to maintain its own settings without leaking + * and affecting other plugins. + * For example, a plugin can set a default file path for local resources without breaking other plugins' configured + * paths. When calling server.bind(), the active realm's settings.bind property is set which is then used by + * routes and extensions added at the same level (server root or plugin). + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverrealm) + */ + readonly realm: ServerRealm; + + /** + * An object of the currently registered plugins where each key is a registered plugin name and the value is + * an object containing: + * * version - the plugin version. + * * name - the plugin name. + * * options - (optional) options passed to the plugin during registration. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverregistrations) + */ + readonly registrations: PluginsListRegistered; + + /** + * The server configuration object after defaults applied. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serversettings) + */ + readonly settings: ServerOptions; + + /** + * The server cookies manager. + * Access: read only and statehood public interface. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverstates) + */ + readonly states: ServerState; + + /** + * A string indicating the listener type where: + * * 'socket' - UNIX domain socket or Windows named pipe. + * * 'tcp' - an HTTP listener. + */ + readonly type: 'socket' | 'tcp'; + + /** + * The hapi module version number. + */ + readonly version: string; + + /** + * Sets a global context used as the default bind object when adding a route or an extension where: + * @param context - the object used to bind this in lifecycle methods such as the route handler and extension methods. The context is also made available as h.context. + * @return Return value: none. + * When setting a context inside a plugin, the context is applied only to methods set up by the plugin. Note that the context applies only to routes and extensions added after it has been set. + * Ignored if the method being bound is an arrow function. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverbindcontext) + */ + bind(context: object): void; + + /** + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servercacheoptions) + */ + cache: ServerCache; + + /** + * Registers a custom content decoding compressor to extend the built-in support for 'gzip' and 'deflate' where: + * @param encoding - the decoder name string. + * @param decoder - a function using the signature function(options) where options are the encoding specific options configured in the route payload.compression configuration option, and the + * return value is an object compatible with the output of node's zlib.createGunzip(). + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverdecoderencoding-decoder) + */ + decoder(encoding: string, decoder: ((options: PayloadCompressionDecoderSettings) => zlib.Gunzip)): void; + + /** + * Extends various framework interfaces with custom methods where: + * @param type - the interface being decorated. Supported types: + * 'handler' - adds a new handler type to be used in routes handlers. + * 'request' - adds methods to the Request object. + * 'server' - adds methods to the Server object. + * 'toolkit' - adds methods to the response toolkit. + * @param property - the object decoration key name. + * @param method - the extension function or other value. + * @param options - (optional) supports the following optional settings: + * apply - when the type is 'request', if true, the method function is invoked using the signature function(request) where request is the current request object and the returned value is assigned + * as the decoration. extend - if true, overrides an existing decoration. The method must be a function with the signature function(existing) where: existing - is the previously set + * decoration method value. must return the new decoration function or value. cannot be used to extend handler decorations. + * @return void; + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverdecoratetype-property-method-options) + */ + decorate(type: 'handler', property: DecorateName, method: HandlerDecorationMethod, options?: {apply?: boolean, extend?: boolean}): void; + decorate(type: 'request', property: DecorateName, method: (existing: ((...args: any[]) => any)) => (request: Request) => DecorationMethod, options: {apply: true, extend: true}): void; + decorate(type: 'request', property: DecorateName, method: (request: Request) => DecorationMethod, options: {apply: true, extend?: boolean}): void; + decorate(type: 'request', property: DecorateName, method: DecorationMethod, options?: {apply?: boolean, extend?: boolean}): void; + decorate(type: 'toolkit', property: DecorateName, method: (existing: ((...args: any[]) => any)) => DecorationMethod, options: {apply?: boolean, extend: true}): void; + decorate(type: 'toolkit', property: DecorateName, method: DecorationMethod, options?: {apply?: boolean, extend?: boolean}): void; + decorate(type: 'server', property: DecorateName, method: (existing: ((...args: any[]) => any)) => DecorationMethod, options: {apply?: boolean, extend: true}): void; + decorate(type: 'server', property: DecorateName, method: DecorationMethod, options?: {apply?: boolean, extend?: boolean}): void; + + /** + * Used within a plugin to declare a required dependency on other plugins where: + * @param dependencies - plugins which must be registered in order for this plugin to operate. Plugins listed must be registered before the server is + * initialized or started. + * @param after - (optional) a function that is called after all the specified dependencies have been registered and before the server starts. The function is only called if the server is + * initialized or started. The function signature is async function(server) where: server - the server the dependency() method was called on. + * @return Return value: none. + * The after method is identical to setting a server extension point on 'onPreStart'. + * If a circular dependency is detected, an exception is thrown (e.g. two plugins each has an after function to be called after the other). + * The method does not provide version dependency which should be implemented using npm peer dependencies. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverdependencydependencies-after) + */ + dependency(dependencies: Dependencies, after?: ((server: Server) => Promise)): void; + + /** + * Registers a custom content encoding compressor to extend the built-in support for 'gzip' and 'deflate' where: + * @param encoding - the encoder name string. + * @param encoder - a function using the signature function(options) where options are the encoding specific options configured in the route compression option, and the return value is an object + * compatible with the output of node's zlib.createGzip(). + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverencoderencoding-encoder) + */ + encoder(encoding: string, encoder: ((options: RouteCompressionEncoderSettings) => zlib.Gzip)): void; + + /** + * Used within a plugin to expose a property via server.plugins[name] where: + * @param key - the key assigned (server.plugins[name][key]). + * @param value - the value assigned. + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverexposekey-value) + */ + expose(key: string, value: any): void; + + /** + * Merges an object into to the existing content of server.plugins[name] where: + * @param obj - the object merged into the exposed properties container. + * @return Return value: none. + * Note that all the properties of obj are deeply cloned into server.plugins[name], so avoid using this method + * for exposing large objects that may be expensive to clone or singleton objects such as database client + * objects. Instead favor server.expose(key, value), which only copies a reference to value. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverexposeobj) + */ + expose(obj: object): void; + + /** + * Registers an extension function in one of the request lifecycle extension points where: + * @param events - an object or array of objects with the following: + * * type - (required) the extension point event name. The available extension points include the request extension points as well as the following server extension points: + * * * 'onPreStart' - called before the connection listeners are started. + * * * 'onPostStart' - called after the connection listeners are started. + * * * 'onPreStop' - called before the connection listeners are stopped. + * * * 'onPostStop' - called after the connection listeners are stopped. + * * method - (required) a function or an array of functions to be executed at a specified point during request processing. The required extension function signature is: + * * * server extension points: async function(server) where: + * * * * server - the server object. + * * * * this - the object provided via options.bind or the current active context set with server.bind(). + * * * request extension points: a lifecycle method. + * * options - (optional) an object with the following: + * * * before - a string or array of strings of plugin names this method must execute before (on the same event). Otherwise, extension methods are executed in the order added. + * * * after - a string or array of strings of plugin names this method must execute after (on the same event). Otherwise, extension methods are executed in the order added. + * * * bind - a context object passed back to the provided method (via this) when called. Ignored if the method is an arrow function. + * * * sandbox - if set to 'plugin' when adding a request extension points the extension is only added to routes defined by the current plugin. Not allowed when configuring route-level + * extensions, or when adding server extensions. Defaults to 'server' which applies to any route added to the server the extension is added to. + * @return void + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverextevents) + */ + ext(events: ServerExtEventsObject | ServerExtEventsObject[] | ServerExtEventsRequestObject | ServerExtEventsRequestObject[]): void; + + /** + * Registers a single extension event using the same properties as used in server.ext(events), but passed as arguments. + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverextevent-method-options) + */ + ext(event: ServerExtType, method: ServerExtPointFunction, options?: ServerExtOptions): void; + ext(event: ServerRequestExtType, method: Lifecycle.Method, options?: ServerExtOptions): void; + + /** + * Initializes the server (starts the caches, finalizes plugin registration) but does not start listening on the connection port. + * @return Return value: none. + * Note that if the method fails and throws an error, the server is considered to be in an undefined state and + * should be shut down. In most cases it would be impossible to fully recover as the various plugins, caches, and + * other event listeners will get confused by repeated attempts to start the server or make assumptions about the + * healthy state of the environment. It is recommended to abort the process when the server fails to start properly. + * If you must try to resume after an error, call server.stop() first to reset the server state. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverinitialize) + */ + initialize(): Promise; + + /** + * Injects a request into the server simulating an incoming HTTP request without making an actual socket connection. Injection is useful for testing purposes as well as for invoking routing logic + * internally without the overhead and limitations of the network stack. The method utilizes the shot module for performing injections, with some additional options and response properties: + * @param options - can be assigned a string with the requested URI, or an object with: + * * method - (optional) the request HTTP method (e.g. 'POST'). Defaults to 'GET'. + * * url - (required) the request URL. If the URI includes an authority (e.g. 'example.com:8080'), it is used to automatically set an HTTP 'Host' header, unless one was specified in headers. + * * headers - (optional) an object with optional request headers where each key is the header name and the value is the header content. Defaults to no additions to the default shot headers. + * * payload - (optional) an string, buffer or object containing the request payload. In case of an object it will be converted to a string for you. Defaults to no payload. Note that payload + * processing defaults to 'application/json' if no 'Content-Type' header provided. + * * credentials - (optional) an credentials object containing authentication information. The credentials are used to bypass the default authentication strategies, and are validated directly as + * if they were received via an authentication scheme. Defaults to no credentials. + * * artifacts - (optional) an artifacts object containing authentication artifact information. The artifacts are used to bypass the default authentication strategies, and are validated directly + * as if they were received via an authentication scheme. Ignored if set without credentials. Defaults to no artifacts. + * * app - (optional) sets the initial value of request.app, defaults to {}. + * * plugins - (optional) sets the initial value of request.plugins, defaults to {}. + * * allowInternals - (optional) allows access to routes with config.isInternal set to true. Defaults to false. + * * remoteAddress - (optional) sets the remote address for the incoming connection. + * * simulate - (optional) an object with options used to simulate client request stream conditions for testing: + * * error - if true, emits an 'error' event after payload transmission (if any). Defaults to false. + * * close - if true, emits a 'close' event after payload transmission (if any). Defaults to false. + * * end - if false, does not end the stream. Defaults to true. + * * split - indicates whether the request payload will be split into chunks. Defaults to undefined, meaning payload will not be chunked. + * * validate - (optional) if false, the options inputs are not validated. This is recommended for run-time usage of inject() to make it perform faster where input validation can be tested + * separately. + * @return Return value: a response object with the following properties: + * * statusCode - the HTTP status code. + * * headers - an object containing the headers set. + * * payload - the response payload string. + * * rawPayload - the raw response payload buffer. + * * raw - an object with the injection request and response objects: + * * req - the simulated node request object. + * * res - the simulated node response object. + * * result - the raw handler response (e.g. when not a stream or a view) before it is serialized for transmission. If not available, the value is set to payload. Useful for inspection and reuse + * of the internal objects returned (instead of parsing the response string). + * * request - the request object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverinjectoptions) + */ + inject(options: string | ServerInjectOptions): Promise; + + /** + * Logs server events that cannot be associated with a specific request. When called the server emits a 'log' event which can be used by other listeners or plugins to record the information or + * output to the console. The arguments are: + * @param tags - (required) a string or an array of strings (e.g. ['error', 'database', 'read']) used to identify the event. Tags are used instead of log levels and provide a much more expressive + * mechanism for describing and filtering events. Any logs generated by the server internally include the 'hapi' tag along with event-specific information. + * @param data - (optional) an message string or object with the application data being logged. If data is a function, the function signature is function() and it called once to generate (return + * value) the actual data emitted to the listeners. If no listeners match the event, the data function is not invoked. + * @param timestamp - (optional) an timestamp expressed in milliseconds. Defaults to Date.now() (now). + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverlogtags-data-timestamp) + */ + log(tags: string | string[], data?: string | object | (() => any), timestamp?: number): void; + + /** + * Looks up a route configuration where: + * @param id - the route identifier. + * @return Return value: the route information if found, otherwise null. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverlookupid) + */ + lookup(id: string): RequestRoute | null; + + /** + * Looks up a route configuration where: + * @param method - the HTTP method (e.g. 'GET', 'POST'). + * @param path - the requested path (must begin with '/'). + * @param host - (optional) hostname (to match against routes with vhost). + * @return Return value: the route information if found, otherwise null. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermatchmethod-path-host) + */ + match(method: Util.HTTP_METHODS, path: string, host?: string): RequestRoute | null; + + /** + * Registers a server method where: + * @param name - a unique method name used to invoke the method via server.methods[name]. + * @param method - the method function with a signature async function(...args, [flags]) where: + * * ...args - the method function arguments (can be any number of arguments or none). + * * flags - when caching is enabled, an object used to set optional method result flags: + * * * ttl - 0 if result is valid but cannot be cached. Defaults to cache policy. + * @param options - (optional) configuration object: + * * bind - a context object passed back to the method function (via this) when called. Defaults to active context (set via server.bind() when the method is registered. Ignored if the method is + * an arrow function. + * * cache - the same cache configuration used in server.cache(). The generateTimeout option is required. + * * generateKey - a function used to generate a unique key (for caching) from the arguments passed to the method function (the flags argument is not passed as input). The server will + * automatically generate a unique key if the function's arguments are all of types 'string', 'number', or 'boolean'. However if the method uses other types of arguments, a key generation + * function must be provided which takes the same arguments as the function and returns a unique string (or null if no key can be generated). + * @return Return value: none. + * Method names can be nested (e.g. utils.users.get) which will automatically create the full path under server.methods (e.g. accessed via server.methods.utils.users.get). + * When configured with caching enabled, server.methods[name].cache is assigned an object with the following properties and methods: - await drop(...args) - a function that can be used to clear + * the cache for a given key. - stats - an object with cache statistics, see catbox for stats documentation. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethodname-method-options) + */ + method(name: string, method: ServerMethod, options?: ServerMethodOptions): void; + + /** + * Registers a server method function as described in server.method() using a configuration object where: + * @param methods - an object or an array of objects where each one contains: + * * name - the method name. + * * method - the method function. + * * options - (optional) settings. + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermethodmethods) + */ + method(methods: ServerMethodConfigurationObject | ServerMethodConfigurationObject[]): void; + + /** + * Sets the path prefix used to locate static resources (files and view templates) when relative paths are used where: + * @param relativeTo - the path prefix added to any relative file path starting with '.'. + * @return Return value: none. + * Note that setting a path within a plugin only applies to resources accessed by plugin methods. If no path is set, the server default route configuration files.relativeTo settings is used. The + * path only applies to routes added after it has been set. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverpathrelativeto) + */ + path(relativeTo: string): void; + + /** + * Registers a plugin where: + * @param plugins - one or an array of: + * * a plugin object. + * * an object with the following: + * * * plugin - a plugin object. + * * * options - (optional) options passed to the plugin during registration. + * * * once, routes - (optional) plugin-specific registration options as defined below. + * @param options - (optional) registration options (different from the options passed to the registration function): + * * once - if true, subsequent registrations of the same plugin are skipped without error. Cannot be used with plugin options. Defaults to false. If not set to true, an error will be thrown the + * second time a plugin is registered on the server. + * * routes - modifiers applied to each route added by the plugin: + * * * prefix - string added as prefix to any route path (must begin with '/'). If a plugin registers a child plugin the prefix is passed on to the child or is added in front of the + * child-specific prefix. + * * * vhost - virtual host string (or array of strings) applied to every route. The outer-most vhost overrides the any nested configuration. + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverregisterplugins-options) + */ + /* tslint:disable-next-line:no-unnecessary-generics */ + register(plugin: ServerRegisterPluginObject, options?: ServerRegisterOptions): Promise; + /* tslint:disable-next-line:no-unnecessary-generics */ + register(plugins: ServerRegisterPluginObjectArray, options?: ServerRegisterOptions): Promise; + register(plugins: Array>, options?: ServerRegisterOptions): Promise; + /* tslint:disable-next-line:unified-signatures */ + register(plugins: Plugin | Array>, options?: ServerRegisterOptions): Promise; + + /** + * Adds a route where: + * @param route - a route configuration object or an array of configuration objects where each object contains: + * * path - (required) the absolute path used to match incoming requests (must begin with '/'). Incoming requests are compared to the configured paths based on the server's router configuration. + * The path can include named parameters enclosed in {} which will be matched against literal values in the request as described in Path parameters. + * * method - (required) the HTTP method. Typically one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', or 'OPTIONS'. Any HTTP method is allowed, except for 'HEAD'. Use '*' to match against any HTTP + * method (only when an exact match was not found, and any match with a specific method will be given a higher priority over a wildcard match). Can be assigned an array of methods which has + * the same result as adding the same route with different methods manually. + * * vhost - (optional) a domain string or an array of domain strings for limiting the route to only requests with a matching host header field. Matching is done against the hostname part of the + * header only (excluding the port). Defaults to all hosts. + * * handler - (required when handler is not set) the route handler function called to generate the response after successful authentication and validation. + * * options - additional route options. The options value can be an object or a function that returns an object using the signature function(server) where server is the server the route is being + * added to and this is bound to the current realm's bind option. + * * rules - route custom rules object. The object is passed to each rules processor registered with server.rules(). Cannot be used if route.options.rules is defined. + * @return Return value: none. + * Note that the options object is deeply cloned (with the exception of bind which is shallowly copied) and cannot contain any values that are unsafe to perform deep copy on. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverrouteroute) + */ + route(route: ServerRoute | ServerRoute[]): void; + + /** + * Defines a route rules processor for converting route rules object into route configuration where: + * @param processor - a function using the signature function(rules, info) where: + * * rules - + * * info - an object with the following properties: + * * * method - the route method. + * * * path - the route path. + * * * vhost - the route virtual host (if any defined). + * * returns a route config object. + * @param options - optional settings: + * * validate - rules object validation: + * * * schema - joi schema. + * * * options - optional joi validation options. Defaults to { allowUnknown: true }. + * Note that the root server and each plugin server instance can only register one rules processor. If a route is added after the rules are configured, it will not include the rules config. + * Routes added by plugins apply the rules to each of the parent realms' rules from the root to the route's realm. This means the processor defined by the plugin override the config generated + * by the root processor if they overlap. The route config overrides the rules config if the overlap. + * @return void + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverrulesprocessor-options) + */ + rules(processor: (rules: object, info: {method: string, path: string, vhost?: string}) => object, options?: {validate: object}): void; // TODO needs implementation + + /** + * Starts the server by listening for incoming requests on the configured port (unless the connection was configured with autoListen set to false). + * @return Return value: none. + * Note that if the method fails and throws an error, the server is considered to be in an undefined state and should be shut down. In most cases it would be impossible to fully recover as the + * various plugins, caches, and other event listeners will get confused by repeated attempts to start the server or make assumptions about the healthy state of the environment. It is + * recommended to abort the process when the server fails to start properly. If you must try to resume after an error, call server.stop() first to reset the server state. If a started server + * is started again, the second call to server.start() is ignored. No events will be emitted and no extension points invoked. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverstart) + */ + start(): Promise; + + /** + * HTTP state management uses client cookies to persist a state across multiple requests. + * @param name - the cookie name string. + * @param options - are the optional cookie settings + * @return Return value: none. + * State defaults can be modified via the server default state configuration option. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverstatename-options) + */ + state(name: string, options?: ServerStateCookieOptions): void; + + /** + * Stops the server's listener by refusing to accept any new connections or requests (existing connections will continue until closed or timeout), where: + * @param options - (optional) object with: + * * timeout - overrides the timeout in millisecond before forcefully terminating a connection. Defaults to 5000 (5 seconds). + * @return Return value: none. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-await-serverstopoptions) + */ + stop(options?: {timeout: number}): Promise; + + /** + * Returns a copy of the routing table where: + * @param host - (optional) host to filter routes matching a specific virtual host. Defaults to all virtual hosts. + * @return Return value: an array of routes where each route contains: + * * settings - the route config with defaults applied. + * * method - the HTTP method in lower case. + * * path - the route path. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servertablehost) + */ + table(host?: string): RequestRoute[]; +} + +/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Utils + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + +/** + * User-extensible type for application specific state. + */ + /* tslint:disable-next-line:no-empty-interface */ +export interface ApplicationState { +} + +export type PeekListener = (chunk: string, encoding: string) => void; + +export namespace Json { + /** + * @see {@link https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter} + */ + type StringifyReplacer = ((key: string, value: any) => any) | Array<(string | number)> | undefined; + + /** + * Any value greater than 10 is truncated. + */ + type StringifySpace = number | string; + + /** + * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionsjson) + */ + interface StringifyArguments { + /** the replacer function or array. Defaults to no action. */ + replacer?: StringifyReplacer; + /** number of spaces to indent nested object keys. Defaults to no indentation. */ + space?: StringifySpace; + /* string suffix added after conversion to JSON string. Defaults to no suffix. */ + suffix?: string; + /* calls Hoek.jsonEscape() after conversion to JSON string. Defaults to false. */ + escape?: boolean; + } +} + +export namespace Lifecycle { + /** + * Lifecycle methods are the interface between the framework and the application. Many of the request lifecycle steps: + * extensions, authentication, handlers, pre-handler methods, and failAction function values are lifecyle methods + * provided by the developer and executed by the framework. + * Each lifecycle method is a function with the signature await function(request, h, [err]) where: + * * request - the request object. + * * h - the response toolkit the handler must call to set a response and return control back to the framework. + * * err - an error object availble only when the method is used as a failAction value. + */ + type Method = (request: Request, h: ResponseToolkit, err?: Error) => ReturnValue; + + /** + * Each lifecycle method must return a value or a promise that resolves into a value. If a lifecycle method returns + * without a value or resolves to an undefined value, an Internal Server Error (500) error response is sent. + * The return value must be one of: + * - Plain value: null, string, number, boolean + * - Buffer object + * - Error object: plain Error OR a Boom object. + * - Stream object + * - any object or array + * - a toolkit signal: + * - a toolkit method response: + * - a promise object that resolve to any of the above values + * For more info please [See docs](https://github.com/hapijs/hapi/blob/master/API.md#lifecycle-methods) + */ + type ReturnValue = ReturnValueTypes | (Promise); + type ReturnValueTypes = + (null | string | number | boolean) | + (Buffer) | + (Error | Boom) | + (stream.Stream) | + (object | object[]) | + symbol | + ResponseToolkit; + + /** + * Various configuration options allows defining how errors are handled. For example, when invalid payload is received or malformed cookie, instead of returning an error, the framework can be + * configured to perform another action. When supported the failAction option supports the following values: + * * 'error' - return the error object as the response. + * * 'log' - report the error but continue processing the request. + * * 'ignore' - take no action and continue processing the request. + * * a lifecycle method with the signature async function(request, h, err) where: + * * * request - the request object. + * * * h - the response toolkit. + * * * err - the error object. + * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-failaction-configuration) + */ + type FailAction = 'error' | 'log' | 'ignore' | Method; +} + +export namespace Util { + interface Dictionary { + [key: string]: T; + } + + type HTTP_METHODS_PARTIAL_LOWERCASE = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options'; + type HTTP_METHODS_PARTIAL = + 'GET' + | 'POST' + | 'PUT' + | 'PATCH' + | 'DELETE' + | 'OPTIONS' + | HTTP_METHODS_PARTIAL_LOWERCASE; + type HTTP_METHODS = 'HEAD' | 'head' | HTTP_METHODS_PARTIAL; +} diff --git a/types/hapi__hapi/test/request/auth.ts b/types/hapi__hapi/test/request/auth.ts new file mode 100644 index 0000000000..55ee033879 --- /dev/null +++ b/types/hapi__hapi/test/request/auth.ts @@ -0,0 +1,18 @@ +import { Request } from '@hapi/hapi'; + +declare module '@hapi/hapi' { + interface UserCredentials { + a: number; + } + + interface AppCredentials { + b: number; + } +} + +const req: Request = {} as any; +const scope: string[] | undefined = req.auth.credentials.scope; +const user = req.auth.credentials.user!; +console.log(user.a); +const app = req.auth.credentials.app!; +console.log(app.b); diff --git a/types/hapi__hapi/test/request/catch-all.ts b/types/hapi__hapi/test/request/catch-all.ts new file mode 100644 index 0000000000..adcae32c2c --- /dev/null +++ b/types/hapi__hapi/test/request/catch-all.ts @@ -0,0 +1,14 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#catch-all-route +import { Request, ResponseToolkit, Server, ServerOptions } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; +const server = new Server(options); + +server.route({ method: '*', path: '/{p*}', handler(request, h) { + return h.response('The page was not found').code(404); +}}); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/request/event-types.ts b/types/hapi__hapi/test/request/event-types.ts new file mode 100644 index 0000000000..ca6490ed0c --- /dev/null +++ b/types/hapi__hapi/test/request/event-types.ts @@ -0,0 +1,67 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-servereventevents +// https://github.com/hapijs/hapi/blob/master/API.md#-requestevents +import { Lifecycle, Request, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; +import * as Crypto from 'crypto'; + +const options: ServerOptions = { + port: 8000, +}; + +const serverRoute: ServerRoute = { + path: '/', + method: 'GET', + handler(request) { + return 'ok: ' + request.path; + } +}; + +const onRequest: Lifecycle.Method = (request, h) => { + /* + * Server events + */ + request.server.events.on('request', (request: Request, event: any, tags: any) => { + console.log(request.paramsArray); + console.log(event); + console.log(tags); + }); + + request.server.events.on('response', (request: Request) => { + console.log('Response sent for request: ' + request.path); + }); + + request.server.events.on('start', () => { + console.log('Server started'); + }); + + request.server.events.once('stop', () => { + console.log('Server stoped'); + }); + + /* + * Request events + */ + const hash = Crypto.createHash('sha1'); + + request.events.on("peek", (chunk) => { + hash.update(chunk); + }); + + request.events.once("finish", () => { + console.log(hash.digest('hex')); + }); + + request.events.once("disconnect", () => { + console.error('request aborted'); + }); + + return h.continue; +}; + +const server = new Server(options); +server.route(serverRoute); +server.ext('onRequest', onRequest, { + before: 'test', +}); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/request/get-log.ts b/types/hapi__hapi/test/request/get-log.ts new file mode 100644 index 0000000000..c87c98d0ea --- /dev/null +++ b/types/hapi__hapi/test/request/get-log.ts @@ -0,0 +1,29 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-requestlogtags-data +import { Lifecycle, Request, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +const handlerFn: Lifecycle.Method = (request, h) => { + request.log(['test', 'error'], 'Test event'); + return 'path: ' + request.path; +}; + +const serverRoute: ServerRoute = { + path: '/', + method: 'GET', + handler: handlerFn +}; + +const server = new Server(options); +server.route(serverRoute); +server.start(); +console.log('Server started at: ' + server.info.uri); + +server.events.on('request', (request: Request, event: any, tags: any) => { + console.log(tags); + if (tags.error) { + console.log(event); + } +}); diff --git a/types/hapi__hapi/test/request/info.ts b/types/hapi__hapi/test/request/info.ts new file mode 100644 index 0000000000..9bb096ec09 --- /dev/null +++ b/types/hapi__hapi/test/request/info.ts @@ -0,0 +1,4 @@ +import { Request } from "@hapi/hapi"; + +const req: Request = {} as any; +const { completed, responded } = req.info; diff --git a/types/hapi__hapi/test/request/methods.ts b/types/hapi__hapi/test/request/methods.ts new file mode 100644 index 0000000000..1e150b28a5 --- /dev/null +++ b/types/hapi__hapi/test/request/methods.ts @@ -0,0 +1,4 @@ +import { Request } from '@hapi/hapi'; + +declare const req: Request; +const act: boolean = req.active(); diff --git a/types/hapi__hapi/test/request/parameters.ts b/types/hapi__hapi/test/request/parameters.ts new file mode 100644 index 0000000000..98e6519373 --- /dev/null +++ b/types/hapi__hapi/test/request/parameters.ts @@ -0,0 +1,37 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-requestparams +import { Lifecycle, Request, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +// Example 1 +// http://localhost:8000/album-name/song-optional +const getAlbum: Lifecycle.Method = (request, h) => { + console.log(request.params); + return 'ok: ' + request.path; +}; +const serverRoute1: ServerRoute = { + path: '/{album}/{song?}', + method: 'GET', + handler: getAlbum +}; + +// Example 2 +// http://localhost:8000/person/rafael/fijalkowski +const getPerson: Lifecycle.Method = (request, h) => { + const nameParts = request.params.name.split('/'); + return { first: nameParts[0], last: nameParts[1] }; +}; +const serverRoute2: ServerRoute = { + path: '/person/{name*2}', + method: 'GET', + handler: getPerson +}; + +const server = new Server(options); +server.route(serverRoute1); +server.route(serverRoute2); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/request/query.ts b/types/hapi__hapi/test/request/query.ts new file mode 100644 index 0000000000..b0a3922aa3 --- /dev/null +++ b/types/hapi__hapi/test/request/query.ts @@ -0,0 +1,26 @@ +// Added test in addition to docs, for request.query +import { Lifecycle, Request, RequestQuery, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +const handlerFn: Lifecycle.Method = (request, h) => { + const query1 = request.query; + console.log(query1); + + const query2 = request.query; + // http://localhost:8000/?name=test + return `You asked for ${query2.name}`; +}; + +const serverRoute: ServerRoute = { + path: '/', + method: 'GET', + handler: handlerFn +}; + +const server = new Server(options); +server.route(serverRoute); +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/response/continue.ts b/types/hapi__hapi/test/response/continue.ts new file mode 100644 index 0000000000..69328ab410 --- /dev/null +++ b/types/hapi__hapi/test/response/continue.ts @@ -0,0 +1,25 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverextevent-method-options +import { Request, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +const serverRoute: ServerRoute = { + path: '/test', + method: 'GET', + handler(request, h) { + return 'ok: ' + request.path; + } +}; + +const server = new Server(options); +server.route(serverRoute); + +server.ext("onRequest", (request, h) => { + request.setUrl('/test'); + return h.continue; +}); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/response/error.ts b/types/hapi__hapi/test/response/error.ts new file mode 100644 index 0000000000..eaec5c7094 --- /dev/null +++ b/types/hapi__hapi/test/response/error.ts @@ -0,0 +1,30 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#errors +import { Request, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; +import * as Boom from "boom"; + +const options: ServerOptions = { + port: 8000, +}; + +const serverRoutes: ServerRoute[] = [ + { + path: '/badRequest', + method: 'GET', + handler(request, h) { + throw Boom.badRequest('Unsupported parameter'); + } + }, + { + path: '/internal', + method: 'GET', + handler(request, h) { + throw new Error('unexpect error'); + } + }, +]; + +const server = new Server(options); +server.route(serverRoutes); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/response/redirect.ts b/types/hapi__hapi/test/response/redirect.ts new file mode 100644 index 0000000000..0cf6b6c0fb --- /dev/null +++ b/types/hapi__hapi/test/response/redirect.ts @@ -0,0 +1,20 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-hredirecturi +import { Request, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +const serverRoute: ServerRoute = { + path: '/', + method: 'GET', + handler(request, h) { + return h.redirect('http://example.com'); + } +}; + +const server = new Server(options); +server.route(serverRoute); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/response/response-events.ts b/types/hapi__hapi/test/response/response-events.ts new file mode 100644 index 0000000000..f919d169b6 --- /dev/null +++ b/types/hapi__hapi/test/response/response-events.ts @@ -0,0 +1,28 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-responseevents +import { Lifecycle, Request, ResponseObject, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; +import * as Crypto from "crypto"; + +const preResponse: Lifecycle.Method = (request, h) => { + // In onPreResponse, the response object will be defined. + const response = request.response; + + const hash = Crypto.createHash('sha1'); + response.events.on('peek', (chunk, encoding) => { + hash.update(chunk); + }); + + response.events.once('finish', () => { + console.log(hash.digest('hex')); + }); + + return h.continue; +}; + +const server = new Server({ + port: 8000, +}); + +server.ext('onPreResponse', preResponse); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/response/response.ts b/types/hapi__hapi/test/response/response.ts new file mode 100644 index 0000000000..754c5f199f --- /dev/null +++ b/types/hapi__hapi/test/response/response.ts @@ -0,0 +1,36 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-hresponsevalue +import { Request, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +const serverRoutes: ServerRoute[] = [ + // Detailed notation + { + path: '/test1', + method: 'GET', + handler(request, h) { + const response = h.response('success'); + response.type('text/plain'); + response.header('X-Custom', 'some-value'); + return response; + } + }, + // Chained notation + { + path: '/test2', + method: 'GET', + handler(request, h) { + return h.response('success') + .type('text/plain') + .header('X-Custom', 'some-value'); + } + }, +]; + +const server = new Server(options); +server.route(serverRoutes); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/route/adding-routes.ts b/types/hapi__hapi/test/route/adding-routes.ts new file mode 100644 index 0000000000..20694e896e --- /dev/null +++ b/types/hapi__hapi/test/route/adding-routes.ts @@ -0,0 +1,38 @@ +// from https://hapijs.com/tutorials/getting-started#adding-routes +import { Request, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +const serverRoute: ServerRoute = { + path: '/', + method: 'GET', + handler(request, h) { + return 'ok: ' + request.path; + } +}; + +const serverRoutes: ServerRoute[] = [ + { + path: '/test1', + method: 'GET', + handler(request, h) { + return 'ok: ' + request.path; + } + }, + { + path: '/test2', + method: 'GET', + handler(request, h) { + return 'ok: ' + request.path; + } + }, +]; + +const server = new Server(options); +server.route(serverRoute); +server.route(serverRoutes); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/route/config.ts b/types/hapi__hapi/test/route/config.ts new file mode 100644 index 0000000000..a8a7414ace --- /dev/null +++ b/types/hapi__hapi/test/route/config.ts @@ -0,0 +1,52 @@ +import { Request, ResponseToolkit, RouteOptions, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +// different methods +const routeConfig: ServerRoute = { + path: '/signin', + method: 'PUT', + vhost: 'site.coms', +}; +const routeConfigTest1: ServerRoute = { + path: '/signin', + method: '*' +}; +const routeConfigTest2: ServerRoute = { + path: '/signin', + method: ['OPTIONS', '*'] +}; + +// different handlers +const routeConfigTest3: ServerRoute = { + path: '/signin', + method: 'PUT', + handler(request, h) { + return 'ok'; + } +}; +const routeConfigTest4: ServerRoute = { + path: '/signin', + method: 'PUT', + handler(request, h) { + return 'ok'; + } +}; + +const server = new Server(options); +server.route(routeConfig); + +// Handler in config +const user: RouteOptions = { + cache: { expiresIn: 5000 }, + handler(request, h) { + return { name: 'John' }; + } +}; + +server.route({method: 'GET', path: '/user', options: user }); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/route/ext.ts b/types/hapi__hapi/test/route/ext.ts new file mode 100644 index 0000000000..a8287cdefd --- /dev/null +++ b/types/hapi__hapi/test/route/ext.ts @@ -0,0 +1,22 @@ +import { Server } from "@hapi/hapi"; + +const server = new Server(); + +server.route({ + method: 'get', + path: "/test", + options: { + ext: { + onPreResponse: { + method(_request, h) { + return h.continue; + }, + }, + onPostHandler: [{ + method(_request, h) { + return h.continue; + }, + }], + } + } +}); diff --git a/types/hapi__hapi/test/route/handler.ts b/types/hapi__hapi/test/route/handler.ts new file mode 100644 index 0000000000..3078fcee1e --- /dev/null +++ b/types/hapi__hapi/test/route/handler.ts @@ -0,0 +1,9 @@ +import { Lifecycle, Request, ResponseToolkit } from "@hapi/hapi"; + +const handler: Lifecycle.Method = (request, h) => { + return 'success'; +}; + +const strictHandler: Lifecycle.Method = (request, h) => { + return 123; +}; diff --git a/types/hapi__hapi/test/route/route-options-pre.ts b/types/hapi__hapi/test/route/route-options-pre.ts new file mode 100644 index 0000000000..4ee901b492 --- /dev/null +++ b/types/hapi__hapi/test/route/route-options-pre.ts @@ -0,0 +1,42 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionspre +import { Lifecycle, Request, ResponseToolkit, Server } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); + +const pre1: Lifecycle.Method = (request, h) => { + return 'Hello'; +}; + +const pre2: Lifecycle.Method = (request, h) => { + return 'World'; +}; + +const pre3: Lifecycle.Method = (request, h) => { + return `request.pre.m1 request.pre.m2`; +}; + +server.route({ + method: 'GET', + path: '/', + options: { + pre: [ + [ + // m1 and m2 executed in parallel + { method: pre1, assign: 'm1' }, + { method: pre2, assign: 'm2' } + ], + { method: pre3, assign: 'm3' }, + ], + handler(request, h) { + return request.pre.m3 + '!\n'; + } + } +}); + +server.start(); + +server.events.on('start', () => { + console.log('Server started at: ' + server.info.uri); +}); diff --git a/types/hapi__hapi/test/route/route-options.ts b/types/hapi__hapi/test/route/route-options.ts new file mode 100644 index 0000000000..112166f61b --- /dev/null +++ b/types/hapi__hapi/test/route/route-options.ts @@ -0,0 +1,194 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#route-options +import { + Lifecycle, + Request, + ResponseToolkit, + RouteOptions, + RouteOptionsAccess, + RouteOptionsCors, + RouteOptionsPayload, + RouteOptionsResponse, + RouteOptionsValidate, + Server, + RouteOptionsSecureObject +} from "@hapi/hapi"; + +const routeOptionsAccess: RouteOptionsAccess = { + access: [ + { + scope: false + }, + { + entity: 'user' + } + ], + scope: false, + entity: 'user', + mode: 'optional', + payload: 'optional', + strategies: ['', ''], + strategy: '' +}; + +const corsOption: RouteOptionsCors = { + origin: 'ignore', + maxAge: 5000, + headers: ['test', 'test', 'test'], + additionalHeaders: ['test', 'test', 'test'], + exposedHeaders: ['test', 'test', 'test'], + additionalExposedHeaders: ['test', 'test', 'test'], + credentials: false +}; + +const payloadOptions: RouteOptionsPayload = { + allow: 'string', + compression: { + test1: { + test: 2 + } + }, + defaultContentType: 'application/json', + failAction(request, h) { + return 'ok: ' + request.path; + }, + maxBytes: 1048576, + multipart: { + output: 'annotated' + }, + output: 'stream', + override: '', + parse: 'gunzip', + timeout: 5000, + uploads: 'dir/' +}; + +const pre1: Lifecycle.Method = (request, h) => { + return 'Hello'; +}; + +const pre2: Lifecycle.Method = (request, h) => { + return 'World'; +}; + +const pre3: Lifecycle.Method = (request, h) => { + return `request.pre.m1 request.pre.m2`; +}; + +const routeOptionsResponse: RouteOptionsResponse = { + emptyStatusCode: 200, + failAction(request, h) { + return 'ok: ' + request.path; + }, + modify: false, + options: undefined, + ranges: true, + sample: 100, + schema: true, + status: { + 200: true, + 302: true, + 404: false, + }, + disconnectStatusCode: 123, +}; + +const routeOptionSecure: RouteOptionsSecureObject = { + referrer: 'origin', + noSniff: true, + xframe: "deny", + hsts: { + includeSubdomains: true, + maxAge: 1111, + preload: false, + }, + noOpen: false, + xss: true, +}; + +const routeOptionsValidate: RouteOptionsValidate = { + errorFields: {}, + failAction(request, h) { + return 'ok: ' + request.path; + }, + headers: false, + options: {}, + params: false, + payload: true, + query: true, +}; + +declare module '@hapi/hapi' { + interface RouteOptionsApp { + one: number; + two: string; + } +} + +const routeOptions: RouteOptions = { + app: { + one: 1, + two: "2" + }, + auth: routeOptionsAccess, + bind: null, + cache: { + privacy: 'default', + statuses: [200], + otherwise: 'no-cache' + }, + compression: { + test1: { + test: 2 + } + }, + cors: corsOption, + description: 'description here', + ext: undefined, + files: { relativeTo: '.' }, + handler(request, h) { + return 'ok: ' + request.path; + }, + id: 'test', + isInternal: false, + json: undefined, + jsonp: 'callback', + log: { collect: false }, + notes: ['test', 'test', 'test'], + payload: payloadOptions, + plugins: { + plugin1: {}, + plugin2: {}, + }, + pre: [ + [ + // m1 and m2 executed in parallel + { method: pre1, assign: 'm1' }, + { method: pre2, assign: 'm2' } + ], + { method: pre3, assign: 'm3' }, + ], + response: routeOptionsResponse, + security: false, + state: { + parse: true, + failAction(request, h) { + return 'ok: ' + request.path; + }, + }, + tags: ['test', 'test', 'test'], + timeout: { + server: 10000, + socket: false + }, + validate: routeOptionsValidate +}; + +const server = new Server({ + port: 8000, + routes: routeOptions +}); +server.start(); + +server.events.on('start', () => { + console.log('Server started at: ' + server.info.uri); +}); diff --git a/types/hapi__hapi/test/route/validation.ts b/types/hapi__hapi/test/route/validation.ts new file mode 100644 index 0000000000..593703e3e5 --- /dev/null +++ b/types/hapi__hapi/test/route/validation.ts @@ -0,0 +1,51 @@ +// from https://hapijs.com/tutorials/validation?lang=en_US +import { Request, ResponseToolkit, RouteOptions, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; +import * as Joi from "@hapi/joi"; + +const options: ServerOptions = { + port: 8000, +}; + +const routeOptions: RouteOptions = { + validate: { + payload: { + id: Joi.string().uuid().required(), + name: Joi.object({ + firstName: Joi.string().required(), + lastName: Joi.string().allow(null) + }), + firstName: Joi.ref("name.firstName") + }, + params: { + name: Joi.string().min(3).max(10), + nameRef: Joi.ref("name") + }, + state: { + woop: Joi.string().allow('doop'), + }, + }, + response: { + schema: Joi.object({ + a: Joi.string(), + b: Joi.object({ + c: Joi.number() + }), + d: Joi.ref("b.c") + }) + } +}; + +const serverRoute: ServerRoute = { + path: '/', + method: 'GET', + handler(request, h) { + return 'ok: ' + request.path; + }, + options: routeOptions +}; + +const server = new Server(options); +server.route(serverRoute); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/server/server-app.ts b/types/hapi__hapi/test/server/server-app.ts new file mode 100644 index 0000000000..410054d3eb --- /dev/null +++ b/types/hapi__hapi/test/server/server-app.ts @@ -0,0 +1,29 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverapp +import { Request, ResponseToolkit, Server, ServerOptions, ServerRoute } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +declare module "@hapi/hapi" { + // Demonstrate augmenting the application state. + interface ApplicationState { + key?: string; + } +} + +const server = new Server(options); +server.app.key = 'value2'; + +const serverRoute: ServerRoute = { + path: '/', + method: 'GET', + handler(request, h) { + return 'key: ' + request.server.app.key; + } +}; + +server.route(serverRoute); + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/server/server-auth-api.ts b/types/hapi__hapi/test/server/server-auth-api.ts new file mode 100644 index 0000000000..59b8c83dde --- /dev/null +++ b/types/hapi__hapi/test/server/server-auth-api.ts @@ -0,0 +1,40 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverauthapi +import { + Server, + ServerAuthScheme, +} from "@hapi/hapi"; +import * as Boom from "@hapi/boom"; + +declare module '@hapi/hapi' { + interface ServerAuthSchemeObjectApi { + settings: { + x: number; + }; + } +} + +const scheme: ServerAuthScheme = (server, options) => { + return { + api: { + settings: { + x: 5 + } + }, + authenticate(request, h) { + const authorization = request.headers.authorization; + if (!authorization) { + throw Boom.unauthorized(null, 'Custom'); + } + return h.authenticated({ credentials: { user: { a: 1 } } }); + } + }; +}; + +const server = new Server({ + port: 8000, +}); +server.auth.scheme('custom', scheme); +server.auth.strategy('default', 'custom'); +server.start(); + +console.log(server.auth.api.default.settings.x); // 5 diff --git a/types/hapi__hapi/test/server/server-auth-default.ts b/types/hapi__hapi/test/server/server-auth-default.ts new file mode 100644 index 0000000000..55ebcd0fcf --- /dev/null +++ b/types/hapi__hapi/test/server/server-auth-default.ts @@ -0,0 +1,41 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverauthdefaultoptions +// https://github.com/hapijs/hapi/blob/master/API.md#-serverauthschemename-scheme +import { Request, ResponseToolkit, Server, ServerAuthScheme, ServerAuthSchemeOptions } from "@hapi/hapi"; +import * as Boom from "@hapi/boom"; + +declare module '@hapi/hapi' { + interface UserCredentials { + a: number; + } +} + +const server = new Server({ + port: 8000, +}); + +const scheme: ServerAuthScheme = (server, options) => { + return { + authenticate(request, h) { + const req = request.raw.req; + const authorization = req.headers.authorization; + if (!authorization) { + throw Boom.unauthorized(null, 'Custom'); + } + return h.authenticated({ credentials: { user: { a: 1 }, scope: ['test'] } }); + } + }; +}; + +server.auth.scheme('custom', scheme); +server.auth.strategy('default', 'custom'); +server.auth.default('default'); + +server.route({ + method: 'GET', + path: '/', + handler(request, h) { + return request.auth.credentials.user || 'not authed'; + } +}); + +server.start(); diff --git a/types/hapi__hapi/test/server/server-auth-test.ts b/types/hapi__hapi/test/server/server-auth-test.ts new file mode 100644 index 0000000000..5a3eb48822 --- /dev/null +++ b/types/hapi__hapi/test/server/server-auth-test.ts @@ -0,0 +1,45 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-await-serverauthteststrategy-request +// https://github.com/hapijs/hapi/blob/master/API.md#-serverauthschemename-scheme +import { Request, ResponseToolkit, Server, ServerAuthScheme, ServerAuthSchemeOptions } from "@hapi/hapi"; +import * as Boom from "@hapi/boom"; + +declare module '@hapi/hapi' { + interface AuthCredentials { + name?: string; + } +} + +const server = new Server({ + port: 8000, +}); + +const scheme: ServerAuthScheme = (server, options) => { + return { + authenticate(request, h) { + const req = request.raw.req; + const authorization = req.headers.authorization; + if (!authorization) { + throw Boom.unauthorized(null, 'Custom'); + } + return h.authenticated({ credentials: { name: 'john', } }); + } + }; +}; + +server.auth.scheme('custom', scheme); +server.auth.strategy('default', 'custom'); + +server.route({ + method: 'GET', + path: '/', + handler: async (request: Request, h: ResponseToolkit) => { + try { + const { credentials } = await request.server.auth.test('default', request); + return { status: true, user: credentials.name }; + } catch (err) { + return { status: false }; + } + } +}); + +server.start(); diff --git a/types/hapi__hapi/test/server/server-auth-verify.ts b/types/hapi__hapi/test/server/server-auth-verify.ts new file mode 100644 index 0000000000..0ce42c7f80 --- /dev/null +++ b/types/hapi__hapi/test/server/server-auth-verify.ts @@ -0,0 +1,26 @@ +import { Request, Server, RequestAuth } from "@hapi/hapi"; +import * as Boom from "@hapi/boom"; + +const server = new Server({ + port: 8000, +}); + +server.auth.scheme('custom', () => ({ + authenticate() { + throw Boom.unauthorized(null, 'hurr'); + }, + async verify(_auth: RequestAuth) { + throw Boom.unauthorized(null, 'durr'); + } +})); +server.auth.strategy('default', 'custom'); + +server.route({ + method: 'GET', + path: '/', + async handler(request: Request) { + request.server.auth.verify(request); + } +}); + +server.start(); diff --git a/types/hapi__hapi/test/server/server-bind.ts b/types/hapi__hapi/test/server/server-bind.ts new file mode 100644 index 0000000000..7deaa77e68 --- /dev/null +++ b/types/hapi__hapi/test/server/server-bind.ts @@ -0,0 +1,27 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverbindcontext +import { Lifecycle, Plugin, Request, ResponseToolkit, Server, ServerRegisterOptions } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); +const handler: Lifecycle.Method = (request, h) => { + return h.context.message; // Or h.context.message +}; + +const plugin: Plugin = { + name: 'example', + register: async (server, options) => { + const bind = { + message: 'hello' + }; + server.bind(bind); + server.route({ method: 'GET', path: '/', handler }); + } +}; + +server.start(); +server.register(plugin); + +server.events.on('start', () => { + console.log('Server started at: ' + server.info.uri); +}); diff --git a/types/hapi__hapi/test/server/server-cache-provision.ts b/types/hapi__hapi/test/server/server-cache-provision.ts new file mode 100644 index 0000000000..3c3b8c23ae --- /dev/null +++ b/types/hapi__hapi/test/server/server-cache-provision.ts @@ -0,0 +1,19 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-await-servercacheprovisionoptions +import { Server } from "@hapi/hapi"; +import * as catbox from "@hapi/catbox"; + +const server = new Server({ + port: 8000, +}); +server.initialize(); +server.cache.provision({engine: require('@hapi/catbox-memory'), name: 'countries' }); + +const cache = server.cache({segment: 'countries', cache: 'countries', expiresIn: 60 * 60 * 1000 }); +cache.set('norway', 'oslo', 10 * 1000).then(() => {}); +const value = cache.get('norway').then(() => {}); + +server.start(); + +server.events.on('start', () => { + console.log('Server started at: ' + server.info.uri); +}); diff --git a/types/hapi__hapi/test/server/server-cache.ts b/types/hapi__hapi/test/server/server-cache.ts new file mode 100644 index 0000000000..babcf75a17 --- /dev/null +++ b/types/hapi__hapi/test/server/server-cache.ts @@ -0,0 +1,23 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-servercacheoptions +import { Server, ServerOptionsCache } from "@hapi/hapi"; +import * as catbox from "@hapi/catbox"; + +const server = new Server({ + port: 8000, +}); + +const catboxOptions: ServerOptionsCache = { + segment: 'countries', + expiresIn: 60 * 60 * 1000 +}; +const cache = server.cache(catboxOptions); +cache.set('norway', 'oslo', 10 * 1000).then(() => {}); + +const value = cache.get('norway').then(() => {}); +console.log("Value: " + value); + +server.start(); + +server.events.on('start', () => { + console.log('Server started at: ' + server.info.uri); +}); diff --git a/types/hapi__hapi/test/server/server-control.ts b/types/hapi__hapi/test/server/server-control.ts new file mode 100644 index 0000000000..cb5879a303 --- /dev/null +++ b/types/hapi__hapi/test/server/server-control.ts @@ -0,0 +1,3 @@ +import { Server } from "@hapi/hapi"; + +new Server().control(new Server()); diff --git a/types/hapi__hapi/test/server/server-decoder.ts b/types/hapi__hapi/test/server/server-decoder.ts new file mode 100644 index 0000000000..7f8d03b23f --- /dev/null +++ b/types/hapi__hapi/test/server/server-decoder.ts @@ -0,0 +1,8 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverdecoderencoding-decoder +import { Server } from "@hapi/hapi"; +import * as Zlib from "zlib"; + +const server = new Server({ port: 80, routes: { payload: { compression: { special: { chunkSize: 16 * 1024 } } } } }); +server.decoder('special', (options) => Zlib.createGunzip(options)); + +server.start(); diff --git a/types/hapi__hapi/test/server/server-decorations.ts b/types/hapi__hapi/test/server/server-decorations.ts new file mode 100644 index 0000000000..5e4e49a454 --- /dev/null +++ b/types/hapi__hapi/test/server/server-decorations.ts @@ -0,0 +1,111 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverdecoratetype-property-method-options +import { Request, ResponseToolkit, Server } from "@hapi/hapi"; + +declare module '@hapi/hapi' { + interface HandlerDecorations { + test?: { + test: number; + }; + } +} + +// Test basic types. + +const server = new Server({ + port: 8000, +}); + +server.start(); +server.decorate('toolkit', 'success', function() { + return this.response({ status: 'ok' }); +}); +server.decorate('handler', 'test', (route, options) => (req, h) => 123); +server.route({ + method: 'GET', + path: '/', + handler: { + test: { + test: 123, + }, + asd: 1, + } +}); + +console.log(server.decorations.toolkit); + +// Test decorators with additional arguments + +declare module '@hapi/hapi' { + interface Server { + withParams(x: number, y: string): string; + } + + interface ResponseToolkit { + withParams(x: number, y: string): string; + } +} + +function decorateServerWithParams(this: Server, x: number, y: string) { + return `${x} ${y}`; +} + +server.decorate('server', 'withParams', decorateServerWithParams); +server.withParams(1, "one"); + +function decorateToolkitWithParams(this: ResponseToolkit, x: number, y: string) { + return `${x} ${y}`; +} + +server.decorate('toolkit', 'withParams', decorateToolkitWithParams); + +server.decorate('toolkit', Symbol('hi'), decorateToolkitWithParams); + +server.route({ + method: 'GET', + path: '/toolkitWithParams', + handler: (r, h) => { + return h.withParams(1, "one"); + } +}); + +// Test request + apply option types + +declare module '@hapi/hapi' { + interface Request { + withApply(x: string, y: number): string; + } +} + +function decorateRequestWithApply(request: Request) { + return (x: string, y: number) => { + return `${x} ${y}`; + }; +} + +server.decorate('request', 'withApply', decorateRequestWithApply, {apply: true}); + +server.route({ + method: 'GET', + path: '/requestWithApply', + handler: (r, h) => { + return r.withApply("one", 1); + } +}); + +// Test extend option type + +declare module '@hapi/hapi' { + interface Server { + withExtend(x: string, y: number): string; + } +} + +const decorateServerWithExtend = (existing: () => void) => { + return (x: string, y: number) => { + existing(); + return `${x} ${y}`; + }; +}; + +server.decorate('server', 'withExtend', decorateServerWithExtend, {extend: true}); +server.withExtend("one", 1); diff --git a/types/hapi__hapi/test/server/server-encoder.ts b/types/hapi__hapi/test/server/server-encoder.ts new file mode 100644 index 0000000000..b09f5fd251 --- /dev/null +++ b/types/hapi__hapi/test/server/server-encoder.ts @@ -0,0 +1,8 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverencoderencoding-encoder +import { Server } from "@hapi/hapi"; +import * as Zlib from "zlib"; + +const server = new Server({ port: 80, routes: { payload: { compression: { special: { chunkSize: 16 * 1024 } } } } }); +server.encoder('special', (options) => Zlib.createGzip(options)); + +server.start(); diff --git a/types/hapi__hapi/test/server/server-events-once.ts b/types/hapi__hapi/test/server/server-events-once.ts new file mode 100644 index 0000000000..821a51a203 --- /dev/null +++ b/types/hapi__hapi/test/server/server-events-once.ts @@ -0,0 +1,31 @@ +// from https://github.com/hapijs/hapi/blob/master/API.md#-servereventsoncecriteria-listener +import { Request, ResponseToolkit, Server, ServerRoute } from "@hapi/hapi"; + +const serverRoute: ServerRoute = { + path: '/', + method: 'GET', + handler(request, h) { + return 'oks: ' + request.path; + } +}; + +declare module '@hapi/hapi' { + interface ServerEvents { + once(event: 'test1', listener: (update: string) => void): this; + once(event: 'test2', listener: (...updates: string[]) => void): this; + } +} + +const server = new Server({ + port: 8000, +}); +server.route(serverRoute); +server.event('test1'); +server.event('test2'); +server.events.once('test1', update => { console.log(update); }); +server.events.once('test2', (...args) => { console.log(args); }); +server.events.emit('test1', 'hello-1'); +server.events.emit('test2', 'hello-2'); // Ignored + +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/server/server-events.ts b/types/hapi__hapi/test/server/server-events.ts new file mode 100644 index 0000000000..6223904f21 --- /dev/null +++ b/types/hapi__hapi/test/server/server-events.ts @@ -0,0 +1,24 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-servereventevents +import { Server, ServerEvents } from "@hapi/hapi"; +import Podium = require('@hapi/podium'); +import '@hapi/hapi/definitions/server/server'; + +declare module '@hapi/hapi' { + interface ServerEvents { + on(event: 'test', listener: (update: string) => void): this; + } +} + +const server = new Server({ + port: 8000, +}); + +server.events.on('route', route => { + console.log(route.path, route.vhost, route.realm, route.method, route.settings, route.fingerprint); +}); + +server.event('test'); +server.events.on('test', (update: any) => console.log(update)); +server.events.emit('test', 'hello'); + +server.start(); diff --git a/types/hapi__hapi/test/server/server-expose.ts b/types/hapi__hapi/test/server/server-expose.ts new file mode 100644 index 0000000000..451104dc6f --- /dev/null +++ b/types/hapi__hapi/test/server/server-expose.ts @@ -0,0 +1,38 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverplugins +import { Plugin, Server, ServerRegisterOptions } from "@hapi/hapi"; + +declare module '@hapi/hapi' { + interface PluginProperties { + example1: { + util(): void; + }; + example2: { + util(): void; + }; + } +} + +const plugin1: Plugin = { + name: 'example1', + async register(server: Server, options: ServerRegisterOptions) { + server.expose('util', () => console.log('something')); + } +}; + +const plugin2: Plugin = { + name: 'example2', + async register(server: Server, options: ServerRegisterOptions) { + server.expose('util', () => console.log('something')); + } +}; + +const server = new Server({ + port: 8000, +}); + +server.start(); +server.register(plugin1); +server.register(plugin2); + +server.plugins.example1.util(); +server.plugins.example2.util(); diff --git a/types/hapi__hapi/test/server/server-info.ts b/types/hapi__hapi/test/server/server-info.ts new file mode 100644 index 0000000000..aef8050a7d --- /dev/null +++ b/types/hapi__hapi/test/server/server-info.ts @@ -0,0 +1,10 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverinfo +import { Server } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); +server.start(); + +console.log(server.info); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/server/server-inject.ts b/types/hapi__hapi/test/server/server-inject.ts new file mode 100644 index 0000000000..3e2710b86c --- /dev/null +++ b/types/hapi__hapi/test/server/server-inject.ts @@ -0,0 +1,40 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-await-serverinjectoptions +import { Request, ResponseToolkit, Server, ServerRoute } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); + +const serverRoute: ServerRoute = { + path: '/', + method: 'GET', + handler(request, h) { + return 'Success!'; + } +}; + +server.route(serverRoute); +server.start(); + +server.inject('/').then(res => console.log(res.result)); + +declare module '@hapi/hapi' { + interface ApplicationState { + injectState?: number; + } +} + +server.inject({ + auth: { + strategy: 'test', + credentials: { + user: { + a: 1, + }, + }, + }, + url: "test", + app: { + injectState: 1 + } +}); diff --git a/types/hapi__hapi/test/server/server-listener.ts b/types/hapi__hapi/test/server/server-listener.ts new file mode 100644 index 0000000000..5ae1460599 --- /dev/null +++ b/types/hapi__hapi/test/server/server-listener.ts @@ -0,0 +1,14 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverlistener +import { Server } from "@hapi/hapi"; +import * as SocketIO from "socket.io"; + +const server = new Server({ + port: 8000, +}); + +const io = SocketIO.listen(server.listener); +io.sockets.on('connection', (socket) => { + socket.emit('welcome'); +}); + +server.start(); diff --git a/types/hapi__hapi/test/server/server-load.ts b/types/hapi__hapi/test/server/server-load.ts new file mode 100644 index 0000000000..c37e0c682d --- /dev/null +++ b/types/hapi__hapi/test/server/server-load.ts @@ -0,0 +1,17 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverload +import { Server } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, + load: { + sampleInterval: 1000, + concurrent: 123, + } +}); +server.start(); + +setTimeout(() => { + console.log(server.load.rss); + console.log(server.load.eventLoopDelay); + console.log(server.load.heapUsed); +}, 5 * 1000); diff --git a/types/hapi__hapi/test/server/server-lookup.ts b/types/hapi__hapi/test/server/server-lookup.ts new file mode 100644 index 0000000000..41f76a2881 --- /dev/null +++ b/types/hapi__hapi/test/server/server-lookup.ts @@ -0,0 +1,20 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverlookupid +import { RequestRoute, Server } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); + +server.route({ + path: '/', + method: 'GET', + options: { + id: 'root', + handler: () => 'ok' + } +}); + +const route: RequestRoute | null = server.lookup('root'); +console.log(route); + +server.start(); diff --git a/types/hapi__hapi/test/server/server-match.ts b/types/hapi__hapi/test/server/server-match.ts new file mode 100644 index 0000000000..e6571bc706 --- /dev/null +++ b/types/hapi__hapi/test/server/server-match.ts @@ -0,0 +1,23 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-servermatchmethod-path-host +import { RequestRoute, Server } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); + +server.route({ + path: '/', + method: 'GET', + options: { + id: 'root', + handler: () => 'ok' + } +}); + +const route: RequestRoute | null = server.match('get', '/'); + +if (route !== null) { + console.log(route.path); +} + +server.start(); diff --git a/types/hapi__hapi/test/server/server-method.ts b/types/hapi__hapi/test/server/server-method.ts new file mode 100644 index 0000000000..4b780156df --- /dev/null +++ b/types/hapi__hapi/test/server/server-method.ts @@ -0,0 +1,25 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-servermethodmethods +import { Server, ServerMethodConfigurationObject } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); +server.start(); + +const add = (a: any, b: any): number => { + return a + b; +}; + +const methodObject: ServerMethodConfigurationObject = { + name: 'sum', + method: add, + options: { + cache: { + expiresIn: 2000, + generateTimeout: 100 + }, + generateKey: (a: string | undefined) => a === undefined ? null : a + } +}; + +server.method(methodObject); diff --git a/types/hapi__hapi/test/server/server-methods.ts b/types/hapi__hapi/test/server/server-methods.ts new file mode 100644 index 0000000000..ab3402169d --- /dev/null +++ b/types/hapi__hapi/test/server/server-methods.ts @@ -0,0 +1,11 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-servermethods +import { Server } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); +server.start(); + +server.method('add', (a, b) => (a + b)); +const result = server.methods.add(1, 2); // 3 +console.log(result); diff --git a/types/hapi__hapi/test/server/server-mime.ts b/types/hapi__hapi/test/server/server-mime.ts new file mode 100644 index 0000000000..8c956e9dfa --- /dev/null +++ b/types/hapi__hapi/test/server/server-mime.ts @@ -0,0 +1,22 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-servermime +import { Server, ServerOptions } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, + mime: { + override: { + 'node/module': { + source: 'steve', + compressible: false, + extensions: ['node', 'module', 'npm'], + type: 'node/module' + } + } + } +}; + +const server = new Server(options); +console.log(server.mime.path('code.js').type); // 'application/javascript' +console.log(server.mime.path('file.npm').type); // 'node/module' + +server.start(); diff --git a/types/hapi__hapi/test/server/server-options.ts b/types/hapi__hapi/test/server/server-options.ts new file mode 100644 index 0000000000..d89a4583b2 --- /dev/null +++ b/types/hapi__hapi/test/server/server-options.ts @@ -0,0 +1,114 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-server-options +import { Plugin, RouteOptions, Server, ServerOptions, ServerRegisterOptions } from "@hapi/hapi"; +import { MimosOptions, MimosOptionsValue } from "@hapi/mimos"; + +const mimeOptions: MimosOptions = { + override: { + 'node/module': { + source: 'iana', + compressible: true, + extensions: ['node', 'modsule', 'npm'], + type: 'node/module' + }, + 'application/javascript': { + source: 'iana', + charset: 'UTF-8', + compressible: true, + extensions: ['js', 'javascript'], + type: 'text/javascript' + }, + 'text/html': { + predicate: (mime: MimosOptionsValue) => { + if (1 === 1) { + // mime.foo = 'test'; + } else { + // mime.foo = 'bar'; + } + return mime; + } + } + } +}; + +const plugin: Plugin = { + name: 'example', + register: async (server: Server, options: ServerRegisterOptions) => { + server.expose('key', 'value'); + server.plugins.example.other = 'other'; + console.log(server.plugins.example.key); // 'value' + console.log(server.plugins.example.other); // 'other' + } +}; + +const routeOptions: RouteOptions = { + compression: { + test: { + some: 'option' + } + }, + files: { + relativeTo: __dirname + }, + cors: { + origin: ['http://test.example.com', 'http://www.example.com', 'http://*.a.com'] + }, +}; + +declare module '@hapi/hapi' { + interface ServerOptionsApp { + key1?: string; + key2?: string; + any_thing?: string; + } +} + +const options: ServerOptions = { + address: '0.0.0.0', + app: { + key1: 'value1', + key2: 'value2', + any_thing: 'any_value', + }, + autoListen: true, + cache: { + engine: require('@hapi/catbox-memory'), + name: 'test', + shared: true, + partition: 'hapi-cache', + any_thing_1: 'any_thing_1', + any_thing_2: 'any_thing_2' + }, + compression: { + minBytes: 1024 + }, + debug: { + request: ['implementation'] + }, + host: 'localhost', + listener: undefined, + load: { sampleInterval: 0 }, + mime: mimeOptions, + plugins: plugin, + port: 8000, + router: { + isCaseSensitive: true, + stripTrailingSlash: false + }, + routes: routeOptions, + state: { + strictHeader: true, + ignoreErrors: false, + isSecure: true, + isHttpOnly: true, + isSameSite: 'Strict', + encoding: 'none' + }, + tls: true +}; + +const server = new Server(options); +server.start(); + +server.events.on('start', () => { + console.log('Server started at: ' + server.info.uri); +}); diff --git a/types/hapi__hapi/test/server/server-path.ts b/types/hapi__hapi/test/server/server-path.ts new file mode 100644 index 0000000000..ab4d812769 --- /dev/null +++ b/types/hapi__hapi/test/server/server-path.ts @@ -0,0 +1,37 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverpathrelativeto +import { Plugin, Server, ServerRegisterOptions, ServerRoute } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); + +// Definition for INERT +declare module '@hapi/hapi' { + interface HandlerDecorations { + file?: string; + } +} + +const serverRouteOption: ServerRoute = { + path: '/file', + method: 'GET', + handler: { + file: './test.html' + } +}; + +const plugin: Plugin = { + name: 'example', + register: async (server: Server, options: ServerRegisterOptions) => { + // Assuming the Inert plugin was registered previously + server.path(__dirname + '../static'); + server.route(serverRouteOption); + } +}; + +server.start(); +server.register(plugin); + +server.events.on('start', () => { + console.log('Server started at: ' + server.info.uri); +}); diff --git a/types/hapi__hapi/test/server/server-plugins.ts b/types/hapi__hapi/test/server/server-plugins.ts new file mode 100644 index 0000000000..003cf6b176 --- /dev/null +++ b/types/hapi__hapi/test/server/server-plugins.ts @@ -0,0 +1,116 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverplugins +import { Plugin, Server, ServerRegisterOptions } from "@hapi/hapi"; + +interface Plugin1 { + one: 1; +} + +interface Plugin2 { + two: 2; +} + +interface Plugin3 { + three: 3; +} + +interface Plugin4 { + four: 4; +} + +declare module '@hapi/hapi' { + interface PluginProperties { + example: { + other: string; + key: string; + }; + } +} + +const plugin1: Plugin = { + name: 'plugin1', + register: async (server: Server, options: Plugin1) => { + server.expose('key', 'value'); + server.plugins.example.other = 'other'; + console.log(server.plugins.example.key); // 'value' + console.log(server.plugins.example.other); // 'other' + }, +}; + +const plugin2: Plugin = { + name: 'plugin2', + register: async (server: Server, options: Plugin2) => {}, + dependencies: { + plugin1: '*', + }, + requirements: { + node: '>=8', + hapi: '>=1337', + }, +}; + +const plugin3: Plugin = { + name: 'plugin3', + register: async (server: Server, options: Plugin3) => {}, + dependencies: ['plugin2'], +}; + +const plugin4: Plugin = { + name: 'plugin4', + register: (server: Server, options: Plugin4) => {}, + dependencies: 'plugin3', +}; + +const server = new Server({ + port: 8000, +}); + +server.start(); +server.register(plugin1); + +server.register({ + plugin: plugin1, + options: {one: 1} +}); + +server.register([ + { + plugin: plugin2, + options: {two: 2} + }, + { + plugin: plugin3, + options: {three: 3} + }, + { + plugin: plugin1, + options: {one: 1} + }, + { + plugin: plugin2, + options: {two: 2} + }, + { + plugin: plugin3, + options: {three: 3} + }, + { + plugin: plugin1, + options: {one: 1} + }, + { + plugin: plugin2, + options: {two: 2} + }, + { + plugin: plugin3, + options: {three: 3} + }, + { + plugin: plugin1, + options: {one: 1} + }, + { + plugin: plugin4, + options: {four: 4} + } +]); diff --git a/types/hapi__hapi/test/server/server-settings.ts b/types/hapi__hapi/test/server/server-settings.ts new file mode 100644 index 0000000000..0ff48633bb --- /dev/null +++ b/types/hapi__hapi/test/server/server-settings.ts @@ -0,0 +1,18 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serversettings +import { Server } from "@hapi/hapi"; + +declare module '@hapi/hapi' { + interface ServerOptionsApp { + key?: string; + } +} + +const server = new Server({ + port: 8000, + app: { + key: 'value' + } +}); +server.start(); + +console.log(server.settings.app); // { key: 'value' } diff --git a/types/hapi__hapi/test/server/server-start.ts b/types/hapi__hapi/test/server/server-start.ts new file mode 100644 index 0000000000..961a8c4b14 --- /dev/null +++ b/types/hapi__hapi/test/server/server-start.ts @@ -0,0 +1,11 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-await-serverstart +import { Server } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); +server.start(); + +server.events.on('start', () => { + console.log('Server started at: ' + server.info.uri); +}); diff --git a/types/hapi__hapi/test/server/server-state.ts b/types/hapi__hapi/test/server/server-state.ts new file mode 100644 index 0000000000..91e87bfd70 --- /dev/null +++ b/types/hapi__hapi/test/server/server-state.ts @@ -0,0 +1,28 @@ +// from https://hapijs.com/tutorials/cookies?lang=en_US +import { Server, ServerOptions, ServerRoute, ServerStateCookieOptions } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +const serverRoute: ServerRoute = { + path: '/say-hello', + method: 'GET', + handler(_request, h) { + h.state('test', { test: true }); + return h.response('Hello').state('data', { firstVisit: false }); + } +}; + +const server = new Server(options); +server.route(serverRoute); + +const stateOption: ServerStateCookieOptions = { + ttl: 24 * 60 * 60 * 1000, // One day + isSecure: false, + isHttpOnly: false, + encoding: 'base64json', +}; +server.state('data', stateOption); +server.start(); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/server/server-stop.ts b/types/hapi__hapi/test/server/server-stop.ts new file mode 100644 index 0000000000..d37c1d3d76 --- /dev/null +++ b/types/hapi__hapi/test/server/server-stop.ts @@ -0,0 +1,17 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-await-serverstopoptions +import { Server } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); + +server.start(); +server.events.on('start', () => { + console.log('Server started at: ' + server.info.uri); +}); +server.events.on('stop', () => { + console.log('Server stoped.'); +}); +setTimeout(() => { + server.stop({ timeout: 10 * 1000 }); +}, 5 * 1000); diff --git a/types/hapi__hapi/test/server/server-table.ts b/types/hapi__hapi/test/server/server-table.ts new file mode 100644 index 0000000000..a1b092ecb9 --- /dev/null +++ b/types/hapi__hapi/test/server/server-table.ts @@ -0,0 +1,29 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-servertablehost +import { Request, ResponseToolkit, Server, ServerOptions } from "@hapi/hapi"; + +const options: ServerOptions = { + port: 8000, +}; + +const server = new Server(options); +server.app.key = 'value2'; + +server.route({ + path: '/', + method: 'GET', + handler(request, h) { + return h.response("Hello World"); + } +}); + +server.start(); +const table = server.table(); +console.log(table); +console.log(table[0].method); +console.log(table[0].path); +console.log(table[0].vhost); +console.log(table[0].realm); +console.log(table[0].settings); +console.log(table[0].fingerprint); +console.log(table[0].auth); +console.log('Server started at: ' + server.info.uri); diff --git a/types/hapi__hapi/test/server/server-version.ts b/types/hapi__hapi/test/server/server-version.ts new file mode 100644 index 0000000000..007d796c64 --- /dev/null +++ b/types/hapi__hapi/test/server/server-version.ts @@ -0,0 +1,9 @@ +// https://github.com/hapijs/hapi/blob/master/API.md#-serverversion +import { Server } from "@hapi/hapi"; + +const server = new Server({ + port: 8000, +}); + +server.start(); +console.log(server.version); // 17.x.x diff --git a/types/hapi__hapi/tsconfig.json b/types/hapi__hapi/tsconfig.json new file mode 100644 index 0000000000..cae92d50c6 --- /dev/null +++ b/types/hapi__hapi/tsconfig.json @@ -0,0 +1,101 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/hapi": [ + "hapi__hapi" + ], + "@hapi/boom": [ + "hapi__boom" + ], + "@hapi/shot": [ + "hapi__shot" + ], + "@hapi/mimos": [ + "hapi__mimos" + ], + "@hapi/iron": [ + "hapi__iron" + ], + "@hapi/joi": [ + "hapi__joi" + ], + "@hapi/podium": [ + "hapi__podium" + ], + "@hapi/catbox": [ + "hapi__catbox" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/request/auth.ts", + "test/request/catch-all.ts", + "test/request/event-types.ts", + "test/request/get-log.ts", + "test/request/info.ts", + "test/request/methods.ts", + "test/request/parameters.ts", + "test/request/query.ts", + "test/response/continue.ts", + "test/response/error.ts", + "test/response/redirect.ts", + "test/response/response-events.ts", + "test/response/response.ts", + "test/route/adding-routes.ts", + "test/route/config.ts", + "test/route/ext.ts", + "test/route/handler.ts", + "test/route/route-options-pre.ts", + "test/route/route-options.ts", + "test/route/validation.ts", + "test/server/server-app.ts", + "test/server/server-auth-api.ts", + "test/server/server-auth-default.ts", + "test/server/server-auth-test.ts", + "test/server/server-auth-verify.ts", + "test/server/server-bind.ts", + "test/server/server-cache-provision.ts", + "test/server/server-cache.ts", + "test/server/server-control.ts", + "test/server/server-decoder.ts", + "test/server/server-decorations.ts", + "test/server/server-encoder.ts", + "test/server/server-events-once.ts", + "test/server/server-events.ts", + "test/server/server-expose.ts", + "test/server/server-info.ts", + "test/server/server-inject.ts", + "test/server/server-listener.ts", + "test/server/server-load.ts", + "test/server/server-lookup.ts", + "test/server/server-match.ts", + "test/server/server-method.ts", + "test/server/server-methods.ts", + "test/server/server-mime.ts", + "test/server/server-options.ts", + "test/server/server-path.ts", + "test/server/server-plugins.ts", + "test/server/server-settings.ts", + "test/server/server-start.ts", + "test/server/server-state.ts", + "test/server/server-stop.ts", + "test/server/server-table.ts", + "test/server/server-version.ts" + ] +} diff --git a/types/hapi__hapi/tslint.json b/types/hapi__hapi/tslint.json new file mode 100644 index 0000000000..1c36270d47 --- /dev/null +++ b/types/hapi__hapi/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-angle-bracket-type-assertion": false + } +} diff --git a/types/hapi__hoek/hapi__hoek-tests.ts b/types/hapi__hoek/hapi__hoek-tests.ts new file mode 100644 index 0000000000..a94c265d00 --- /dev/null +++ b/types/hapi__hoek/hapi__hoek-tests.ts @@ -0,0 +1,291 @@ +import * as Hoek from "@hapi/hoek"; + +/** + * Import the entire module as above or use named imports: + * import { clone, merge, assert } from "@hapi/hoek"; + * "Tests" taken straight from hoek API reference and adapted to TypeScript. + */ + +// clone(obj) + +let nestedObj = { + w: /^something$/ig, + x: { + a: [1, 2, 3], + b: 123456, + c: new Date() + }, + y: 'y', + z: new Date() +}; + +let copy = Hoek.clone(nestedObj); + +copy.x.b = 100; + +console.log(copy.y); // results in 'y' +console.log(nestedObj.x.b); // results in 123456 +console.log(copy.x.b); // results in 100 + +// cloneWithShallow(obj, keys) + +nestedObj = { + w: /^something$/ig, + x: { + a: [1, 2, 3], + b: 123456, + c: new Date() + }, + y: 'y', + z: new Date() +}; + +copy = Hoek.cloneWithShallow(nestedObj, ['x']); + +copy.x.b = 100; + +console.log(copy.y); // results in 'y' +console.log(nestedObj.x.b); // results in 100 +console.log(copy.x.b); // results in 100 + +// merge(target, source, isNullOverride, isMergeArrays) + +const target = { a: 1, b: 2 }; +const source = { a: 0, c: 5 }; +const source2 = { a: null, c: 5 }; + +Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5} +Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5} +Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5} + +const targetArray = [1, 2, 3]; +const sourceArray = [4, 5]; + +Hoek.merge(targetArray, sourceArray); // results in [1, 2, 3, 4, 5] +Hoek.merge(targetArray, sourceArray, true, false); // results in [4, 5] + +// applyToDefaults(defaults, options, isNullOverride) + +let defaults = { host: "localhost", port: 8000 }; +const options = { port: 8080 }; + +let config = Hoek.applyToDefaults(defaults, options); // results in { host: "localhost", port: 8080 } + +defaults = { host: "localhost", port: 8000 }; +const options1 = { host: null, port: 8080 }; + +config = Hoek.applyToDefaults(defaults, options1, true); // results in { host: null, port: 8080 } + +// applyToDefaultsWithShallow(defaults, options, keys) + +const defaults1 = { + server: { + host: "localhost", + port: 8000 + }, + name: 'example' +}; + +const options2 = { server: { port: 8080 } }; + +const config1 = Hoek.applyToDefaultsWithShallow(defaults1, options2, ['server']); // results in { server: { port: 8080 }, name: 'example' } + +// deepEqual(b, a, [options]) + +Hoek.deepEqual({ a: [1, 2], b: 'string', c: { d: true } }, { a: [1, 2], b: 'string', c: { d: true } }); // results in true +Hoek.deepEqual(Object.create(null), {}, { prototype: false }); // results in true +Hoek.deepEqual(Object.create(null), {}); // results in false + +// unique(array, key) + +let array = [1, 2, 2, 3, 3, 4, 5, 6]; + +const newArray = Hoek.unique(array); // results in [1,2,3,4,5,6] + +let array1 = [{ id: 1 }, { id: 1 }, { id: 2 }]; + +const newArray1 = Hoek.unique(array1, "id"); // results in [{id: 1}, {id: 2}] + +// mapToObject(array, key) + +array = [1, 2, 3]; +let newObject = Hoek.mapToObject(array); // results in {"1": true, "2": true, "3": true} + +array1 = [{ id: 1 }, { id: 2 }]; +newObject = Hoek.mapToObject(array1, "id"); // results in {"1": true, "2": true} + +// intersect(array1, array2) + +array = [1, 2, 3]; +const array2 = [1, 4, 5]; + +const newArray2 = Hoek.intersect(array, array2); // results in [1] + +// contain(ref, values, [options]) + +Hoek.contain('aaa', 'a', { only: true }); // true +Hoek.contain([{ a: 1 }], [{ a: 1 }], { deep: true }); // true +Hoek.contain([1, 2, 2], [1, 2], { once: true }); // false +Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 }, { part: true }); // true + +// flatten(array, [target]) + +let array3 = [1, [2, 3]]; + +let flattenedArray = Hoek.flatten(array); // results in [1, 2, 3] + +array3 = [1, [2, 3]]; +const target1 = [4, [5]]; + +flattenedArray = Hoek.flatten(array3, target1); // results in [4, [5], 1, 2, 3] + +// reach(obj, chain, [options]) + +let chain = 'a.b.c'; +let obj = { a: { b: { c: 1 } } }; + +Hoek.reach(obj, chain); // returns 1 + +chain = 'a.b.-1'; +const obj1 = { a: { b: [2, 3, 6] } }; + +Hoek.reach(obj1, chain); // returns 6 + +// reachTemplate(obj, template, [options]) + +chain = 'a.b.c'; +obj = { a: { b: { c: 1 } } }; + +Hoek.reachTemplate(obj, '1+{a.b.c}=2'); // returns '1+1=2' + +// transform(obj, transform, [options]) + +const source1 = { + address: { + one: '123 main street', + two: 'PO Box 1234' + }, + title: 'Warehouse', + state: 'CA' +}; + +let result = Hoek.transform(source1, { + 'person.address.lineOne': 'address.one', + 'person.address.lineTwo': 'address.two', + title: 'title', + 'person.address.region': 'state' +}); +// Results in +// { +// person: { +// address: { +// lineOne: '123 main street', +// lineTwo: 'PO Box 1234', +// region: 'CA' +// } +// }, +// title: 'Warehouse' +// } + +// shallow(obj) + +const shallow = Hoek.shallow({ a: { b: 1 } }); + +// stringify(obj) + +let a: any = {}; +a.b = a; +Hoek.stringify(a); // Returns '[Cannot display object: Converting circular structure to JSON]' + +// Timer + +const timerObj = new Hoek.Timer(); +console.log("Time is now: " + timerObj.ts); +console.log(`Elapsed time from initialization: ${timerObj.elapsed()}milliseconds`); + +// Bench + +const benchObj = new Hoek.Bench(); +console.log(`Elapsed time from initialization: ${benchObj.elapsed()}milliseconds`); + +// base64urlEncode(value) + +Hoek.base64urlEncode("hoek"); + +// base64urlDecode(value) + +Hoek.base64urlDecode("aG9law=="); + +// escapeHtml(string) + +const string = ' hey '; +const escapedString = Hoek.escapeHtml(string); // returns <html> hey </html> + +// escapeHeaderAttribute(attribute) + +a = Hoek.escapeHeaderAttribute('I said "go w\\o me"'); // returns I said \"go w\\o me\" + +// escapeRegex(string) + +a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); // returns 4\^f\$s\.4\*5\+\-_\?%\=#\!\:@\|~\\\/`"\(>\)\[<\]d\{\}s\, + +// assert(condition, message) + +const x = 1; +const y = 2 as number; + +Hoek.assert(x === y, 'x should equal y'); // Throws 'x should equal y' + +Hoek.assert(x === y, new Error('x should equal y')); // Throws the given error object + +// abort(message) + +Hoek.abort("Error message"); + +// displayStack(slice) + +const stack = Hoek.displayStack(); +console.log(stack); + +// callStack(slice) + +const stack2 = Hoek.callStack(); +console.log(stack2); + +// nextTick(fn) + +let myFn = () => { + console.log('Do this later'); +}; + +const nextFn = Hoek.nextTick(myFn); + +nextFn(); +console.log('Do this first'); + +// Results in: +// +// Do this first +// Do this later + +// once(fn) + +myFn = () => { + console.log('Ran myFn'); +}; + +const onceFn = Hoek.once(myFn); +onceFn(); // results in "Ran myFn" +onceFn(); // results in undefined + +// ignore + +Hoek.ignore(); + +// uniqueFilename(path, extension) + +const result1 = Hoek.uniqueFilename('./test/modules', 'txt'); // results in "full/path/test/modules/{random}.txt" + +// isInteger(value) + +result = Hoek.isInteger('23'); diff --git a/types/hapi__hoek/index.d.ts b/types/hapi__hoek/index.d.ts new file mode 100644 index 0000000000..885bb9561d --- /dev/null +++ b/types/hapi__hoek/index.d.ts @@ -0,0 +1,213 @@ +// Type definitions for @hapi/hoek 6.2 +// Project: https://github.com/hapijs/hoek +// Definitions by: Prashant Tiwari +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface ContainOptions { + /** Perform a deep comparison of the values? */ + deep?: boolean; + /** Allow only one occurrence of each value? */ + once?: boolean; + /** Don't allow values not explicitly listed? */ + only?: boolean; + /** Allow partial match of the values? */ + part?: boolean; +} + +export interface ReachOptions { + /** String to split chain path on. Defaults to ".". */ + separator?: string; + /** Value to return if the path or value is not present. Default is undefined. */ + default?: any; + /** Throw an error on missing member? Default is false. */ + strict?: boolean; + /** Allow traversing functions for properties? */ + functions?: boolean; +} + +// Object + +/** + * Clone an object or an array. + */ +export function clone(obj: T): T; + +/** + * Clone an object or array. + */ +export function cloneWithShallow(obj: any, keys: string[]): any; + +/** + * Merge all the properties of source into target. + */ +export function merge(target: T1, source: T2, isNullOverride?: boolean, isMergeArrays?: boolean): T1 & T2; + +/** + * Apply options to a copy of the defaults. + */ +export function applyToDefaults(defaults: T1, options: T2, isNullOverride?: boolean): T1 & T2; + +/** + * Apply options to a copy of the defaults. + */ +export function applyToDefaultsWithShallow(defaults: T1, options: T2, keys?: string[]): T1 & T2; + +/** + * Perform a deep comparison of the two values. + */ +export function deepEqual(b: T, a: T, options?: any): T; + +/** + * Remove duplicate items from Array. + */ +export function unique(array: T[], key?: string): T[]; + +/** + * Convert an Array into an Object. + */ +export function mapToObject(array: any[], key?: string): any; + +/** + * Find the common unique items in two arrays. + */ +export function intersect(array1: any[], array2: any[]): any; + +/** + * Test if the reference value contains the provided values. + */ +export function contain(ref: any, values: any, options?: ContainOptions): boolean; + +/** + * Flatten an array. + */ +export function flatten(array: any[], target?: any[]): any[]; + +/** + * Convert an object key chain string to reference. + */ +export function reach(obj: any, chain: any, options?: ReachOptions): any; + +/** + * Replace string parameters ({name}) with their corresponding object key values. + */ +export function reachTemplate(obj: any, template: string, options?: ReachOptions): any; + +/** + * Transform an existing object into a new one based on the supplied obj and transform map. + */ +export function transform(obj: any, transform: any, options?: ReachOptions): any; + +/** + * Perform a shallow copy by copying the references of all the top level children. + */ +export function shallow(obj: any): any; + +/** + * Convert an object to string. Any errors are caught and reported back in the form of the returned string. + */ +export function stringify(obj: any): string; + +// Timer + +/** + * A Timer object. + */ +export class Timer { + /** The number of milliseconds elapsed since the epoch. */ + ts: number; + /** The time (ms) elapsed since the timer was created. */ + elapsed(): number; +} + +// Bench + +/** + * Same as Timer, except ts stores the internal node clock. + */ +export class Bench { + /** The number of milliseconds on the node clock elapsed since the epoch. */ + ts: number; + /** The time (ms) elapsed since the timer was created. */ + elapsed(): number; +} + +// Binary Encoding/Decoding + +/** + * Encode value of string or buffer type in Base64 or URL encoding. + */ +export function base64urlEncode(value: string): string; + +/** + * Decode string into Base64 or URL encoding. + */ +export function base64urlDecode(value: string): string; + +// Escaping Characters + +/** + * Escape html characters. + */ +export function escapeHtml(htmlString: string): string; + +/** + * Escape attribute value for use in HTTP header. + */ +export function escapeHeaderAttribute(attribute: string): string; + +/** + * Escape string for Regex construction. + */ +export function escapeRegex(regexString: string): string; + +// Errors + +/** + * Print message or throw error if condition fails. + */ +export function assert(condition: boolean, message: string | Error): void | Error; + +/** + * Throw if process.env.NODE_ENV === 'test'. Else display most recent stack and exit process. + */ +export function abort(message: string | Error): void; + +/** + * Display the trace stack. + */ +export function displayStack(slice?: any): string[]; + +/** + * Return a trace stack array. + */ +export function callStack(slice?: any): any[]; + +// Function + +/** + * Wrap fn in process.nextTick. + */ +export function nextTick(fn: () => void): () => void; + +/** + * Make sure fn is only run once. + */ +export function once(fn: () => void): () => void; + +/** + * A simple no-op function. + */ +export function ignore(): void; + +// Miscellaneous + +/** + * path to prepend to a randomly generated file name. + */ +export function uniqueFilename(path: string, extension?: string): string; + +/** + * Check value to see if it is an integer. + */ +export function isInteger(value: any): boolean; diff --git a/types/hapi__hoek/tsconfig.json b/types/hapi__hoek/tsconfig.json new file mode 100644 index 0000000000..f343e5f87f --- /dev/null +++ b/types/hapi__hoek/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": false, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/hoek": [ + "hapi__hoek" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__hoek-tests.ts" + ] +} diff --git a/types/navigator-permissions/tslint.json b/types/hapi__hoek/tslint.json similarity index 100% rename from types/navigator-permissions/tslint.json rename to types/hapi__hoek/tslint.json diff --git a/types/hapi__inert/hapi__inert-tests.ts b/types/hapi__inert/hapi__inert-tests.ts new file mode 100644 index 0000000000..4e902a19a3 --- /dev/null +++ b/types/hapi__inert/hapi__inert-tests.ts @@ -0,0 +1,105 @@ +import { + Server, + Lifecycle, +} from '@hapi/hapi'; + +import * as path from 'path'; +import * as inert from '@hapi/inert'; + +const server = new Server({ + port: 3000, + routes: { + files: { + relativeTo: path.join(__dirname, 'public') + } + } +}); + +const provision = async () => { + await server.register(inert); + + await server.register({ + plugin: inert, + options: { etagsCacheMaxSize: 400 }, + }); + + await server.register({ + plugin: inert, + once: true, + }); + + server.route({ + method: 'GET', + path: '/{param*}', + handler: { + directory: { + path: '.', + redirectToSlash: true, + index: true + } + } + }); + + // https://github.com/hapijs/inert#serving-a-single-file + server.route({ + method: 'GET', + path: '/{path*}', + handler: { + file: 'page.html' + } + }); + + // https://github.com/hapijs/inert#customized-file-response + server.route({ + method: 'GET', + path: '/file', + handler(request, reply) { + let path = 'plain.txt'; + if (request.headers['x-magic'] === 'sekret') { + path = 'awesome.png'; + } + + return reply.file(path).vary('x-magic'); + } + }); + + const handler: Lifecycle.Method = (request, h) => { + const response = request.response; + if (response instanceof Error && response.output.statusCode === 404) { + return h.file('404.html').code(404); + } + + return h.continue; + }; + + server.ext('onPostHandler', handler); + + const file: inert.FileHandlerRouteObject = { + path: '', + confine: true, + }; + + const directory: inert.DirectoryHandlerRouteObject = { + path: '', + listing: true + }; + + server.route({ + path: '', + method: 'GET', + handler: { + file, + directory: { + path() { + if (Math.random() > 0.5) { + return ''; + } else if (Math.random() > 0) { + return ['']; + } + return new Error(''); + } + }, + }, + options: { files: { relativeTo: __dirname } } + }); +}; diff --git a/types/hapi__inert/index.d.ts b/types/hapi__inert/index.d.ts new file mode 100644 index 0000000000..bbd6f18ecc --- /dev/null +++ b/types/hapi__inert/index.d.ts @@ -0,0 +1,169 @@ +// Type definitions for @hapi/inert 5.2 +// Project: https://github.com/hapijs/inert/ +// Definitions by: Steve Ognibene +// Alexander James Phillips +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { + Plugin, + Request, +} from '@hapi/hapi'; + +declare namespace inert { + type RequestHandler = (request: Request) => T; + + interface ReplyFileHandlerOptions { + /** + * confine - serve file relative to this directory and returns 403 Forbidden if the path resolves outside the confine directory. + * Defaults to true which uses the relativeTo route option as the confine. Set to false to disable this security feature. + */ + confine?: boolean; + /** + * filename - an optional filename to specify if sending a 'Content-Disposition' header, defaults to the basename of path + */ + filename?: string; + /** + * mode - specifies whether to include the 'Content-Disposition' header with the response. Available values: + * * false - header is not included. This is the default value. + * * 'attachment' + * *'inline' + */ + mode?: false | 'attachment' | 'inline'; + /** + * lookupCompressed - if true, looks for for a pre-compressed version of the file with the same filename with an extension, depending on the accepted encoding. Defaults to false. + */ + lookupCompressed?: boolean; + /** + * lookupMap - an object which maps content encoding to expected file name extension. Defaults to `{ gzip: '.gz' }. + */ + lookupMap?: {[index: string]: string}; + /** + * etagMethod - specifies the method used to calculate the ETag header response. Available values: + * * 'hash' - SHA1 sum of the file contents, suitable for distributed deployments. Default value. + * * 'simple' - Hex encoded size and modification date, suitable when files are stored on a single server. + * * false - Disable ETag computation. + */ + etagMethod?: 'hash' | 'simple' | false; + /** + * start - offset in file to reading from, defaults to 0. + */ + start?: number; + /** + * end - offset in file to stop reading from. If not set, will read to end of file. + */ + end?: number; + } + + interface FileHandlerRouteObject extends ReplyFileHandlerOptions { + /** + * path - a path string or function as described above (required). + */ + path: string | RequestHandler; + } + + interface DirectoryHandlerRouteObject { + /** + * path - (required) the directory root path (relative paths are resolved based on the route files configuration). Value can be: + * * a single path string used as the prefix for any resources requested by appending the request path parameter to the provided string. + * * an array of path strings. Each path will be attempted in order until a match is found (by following the same process as the single path string). + * * a function with the signature function(request) which returns the path string or an array of path strings. + * If the function returns an error, the error is passed back to the client in the response. + */ + path: string | string[] | RequestHandler; + /** + * index - optional boolean|string|string[], determines if an index file will be served if found in the folder when requesting a directory. + * The given string or strings specify the name(s) of the index file to look for. If true, looks for 'index.html'. + * Any falsy value disables index file lookup. Defaults to true. + */ + index?: boolean | string | string[]; + /** + * listing - optional boolean, determines if directory listing is generated when a directory is requested without an index document. Defaults to false. + */ + listing?: boolean; + /** + * showHidden - optional boolean, determines if hidden files will be shown and served. Defaults to false. + */ + showHidden?: boolean; + /** + * redirectToSlash - optional boolean, determines if requests for a directory without a trailing slash are redirected to the same path with the missing slash. + * Useful for ensuring relative links inside the response are resolved correctly. + * Disabled when the server config router.stripTrailingSlash is true.Defaults to false. + */ + redirectToSlash?: boolean; + /** + * lookupCompressed - optional boolean, instructs the file processor to look for the same filename with the '.gz' suffix for a pre-compressed + * version of the file to serve if the request supports content encoding. Defaults to false. + */ + lookupCompressed?: boolean; + /** + * etagMethod - specifies the method used to calculate the ETag header response. Available values: + * * 'hash' - SHA1 sum of the file contents, suitable for distributed deployments. Default value. + * * 'simple' - Hex encoded size and modification date, suitable when files are stored on a single server. + * * false - Disable ETag computation. + */ + etagMethod?: 'hash' | 'simple' | false; + /** + * defaultExtension - optional string, appended to file requests if the requested file is not found. Defaults to no extension. + */ + defaultExtension?: string; + } + + /** + * inert accepts the following registration options + * @see {@link https://github.com/hapijs/inert#registration-options} + */ + interface OptionalRegistrationOptions { + /** + * sets the maximum number of file etag hash values stored in the etags cache. Defaults to 10000. + */ + etagsCacheMaxSize?: number; + } +} + +declare const inert: Plugin; + +export = inert; + +declare module '@hapi/hapi' { + interface HandlerDecorations { + /** + * The file handler + * + * Generates a static file endpoint for serving a single file. file can be set to: + * * a relative or absolute file path string (relative paths are resolved based on the route files configuration). + * * a function with the signature function(request) which returns the relative or absolute file path. + * * an object with one or more of the following options @see IFileHandler + * @see {@link https://github.com/hapijs/inert#the-file-handler} + */ + file?: string | inert.RequestHandler | inert.FileHandlerRouteObject; + /** + * The directory handler + * + * Generates a directory endpoint for serving static content from a directory. + * Routes using the directory handler must include a path parameter at the end of the path string + * (e.g. /path/to/somewhere/{param} where the parameter name does not matter). + * The path parameter can use any of the parameter options (e.g. {param} for one level files only, + * {param?} for one level files or the directory root, {param*} for any level, or {param*3} for a specific level). + * If additional path parameters are present, they are ignored for the purpose of selecting the file system resource. + * The directory handler is an object with the following options: + * @see {@link https://github.com/hapijs/inert#the-directory-handler} + */ + directory?: inert.DirectoryHandlerRouteObject; + files?: { + /** + * Set the relative path + */ + relativeTo: string; + }; + } + + interface ResponseToolkit { + /** + * Transmits a file from the file system. The 'Content-Type' header defaults to the matching mime type based on filename extension. + * @see {@link https://github.com/hapijs/inert#replyfilepath-options} + */ + file(path: string, options?: inert.ReplyFileHandlerOptions): ResponseObject; + } +} diff --git a/types/hapi__inert/tsconfig.json b/types/hapi__inert/tsconfig.json new file mode 100644 index 0000000000..b6a0712557 --- /dev/null +++ b/types/hapi__inert/tsconfig.json @@ -0,0 +1,52 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/hapi": [ + "hapi__hapi" + ], + "@hapi/boom": [ + "hapi__boom" + ], + "@hapi/shot": [ + "hapi__shot" + ], + "@hapi/mimos": [ + "hapi__mimos" + ], + "@hapi/iron": [ + "hapi__iron" + ], + "@hapi/joi": [ + "hapi__joi" + ], + "@hapi/podium": [ + "hapi__podium" + ], + "@hapi/catbox": [ + "hapi__catbox" + ], + "@hapi/inert": [ + "hapi__inert" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__inert-tests.ts" + ] +} diff --git a/types/os-name/tslint.json b/types/hapi__inert/tslint.json similarity index 100% rename from types/os-name/tslint.json rename to types/hapi__inert/tslint.json diff --git a/types/hapi__iron/hapi__iron-tests.ts b/types/hapi__iron/hapi__iron-tests.ts new file mode 100644 index 0000000000..a83450fefd --- /dev/null +++ b/types/hapi__iron/hapi__iron-tests.ts @@ -0,0 +1,78 @@ +import * as Iron from "@hapi/iron"; + +const options: Iron.SealOptions = { + encryption: { + saltBits: 256, + algorithm: 'aes-256-cbc', + iterations: 1, + minPasswordlength: 32 + }, + integrity: { + saltBits: 256, + algorithm: 'sha256', + iterations: 1, + minPasswordlength: 32 + }, + ttl: 0, + timestampSkewSec: 60, + localtimeOffsetMsec: 0 +}; + +const algorithms: Iron.Algorithms = { + 'aes-128-ctr': { keyBits: 128, ivBits: 128 }, + 'aes-256-cbc': { keyBits: 256, ivBits: 128 }, + sha256: { keyBits: 256 } +}; + +const optionsGenerateKey: Iron.GenerateKeyOptions = { + saltBits: 256, + salt: '4d8nr9q384nr9q384nr93q8nruq9348run', + algorithm: 'aes-128-ctr', + iterations: 10000, + iv: 'sdfsdfsdfsdfscdrgercgesrcgsercg', + minPasswordlength: 32 +}; + +const obj: object = { + a: 1, + b: 2, + c: [3, 4, 5], + d: { + e: 'f' + } +}; + +Iron.seal(obj, 'password', options) + .then((sealed: string) => { + console.log(sealed); + }); + +Iron.unseal('data', 'password', Iron.defaults) + .then((unsealed: object) => { + console.log(unsealed); + }); + +Iron.generateKey('password', options.encryption) + .then((value: Iron.Key) => { + console.log(value); + }); + +Iron.generateKey('password', optionsGenerateKey) + .then((value: Iron.Key) => { + console.log(value); + }); + +Iron.encrypt('password', Iron.defaults.encryption, 'data') + .then((obj: { data: Buffer, key: Iron.Key }) => { + console.log(obj); + }); + +Iron.decrypt('password', Iron.defaults.encryption, 'data') + .then((buffer: Buffer) => { + console.log(buffer); + }); + +Iron.hmacWithPassword('password', Iron.defaults.integrity, 'data') + .then((value: Iron.HMacResult) => { + console.log(value); + }); diff --git a/types/hapi__iron/index.d.ts b/types/hapi__iron/index.d.ts new file mode 100644 index 0000000000..1be1396775 --- /dev/null +++ b/types/hapi__iron/index.d.ts @@ -0,0 +1,100 @@ +// Type definitions for @hapi/iron 5.1 +// Project: https://github.com/hueniverse/iron +// Definitions by: Simon Schick +// Rafael Souza Fijalkowski +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +export interface SealOptionsSub { + /** + * the size of the salt (random buffer used to ensure that two identical objects will generate a different encrypted result. + */ + saltBits: number; + /** + * the algorithm used ('aes-256-cbc' for encryption and 'sha256' for integrity are the only two supported at this time). + */ + algorithm: keyof Algorithms; + /** + * the number of iterations used to derive a key from the password. Set to 1 by default. The number of ideal iterations + * to use is dependent on your application's performance requirements. More iterations means it takes longer to generate the key. + */ + iterations: number; + /** + * minimum password size + */ + minPasswordlength: number; +} + +/** + * iron provides a few options for customizing the key derivation algorithm used to generate encryption and + * integrity verification keys as well as the algorithms and salt sizes used. + * For context [See docs](https://github.com/hueniverse/iron#options) + */ +export interface SealOptions { + /** + * defines the options used by the encryption process. + */ + encryption: SealOptionsSub; + /** + * defines the options used by the HMAC integrity verification process. + */ + integrity: SealOptionsSub; + /** + * sealed object lifetime in milliseconds where 0 means forever. Defaults to 0. + */ + ttl: number; + /** + * number of seconds of permitted clock skew for incoming expirations. Defaults to 60 seconds. + */ + timestampSkewSec: number; + /** + * local clock time offset, expressed in number of milliseconds (positive or negative). Defaults to 0. + */ + localtimeOffsetMsec: number; +} + +export interface Algorithms { + 'aes-128-ctr': { + keyBits: number; + ivBits: number; + }; + 'aes-256-cbc': { + keyBits: number; + ivBits: number; + }; + 'sha256': { + keyBits: number; + }; +} + +export interface GenerateKeyOptions extends Pick { + saltBits?: number; + salt?: string; + iv?: string; +} + +export interface Key { + key: Buffer; + salt: string; + iv: string; +} + +export interface HMacResult { + digest: string; + salt: string; +} + +export const defaults: SealOptions; +export const algorithms: Algorithms; +export const macFormatVersion: string; +export const macPrefix: string; + +export function generateKey(password: string, options: GenerateKeyOptions): Promise; +export function encrypt(password: string, options: GenerateKeyOptions, data: string): Promise<{ data: Buffer, key: Key }>; +export function decrypt(password: string, options: GenerateKeyOptions, data: string): Promise; +export function hmacWithPassword(password: string, options: GenerateKeyOptions, data: string): Promise; +export function seal(obj: object, password: string, options: SealOptions): Promise; +export function unseal(data: string, password: string, options: SealOptions): Promise; diff --git a/types/hapi__iron/tsconfig.json b/types/hapi__iron/tsconfig.json new file mode 100644 index 0000000000..55e4178170 --- /dev/null +++ b/types/hapi__iron/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/iron": [ + "hapi__iron" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__iron-tests.ts" + ] +} diff --git a/types/hapi__iron/tslint.json b/types/hapi__iron/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/hapi__iron/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/hapi__joi/hapi__joi-tests.ts b/types/hapi__joi/hapi__joi-tests.ts new file mode 100644 index 0000000000..37e8f716fd --- /dev/null +++ b/types/hapi__joi/hapi__joi-tests.ts @@ -0,0 +1,1176 @@ +import Joi = require('@hapi/joi'); + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let x: any = null; +declare const value: any; +let num = 0; +let str = ''; +declare const bool: boolean; +declare const exp: RegExp; +declare const obj: object; +declare const date: Date; +declare const err: Error; +declare const func: () => void; + +declare const numArr: number[]; +declare const strArr: string[]; +declare const expArr: RegExp[]; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let schema: Joi.Schema = Joi.any(); +declare const schemaLike: Joi.SchemaLike; + +let anySchema: Joi.AnySchema = Joi.any(); +let numSchema: Joi.NumberSchema = Joi.number(); +let strSchema: Joi.StringSchema = Joi.string(); +let arrSchema: Joi.ArraySchema = Joi.array(); +let boolSchema: Joi.BooleanSchema = Joi.boolean(); +let binSchema: Joi.BinarySchema = Joi.binary(); +let dateSchema: Joi.DateSchema = Joi.date(); +let funcSchema: Joi.FunctionSchema = Joi.func(); +let objSchema: Joi.ObjectSchema = Joi.object(); +let altSchema: Joi.AlternativesSchema = Joi.alternatives(); + +declare const schemaArr: Joi.Schema[]; + +let ref: Joi.Reference = Joi.ref('test'); +let description: Joi.Description = {}; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let validOpts: Joi.ValidationOptions = {}; + +validOpts = { abortEarly: bool }; +validOpts = { convert: bool }; +validOpts = { allowUnknown: bool }; +validOpts = { skipFunctions: bool }; +validOpts = { stripUnknown: bool }; +validOpts = { stripUnknown: { arrays: bool } }; +validOpts = { stripUnknown: { objects: bool } }; +validOpts = { stripUnknown: { arrays: bool, objects: bool } }; +validOpts = { presence: 'optional' || 'required' || 'forbidden' }; +validOpts = { context: obj }; +validOpts = { noDefaults: bool }; +validOpts = { + language: { + root: str, + key: str, + messages: { wrapArrays: bool }, + string: { base: str }, + number: { base: str }, + object: { + base: false, + children: { childRule: str } + }, + customType: { + customRule: str + } + } +}; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let renOpts: Joi.RenameOptions = {}; + +renOpts = { alias: bool }; +renOpts = { multiple: bool }; +renOpts = { override: bool }; +renOpts = { ignoreUndefined: bool }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let emailOpts: Joi.EmailOptions = {}; + +emailOpts = { errorLevel: num }; +emailOpts = { errorLevel: bool }; +emailOpts = { tldWhitelist: strArr }; +emailOpts = { tldWhitelist: obj }; +emailOpts = { minDomainAtoms: num }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let hexOpts: Joi.HexOptions = {}; + +hexOpts = { byteAligned: bool }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let ipOpts: Joi.IpOptions = {}; + +ipOpts = { version: str }; +ipOpts = { version: strArr }; +ipOpts = { cidr: str }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let uriOpts: Joi.UriOptions = {}; + +uriOpts = { scheme: str }; +uriOpts = { scheme: exp }; +uriOpts = { scheme: strArr }; +uriOpts = { scheme: expArr }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let base64Opts: Joi.Base64Options = {}; + +base64Opts = { paddingRequired: bool }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let dataUriOpts: Joi.DataUriOptions = {}; + +dataUriOpts = { paddingRequired: bool }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let whenOpts: Joi.WhenOptions = { + is: Joi.any(), +}; + +whenOpts = { is: x }; +whenOpts = { is: schema, then: schema }; +whenOpts = { is: schema, otherwise: schema }; +whenOpts = { is: schemaLike, then: schemaLike, otherwise: schemaLike }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let whenSchemaOpts: Joi.WhenSchemaOptions = {}; + +whenSchemaOpts = { then: schema }; +whenSchemaOpts = { otherwise: schema }; +whenSchemaOpts = { then: schemaLike, otherwise: schemaLike }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let refOpts: Joi.ReferenceOptions = {}; + +refOpts = { separator: str }; +refOpts = { contextPrefix: str }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let stringRegexOpts: Joi.StringRegexOptions = {}; + +stringRegexOpts = { name: str }; +stringRegexOpts = { invert: bool }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +declare const validErr: Joi.ValidationError; +let validErrItem: Joi.ValidationErrorItem; +let validErrFunc: Joi.ValidationErrorFunction; + +validErrItem = { + message: str, + type: str, + path: [str] +}; + +validErrItem = { + message: str, + type: str, + path: [str], + options: validOpts, + context: obj +}; + +validErrFunc = errs => errs; +validErrFunc = errs => errs[0]; +validErrFunc = errs => 'Some error'; +validErrFunc = errs => err; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +schema = anySchema; +schema = numSchema; +schema = strSchema; +schema = arrSchema; +schema = boolSchema; +schema = binSchema; +schema = dateSchema; +schema = funcSchema; +schema = objSchema; + +anySchema = anySchema; +anySchema = numSchema; +anySchema = strSchema; +anySchema = arrSchema; +anySchema = boolSchema; +anySchema = binSchema; +anySchema = dateSchema; +anySchema = funcSchema; +anySchema = objSchema; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +let schemaMap: Joi.SchemaMap = {}; + +schemaMap = { + a: numSchema, + b: strSchema +}; +schemaMap = { + a: numSchema, + b: { + b1: strSchema, + b2: anySchema + } +}; +schemaMap = { + a: numSchema, + b: [ + { b1: strSchema }, + { b2: anySchema } + ], + c: arrSchema, + d: schemaLike +}; +schemaMap = { + a: 1, + b: { + b1: '1', + b2: 2 + }, + c: [ + { c1: true }, + { c2: null } + ] +}; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +anySchema = Joi.any(); + +{ // common + anySchema = anySchema.allow(x); + anySchema = anySchema.allow(x, x); + anySchema = anySchema.allow([x, x, x]); + anySchema = anySchema.bind(); + anySchema = anySchema.valid(x); + anySchema = anySchema.valid(x, x); + anySchema = anySchema.valid([x, x, x]); + anySchema = anySchema.only(x); + anySchema = anySchema.only(x, x); + anySchema = anySchema.only([x, x, x]); + anySchema = anySchema.equal(x); + anySchema = anySchema.equal(x, x); + anySchema = anySchema.equal([x, x, x]); + anySchema = anySchema.invalid(x); + anySchema = anySchema.invalid(x, x); + anySchema = anySchema.invalid([x, x, x]); + anySchema = anySchema.disallow(x); + anySchema = anySchema.disallow(x, x); + anySchema = anySchema.disallow([x, x, x]); + anySchema = anySchema.not(x); + anySchema = anySchema.not(x, x); + anySchema = anySchema.not([x, x, x]); + + anySchema = anySchema.default(); + anySchema = anySchema.default(x); + anySchema = anySchema.default(x, str); + + anySchema = anySchema.required(); + anySchema = anySchema.optional(); + anySchema = anySchema.forbidden(); + anySchema = anySchema.strip(); + + anySchema = anySchema.description(str); + anySchema = anySchema.notes(str); + anySchema = anySchema.notes(strArr); + anySchema = anySchema.tags(str); + anySchema = anySchema.tags(strArr); + + anySchema = anySchema.meta(obj); + anySchema = anySchema.example(obj); + anySchema = anySchema.unit(str); + + anySchema = anySchema.options(validOpts); + anySchema = anySchema.strict(); + anySchema = anySchema.strict(bool); + anySchema = anySchema.concat(x); + + altSchema = anySchema.when(str, whenOpts); + altSchema = anySchema.when(ref, whenOpts); + altSchema = anySchema.when(schema, whenSchemaOpts); + + anySchema = anySchema.label(str); + anySchema = anySchema.raw(); + anySchema = anySchema.raw(bool); + anySchema = anySchema.empty(); + anySchema = anySchema.empty(str); + anySchema = anySchema.empty(anySchema); + + anySchema = anySchema.error(err); + anySchema = anySchema.error(validErrFunc); + anySchema = anySchema.error(validErrFunc, { self: true }); +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +arrSchema = Joi.array(); + +arrSchema = arrSchema.has(Joi.any()); +arrSchema = arrSchema.sparse(); +arrSchema = arrSchema.sparse(bool); +arrSchema = arrSchema.single(); +arrSchema = arrSchema.single(bool); +arrSchema = arrSchema.ordered(anySchema); +arrSchema = arrSchema.ordered(anySchema, numSchema, strSchema, arrSchema, boolSchema, binSchema, dateSchema, funcSchema, objSchema, schemaLike); +arrSchema = arrSchema.ordered(schemaMap); +arrSchema = arrSchema.ordered([schemaMap, schemaMap, schemaLike]); +arrSchema = arrSchema.min(num); +arrSchema = arrSchema.max(num); +arrSchema = arrSchema.length(num); +arrSchema = arrSchema.length(ref); +arrSchema = arrSchema.unique(); +arrSchema = arrSchema.unique((a, b) => a.test === b.test); +arrSchema = arrSchema.unique('customer.id'); + +arrSchema = arrSchema.items(numSchema); +arrSchema = arrSchema.items(numSchema, strSchema, schemaLike); +arrSchema = arrSchema.items([numSchema, strSchema, schemaLike]); +arrSchema = arrSchema.items(schemaMap); +arrSchema = arrSchema.items(schemaMap, schemaMap, schemaLike); +arrSchema = arrSchema.items([schemaMap, schemaMap, schemaLike]); + +// - - - - - - - - + +{ // common copy paste + // use search & replace from any + arrSchema = arrSchema.allow(x); + arrSchema = arrSchema.allow(x, x); + arrSchema = arrSchema.allow([x, x, x]); + arrSchema = arrSchema.valid(x); + arrSchema = arrSchema.valid(x, x); + arrSchema = arrSchema.valid([x, x, x]); + arrSchema = arrSchema.only(x); + arrSchema = arrSchema.only(x, x); + arrSchema = arrSchema.only([x, x, x]); + arrSchema = arrSchema.equal(x); + arrSchema = arrSchema.equal(x, x); + arrSchema = arrSchema.equal([x, x, x]); + arrSchema = arrSchema.invalid(x); + arrSchema = arrSchema.invalid(x, x); + arrSchema = arrSchema.invalid([x, x, x]); + arrSchema = arrSchema.disallow(x); + arrSchema = arrSchema.disallow(x, x); + arrSchema = arrSchema.disallow([x, x, x]); + arrSchema = arrSchema.not(x); + arrSchema = arrSchema.not(x, x); + arrSchema = arrSchema.not([x, x, x]); + + arrSchema = arrSchema.default(x); + + arrSchema = arrSchema.required(); + arrSchema = arrSchema.optional(); + arrSchema = arrSchema.forbidden(); + + arrSchema = arrSchema.description(str); + arrSchema = arrSchema.notes(str); + arrSchema = arrSchema.notes(strArr); + arrSchema = arrSchema.tags(str); + arrSchema = arrSchema.tags(strArr); + + arrSchema = arrSchema.meta(obj); + arrSchema = arrSchema.example(obj); + arrSchema = arrSchema.unit(str); + + arrSchema = arrSchema.options(validOpts); + arrSchema = arrSchema.strict(); + arrSchema = arrSchema.concat(x); + + altSchema = arrSchema.when(str, whenOpts); + altSchema = arrSchema.when(ref, whenOpts); + altSchema = arrSchema.when(schema, whenSchemaOpts); +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +boolSchema = Joi.bool(); +boolSchema = Joi.boolean(); + +{ // common copy paste + boolSchema = boolSchema.allow(x); + boolSchema = boolSchema.allow(x, x); + boolSchema = boolSchema.allow([x, x, x]); + boolSchema = boolSchema.valid(x); + boolSchema = boolSchema.valid(x, x); + boolSchema = boolSchema.valid([x, x, x]); + boolSchema = boolSchema.only(x); + boolSchema = boolSchema.only(x, x); + boolSchema = boolSchema.only([x, x, x]); + boolSchema = boolSchema.equal(x); + boolSchema = boolSchema.equal(x, x); + boolSchema = boolSchema.equal([x, x, x]); + boolSchema = boolSchema.invalid(x); + boolSchema = boolSchema.invalid(x, x); + boolSchema = boolSchema.invalid([x, x, x]); + boolSchema = boolSchema.disallow(x); + boolSchema = boolSchema.disallow(x, x); + boolSchema = boolSchema.disallow([x, x, x]); + boolSchema = boolSchema.not(x); + boolSchema = boolSchema.not(x, x); + boolSchema = boolSchema.not([x, x, x]); + + boolSchema = boolSchema.default(x); + + boolSchema = boolSchema.required(); + boolSchema = boolSchema.optional(); + boolSchema = boolSchema.forbidden(); + + boolSchema = boolSchema.description(str); + boolSchema = boolSchema.notes(str); + boolSchema = boolSchema.notes(strArr); + boolSchema = boolSchema.tags(str); + boolSchema = boolSchema.tags(strArr); + + boolSchema = boolSchema.meta(obj); + boolSchema = boolSchema.example(obj); + boolSchema = boolSchema.unit(str); + + boolSchema = boolSchema.options(validOpts); + boolSchema = boolSchema.strict(); + boolSchema = boolSchema.concat(x); + + boolSchema = boolSchema.truthy(str); + boolSchema = boolSchema.truthy(num); + boolSchema = boolSchema.truthy(strArr); + boolSchema = boolSchema.truthy(numArr); + boolSchema = boolSchema.truthy(str, str); + boolSchema = boolSchema.truthy(strArr, str); + boolSchema = boolSchema.truthy(str, strArr); + boolSchema = boolSchema.truthy(strArr, strArr); + boolSchema = boolSchema.falsy(str); + boolSchema = boolSchema.falsy(num); + boolSchema = boolSchema.falsy(strArr); + boolSchema = boolSchema.falsy(numArr); + boolSchema = boolSchema.falsy(str, str); + boolSchema = boolSchema.falsy(strArr, str); + boolSchema = boolSchema.falsy(str, strArr); + boolSchema = boolSchema.falsy(strArr, strArr); + boolSchema = boolSchema.insensitive(bool); + + altSchema = boolSchema.when(str, whenOpts); + altSchema = boolSchema.when(ref, whenOpts); + altSchema = boolSchema.when(schema, whenSchemaOpts); +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +binSchema = Joi.binary(); + +binSchema = binSchema.encoding(str); +binSchema = binSchema.min(num); +binSchema = binSchema.max(num); +binSchema = binSchema.length(num); + +{ // common + binSchema = binSchema.allow(x); + binSchema = binSchema.allow(x, x); + binSchema = binSchema.allow([x, x, x]); + binSchema = binSchema.valid(x); + binSchema = binSchema.valid(x, x); + binSchema = binSchema.valid([x, x, x]); + binSchema = binSchema.only(x); + binSchema = binSchema.only(x, x); + binSchema = binSchema.only([x, x, x]); + binSchema = binSchema.equal(x); + binSchema = binSchema.equal(x, x); + binSchema = binSchema.equal([x, x, x]); + binSchema = binSchema.invalid(x); + binSchema = binSchema.invalid(x, x); + binSchema = binSchema.invalid([x, x, x]); + binSchema = binSchema.disallow(x); + binSchema = binSchema.disallow(x, x); + binSchema = binSchema.disallow([x, x, x]); + binSchema = binSchema.not(x); + binSchema = binSchema.not(x, x); + binSchema = binSchema.not([x, x, x]); + + binSchema = binSchema.default(x); + + binSchema = binSchema.required(); + binSchema = binSchema.optional(); + binSchema = binSchema.forbidden(); + + binSchema = binSchema.description(str); + binSchema = binSchema.notes(str); + binSchema = binSchema.notes(strArr); + binSchema = binSchema.tags(str); + binSchema = binSchema.tags(strArr); + + binSchema = binSchema.meta(obj); + binSchema = binSchema.example(obj); + binSchema = binSchema.unit(str); + + binSchema = binSchema.options(validOpts); + binSchema = binSchema.strict(); + binSchema = binSchema.concat(x); + + altSchema = binSchema.when(str, whenOpts); + altSchema = binSchema.when(ref, whenOpts); + altSchema = binSchema.when(schema, whenSchemaOpts); +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +dateSchema = Joi.date(); + +dateSchema = dateSchema.greater('now'); +dateSchema = dateSchema.less('now'); +dateSchema = dateSchema.min('now'); +dateSchema = dateSchema.max('now'); + +dateSchema = dateSchema.greater(date); +dateSchema = dateSchema.less(date); +dateSchema = dateSchema.min(date); +dateSchema = dateSchema.max(date); + +dateSchema = dateSchema.greater(str); +dateSchema = dateSchema.less(str); +dateSchema = dateSchema.min(str); +dateSchema = dateSchema.max(str); + +dateSchema = dateSchema.greater(num); +dateSchema = dateSchema.less(num); +dateSchema = dateSchema.min(num); +dateSchema = dateSchema.max(num); + +dateSchema = dateSchema.greater(ref); +dateSchema = dateSchema.less(ref); +dateSchema = dateSchema.min(ref); +dateSchema = dateSchema.max(ref); + +dateSchema = dateSchema.format(str); +dateSchema = dateSchema.format(strArr); + +dateSchema = dateSchema.iso(); + +dateSchema = dateSchema.timestamp(); +dateSchema = dateSchema.timestamp('javascript'); +dateSchema = dateSchema.timestamp('unix'); + +{ // common + dateSchema = dateSchema.allow(x); + dateSchema = dateSchema.allow(x, x); + dateSchema = dateSchema.allow([x, x, x]); + dateSchema = dateSchema.valid(x); + dateSchema = dateSchema.valid(x, x); + dateSchema = dateSchema.valid([x, x, x]); + dateSchema = dateSchema.only(x); + dateSchema = dateSchema.only(x, x); + dateSchema = dateSchema.only([x, x, x]); + dateSchema = dateSchema.equal(x); + dateSchema = dateSchema.equal(x, x); + dateSchema = dateSchema.equal([x, x, x]); + dateSchema = dateSchema.invalid(x); + dateSchema = dateSchema.invalid(x, x); + dateSchema = dateSchema.invalid([x, x, x]); + dateSchema = dateSchema.disallow(x); + dateSchema = dateSchema.disallow(x, x); + dateSchema = dateSchema.disallow([x, x, x]); + dateSchema = dateSchema.not(x); + dateSchema = dateSchema.not(x, x); + dateSchema = dateSchema.not([x, x, x]); + + dateSchema = dateSchema.default(x); + + dateSchema = dateSchema.required(); + dateSchema = dateSchema.optional(); + dateSchema = dateSchema.forbidden(); + + dateSchema = dateSchema.description(str); + dateSchema = dateSchema.notes(str); + dateSchema = dateSchema.notes(strArr); + dateSchema = dateSchema.tags(str); + dateSchema = dateSchema.tags(strArr); + + dateSchema = dateSchema.meta(obj); + dateSchema = dateSchema.example(obj); + dateSchema = dateSchema.unit(str); + + dateSchema = dateSchema.options(validOpts); + dateSchema = dateSchema.strict(); + dateSchema = dateSchema.concat(x); + + altSchema = dateSchema.when(str, whenOpts); + altSchema = dateSchema.when(ref, whenOpts); + altSchema = dateSchema.when(schema, whenSchemaOpts); +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +funcSchema = Joi.func(); + +funcSchema = funcSchema.arity(num); +funcSchema = funcSchema.minArity(num); +funcSchema = funcSchema.maxArity(num); +funcSchema = funcSchema.ref(); + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +numSchema = Joi.number(); + +numSchema = numSchema.min(num); +numSchema = numSchema.min(ref); +numSchema = numSchema.max(num); +numSchema = numSchema.max(ref); +numSchema = numSchema.greater(num); +numSchema = numSchema.greater(ref); +numSchema = numSchema.less(num); +numSchema = numSchema.less(ref); +numSchema = numSchema.integer(); +numSchema = numSchema.unsafe(); +numSchema = numSchema.precision(num); +numSchema = numSchema.multiple(num); +numSchema = numSchema.positive(); +numSchema = numSchema.negative(); +numSchema = numSchema.port(); + +{ // common + numSchema = numSchema.allow(x); + numSchema = numSchema.allow(x, x); + numSchema = numSchema.allow([x, x, x]); + numSchema = numSchema.valid(x); + numSchema = numSchema.valid(x, x); + numSchema = numSchema.valid([x, x, x]); + numSchema = numSchema.only(x); + numSchema = numSchema.only(x, x); + numSchema = numSchema.only([x, x, x]); + numSchema = numSchema.equal(x); + numSchema = numSchema.equal(x, x); + numSchema = numSchema.equal([x, x, x]); + numSchema = numSchema.invalid(x); + numSchema = numSchema.invalid(x, x); + numSchema = numSchema.invalid([x, x, x]); + numSchema = numSchema.disallow(x); + numSchema = numSchema.disallow(x, x); + numSchema = numSchema.disallow([x, x, x]); + numSchema = numSchema.not(x); + numSchema = numSchema.not(x, x); + numSchema = numSchema.not([x, x, x]); + + numSchema = numSchema.default(x); + + numSchema = numSchema.required(); + numSchema = numSchema.optional(); + numSchema = numSchema.forbidden(); + + numSchema = numSchema.description(str); + numSchema = numSchema.notes(str); + numSchema = numSchema.notes(strArr); + numSchema = numSchema.tags(str); + numSchema = numSchema.tags(strArr); + + numSchema = numSchema.meta(obj); + numSchema = numSchema.example(obj); + numSchema = numSchema.unit(str); + + numSchema = numSchema.options(validOpts); + numSchema = numSchema.strict(); + numSchema = numSchema.concat(x); + + altSchema = numSchema.when(str, whenOpts); + altSchema = numSchema.when(ref, whenOpts); + altSchema = numSchema.when(schema, whenSchemaOpts); +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +objSchema = Joi.object(); +objSchema = Joi.object(schemaMap); + +objSchema = objSchema.keys(); +objSchema = objSchema.keys(schemaMap); + +objSchema = objSchema.append(); +objSchema = objSchema.append(schemaMap); + +objSchema = objSchema.min(num); +objSchema = objSchema.max(num); +objSchema = objSchema.length(num); + +objSchema = objSchema.pattern(exp, schema); +objSchema = objSchema.pattern(exp, schemaLike); + +objSchema = objSchema.and(str); +objSchema = objSchema.and(str, str); +objSchema = objSchema.and(str, str, str); +objSchema = objSchema.and(strArr); + +objSchema = objSchema.nand(str); +objSchema = objSchema.nand(str, str); +objSchema = objSchema.nand(str, str, str); +objSchema = objSchema.nand(strArr); + +objSchema = objSchema.schema(); + +objSchema = objSchema.or(str); +objSchema = objSchema.or(str, str); +objSchema = objSchema.or(str, str, str); +objSchema = objSchema.or(strArr); + +objSchema = objSchema.oxor(str); +objSchema = objSchema.oxor(str, str); +objSchema = objSchema.oxor(str, str, str); +objSchema = objSchema.oxor(strArr); + +objSchema = objSchema.xor(str); +objSchema = objSchema.xor(str, str); +objSchema = objSchema.xor(str, str, str); +objSchema = objSchema.xor(strArr); + +objSchema = objSchema.with(str, str); +objSchema = objSchema.with(str, strArr); + +objSchema = objSchema.without(str, str); +objSchema = objSchema.without(str, strArr); + +objSchema = objSchema.rename(str, str); +objSchema = objSchema.rename(str, str, renOpts); + +objSchema = objSchema.assert(str, schema); +objSchema = objSchema.assert(str, schema, str); +objSchema = objSchema.assert(ref, schema); +objSchema = objSchema.assert(ref, schema, str); + +objSchema = objSchema.unknown(); +objSchema = objSchema.unknown(bool); + +objSchema = objSchema.type(func); +objSchema = objSchema.type(func, str); + +objSchema = objSchema.requiredKeys(str); +objSchema = objSchema.requiredKeys(str, str); +objSchema = objSchema.requiredKeys(strArr); + +objSchema = objSchema.optionalKeys(str); +objSchema = objSchema.optionalKeys(str, str); +objSchema = objSchema.optionalKeys(strArr); + +objSchema = objSchema.forbiddenKeys(str); +objSchema = objSchema.forbiddenKeys(str, str); +objSchema = objSchema.forbiddenKeys(strArr); + +{ // common + objSchema = objSchema.allow(x); + objSchema = objSchema.allow(x, x); + objSchema = objSchema.allow([x, x, x]); + objSchema = objSchema.valid(x); + objSchema = objSchema.valid(x, x); + objSchema = objSchema.valid([x, x, x]); + objSchema = objSchema.only(x); + objSchema = objSchema.only(x, x); + objSchema = objSchema.only([x, x, x]); + objSchema = objSchema.equal(x); + objSchema = objSchema.equal(x, x); + objSchema = objSchema.equal([x, x, x]); + objSchema = objSchema.invalid(x); + objSchema = objSchema.invalid(x, x); + objSchema = objSchema.invalid([x, x, x]); + objSchema = objSchema.disallow(x); + objSchema = objSchema.disallow(x, x); + objSchema = objSchema.disallow([x, x, x]); + objSchema = objSchema.not(x); + objSchema = objSchema.not(x, x); + objSchema = objSchema.not([x, x, x]); + + objSchema = objSchema.default(x); + + objSchema = objSchema.required(); + objSchema = objSchema.optional(); + objSchema = objSchema.forbidden(); + + objSchema = objSchema.description(str); + objSchema = objSchema.notes(str); + objSchema = objSchema.notes(strArr); + objSchema = objSchema.tags(str); + objSchema = objSchema.tags(strArr); + + objSchema = objSchema.meta(obj); + objSchema = objSchema.example(obj); + objSchema = objSchema.unit(str); + + objSchema = objSchema.options(validOpts); + objSchema = objSchema.strict(); + objSchema = objSchema.concat(x); + + altSchema = objSchema.when(str, whenOpts); + altSchema = objSchema.when(ref, whenOpts); + altSchema = objSchema.when(schema, whenSchemaOpts); +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +strSchema = Joi.string(); + +strSchema = strSchema.insensitive(); +strSchema = strSchema.min(num); +strSchema = strSchema.min(num, str); +strSchema = strSchema.min(ref); +strSchema = strSchema.min(ref, str); +strSchema = strSchema.max(num); +strSchema = strSchema.max(num, str); +strSchema = strSchema.max(ref); +strSchema = strSchema.max(ref, str); +strSchema = strSchema.creditCard(); +strSchema = strSchema.length(num); +strSchema = strSchema.length(num, str); +strSchema = strSchema.length(ref); +strSchema = strSchema.length(ref, str); +strSchema = strSchema.regex(exp); +strSchema = strSchema.regex(exp, str); +strSchema = strSchema.regex(exp, stringRegexOpts); +strSchema = strSchema.replace(exp, str); +strSchema = strSchema.replace(str, str); +strSchema = strSchema.alphanum(); +strSchema = strSchema.token(); +strSchema = strSchema.email(); +strSchema = strSchema.email(emailOpts); +strSchema = strSchema.ip(); +strSchema = strSchema.ip(ipOpts); +strSchema = strSchema.uri(); +strSchema = strSchema.uri(uriOpts); +strSchema = strSchema.guid(); +strSchema = strSchema.guid({ version: ['uuidv1', 'uuidv2', 'uuidv3', 'uuidv4', 'uuidv5'] }); +strSchema = strSchema.guid({ version: 'uuidv4' }); +strSchema = strSchema.hex(); +strSchema = strSchema.hex(hexOpts); +strSchema = strSchema.hostname(); +strSchema = strSchema.isoDate(); +strSchema = strSchema.lowercase(); +strSchema = strSchema.uppercase(); +strSchema = strSchema.trim(); +strSchema = strSchema.truncate(); +strSchema = strSchema.truncate(false); +strSchema = strSchema.normalize(); +strSchema = strSchema.normalize('NFKC'); +strSchema = strSchema.base64(); +strSchema = strSchema.base64(base64Opts); +strSchema = strSchema.dataUri(); +strSchema = strSchema.dataUri(dataUriOpts); + +{ // common + strSchema = strSchema.allow(x); + strSchema = strSchema.allow(x, x); + strSchema = strSchema.allow([x, x, x]); + strSchema = strSchema.valid(x); + strSchema = strSchema.valid(x, x); + strSchema = strSchema.valid([x, x, x]); + strSchema = strSchema.only(x); + strSchema = strSchema.only(x, x); + strSchema = strSchema.only([x, x, x]); + strSchema = strSchema.equal(x); + strSchema = strSchema.equal(x, x); + strSchema = strSchema.equal([x, x, x]); + strSchema = strSchema.invalid(x); + strSchema = strSchema.invalid(x, x); + strSchema = strSchema.invalid([x, x, x]); + strSchema = strSchema.disallow(x); + strSchema = strSchema.disallow(x, x); + strSchema = strSchema.disallow([x, x, x]); + strSchema = strSchema.not(x); + strSchema = strSchema.not(x, x); + strSchema = strSchema.not([x, x, x]); + + strSchema = strSchema.default(x); + + strSchema = strSchema.required(); + strSchema = strSchema.optional(); + strSchema = strSchema.forbidden(); + + strSchema = strSchema.description(str); + strSchema = strSchema.notes(str); + strSchema = strSchema.notes(strArr); + strSchema = strSchema.tags(str); + strSchema = strSchema.tags(strArr); + + strSchema = strSchema.meta(obj); + strSchema = strSchema.example(obj); + strSchema = strSchema.unit(str); + + strSchema = strSchema.options(validOpts); + strSchema = strSchema.strict(); + strSchema = strSchema.concat(x); + + altSchema = strSchema.when(str, whenOpts); + altSchema = strSchema.when(ref, whenOpts); + altSchema = strSchema.when(schema, whenSchemaOpts); +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +schema = Joi.alternatives(); +schema = Joi.alternatives().try(schemaArr); +schema = Joi.alternatives().try(schema, schema); + +schema = Joi.alternatives(schemaArr); +schema = Joi.alternatives(schema, anySchema, boolSchema); + +schema = Joi.alt(); +schema = Joi.alt().try(schemaArr); +schema = Joi.alt().try(schema, schema); + +schema = Joi.alt(schemaArr); +schema = Joi.alt(schema, anySchema, boolSchema); + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +schema = Joi.lazy(() => schema, { once: true }); + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +{ // validate tests + { + Joi.validate(value, obj); + Joi.validate(value, schema); + Joi.validate(value, schema, validOpts); + Joi.validate(value, schema, validOpts, (err, value) => { + x = value; + str = err.message; + str = err.details[0].path[0]; + str = err.details[0].message; + str = err.details[0].type; + }); + Joi.validate(value, schema, (err, value) => { + x = value; + str = err.message; + str = err.details[0].path.join('.'); + str = err.details[0].message; + str = err.details[0].type; + }); + // variant + Joi.validate(num, schema, validOpts, (err, value) => { + num = value; + }); + + // plain opts + Joi.validate(value, {}); + } + + { + let value = { username: 'example', password: 'example' }; + const schema = Joi.object().keys({ + username: Joi.string().max(255).required(), + password: Joi.string().regex(/^[a-zA-Z0-9]{3,255}$/).required(), + }); + let returnValue: Joi.ValidationResult; + + returnValue = schema.validate(value); + value = schema.validate(value, (err, value) => value); + + returnValue = Joi.validate(value, schema); + returnValue = Joi.validate(value, obj); + value = Joi.validate(value, obj, (err, value) => value); + value = Joi.validate(value, schema, (err, value) => value); + + returnValue = Joi.validate(value, schema, validOpts); + returnValue = Joi.validate(value, obj, validOpts); + value = Joi.validate(value, obj, validOpts, (err, value) => value); + value = Joi.validate(value, schema, validOpts, (err, value) => value); + + returnValue = schema.validate(value); + returnValue = schema.validate(value, validOpts); + value = schema.validate(value, (err, value) => value); + value = schema.validate(value, validOpts, (err, value) => value); + + returnValue + .then(val => JSON.stringify(val, null, 2)) + .then(val => { throw new Error('one error'); }) + .catch(e => {}); + } +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +schema = Joi.compile(obj); +schema = Joi.compile(schemaMap); + +Joi.assert(obj, schema); +Joi.assert(obj, schema, str); +Joi.assert(obj, schema, err); +Joi.assert(obj, schemaLike); + +Joi.attempt(obj, schema); +Joi.attempt(obj, schema, str); +Joi.attempt(obj, schema, err); +Joi.attempt(obj, schemaLike); + +ref = Joi.ref(str, refOpts); +ref = Joi.ref(str); + +Joi.isRef(ref); + +description = Joi.describe(schema); +description = schema.describe(); + +schema = Joi.reach(objSchema, ''); +schema = Joi.reach(objSchema, []); + +const Joi2 = Joi.extend({ name: '', base: schema }); + +const Joi3 = Joi.extend({ + base: Joi.string(), + name: 'string', + language: { + asd: 'must be exactly asd(f)', + }, + pre(value, state, options) { + return value; + }, + describe(description) { + return description; + }, + rules: [ + { + name: 'asd', + params: { + allowFalse: Joi.boolean().default(false), + }, + setup(params) { + const fIsAllowed = params.allowFalse; + }, + validate(params, value: boolean, state, options) { + if (value || params.allowFalse && !value) { + return value; + } + return this.createError('asd', { v: value }, state, options); + }, + }, + ], +}); + +const Joi4 = Joi.extend([{ name: '', base: schema }, { name: '', base: schema }]); + +const Joi5 = Joi.extend({ name: '', base: schema }, { name: '', base: schema }); + +const Joi6 = Joi.extend({ name: '', base: schema }, [{ name: '', base: schema }, { name: '', base: schema }]); + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +const defaultsJoi = Joi.defaults((schema) => { + switch (schema.schemaType) { + case 'string': + return schema.allow(''); + case 'object': + return (schema as Joi.ObjectSchema).min(1); + default: + return schema; + } +}); + +schema = Joi.allow(x, x); +schema = Joi.allow([x, x, x]); +schema = Joi.valid(x); +schema = Joi.valid(x, x); +schema = Joi.valid([x, x, x]); +schema = Joi.only(x); +schema = Joi.only(x, x); +schema = Joi.only([x, x, x]); +schema = Joi.equal(x); +schema = Joi.equal(x, x); +schema = Joi.equal([x, x, x]); +schema = Joi.invalid(x); +schema = Joi.invalid(x, x); +schema = Joi.invalid([x, x, x]); +schema = Joi.disallow(x); +schema = Joi.disallow(x, x); +schema = Joi.disallow([x, x, x]); +schema = Joi.not(x); +schema = Joi.not(x, x); +schema = Joi.not([x, x, x]); + +schema = Joi.required(); +schema = Joi.optional(); +schema = Joi.forbidden(); +schema = Joi.strip(); + +schema = Joi.description(str); +schema = Joi.notes(str); +schema = Joi.notes(strArr); +schema = Joi.tags(str); +schema = Joi.tags(strArr); + +schema = Joi.meta(obj); +schema = Joi.example(obj); +schema = Joi.unit(str); + +schema = Joi.options(validOpts); +schema = Joi.strict(); +schema = Joi.strict(bool); +schema = Joi.concat(x); + +schema = Joi.when(str, whenOpts); +schema = Joi.when(ref, whenOpts); +schema = Joi.when(schema, whenSchemaOpts); + +schema = Joi.label(str); +schema = Joi.raw(); +schema = Joi.raw(bool); +schema = Joi.empty(); +schema = Joi.empty(str); +schema = Joi.empty(anySchema); + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +schema = Joi.allow(x, x); +schema = Joi.allow([x, x, x]); +schema = Joi.valid(x); +schema = Joi.valid(x, x); +schema = Joi.valid([x, x, x]); +schema = Joi.only(x); +schema = Joi.only(x, x); +schema = Joi.only([x, x, x]); +schema = Joi.equal(x); +schema = Joi.equal(x, x); +schema = Joi.equal([x, x, x]); +schema = Joi.invalid(x); +schema = Joi.invalid(x, x); +schema = Joi.invalid([x, x, x]); +schema = Joi.disallow(x); +schema = Joi.disallow(x, x); +schema = Joi.disallow([x, x, x]); +schema = Joi.not(x); +schema = Joi.not(x, x); +schema = Joi.not([x, x, x]); + +schema = Joi.required(); +schema = Joi.exist(); +schema = Joi.optional(); +schema = Joi.forbidden(); +schema = Joi.strip(); + +schema = Joi.description(str); +schema = Joi.notes(str); +schema = Joi.notes(strArr); +schema = Joi.tags(str); +schema = Joi.tags(strArr); + +schema = Joi.meta(obj); +schema = Joi.example(obj); +schema = Joi.unit(str); + +schema = Joi.options(validOpts); +schema = Joi.strict(); +schema = Joi.strict(bool); +schema = Joi.concat(x); + +schema = Joi.when(str, whenOpts); +schema = Joi.when(ref, whenOpts); +schema = Joi.when(schema, whenSchemaOpts); + +schema = Joi.label(str); +schema = Joi.raw(); +schema = Joi.raw(bool); +schema = Joi.empty(); +schema = Joi.empty(str); +schema = Joi.empty(anySchema); + +schema = Joi.symbol(); +schema = Joi.symbol().map(new Map()); +schema = Joi.symbol().map({ + key: Symbol('asd'), +}); diff --git a/types/hapi__joi/index.d.ts b/types/hapi__joi/index.d.ts new file mode 100644 index 0000000000..35060f18c3 --- /dev/null +++ b/types/hapi__joi/index.d.ts @@ -0,0 +1,1340 @@ +// Type definitions for @hapi/joi 15.0 +// Project: https://github.com/hapijs/joi +// Definitions by: Bart van der Schoor +// Laurence Dougal Myers +// Christopher Glantschnig +// David Broder-Rodgers +// Gael Magnan de Bornier +// Rytis Alekna +// Pavel Ivanov +// Youngrok Kim +// Dan Kraus +// Anjun Wang +// Rafael Kallis +// Conan Lai +// Peter Thorson +// Will Garcia +// Simon Schick +// Alejandro Fernandez Haro +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +// TODO express type of Schema in a type-parameter (.default, .valid, .example etc) + +export type Types = 'any' | 'alternatives' | 'array' | 'boolean' | 'binary' | 'date' | 'function' | 'lazy' | 'number' | 'object' | 'string'; + +export type LanguageOptions = string | boolean | null | { + [key: string]: LanguageOptions; +}; + +export type LanguageRootOptions = { + root?: string; + key?: string; + messages?: { wrapArrays?: boolean; }; +} & Partial> & { [key: string]: LanguageOptions; }; + +export interface ValidationOptions { + /** + * when true, stops validation on the first error, otherwise returns all the errors found. Defaults to true. + */ + abortEarly?: boolean; + /** + * when true, attempts to cast values to the required types (e.g. a string to a number). Defaults to true. + */ + convert?: boolean; + /** + * when true, allows object to contain unknown keys which are ignored. Defaults to false. + */ + allowUnknown?: boolean; + /** + * when true, ignores unknown keys with a function value. Defaults to false. + */ + skipFunctions?: boolean; + /** + * remove unknown elements from objects and arrays. Defaults to false + * - when true, all unknown elements will be removed + * - when an object: + * - objects - set to true to remove unknown keys from objects + */ + stripUnknown?: boolean | { arrays?: boolean; objects?: boolean }; + /** + * overrides individual error messages. Defaults to no override ({}). + */ + language?: LanguageRootOptions; + /** + * sets the default presence requirements. Supported modes: 'optional', 'required', and 'forbidden'. Defaults to 'optional'. + */ + presence?: 'optional' | 'required' | 'forbidden'; + /** + * provides an external data set to be used in references + */ + context?: Context; + /** + * when true, do not apply default values. Defaults to false. + */ + noDefaults?: boolean; +} + +export interface RenameOptions { + /** + * if true, does not delete the old key name, keeping both the new and old keys in place. Defaults to false. + */ + alias?: boolean; + /** + * if true, allows renaming multiple keys to the same destination where the last rename wins. Defaults to false. + */ + multiple?: boolean; + /** + * if true, allows renaming a key over an existing key. Defaults to false. + */ + override?: boolean; + /** + * if true, skip renaming of a key if it's undefined. Defaults to false. + */ + ignoreUndefined?: boolean; +} + +export interface EmailOptions { + /** + * Numerical threshold at which an email address is considered invalid + */ + errorLevel?: number | boolean; + /** + * Specifies a list of acceptable TLDs. + */ + tldWhitelist?: string[] | object; + /** + * Number of atoms required for the domain. Be careful since some domains, such as io, directly allow email. + */ + minDomainAtoms?: number; +} + +export interface HexOptions { + /** + * hex decoded representation must be byte aligned. + * @default false + */ + byteAligned?: boolean; +} + +export interface IpOptions { + /** + * One or more IP address versions to validate against. Valid values: ipv4, ipv6, ipvfuture + */ + version?: string | string[]; + /** + * Used to determine if a CIDR is allowed or not. Valid values: optional, required, forbidden + */ + cidr?: string; +} + +export type GuidVersions = 'uuidv1' | 'uuidv2' | 'uuidv3' | 'uuidv4' | 'uuidv5'; + +export interface GuidOptions { + version: GuidVersions[] | GuidVersions; +} + +export interface UriOptions { + /** + * Specifies one or more acceptable Schemes, should only include the scheme name. + * Can be an Array or String (strings are automatically escaped for use in a Regular Expression). + */ + scheme?: string | RegExp | Array; + /** + * Allow relative URIs. Defaults to `false`. + */ + allowRelative?: boolean; + /** + * Restrict only relative URIs. Defaults to `false`. + */ + relativeOnly?: boolean; +} + +export interface DataUriOptions { + /** + * optional parameter defaulting to true which will require = padding if true or make padding optional if false + */ + paddingRequired?: boolean; +} + +export interface Base64Options { + /** + * optional parameter defaulting to true which will require = padding if true or make padding optional if false + */ + paddingRequired?: boolean; +} + +export interface WhenOptions { + /** + * the required condition joi type. + */ + is: SchemaLike; + /** + * the alternative schema type if the condition is true. Required if otherwise is missing. + */ + then?: SchemaLike; + /** + * the alternative schema type if the condition is false. Required if then is missing + */ + otherwise?: SchemaLike; +} + +export interface WhenSchemaOptions { + /** + * the alternative schema type if the condition is true. Required if otherwise is missing. + */ + then?: SchemaLike; + /** + * the alternative schema type if the condition is false. Required if then is missing + */ + otherwise?: SchemaLike; +} + +export interface ReferenceOptions { + separator?: string; + contextPrefix?: string; + default?: any; + strict?: boolean; + functions?: boolean; +} + +// tslint:disable-next-line:interface-name +export interface IPOptions { + version?: string[]; + cidr?: string; +} + +export interface StringRegexOptions { + name?: string; + invert?: boolean; +} + +export interface JoiObject { + isJoi: boolean; +} + +export interface ErrorOptions { + /** + * Boolean value indicating whether the error handler should be used for all errors or only for errors occurring + * on this property (`true` value). + * This concept only makes sense for `array` or `object` schemas as other values don't have children. + * @default false + */ + self?: boolean; +} + +export interface ValidationError extends Error, JoiObject { + details: ValidationErrorItem[]; + annotate(): string; + _object: any; +} + +export interface ValidationErrorItem { + message: string; + type: string; + path: string[]; + options?: ValidationOptions; + context?: Context; +} + +export type ValidationErrorFunction = (errors: ValidationErrorItem[]) => string | ValidationErrorItem | ValidationErrorItem[] | Error; + +export interface ValidationResult extends Pick, 'then' | 'catch'> { + error: ValidationError; + value: T; +} + +export type SchemaLike = string | number | boolean | object | null | Schema | SchemaMap; + +export interface SchemaMap { + [key: string]: SchemaLike | SchemaLike[]; +} + +export type Schema = AnySchema + | ArraySchema + | AlternativesSchema + | BinarySchema + | BooleanSchema + | DateSchema + | FunctionSchema + | NumberSchema + | ObjectSchema + | StringSchema + | LazySchema; + +export interface AnySchema extends JoiObject { + schemaType?: Types | string; + + /** + * Validates a value using the schema and options. + */ + validate(value: T, options?: ValidationOptions): ValidationResult; + validate(value: T, callback: (err: ValidationError, value: T) => R): R; + validate(value: T, options: ValidationOptions, callback: (err: ValidationError, value: T) => R): R; + + /** + * Whitelists a value + */ + allow(...values: any[]): this; + allow(values: any[]): this; + + /** + * By default, some Joi methods to function properly need to rely on the Joi instance they are attached to because + * they use `this` internally. + * So `Joi.string()` works but if you extract the function from it and call `string()` it won't. + * `bind()` creates a new Joi instance where all the functions relying on `this` are bound to the Joi instance. + */ + bind(): this; + + /** + * Adds the provided values into the allowed whitelist and marks them as the only valid values allowed. + */ + valid(...values: any[]): this; + valid(values: any[]): this; + only(...values: any[]): this; + only(values: any[]): this; + equal(...values: any[]): this; + equal(values: any[]): this; + + /** + * Blacklists a value + */ + invalid(...values: any[]): this; + invalid(values: any[]): this; + disallow(...values: any[]): this; + disallow(values: any[]): this; + not(...values: any[]): this; + not(values: any[]): this; + + /** + * Marks a key as required which will not allow undefined as value. All keys are optional by default. + */ + required(): this; + exist(): this; + + /** + * Marks a key as optional which will allow undefined as values. Used to annotate the schema for readability as all keys are optional by default. + */ + optional(): this; + + /** + * Marks a key as forbidden which will not allow any value except undefined. Used to explicitly forbid keys. + */ + forbidden(): this; + + /** + * Marks a key to be removed from a resulting object or array after validation. Used to sanitize output. + */ + strip(): this; + + /** + * Annotates the key + */ + description(desc: string): this; + + /** + * Annotates the key + */ + notes(notes: string | string[]): this; + + /** + * Annotates the key + */ + tags(notes: string | string[]): this; + + /** + * Attaches metadata to the key. + */ + meta(meta: object): this; + + /** + * Annotates the key with an example value, must be valid. + */ + example(value: any): this; + + /** + * Annotates the key with an unit name. + */ + unit(name: string): this; + + /** + * Overrides the global validate() options for the current key and any sub-key. + */ + options(options: ValidationOptions): this; + + /** + * Sets the options.convert options to false which prevent type casting for the current key and any child keys. + */ + strict(isStrict?: boolean): this; + + /** + * Sets a default value if the original value is undefined. + * @param value - the value. + * value supports references. + * value may also be a function which returns the default value. + * If value is specified as a function that accepts a single parameter, that parameter will be a context + * object that can be used to derive the resulting value. This clones the object however, which incurs some + * overhead so if you don't need access to the context define your method so that it does not accept any + * parameters. + * Without any value, default has no effect, except for object that will then create nested defaults + * (applying inner defaults of that object). + * + * Note that if value is an object, any changes to the object after default() is called will change the + * reference and any future assignment. + * + * Additionally, when specifying a method you must either have a description property on your method or the + * second parameter is required. + */ + default(value?: any, description?: string): this; + + /** + * Returns a new type that is the result of adding the rules of one type to another. + */ + concat(schema: this): this; + + /** + * Converts the type into an alternatives type where the conditions are merged into the type definition where: + */ + when(ref: string | Reference, options: WhenOptions): AlternativesSchema; + when(ref: Schema, options: WhenSchemaOptions): AlternativesSchema; + + /** + * Overrides the key name in error messages. + */ + label(name: string): this; + + /** + * Outputs the original untouched value instead of the casted value. + */ + raw(isRaw?: boolean): this; + + /** + * Considers anything that matches the schema to be empty (undefined). + * @param schema - any object or joi schema to match. An undefined schema unsets that rule. + */ + empty(schema?: SchemaLike): this; + + /** + * Overrides the default joi error with a custom error if the rule fails where: + * @param err - can be: + * an instance of `Error` - the override error. + * a `function(errors)`, taking an array of errors as argument, where it must either: + * return a `string` - substitutes the error message with this text + * return a single ` object` or an `Array` of it, where: + * `type` - optional parameter providing the type of the error (eg. `number.min`). + * `message` - optional parameter if `template` is provided, containing the text of the error. + * `template` - optional parameter if `message` is provided, containing a template string, using the same format as usual joi language errors. + * `context` - optional parameter, to provide context to your error if you are using the `template`. + * return an `Error` - same as when you directly provide an `Error`, but you can customize the error message based on the errors. + * + * Note that if you provide an `Error`, it will be returned as-is, unmodified and undecorated with any of the + * normal joi error properties. If validation fails and another error is found before the error + * override, that error will be returned and the override will be ignored (unless the `abortEarly` + * option has been set to `false`). + */ + error(err: Error | ValidationErrorFunction, options?: ErrorOptions): this; + + /** + * Returns a plain object representing the schema's rules and properties + */ + describe(): Description; +} + +export interface Description { + type?: Types | string; + label?: string; + description?: string; + flags?: object; + notes?: string[]; + tags?: string[]; + meta?: any[]; + example?: any[]; + valids?: any[]; + invalids?: any[]; + unit?: string; + options?: ValidationOptions; + [key: string]: any; +} + +export interface Context { + [key: string]: any; + key?: string; + label?: string; +} + +export interface State { + key?: string; + path?: string; + parent?: any; + reference?: any; +} + +export interface BooleanSchema extends AnySchema { + /** + * Allows for additional values to be considered valid booleans by converting them to true during validation. + * Accepts a value or an array of values. String comparisons are by default case insensitive, + * see boolean.insensitive() to change this behavior. + * @param values - strings, numbers or arrays of them + */ + truthy(...values: Array): this; + + /** + * Allows for additional values to be considered valid booleans by converting them to false during validation. + * Accepts a value or an array of values. String comparisons are by default case insensitive, + * see boolean.insensitive() to change this behavior. + * @param values - strings, numbers or arrays of them + */ + falsy(...values: Array): this; + + /** + * Allows the values provided to truthy and falsy as well as the "true" and "false" default conversion + * (when not in strict() mode) to be matched in a case insensitive manner. + */ + insensitive(enabled?: boolean): this; +} + +export interface NumberSchema extends AnySchema { + /** + * Specifies the minimum value. + * It can also be a reference to another field. + */ + min(limit: number | Reference): this; + + /** + * Specifies the maximum value. + * It can also be a reference to another field. + */ + max(limit: number | Reference): this; + + /** + * Specifies that the value must be greater than limit. + * It can also be a reference to another field. + */ + greater(limit: number | Reference): this; + + /** + * Specifies that the value must be less than limit. + * It can also be a reference to another field. + */ + less(limit: number | Reference): this; + + /** + * Requires the number to be an integer (no floating point). + */ + integer(): this; + + /** + * Allows the number to be outside of JavaScript's safety range (Number.MIN_SAFE_INTEGER & Number.MAX_SAFE_INTEGER). + */ + unsafe(enabled?: boolean): this; + + /** + * Specifies the maximum number of decimal places where: + * @param limit - the maximum number of decimal places allowed. + */ + precision(limit: number): this; + + /** + * Specifies that the value must be a multiple of base. + */ + multiple(base: number): this; + + /** + * Requires the number to be positive. + */ + positive(): this; + + /** + * Requires the number to be negative. + */ + negative(): this; + + /** + * Requires the number to be a TCP port, so between 0 and 65535. + */ + port(): this; +} + +export interface StringSchema extends AnySchema { + /** + * Allows the value to match any whitelist of blacklist item in a case insensitive comparison. + */ + insensitive(): this; + + /** + * Specifies the minimum number string characters. + * @param limit - the minimum number of string characters required. It can also be a reference to another field. + * @param encoding - if specified, the string length is calculated in bytes using the provided encoding. + */ + min(limit: number | Reference, encoding?: string): this; + + /** + * Specifies the maximum number of string characters. + * @param limit - the maximum number of string characters allowed. It can also be a reference to another field. + * @param encoding - if specified, the string length is calculated in bytes using the provided encoding. + */ + max(limit: number | Reference, encoding?: string): this; + + /** + * Specifies whether the string.max() limit should be used as a truncation. + * @param enabled - optional parameter defaulting to true which allows you to reset the behavior of truncate by providing a falsy value. + */ + truncate(enabled?: boolean): this; + + /** + * Requires the string value to be in a unicode normalized form. If the validation convert option is on (enabled by default), the string will be normalized. + * @param form - The unicode normalization form to use. Valid values: NFC [default], NFD, NFKC, NFKD + */ + normalize(form?: 'NFC' | 'NFD' | 'NFKC' | 'NFKD'): this; + + /** + * Requires the string value to be a valid base64 string; does not check the decoded value. + * @param options - optional settings: The unicode normalization options to use. Valid values: NFC [default], NFD, NFKC, NFKD + */ + base64(options?: Base64Options): this; + + /** + * Requires the number to be a credit card number (Using Lunh Algorithm). + */ + creditCard(): this; + + /** + * Specifies the exact string length required + * @param limit - the required string length. It can also be a reference to another field. + * @param encoding - if specified, the string length is calculated in bytes using the provided encoding. + */ + length(limit: number | Reference, encoding?: string): this; + + /** + * Defines a regular expression rule. + * @param pattern - a regular expression object the string value must match against. + * @param options - optional, can be: + * Name for patterns (useful with multiple patterns). Defaults to 'required'. + * An optional configuration object with the following supported properties: + * name - optional pattern name. + * invert - optional boolean flag. Defaults to false behavior. If specified as true, the provided pattern will be disallowed instead of required. + */ + regex(pattern: RegExp, options?: string | StringRegexOptions): this; + + /** + * Replace characters matching the given pattern with the specified replacement string where: + * @param pattern - a regular expression object to match against, or a string of which all occurrences will be replaced. + * @param replacement - the string that will replace the pattern. + */ + replace(pattern: RegExp | string, replacement: string): this; + + /** + * Requires the string value to only contain a-z, A-Z, and 0-9. + */ + alphanum(): this; + + /** + * Requires the string value to only contain a-z, A-Z, 0-9, and underscore _. + */ + token(): this; + + /** + * Requires the string value to be a valid email address. + */ + email(options?: EmailOptions): this; + + /** + * Requires the string value to be a valid ip address. + */ + ip(options?: IpOptions): this; + + /** + * Requires the string value to be a valid RFC 3986 URI. + */ + uri(options?: UriOptions): this; + + /** + * Requires the string value to be a valid data URI string. + */ + dataUri(options?: DataUriOptions): this; + + /** + * Requires the string value to be a valid GUID. + */ + guid(options?: GuidOptions): this; + + /** + * Alias for `guid` -- Requires the string value to be a valid GUID + */ + uuid(options?: GuidOptions): this; + + /** + * Requires the string value to be a valid hexadecimal string. + */ + hex(options?: HexOptions): this; + + /** + * Requires the string value to be a valid hostname as per RFC1123. + */ + hostname(): this; + + /** + * Requires the string value to be in valid ISO 8601 date format. + */ + isoDate(): this; + + /** + * Requires the string value to be all lowercase. If the validation convert option is on (enabled by default), the string will be forced to lowercase. + */ + lowercase(): this; + + /** + * Requires the string value to be all uppercase. If the validation convert option is on (enabled by default), the string will be forced to uppercase. + */ + uppercase(): this; + + /** + * Requires the string value to contain no whitespace before or after. If the validation convert option is on (enabled by default), the string will be trimmed. + */ + trim(): this; +} + +export interface SymbolSchema extends AnySchema { + // TODO: support number and symbol index + map(iterable: Iterable<[string | number | boolean | symbol, symbol]> | { [key: string]: symbol }): this; +} + +export interface ArraySchema extends AnySchema { + /** + * Verifies that an assertion passes for at least one item in the array, where: + * `schema` - the validation rules required to satisfy the assertion. If the `schema` includes references, they are resolved against + * the array item being tested, not the value of the `ref` target. + */ + has(schema: SchemaLike): this; + /** + * Allow this array to be sparse. + * enabled can be used with a falsy value to go back to the default behavior. + */ + sparse(enabled?: any): this; + + /** + * Allow single values to be checked against rules as if it were provided as an array. + * enabled can be used with a falsy value to go back to the default behavior. + */ + single(enabled?: any): this; + + /** + * List the types allowed for the array values. + * type can be an array of values, or multiple values can be passed as individual arguments. + * If a given type is .required() then there must be a matching item in the array. + * If a type is .forbidden() then it cannot appear in the array. + * Required items can be added multiple times to signify that multiple items must be found. + * Errors will contain the number of items that didn't match. + * Any unmatched item having a label will be mentioned explicitly. + * + * @param type - a joi schema object to validate each array item against. + */ + items(...types: SchemaLike[]): this; + items(types: SchemaLike[]): this; + + /** + * Lists the types in sequence order for the array values where: + * @param type - a joi schema object to validate against each array item in sequence order. type can be an array of values, or multiple values can be passed as individual arguments. + * If a given type is .required() then there must be a matching item with the same index position in the array. + * Errors will contain the number of items that didn't match. + * Any unmatched item having a label will be mentioned explicitly. + */ + ordered(...types: SchemaLike[]): this; + ordered(types: SchemaLike[]): this; + + /** + * Specifies the minimum number of items in the array. + */ + min(limit: number): this; + + /** + * Specifies the maximum number of items in the array. + */ + max(limit: number): this; + + /** + * Specifies the exact number of items in the array. + */ + length(limit: number | Reference): this; + + /** + * Requires the array values to be unique. + * Be aware that a deep equality is performed on elements of the array having a type of object, + * a performance penalty is to be expected for this kind of operation. + */ + unique(comparator?: string): this; + unique(comparator?: (a: T, b: T) => boolean): this; +} + +export interface ObjectSchema extends AnySchema { + /** + * Sets or extends the allowed object keys. + */ + keys(schema?: SchemaMap): this; + + /** + * Appends the allowed object keys. If schema is null, undefined, or {}, no changes will be applied. + */ + append(schema?: SchemaMap): this; + + /** + * Specifies the minimum number of keys in the object. + */ + min(limit: number): this; + + /** + * Specifies the maximum number of keys in the object. + */ + max(limit: number): this; + + /** + * Specifies the exact number of keys in the object. + */ + length(limit: number): this; + + /** + * Requires the object to be a Joi schema instance. + */ + schema(): this; + + /** + * Specify validation rules for unknown keys matching a pattern. + * + * @param pattern - a pattern that can be either a regular expression or a joi schema that will be tested against the unknown key names + * @param schema - the schema object matching keys must validate against + */ + pattern(pattern: RegExp | SchemaLike, schema: SchemaLike): this; + + /** + * Defines an all-or-nothing relationship between keys where if one of the peers is present, all of them are required as well. + * @param peers - the key names of which if one present, all are required. peers can be a single string value, + * an array of string values, or each peer provided as an argument. + */ + and(...peers: string[]): this; + and(peers: string[]): this; + + /** + * Defines a relationship between keys where not all peers can be present at the same time. + * @param peers - the key names of which if one present, the others may not all be present. + * peers can be a single string value, an array of string values, or each peer provided as an argument. + */ + nand(...peers: string[]): this; + nand(peers: string[]): this; + + /** + * Defines a relationship between keys where one of the peers is required (and more than one is allowed). + */ + or(...peers: string[]): this; + or(peers: string[]): this; + + /** + * Defines an exclusive relationship between a set of keys where only one is allowed but none are required where: + * `peers` - the exclusive key names that must not appear together but where none are required. + */ + oxor(...peers: string[]): this; + oxor(peers: string[]): this; + + /** + * Defines an exclusive relationship between a set of keys. one of them is required but not at the same time where: + */ + xor(...peers: string[]): this; + xor(peers: string[]): this; + + /** + * Requires the presence of other keys whenever the specified key is present. + */ + with(key: string, peers: string | string[]): this; + + /** + * Forbids the presence of other keys whenever the specified is present. + */ + without(key: string, peers: string | string[]): this; + + /** + * Renames a key to another name (deletes the renamed key). + */ + rename(from: string, to: string, options?: RenameOptions): this; + + /** + * Verifies an assertion where. + */ + assert(ref: string | Reference, schema: SchemaLike, message?: string): this; + + /** + * Overrides the handling of unknown keys for the scope of the current object only (does not apply to children). + */ + unknown(allow?: boolean): this; + + /** + * Requires the object to be an instance of a given constructor. + * + * @param constructor - the constructor function that the object must be an instance of. + * @param name - an alternate name to use in validation errors. This is useful when the constructor function does not have a name. + */ + // tslint:disable-next-line:ban-types + type(constructor: Function, name?: string): this; + + /** + * Sets the specified children to required. + * + * @param children - can be a single string value, an array of string values, or each child provided as an argument. + * + * var schema = Joi.object().keys({ a: { b: Joi.number() }, c: { d: Joi.string() } }); + * var requiredSchema = schema.requiredKeys('', 'a.b', 'c', 'c.d'); + * + * Note that in this example '' means the current object, a is not required but b is, as well as c and d. + */ + requiredKeys(children: string[]): this; + requiredKeys(...children: string[]): this; + + /** + * Sets the specified children to optional. + * + * @param children - can be a single string value, an array of string values, or each child provided as an argument. + * + * The behavior is exactly the same as requiredKeys. + */ + optionalKeys(children: string[]): this; + optionalKeys(...children: string[]): this; + + /** + * Sets the specified children to forbidden. + * + * @param children - can be a single string value, an array of string values, or each child provided as an argument. + * + * const schema = Joi.object().keys({ a: { b: Joi.number().required() }, c: { d: Joi.string().required() } }); + * const optionalSchema = schema.forbiddenKeys('a.b', 'c.d'); + * + * The behavior is exactly the same as requiredKeys. + */ + forbiddenKeys(children: string[]): this; + forbiddenKeys(...children: string[]): this; +} + +export interface BinarySchema extends AnySchema { + /** + * Sets the string encoding format if a string input is converted to a buffer. + */ + encoding(encoding: string): this; + + /** + * Specifies the minimum length of the buffer. + */ + min(limit: number): this; + + /** + * Specifies the maximum length of the buffer. + */ + max(limit: number): this; + + /** + * Specifies the exact length of the buffer: + */ + length(limit: number): this; +} + +export interface DateSchema extends AnySchema { + /** + * Specifies that the value must be greater than date. + * Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date, + * allowing to explicitly ensure a date is either in the past or in the future. + * It can also be a reference to another field. + */ + greater(date: 'now' | Date | number | string | Reference): this; + + /** + * Specifies that the value must be less than date. + * Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date, + * allowing to explicitly ensure a date is either in the past or in the future. + * It can also be a reference to another field. + */ + less(date: 'now' | Date | number | string | Reference): this; + + /** + * Specifies the oldest date allowed. + * Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date, + * allowing to explicitly ensure a date is either in the past or in the future. + * It can also be a reference to another field. + */ + min(date: 'now' | Date | number | string | Reference): this; + + /** + * Specifies the latest date allowed. + * Notes: 'now' can be passed in lieu of date so as to always compare relatively to the current date, + * allowing to explicitly ensure a date is either in the past or in the future. + * It can also be a reference to another field. + */ + max(date: 'now' | Date | number | string | Reference): this; + + /** + * Specifies the allowed date format: + * @param format - string or array of strings that follow the moment.js format. + */ + format(format: string | string[]): this; + + /** + * Requires the string value to be in valid ISO 8601 date format. + */ + iso(): this; + + /** + * Requires the value to be a timestamp interval from Unix Time. + * @param type - the type of timestamp (allowed values are unix or javascript [default]) + */ + timestamp(type?: 'javascript' | 'unix'): this; +} + +export interface FunctionSchema extends AnySchema { + /** + * Specifies the arity of the function where: + * @param n - the arity expected. + */ + arity(n: number): this; + + /** + * Specifies the minimal arity of the function where: + * @param n - the minimal arity expected. + */ + minArity(n: number): this; + + /** + * Specifies the minimal arity of the function where: + * @param n - the minimal arity expected. + */ + maxArity(n: number): this; + + /** + * Requires the function to be a Joi reference. + */ + ref(): this; +} + +export interface AlternativesSchema extends AnySchema { + try(types: SchemaLike[]): this; + try(...types: SchemaLike[]): this; + when(ref: string | Reference, options: WhenOptions): this; + when(ref: Schema, options: WhenSchemaOptions): this; +} + +export interface LazySchema extends AnySchema { +} + +export interface Reference extends JoiObject { + (value: any, validationOptions: ValidationOptions): any; + isContext: boolean; + key: string; + path: string; + toString(): string; +} + +export type ExtensionBoundSchema = Schema & { + /** + * Creates a joi error object. + * Used in conjunction with custom rules. + * @param type - the type of rule to create the error for. + * @param context - provide properties that will be available in the `language` templates. + * @param state - should the context passed into the `validate` function in a custom rule + * @param options - should the context passed into the `validate` function in a custom rule + */ + createError(type: string, context: Context, state: State, options: ValidationOptions): Err; +}; + +export interface Rules

{ + name: string; + params?: ObjectSchema | {[key in keyof P]: SchemaLike; }; + setup?(this: ExtensionBoundSchema, params: P): Schema | void; + validate?(this: ExtensionBoundSchema, params: P, value: any, state: State, options: ValidationOptions): any; + description?: string | ((params: P) => string); +} + +export interface Extension { + name: string; + base?: Schema; + language?: LanguageOptions; + coerce?(this: ExtensionBoundSchema, value: any, state: State, options: ValidationOptions): any; + pre?(this: ExtensionBoundSchema, value: any, state: State, options: ValidationOptions): any; + describe?(this: Schema, description: Description): Description; + rules?: Rules[]; +} + +export interface Err extends JoiObject { + toString(): string; +} + +export interface LazyOptions { + /** + * If true the schema generator will only be called once and the result will be cached. + */ + once?: boolean; +} + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +/** + * Current version of the joi package. + */ +export const version: string; + +/** + * Generates a schema object that matches any data type. + */ +export function any(): AnySchema; + +/** + * Generates a schema object that matches an array data type. + */ +export function array(): ArraySchema; + +/** + * Generates a schema object that matches a boolean data type (as well as the strings 'true', 'false', 'yes', and 'no'). Can also be called via bool(). + */ +export function bool(): BooleanSchema; + +export function boolean(): BooleanSchema; + +/** + * Generates a schema object that matches a Buffer data type (as well as the strings which will be converted to Buffers). + */ +export function binary(): BinarySchema; + +/** + * Generates a schema object that matches a date type (as well as a JavaScript date string or number of milliseconds). + */ +export function date(): DateSchema; + +/** + * Generates a schema object that matches a function type. + */ +export function func(): FunctionSchema; + +/** + * Generates a schema object that matches a number data type (as well as strings that can be converted to numbers). + */ +export function number(): NumberSchema; + +/** + * Generates a schema object that matches an object data type (as well as JSON strings that have been parsed into objects). + */ +export function object(schema?: SchemaMap): ObjectSchema; + +/** + * Generates a schema object that matches a string data type. Note that empty strings are not allowed by default and must be enabled with allow(''). + */ +export function string(): StringSchema; + +/** + * Generates a schema object that matches any symbol. + */ +export function symbol(): SymbolSchema; + +/** + * Generates a type that will match one of the provided alternative schemas + */ +export function alternatives(types: SchemaLike[]): AlternativesSchema; +export function alternatives(...types: SchemaLike[]): AlternativesSchema; + +/** + * Alias for `alternatives` + */ +export function alt(types: SchemaLike[]): AlternativesSchema; +export function alt(...types: SchemaLike[]): AlternativesSchema; + +/** + * Generates a placeholder schema for a schema that you would provide with the fn. + * Supports the same methods of the any() type. + * This is mostly useful for recursive schemas + */ +export function lazy(cb: () => Schema, options?: LazyOptions): LazySchema; + +/** + * Validates a value using the given schema and options. + */ +export function validate(value: T, schema: SchemaLike, options?: ValidationOptions): ValidationResult; +export function validate(value: T, schema: SchemaLike, callback: (err: ValidationError, value: T) => R): R; +export function validate(value: T, schema: SchemaLike, options: ValidationOptions, callback: (err: ValidationError, value: T) => R): R; + +/** + * Converts literal schema definition to joi schema object (or returns the same back if already a joi schema object). + */ +export function compile(schema: SchemaLike): Schema; + +/** + * Validates a value against a schema and throws if validation fails. + * + * @param value - the value to validate. + * @param schema - the schema object. + * @param message - optional message string prefix added in front of the error message. may also be an Error object. + */ +export function assert(value: any, schema: SchemaLike, message?: string | Error): void; + +/** + * Validates a value against a schema, returns valid object, and throws if validation fails where: + * + * @param value - the value to validate. + * @param schema - the schema object. + * @param message - optional message string prefix added in front of the error message. may also be an Error object. + */ +export function attempt(value: T, schema: SchemaLike, message?: string | Error): T; + +/** + * Generates a reference to the value of the named key. + */ +export function ref(key: string, options?: ReferenceOptions): Reference; + +/** + * Checks whether or not the provided argument is a reference. It's especially useful if you want to post-process error messages. + */ +export function isRef(ref: any): ref is Reference; + +/** + * Get a sub-schema of an existing schema based on a `path` that can be either a string or an array + * of strings For string values path separator is a dot (`.`) + */ +export function reach(schema: ObjectSchema, path: string | string[]): Schema; + +/** + * Creates a new Joi instance customized with the extension(s) you provide included. + */ +export function extend(extension: Extension|Extension[], ...extensions: Array): any; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +import * as Module from '@hapi/joi'; +export type Root = typeof Module; +export type DefaultsFunction = (root: Schema) => Schema; + +/** + * Creates a new Joi instance that will apply defaults onto newly created schemas + * through the use of the fn function that takes exactly one argument, the schema being created. + * + * @param fn - The function must always return a schema, even if untransformed. + */ +export function defaults(fn: DefaultsFunction): Root; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- +// Below are undocumented APIs. use at your own risk +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + +/** + * Returns a plain object representing the schema's rules and properties + */ +export function describe(schema: Schema): Description; + +/** + * Whitelists a value + */ +export function allow(value: any, ...values: any[]): Schema; +export function allow(values: any[]): Schema; + +/** + * Adds the provided values into the allowed whitelist and marks them as the only valid values allowed. + */ +export function valid(value: any, ...values: any[]): Schema; +export function valid(values: any[]): Schema; +export function only(value: any, ...values: any[]): Schema; +export function only(values: any[]): Schema; +export function equal(value: any, ...values: any[]): Schema; +export function equal(values: any[]): Schema; + +/** + * Blacklists a value + */ +export function invalid(value: any, ...values: any[]): Schema; +export function invalid(values: any[]): Schema; +export function disallow(value: any, ...values: any[]): Schema; +export function disallow(values: any[]): Schema; +export function not(value: any, ...values: any[]): Schema; +export function not(values: any[]): Schema; + +/** + * Marks a key as required which will not allow undefined as value. All keys are optional by default. + */ +export function required(): Schema; + +/** + * Alias of `required`. + */ +export function exist(): Schema; + +/** + * Marks a key as optional which will allow undefined as values. Used to annotate the schema for readability as all keys are optional by default. + */ +export function optional(): Schema; + +/** + * Marks a key as forbidden which will not allow any value except undefined. Used to explicitly forbid keys. + */ +export function forbidden(): Schema; + +/** + * Marks a key to be removed from a resulting object or array after validation. Used to sanitize output. + */ +export function strip(): Schema; + +/** + * Annotates the key + */ +export function description(desc: string): Schema; + +/** + * Annotates the key + */ +export function notes(notes: string | string[]): Schema; + +/** + * Annotates the key + */ +export function tags(notes: string | string[]): Schema; + +/** + * Attaches metadata to the key. + */ +export function meta(meta: object): Schema; + +/** + * Annotates the key with an example value, must be valid. + */ +export function example(value: any): Schema; + +/** + * Annotates the key with an unit name. + */ +export function unit(name: string): Schema; + +/** + * Overrides the global validate() options for the current key and any sub-key. + */ +export function options(options: ValidationOptions): Schema; + +/** + * Sets the options.convert options to false which prevent type casting for the current key and any child keys. + */ +export function strict(isStrict?: boolean): Schema; + +/** + * Returns a new type that is the result of adding the rules of one type to another. + */ +export function concat(schema: T): T; + +/** + * Converts the type into an alternatives type where the conditions are merged into the type definition where: + */ +export function when(ref: string | Reference, options: WhenOptions): AlternativesSchema; +export function when(ref: Schema, options: WhenSchemaOptions): AlternativesSchema; + +/** + * Overrides the key name in error messages. + */ +export function label(name: string): Schema; + +/** + * Outputs the original untouched value instead of the casted value. + */ +export function raw(isRaw?: boolean): Schema; + +/** + * Considers anything that matches the schema to be empty (undefined). + * @param schema - any object or joi schema to match. An undefined schema unsets that rule. + */ +export function empty(schema?: any): Schema; diff --git a/types/hapi__joi/tsconfig.json b/types/hapi__joi/tsconfig.json new file mode 100644 index 0000000000..7cb57e1dd1 --- /dev/null +++ b/types/hapi__joi/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/joi": [ + "hapi__joi" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__joi-tests.ts" + ] +} diff --git a/types/hapi__joi/tslint.json b/types/hapi__joi/tslint.json new file mode 100644 index 0000000000..79fc0653dc --- /dev/null +++ b/types/hapi__joi/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // All are TODOs + "no-empty-interface": false, + "no-self-import": false + } +} diff --git a/types/hapi__lab/hapi__lab-tests.ts b/types/hapi__lab/hapi__lab-tests.ts new file mode 100644 index 0000000000..95a07b1c6a --- /dev/null +++ b/types/hapi__lab/hapi__lab-tests.ts @@ -0,0 +1,169 @@ +import { script, assertions } from "@hapi/lab"; + +const { experiment, describe, suite, test, it, before, beforeEach, after, afterEach } = script(); +const expect = assertions.expect; +const fail = assertions.fail; + +experiment('math', () => { + + before((done) => { + + setTimeout(() => { + + done(); + }, 1000); + }); + + beforeEach((done) => { + + done(); + }); + + test('returns true when 1 + 1 equals 2', (done) => { + + expect(1 + 1).to.equal(2); + done(); + }); +}); + +experiment('math', () => { + + before(() => { + + return Promise.resolve(); + }); + + test('returns true when 1 + 1 equals 2', () => { + + return Promise.resolve() + .then((aValue) => { + + const expectedValue = aValue; + expect(aValue).to.equal(expectedValue); + }); + }); +}); + +experiment.only('with only experiment', () => { + + test('this test will run', (done) => { + + expect(1 + 1).to.equal(2); + done(); + }); + + test('another test that will run', (done) => { + + expect(true).to.equal(true); + done(); + }); +}); + +experiment('with only test', () => { + + test.only('only this test will run', (done) => { + + expect(1 + 1).to.equal(2); + done(); + }); + + test('another test that will not be executed', (done) => { + + done(); + }); +}); + +test('attaches notes', (done) => { + + expect(1 + 1).to.equal(2); + done.note(`The current time is ${Date.now()}`); + done(); +}); + +test('cleanups after test', (done, onCleanup) => { + + if (onCleanup) { + + onCleanup((next) => { + + return next(); + }); + } + + expect(1 + 1).to.equal(2); + done(); +}); + +experiment('my plan', () => { + + test('only a single assertion executes', { plan: 1 }, (done) => { + + expect(1 + 1).to.equal(2); + done(); + }); +}); + +experiment('math', { timeout: 1000 }, () => { + + before({ timeout: 500 }, (done) => { + + done(); + }); + + test('returns true when 1 + 1 equals 2', { parallel: true }, (done) => { + + expect(1 + 1).to.equal(2); + done(); + }); +}); + +describe('math', () => { + + before((done) => { + + done(); + }); + + after((done) => { + + done(); + }); + + afterEach((done) => { + + done(); + }); + + it('returns true when 1 + 1 equals 2', (done) => { + + expect(1 + 1).to.equal(2); + done(); + }); +}); + +suite('math', () => { + + test('returns true when 1 + 1 equals 2', (done) => { + + expect(1 + 1).to.equal(2); + done(); + }); +}); + +describe('expectation', () => { + + it('should be able to expect', (done) => { + + expect(true).to.be.true(); + + done(); + }); + + it('should be able to fail (This test should fail)', (done) => { + + fail('Should fail'); + + done(); + }); + +}); diff --git a/types/hapi__lab/index.d.ts b/types/hapi__lab/index.d.ts new file mode 100644 index 0000000000..af89f16166 --- /dev/null +++ b/types/hapi__lab/index.d.ts @@ -0,0 +1,188 @@ +// Type definitions for @hapi/lab 18.1 +// Project: https://github.com/hapijs/lab +// Definitions by: Prashant Tiwari +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** The test script. */ +export function script(options?: ScriptOptions): Lab & ExperimentAlt & TestAlt; +/** Access the configured assertion library. */ +export const assertions: any; + +interface Lab { + /** Organise tests into an experiment */ + experiment(desc: string, cb: EmptyCallback): void; + + /** Organise tests into an experiment with options */ + experiment(desc: string, options: ExperimentOptions, cb: EmptyCallback): void; + + /** Create a test suite */ + describe(desc: string, cb: EmptyCallback): void; + + /** Create a test suite with options */ + describe(desc: string, options: ExperimentOptions, cb: EmptyCallback): void; + + /** Create a test suite */ + suite(desc: string, cb: EmptyCallback): void; + + /** Create a test suite with options */ + suite(desc: string, options: ExperimentOptions, cb: EmptyCallback): void; + + /** The test spec */ + test(desc: string, cb: TestCallback): void; + + /** The test spec using a promise */ + test(desc: string, promise: TestPromise): void; + + /** The test spec with options */ + test(desc: string, options: TestOptions, cb: TestCallback): void; + + /** The test spec using a promise with options */ + test(desc: string, options: TestOptions, promise: TestPromise): void; + + /** The test spec */ + it(desc: string, cb: TestCallback): void; + + /** The test spec using a promise */ + it(desc: string, promise: TestPromise): void; + + /** The test spec with options */ + it(desc: string, options: TestOptions, cb: TestCallback): void; + + /** The test spec using a promise with options */ + it(desc: string, options: TestOptions, promise: TestPromise): void; + + /** Perform async actions before the test suite */ + before(cb: AsyncCallback): void; + + /** Perform async actions before the test suite using a promise */ + before(promise: AsyncPromise): void; + + /** Perform async actions before the test suite with options */ + before(options: AsyncOptions, cb: AsyncCallback): void; + + /** Perform async actions before the test suite with otions, using a promise */ + before(options: AsyncOptions, promise: AsyncPromise): void; + + /** Perform async actions before each test */ + beforeEach(cb: AsyncCallback): void; + + /** Perform async actions before each test using a promise */ + beforeEach(promise: AsyncPromise): void; + + /** Perform async actions before each test with options */ + beforeEach(options: AsyncOptions, cb: AsyncCallback): void; + + /** Perform async actions before each test with options, using a promise */ + beforeEach(options: AsyncOptions, promise: AsyncPromise): void; + + /** Perform async actions after the test suite */ + after(cb: AsyncCallback): void; + + /** Perform async actions after the test suite using a promise */ + after(promise: AsyncPromise): void; + + /** Perform async actions after the test suite with options */ + after(options: AsyncOptions, cb: AsyncCallback): void; + + /** Perform async actions after the test suite with options, using a promise */ + after(options: AsyncOptions, promise: AsyncPromise): void; + + /** Perform async actions after each test */ + afterEach(cb: AsyncCallback): void; + + /** Perform async actions after each test using a promise */ + afterEach(promise: AsyncPromise): void; + + /** Perform async actions after each test with options */ + afterEach(options: AsyncOptions, cb: AsyncCallback): void; + + /** Perform async actions after each test with options, using a promise */ + afterEach(options: AsyncOptions, promise: AsyncPromise): void; +} + +interface ExperimentAlt { + experiment: SkipOnlyExperiment; + suite: SkipOnlyExperiment; + describe: SkipOnlyExperiment; +} + +interface TestAlt { + test: SkipOnlyTest; + it: SkipOnlyTest; +} + +interface SkipOnlyExperiment { + /** Skip this test suite */ + skip: ExperimentArgs & ExperimentWithOptionsArgs; + + /** Only execute this test suite */ + only: ExperimentArgs & ExperimentWithOptionsArgs; +} + +interface SkipOnlyTest { + /** Skip this test */ + skip: TestArgs & TestWithOptionsArgs; + + /** Only execute this test */ + only: TestArgs & TestWithOptionsArgs; +} + +interface ScriptOptions { + /** Enable auto-execution of the script? (true) */ + schedule?: boolean; + + /** Pass Lab CLI options */ + cli?: any; +} + +interface ExperimentOptions { + /** Set a specific timeout in milliseconds (2000) */ + timeout?: number; + + /** Execute tests in parallel? (false) */ + parallel?: boolean; + + /** Skip execution? (false) */ + skip?: boolean; + + /** Execute only this test/experiment? (false) */ + only?: boolean; +} + +interface TestOptions extends ExperimentOptions { + /** The expected number of assertions to execute */ + plan?: number; +} + +interface AsyncOptions { + /** Set a specific timeout in milliseconds (disabled) */ + timeout?: number; +} + +interface DoneNote { + /** Attach a note to the test case */ + note: (text: string) => void; +} + +type EmptyCallback = () => void; + +type DoneFunction = (err?: Error) => void; + +type CleanupFunction = (func: (next: Function) => void) => void; + +type TestCallback = (done: DoneFunction & DoneNote, onCleanup?: CleanupFunction) => void; + +type TestPromise = () => Promise; + +type AsyncCallback = (done: DoneFunction) => void; + +type AsyncPromise = () => Promise; + +type ExperimentArgs = (desc: string, cb: EmptyCallback) => {}; + +type ExperimentWithOptionsArgs = (desc: string, options: ExperimentOptions, cb: EmptyCallback) => {}; + +type TestArgs = (desc: string, cb: TestCallback) => {}; + +type TestWithOptionsArgs = (desc: string, options: TestOptions, cb: TestCallback) => {} diff --git a/types/hapi__lab/tsconfig.json b/types/hapi__lab/tsconfig.json new file mode 100644 index 0000000000..c303939cd4 --- /dev/null +++ b/types/hapi__lab/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/lab": [ + "hapi__lab" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__lab-tests.ts" + ] +} diff --git a/types/three/tslint.json b/types/hapi__lab/tslint.json similarity index 100% rename from types/three/tslint.json rename to types/hapi__lab/tslint.json diff --git a/types/hapi__mimos/index.d.ts b/types/hapi__mimos/index.d.ts new file mode 100644 index 0000000000..7139e25cc0 --- /dev/null +++ b/types/hapi__mimos/index.d.ts @@ -0,0 +1,28 @@ +// Type definitions for @hapi/mimos 4.1 +// Project: https://github.com/hapijs/mimos +// Definitions by: AJP +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { DataStructure as MimeDbDataStructure } from 'mime-db'; + +/** + * + * @see {@link https://github.com/hapijs/mimos#new-mimosoptions} + */ +export interface MimosOptions { + /** + * an object hash that is merged into the built in mime information specified here {@link https://github.com/jshttp/mime-db}. Each key value pair represents a single mime object. Each override value should follow this schema: + * * the key is the lower-cased correct mime-type. (Ex. "application/javascript"). + * * the value should an object @see MimosOptionsValue + */ + override: {[index: string]: MimosOptionsValue}; +} + +export interface MimosOptionsValue extends MimeDbDataStructure { + /** specify the type value of result objects, defaults to key. See the example below for more clarification. */ + type?: string; + /** method with signature function(mime) when this mime type is found in the database, this function will run. This allows you make customizations to mime based on developer criteria. */ + predicate?: (mime: MimosOptionsValue) => MimosOptionsValue; +} diff --git a/types/hapi__mimos/tsconfig.json b/types/hapi__mimos/tsconfig.json new file mode 100644 index 0000000000..0ed4a577f2 --- /dev/null +++ b/types/hapi__mimos/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/mimos": [ + "hapi__mimos" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts" + ] +} diff --git a/types/hapi__mimos/tslint.json b/types/hapi__mimos/tslint.json new file mode 100644 index 0000000000..3d59f55fda --- /dev/null +++ b/types/hapi__mimos/tslint.json @@ -0,0 +1,80 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "npm-naming": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} diff --git a/types/hapi__podium/hapi__podium-tests.ts b/types/hapi__podium/hapi__podium-tests.ts new file mode 100644 index 0000000000..1368c57119 --- /dev/null +++ b/types/hapi__podium/hapi__podium-tests.ts @@ -0,0 +1,33 @@ +declare var console: { log(...args: any[]): void }; + +import Podium = require('@hapi/podium'); +const podiumObject = new Podium(); // new emitter + +const podiumObject2 = new Podium('event1');// creates new event and calls registerEvent() + +podiumObject.registerEvent('event1'); + +//with optional parameters +podiumObject.registerEvent({ + name: 'event1', + shared: true +}); + +podiumObject.registerEvent('event1'); + +podiumObject.on('event1',function(update){ // Way 1 + console.log('inside autonomous listener without name! data:', update); +}); + +const listener1 = function() { // normal function object + console.log('listener1 called'); +} +podiumObject.on('event1',listener1); // Way 2 + +// podium.addListener(criteria, listener) Same as podium.on(). + +podiumObject.addListener('event1',listener1); + +// podium.once(criteria, listener) Same as calling podium.on() with the count option set to 1. Whenever we call emit(), listener1 will get fired but also get removed, so that it won't get fired on call to emit(). + +podiumObject.once('event1',listener1); diff --git a/types/hapi__podium/index.d.ts b/types/hapi__podium/index.d.ts new file mode 100644 index 0000000000..d48e185097 --- /dev/null +++ b/types/hapi__podium/index.d.ts @@ -0,0 +1,187 @@ +// Type definitions for @hapi/podium 3.4 +// Project: https://github.com/hapijs/podium +// Definitions by: AJP +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/** + * Podium + * Node (semi) compatible event emitter with extra features. + * podium is an event emitter with support for tags, filters, channels, event update cloning, arguments spreading, and other features useful when building large scale applications. While node's native EventEmitter is strictly focused on maximum performance, it lacks many features that do not belong in the core implementation. podium is not restricted by node's performance requirement as it is designed for application layer needs where it's overhead is largely insignificant as implementing these features will have similar cost on top of the native emitter. + * @see {@link https://github.com/hapijs/podium} + */ +interface Podium { + /** + * Creates a new podium emitter + * @param events if present, the value is passed to podium.registerEvent(). + */ + new(events?: Podium.Events[]): Podium; + new(events?: Podium.Events): Podium; + + /** + * podium.registerEvent(events) + * Register the specified events and their optional configuration. Events must be registered before they can be emitted or subscribed to. This is done to detect event name mispelling and invalid event activities. + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumregistereventevents} + */ + registerEvent(events: Podium.Events[]): void; + registerEvent(events: Podium.Events): void; + + /** + * podium.registerPodium(podiums) + * Registers another emitter as an event source for the current emitter (any event update emitted by the source emitter is passed to any subscriber of the current emitter) + * Note that any events registered with a source emitter are automatically added to the current emitter. If the events are already registered, they are left as-is. + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumregisterpodiumpodiums} + */ + registerPodium(podiums: Podium[]): void; + registerPodium(podiums: Podium): void; + + /** + * podium.emit(criteria, data, [callback]) + * Emits an event update to all the subscribed listeners + * @param criteria the event update criteria + * @param data the value emitted to the subscribers. + * @param callback an optional callback method invoked when all subscribers have been notified using the signature function() + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumemitcriteria-data-callback} + */ + emit(criteria: string | {name: string, channel?: string, tags?: string | string[]}, data: any, callback?: (() => void)): void; + + /** + * podium.on(criteria, listener) + * Subscribe a handler to an event + * @param criteria the subscription criteria + * @param listener the handler method set to receive event updates. The function signature depends on the block, spread, and tags options. + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumoncriteria-listener} + */ + on(criteria: string | Podium.Criteria, listener: Podium.Listener): void; + + /** + * podium.addListener(criteria, listener) + * Same as podium.on() + * @param criteria the subscription criteria + * @param listener the handler method set to receive event updates. The function signature depends on the block, spread, and tags options. + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumoncriteria-listener} + */ + addListener(criteria: string | Podium.Criteria, listener: Podium.Listener): void; + + /** + * podium.once(criteria, listener) + * Same as podium.on() with the count option set to 1. + * @param criteria the subscription criteria + * @param listener the handler method set to receive event updates. The function signature depends on the block, spread, and tags options. + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumoncriteria-listener} + */ + once(criteria: string | Podium.Criteria, listener: Podium.Listener): void; + + /** + * podium.removeListener(name, listener) + * Removes all listeners subscribed to a given event name matching the provided listener method where: + * @param name the event name string. + * @param listener the function reference provided when subscribed. + * Returns a reference to the current emitter. + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumremovelistenername-listener} + */ + removeListener(name: string, listener: Podium.Listener): Podium; + + /** + * podium.removeAllListeners(name) + * Removes all listeners subscribed to a given event name + * @param name the event name string. + * Returns a reference to the current emitter. + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumremovealllistenersname} + */ + removeAllListeners(name: string): Podium; + + /** + * podium.hasListeners(name) + * Returns whether an event has any listeners subscribed + * @param name the event name string. + * Returns true if the event name has any listeners, otherwise false. + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumhaslistenersname} + */ + hasListeners(name: string): boolean; +} + +declare namespace Podium { + /** + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumregistereventevents} + */ + export type Events = string | EventOptionsObject | Podium; + + /** + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumregistereventevents} + */ + export interface EventOptionsObject { + /** the event name string (required). */ + name: string; + /** a string or array of strings specifying the event channels available. Defaults to no channel restrictions (event updates can specify a channel or not). */ + channels?: string | string[]; + /** if true, the data object passed to podium.emit() is cloned before it is passed to the listeners (unless an override specified by each listener). Defaults to false (data is passed as-is). */ + clone?: boolean; + /** if true, the data object passed to podium.emit() must be an array and the listener method is called with each array element passed as a separate argument (unless an override specified by each listener). This should only be used when the emitted data structure is known and predictable. Defaults to false (data is emitted as a single argument regardless of its type). */ + spread?: boolean; + /** if true and the criteria object passed to podium.emit() includes tags, the tags are mapped to an object (where each tag string is the key and the value is true) which is appended to the arguments list at the end (but before the callback argument if block is set). A configuration override can be set by each listener. Defaults to false. */ + tags?: boolean; + /** if true, the same event name can be registered multiple times where the second registration is ignored. Note that if the registration config is changed between registrations, only the first configuration is used. Defaults to false (a duplicate registration will throw an error). */ + shared?: boolean; + } + + /** + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumoncriteria-listener} + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumaddlistenercriteria-listener} + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumoncecriteria-listener} + */ + export interface CriteriaObject { + /** the event name string (required). */ + name: string; + /** if true, the listener method receives an additional callback argument which must be called when the method completes. No other event will be emitted until the callback methods is called. The method signature is function(). If block is set to a positive integer, the value is used to set a timeout after which any pending events will be emitted, ignoring the eventual call to callback. Defaults to false (non blocking). */ + block?: boolean | number; + /** a string or array of strings specifying the event channels to subscribe to. If the event registration specified a list of allowed channels, the channels array must match the allowed channels. If channels are specified, event updates without any channel designation will not be included in the subscription. Defaults to no channels filter. */ + channels?: string | string[]; + /** if true, the data object passed to podium.emit() is cloned before it is passed to the listener method. Defaults to the event registration option (which defaults to false). */ + clone?: boolean; + /** a positive integer indicating the number of times the listener can be called after which the subscription is automatically removed. A count of 1 is the same as calling podium.once(). Defaults to no limit. */ + count?: number; + /** + * the event tags (if present) to subscribe to which can be one of: + * * a tag string. + * * an array of tag strings. + * * an object with the following: + */ + filter?: string | string[] | CriteriaFilterOptionsObject; + /** if true, and the data object passed to podium.emit() is an array, the listener method is called with each array element passed as a separate argument. This should only be used when the emitted data structure is known and predictable. Defaults to the event registration option (which defaults to false). */ + spread?: boolean; + /** if true and the criteria object passed to podium.emit() includes tags, the tags are mapped to an object (where each tag string is the key and the value is true) which is appended to the arguments list at the end (but before the callback argument if block is set). Defaults to the event registration option (which defaults to false). */ + tags?: boolean; + /** the handler method set to receive event updates. The function signature depends on the block, spread, and tags options. */ + listener?: Listener; + } + + /** + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumoncriteria-listener} + */ + export interface CriteriaFilterOptionsObject { + /** a tag string or array of tag strings. */ + tags?: string | string[]; + /** if true, all tags must be present for the event update to match the subscription. Defaults to false (at least one matching tag). */ + all?: boolean; + } + + /** + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumoncriteria-listener} + */ + export type Criteria = string | CriteriaObject; + + /** + * @see {@link https://github.com/hapijs/podium/blob/master/API.md#podiumoncriteria-listener} + */ + export interface Listener { + (data: any, tags?: Tags, callback?: () => void): void; + } + + export type Tags = {[tag: string]: boolean}; +} + +declare var Podium: Podium; + +export = Podium; diff --git a/types/hapi__podium/tsconfig.json b/types/hapi__podium/tsconfig.json new file mode 100644 index 0000000000..b20db147b5 --- /dev/null +++ b/types/hapi__podium/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/podium": [ + "hapi__podium" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__podium-tests.ts" + ] +} diff --git a/types/hapi__podium/tslint.json b/types/hapi__podium/tslint.json new file mode 100644 index 0000000000..3d59f55fda --- /dev/null +++ b/types/hapi__podium/tslint.json @@ -0,0 +1,80 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "npm-naming": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} diff --git a/types/hapi__shot/hapi__shot-tests.ts b/types/hapi__shot/hapi__shot-tests.ts new file mode 100644 index 0000000000..ce8b828e53 --- /dev/null +++ b/types/hapi__shot/hapi__shot-tests.ts @@ -0,0 +1,20 @@ +// From: https://github.com/hapijs/shot#example + +// Load modules + +import { IncomingMessage, ServerResponse, createServer } from 'http'; +import { inject } from '@hapi/shot'; + +// Declare internals + +async function main() { + const dispatch = (req: IncomingMessage, res: ServerResponse) => { + const reply = 'Hello World'; + res.writeHead(200, { 'Content-Type': 'text/plain', 'Content-Length': reply.length }); + res.end(reply); + }; + + const server = createServer(dispatch); + + console.log((await inject(dispatch, { method: 'get', url: '/', headers: { test: 'asd', test2: ['a', 'b'] } })).payload); +} diff --git a/types/hapi__shot/index.d.ts b/types/hapi__shot/index.d.ts new file mode 100644 index 0000000000..c16503d58d --- /dev/null +++ b/types/hapi__shot/index.d.ts @@ -0,0 +1,108 @@ +// Type definitions for @hapi/shot 4.1 +// Project: https://github.com/hapijs/shot +// Definitions by: AJP +// Simon Schick +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +import { ServerResponse } from "http"; +import { Readable, Stream } from "stream"; + +/** + * Injects a fake request into an HTTP server. + * @param dispatchFunc listener function. The same as you would pass to Http.createServer when making a node HTTP server. @see IListener + * @param options request options object @see RequestOptions + * @see {@link https://github.com/hapijs/shot/blob/master/API.md#shotinjectdispatchfunc-options-callback} + */ +export function inject(dispatchFunc: Listener, options: RequestOptions): Promise; + +/** + * Checks if given object obj is a Shot Request object. + * @see {@link https://github.com/hapijs/shot/blob/master/API.md#shotisinjectionobj} + */ +export function isInjection(obj: any): boolean; + +/** + * listener function. The same as you would pass to Http.createServer when making a node HTTP server. Has the signature function (req, res) where: + * * req - a simulated request object. Inherits from Stream.Readable. + * * res - a simulated response object. Inherits from node's Http.ServerResponse. + * @see {@link https://github.com/hapijs/shot/blob/master/API.md#shotinjectdispatchfunc-options-callback} + */ +export type Listener = (req: SimulatedRequestObject, res: SimulatedResponseObject) => void; + +/** + * a simulated request object. Inherits from Stream.Readable. + * @see {@link https://github.com/hapijs/shot/blob/master/API.md#shotinjectdispatchfunc-options-callback} + */ +// tslint:disable-next-line:no-empty-interface +export interface SimulatedRequestObject extends Readable {} + +/** + * a simulated response object. Inherits from node's Http.ServerResponse. + * @see {@link https://github.com/hapijs/shot/blob/master/API.md#shotinjectdispatchfunc-options-callback} + */ +// tslint:disable-next-line:no-empty-interface +export interface SimulatedResponseObject extends ServerResponse {} + +/** + * @see {@link https://github.com/hapijs/shot/blob/master/API.md#shotinjectdispatchfunc-options-callback} + */ +export interface RequestOptions { + /** a string specifying the request URL. */ + url: string; + /** a string specifying the HTTP request method, defaulting to 'GET'. */ + method?: string; + /** a string specifying the HTTP HOST header value to be used if no header is provided, and the url does not include an authority component. Defaults to 'localhost'. */ + authority?: string; + /** an optional object containing request headers. */ + headers?: Headers; + /** an optional string specifying the client remote address. Defaults to '127.0.0.1'. */ + remoteAddress?: string; + /** an optional request payload. Can be a string, Buffer, Stream or object. */ + payload?: string | Buffer | Stream | object; + /** an object containing flags to simulate various conditions: */ + simulate?: { + /** indicates whether the request will fire an end event. Defaults to undefined, meaning an end event will fire. */ + end?: boolean; + /** indicates whether the request payload will be split into chunks. Defaults to `undefined`, meaning payload will not be chunked. */ + split?: boolean; + /** whether the request will emit an error event. Defaults to undefined, meaning no error event will be emitted. If set to true, the emitted error will have a message of 'Simulated'. */ + error?: boolean; + /** whether the request will emit a close event. Defaults to undefined, meaning no close event will be emitted. */ + close?: boolean; + }; + /** Optional flag to validate this options object. Defaults to true. */ + validate?: boolean; +} + +export interface Headers { + [header: string]: string | string[]; +} + +/** + * @see {@link https://github.com/hapijs/shot/blob/master/API.md#shotinjectdispatchfunc-options-callback} + */ +export interface ResponseObject { + /** an object containing the raw request and response objects where: */ + raw: { + /** the simulated request object. */ + req: SimulatedRequestObject; + /** the simulated response object. */ + res: SimulatedResponseObject; + }; + /** an object containing the response headers. */ + headers: Headers; + /** the HTTP status code. */ + statusCode: number; + /** the HTTP status message. */ + statusMessage: string; + /** the payload as a UTF-8 encoded string. */ + payload: string; + /** the raw payload as a Buffer. */ + rawPayload: Buffer; + /** an object containing the response trailers. */ + trailers: {[index: string]: any}; +} diff --git a/types/hapi__shot/tsconfig.json b/types/hapi__shot/tsconfig.json new file mode 100644 index 0000000000..cfa26b5bc9 --- /dev/null +++ b/types/hapi__shot/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/shot": [ + "hapi__shot" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__shot-tests.ts" + ] +} diff --git a/types/hapi__shot/tslint.json b/types/hapi__shot/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/hapi__shot/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/hapi__topo/hapi__topo-tests.ts b/types/hapi__topo/hapi__topo-tests.ts new file mode 100644 index 0000000000..5d45d1cdf8 --- /dev/null +++ b/types/hapi__topo/hapi__topo-tests.ts @@ -0,0 +1,15 @@ +import Topo = require('@hapi/topo'); + +const morning = new Topo(); + +morning.add('Nap', { after: ['breakfast', 'prep'] }); // $ExpectType string[] +morning.add('Nap', { after: 'foo' }); // $ExpectError +morning.add(['Make toast', 'Pour juice'], { before: 'breakfast', group: 'prep' }); // $ExpectType string[] +morning.add('Eat breakfast', { group: 'breakfast' }); // $ExpectType string[] + +morning.nodes; // $ExpectType string[] + +const dinner = new Topo(); +dinner.add('Eat dinner', { group: 'dinner', after: 'breakfast' }); // $ExpectType string[] + +morning.merge(dinner); diff --git a/types/hapi__topo/index.d.ts b/types/hapi__topo/index.d.ts new file mode 100644 index 0000000000..24a0dfda89 --- /dev/null +++ b/types/hapi__topo/index.d.ts @@ -0,0 +1,49 @@ +// Type definitions for @hapi/topo 3.1 +// Project: https://github.com/hapijs/topo#readme +// Definitions by: BendingBender +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +export = Topo; + +/** + * The Topo object is the container for topologically sorting a list of nodes with non-circular interdependencies. + */ +declare class Topo { + /** + * An array of the topologically sorted nodes. This list is renewed upon each call to `topo.add()`. + */ + nodes: TNode[]; + + /** + * Specifies an additional node or list of nodes to be topologically sorted. + * + * @param nodes a mixed value or array of mixed values to be added as nodes to the topologically sorted list. + * @param options optional sorting information about the `nodes`: + * - `group` - a string naming the group to which `nodes` should be assigned. The group name `'?'` is reserved. + * - `before` - a string or array of strings specifying the groups that `nodes` must precede in the topological sort. + * - `after` - a string or array of strings specifying the groups that `nodes` must succeed in the topological sort. + * - `sort` - a numerical value used to sort items when performing a `topo.merge()`. + * @returns an array of the topologically sorted nodes. + */ + add( + nodes: TNode | TNode[], + options?: { + group?: TGroup; + before?: TGroup | TGroup[]; + after?: TGroup | TGroup[]; + sort?: number; + } + ): TNode[]; + + /** + * Merges another `Topo` object into the current object. + * If the order in which items have been added to each list matters, use the `sort` option in `topo.add()` + * with an incrementing value providing an absolute sort order among all items added to either object. + * + * @param others the other object or array of objects to be merged into the current one. `null` values are ignored. + * @returns an array of the topologically sorted nodes. Will throw if a dependency error is found as a result of the combined items. + */ + merge(others: Topo | Array>): TNode[]; +} diff --git a/types/hapi__topo/tsconfig.json b/types/hapi__topo/tsconfig.json new file mode 100644 index 0000000000..cd79b1b7ca --- /dev/null +++ b/types/hapi__topo/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/topo": [ + "hapi__topo" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__topo-tests.ts" + ] +} diff --git a/types/p-all/tslint.json b/types/hapi__topo/tslint.json similarity index 100% rename from types/p-all/tslint.json rename to types/hapi__topo/tslint.json diff --git a/types/hapi__vision/hapi__vision-tests.ts b/types/hapi__vision/hapi__vision-tests.ts new file mode 100644 index 0000000000..c78ed4c6b2 --- /dev/null +++ b/types/hapi__vision/hapi__vision-tests.ts @@ -0,0 +1,81 @@ +import { + Server, + Request, + ResponseToolkit, +} from '@hapi/hapi'; + +import * as Vision from '@hapi/vision'; +import * as Handlebars from 'handlebars'; + +const server = new Server({ + port: 80, +}); + +const provision = async () => { + await server.register({ + plugin: Vision, + options: { + engines: { hbs: Handlebars }, + path: __dirname + '/templates', + } + }); + + server.views({ + engines: { hbs: Handlebars }, + path: __dirname + '/templates', + }); + + const context = { + title: 'Views Example', + message: 'Hello, World', + }; + + console.log(await server.render('hello', context)); + + server.route({ + method: 'GET', + path: '/view', + handler: async (request: Request, h: ResponseToolkit) => { + return request.render('test', { message: 'hello' }); + }, + }); + + server.route({ + method: 'GET', + path: '/', + handler: { + view: { + template: 'hello', + context: { + title: 'Views Example', + message: 'Hello, World', + }, + }, + }, + }); + + const handler = (request: Request, h: ResponseToolkit) => { + const context = { + title: 'Views Example', + message: 'Hello, World', + }; + return h.view('hello', context); + }; + + server.route({ method: 'GET', path: '/', handler }); + + server.route({ + method: 'GET', + path: '/temp1', + handler: { + view: { + template: 'temp1', + options: { + compileOptions: { + noEscape: true, + }, + }, + }, + }, + }); +}; diff --git a/types/hapi__vision/index.d.ts b/types/hapi__vision/index.d.ts new file mode 100644 index 0000000000..41df5d3cc2 --- /dev/null +++ b/types/hapi__vision/index.d.ts @@ -0,0 +1,268 @@ +// Type definitions for @hapi/vision 5.5 +// Project: https://github.com/hapijs/vision +// Definitions by: Jason Swearingen +// Alexander James Phillips +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { + Plugin, + Request, + ResponseObject, +} from '@hapi/hapi'; + +declare namespace vision { + interface EnginesConfiguration { + /** + * Required object where each key is a file extension (e.g. 'html', 'hbr'), mapped to the npm module used for rendering the templates. + * Alternatively, the extension can be mapped to an object + */ + engines: {[fileExtension: string]: NpmModule} | ServerViewsEnginesOptions; + /** defines the default filename extension to append to template names when multiple engines are configured and no explicit extension is provided for a given template. No default value. */ + defaultExtension?: string; + } + + /** + * Includes `module` and any of the views options listed below (@see ServerViewsAdditionalOptions) (except defaultExtension) to override the defaults for a specific engine. + */ + interface ServerViewsEnginesOptions extends ServerViewsConfiguration { + /** + * The npm module used for rendering the templates. The module object must contain the compile() function + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#serverviewsoptions} > options > engines > module + */ + module: NpmModule; + } + interface ServerViewsConfiguration extends ViewHandlerOrReplyOptions, EnginesConfiguration { + /** + * The root file path, or array of file paths, where partials are located. + * Partials are small segments of template code that can be nested and reused throughout other templates. + * Defaults to no partials support (empty path). + */ + partialsPath?: string | string[]; + /** + * The directory path, or array of directory paths, where helpers are located. + * Helpers are functions used within templates to perform transformations and other data manipulations using the template context or other inputs. + * Each '.js' file in the helpers directory is loaded and the file name is used as the helper name. + * The files must export a single method with the signature function(context) and return a string. + * Sub-folders are not supported and are ignored. Defaults to no helpers support (empty path). + * Note that jade does not support loading helpers this way. + */ + helpersPath?: string | string[]; + /** if set to false, templates will not be cached (thus will be read from file on every use). Defaults to true. */ + isCached?: boolean; + } + + /** + * + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#the-view-handler} > options for the list of attributes it can not have (isCached, partialsPath, helpersPath) + */ + interface ViewHandlerOrReplyOptions { + /** the root file path, or array of file paths, used to resolve and load the templates identified when calling reply.view(). Defaults to current working directory. */ + path?: string | string[]; + /** + * a base path used as prefix for path and partialsPath. No default. + */ + relativeTo?: string; + /** + * If set to true or a layout filename, layout support is enabled. + * A layout is a single template file used as the parent template for other view templates in the same engine. + * If true, the layout template name must be 'layout.ext' where 'ext' is the engine's extension. + * Otherwise, the provided filename is suffixed with the engine's extension and loaded. + * Disable layout when using Jade as it will handle including any layout files independently. + * Defaults to false. + */ + layout?: boolean | string; + /** the root file path, or array of file paths, where layout templates are located (using the relativeTo prefix if present). Defaults to path. */ + layoutPath?: string | string[]; + /** the key used by the template engine to denote where primary template content should go. Defaults to 'content'. */ + layoutKeyword?: string; + /** the text encoding used by the templates when reading the files and outputting the result. Defaults to 'utf8'. */ + encoding?: string; + /** if set to true, allows absolute template paths passed to reply.view(). Defaults to false. */ + allowAbsolutePaths?: boolean; + /** if set to true, allows template paths passed to reply.view() to contain '../'. Defaults to false. */ + allowInsecureAccess?: boolean; + /** options object passed to the engine's compile function. Defaults to empty options {}. */ + compileOptions?: CompileOptions; + /** options object passed to the returned function from the compile operation. Defaults to empty options {}. */ + runtimeOptions?: RuntimeOptions; + /** the content type of the engine results. Defaults to 'text/html'. */ + contentType?: string; + /** specify whether the engine compile() method is 'sync' or 'async'. Defaults to 'sync'. */ + compileMode?: 'sync' | 'async'; + /** + * A global context used with all templates. + * The global context option can be either an object or a function that takes the request as its only argument and returns a context object. + * The request object is only provided when using the view handler or reply.view(). + * When using server.render() or request.render(), the request argument will be null. + * When rendering views, the global context will be merged with any context object specified on the handler or using reply.view(). + * When multiple context objects are used, values from the global context always have lowest precedence. + */ + context?: object | ((request: Request) => object); + } + + /** + * Options passed to module when compiling template. + * Cast your options to this interface or extend it with: + * declare module '@hapi/hapi' { + * interface CompileOptions { + * noEscape: boolean; + * } + * } + */ + type CompileOptions = object; + type RuntimeOptions = object; + + /** + * The rendering function. The required function signature depends on the compileMode settings (see below). + * + * If compileMode is 'sync', the signature is compile(template, options), + * the return value is a function with signature function(context, options) (the compiled sync template), + * and the method is allowed to throw errors. + * + * If compileMode is 'async', + * the signature is compile(template, options, next) where next has the signature function(err, compiled), + * compiled is a function with signature function(context, options, callback) (the compiled async template) + * and callback has the signature function(err, rendered). + */ + type ServerViewCompileSync = (template: string, options: any) => (context: any, options: any) => void; + type ServerViewCompileAsync = (template: string, options: any, next: ServerViewCompileNext) => void; + + type ServerViewCompile = ServerViewCompileSync | ServerViewCompileAsync; + + type ServerViewCompileNext = (err: Error | null, compiled: (context: any, options: any, callback: (err: null | Error, rendered: string | null) => void) => void) => void; + + /** + * The npm module used for rendering the templates. The module object must contain the compile() function + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#serverviewsoptions} > options > engines > module + */ + interface NpmModule { + /** + * The rendering function. The required function signature depends on the compileMode settings + */ + compile: ServerViewCompile; + /** + * Initializes additional engine state.The config object is the engine configuration object allowing updates to be made. + * This is useful for engines like Nunjucks that rely on additional state for rendering. next has the signature function(err). + */ + prepare?(config: EngineConfigurationObject, next: (err?: Error) => void): void; + /** + * Registers a partial for use during template rendering. + * The name is the partial path that templates should use to reference the partial and src is the uncompiled template string for the partial. + */ + registerPartial?(name: string, src: string): void; + /** + * Registers a helper for use during template rendering. + * The name is the name that templates should use to reference the helper and helper is the function that will be invoked when the helper is called. + */ + registerHelper?(name: string, helper: (...args: any[]) => any): void; + } + + type EngineConfigurationObject = object; + + /** + * Renders a template + * @param template - the template filename and path, relative to the views manager templates path (path or relativeTo). + * @param context - optional object used by the template to render context-specific result. Defaults to no context ({}). + * @param options - optional object used to override the views manager configuration. + */ + type RenderMethod = (template: string, context?: any, options?: ServerViewsConfiguration) => Promise; + + /** + * View Manager + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#view-manager} + */ + interface ViewManager { + /** + * Registers a helper, on all configured engines that have a registerHelper() method, for use during template rendering. + * Engines without a registerHelper() method will be skipped. + * The name is the name that templates should use to reference the helper and helper is the function that will be invoked when the helper is called. + * @param name + * @param helper + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#managerregisterhelpername-helper} + */ + registerHelper(name: string, helper: (...args: any[]) => any): void; + /** + * Renders a template. This is typically not needed and it is usually more convenient to use server.render(). + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#managerrendertemplate-context-options-callback} + */ + render: RenderMethod; + } +} + +declare const vision: Plugin; + +export = vision; + +declare module '@hapi/hapi' { + interface Server { + /** + * Initializes the server views manager + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#serverviewsoptions} + */ + views(options: vision.ServerViewsConfiguration): vision.ViewManager; + /** + * Utilizes the server views manager to render a template + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#serverrendertemplate-context-options-callback} + */ + render: vision.RenderMethod; + } +} + +declare module '@hapi/hapi' { + interface Request { + /** + * request.render() works the same way as server.render() but is for use inside of request handlers. + * server.render() does not work inside request handlers when called via request.server.render() if the view manager was created by a plugin. + * This is because the request.server object does not have access to the plugin realm where the view manager was configured. + * request.render() gets its realm from the route that the request was bound to. + * Note that this will not work in onRequest extensions added by the plugin because the route isn't yet set at this point in the request + * lifecycle and the request.render() method will produce the same limited results server.render() can. + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#requestrendertemplate-context-options-callback} + */ + render: vision.RenderMethod; + } +} + +declare module '@hapi/hapi' { + interface ResponseToolkit { + /** + * Concludes the handler activity by returning control over to the router with a templatized view response + * Returns a response object. The generated response will have the variety property set to view. + * The response flow control rules apply. + * @param template the template filename and path, relative to the templates path configured via the server views manager. + * @param context optional object used by the template to render context-specific result. Defaults to no context {}. + * @param options optional object used to override the server's views manager configuration for this response. + * Cannot override isCached, partialsPath, or helpersPath which are only loaded at initialization. + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#replyviewtemplate-context-options} + */ + view(templatePath: string, context?: any, options?: vision.ViewHandlerOrReplyOptions): ResponseObject; + } +} + +declare module '@hapi/hapi' { + interface HandlerDecorations { + /** + * The view handler can be used with routes registered in the same realm as the view manager. + * The handler takes an options parameter that can be either a string or an object. + * When the options parameter is a string, it should be the filename and path of the template relative + * to the templates path configured via the views manager. When the options parameter is an object, it may have the following keys: + * The rendering context contains the `params`, `payload`, `query`, and `pre` values from the request by default + * (these can be overriden by values explicitly set via the options). + * @see {@link https://github.com/hapijs/vision/blob/master/API.md#the-view-handler} + */ + view?: string | { + /** the template filename and path, relative to the templates path configured via the server views manager. */ + template: string; + /** optional object used by the template to render context-specific result. Defaults to no context {}. */ + context?: object; + /** + * optional object used to override the server's views manager configuration for this response. + * Cannot override isCached, partialsPath, or helpersPath which are only loaded at initialization. + * TODO check if it can have `defaultExtension`. + */ + options?: vision.ViewHandlerOrReplyOptions; + }; + } +} diff --git a/types/hapi__vision/package.json b/types/hapi__vision/package.json new file mode 100644 index 0000000000..ba6df20520 --- /dev/null +++ b/types/hapi__vision/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "handlebars": "^4.1" + } +} diff --git a/types/hapi__vision/tsconfig.json b/types/hapi__vision/tsconfig.json new file mode 100644 index 0000000000..331ab63afe --- /dev/null +++ b/types/hapi__vision/tsconfig.json @@ -0,0 +1,52 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/hapi": [ + "hapi__hapi" + ], + "@hapi/boom": [ + "hapi__boom" + ], + "@hapi/shot": [ + "hapi__shot" + ], + "@hapi/mimos": [ + "hapi__mimos" + ], + "@hapi/iron": [ + "hapi__iron" + ], + "@hapi/joi": [ + "hapi__joi" + ], + "@hapi/podium": [ + "hapi__podium" + ], + "@hapi/catbox": [ + "hapi__catbox" + ], + "@hapi/vision": [ + "hapi__vision" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__vision-tests.ts" + ] +} diff --git a/types/p-do-whilst/tslint.json b/types/hapi__vision/tslint.json similarity index 100% rename from types/p-do-whilst/tslint.json rename to types/hapi__vision/tslint.json diff --git a/types/hapi__wreck/hapi__wreck-tests.ts b/types/hapi__wreck/hapi__wreck-tests.ts new file mode 100644 index 0000000000..9fd0538d72 --- /dev/null +++ b/types/hapi__wreck/hapi__wreck-tests.ts @@ -0,0 +1,40 @@ + +import Wreck = require('@hapi/wreck'); + +Wreck.get('https://google.com/', {}).then((response) => { + /* do stuff */ +}); + + +var method = 'GET'; // GET, POST, PUT, DELETE +var uri = 'https://google.com/'; +var readableStream = Wreck.toReadableStream('foo=bar'); + +var wreck = Wreck.defaults({ + headers: { 'x-foo-bar': 123 } +}); + +// cascading example -- does not alter `wreck` +var wreckWithTimeout = wreck.defaults({ + timeout: 5 +}); + +// all attributes are optional +var options = { + maxBytes: 1048576, // 1 MB, default: unlimited + rejectUnauthorized: true +}; + +var optionalCallback = function (err: any, res: any) { + + /* handle err if it exists, in which case res will be undefined */ + + // buffer the response stream + Wreck.read(res, null).then((payload) => { + /* do stuff */ + }); +}; + +var req = wreck.request(method, uri, options).then((response) => { + /* do stuff */ +}); diff --git a/types/hapi__wreck/index.d.ts b/types/hapi__wreck/index.d.ts new file mode 100644 index 0000000000..68c8ca454c --- /dev/null +++ b/types/hapi__wreck/index.d.ts @@ -0,0 +1,85 @@ +// Type definitions for @hapi/wreck 15.0 +// Project: https://github.com/hapijs/wreck +// Definitions by: Marcin Porębski +// Rodrigo Saboya +// Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + + +import * as Boom from "@hapi/boom"; +import * as events from "events"; +import * as http from "http"; +import * as stream from "stream"; +import * as Url from "url"; + +interface RequestOptions { + baseUrl?: string; + socketPath? : string; + payload?: any; + headers?: { [key: string]: any }; + redirects?: number; + redirect303?: boolean; + beforeRedirect?: (redirectMethod: string, statusCode: number, location: string, resHeaders: { [key: string]: any }, redirectOptions: any, next: () => {}) => void; + redirected?: (statusCode: number, location: string, req: http.ClientRequest) => void; + timeout?: number; + maxBytes?: number; + rejectUnauthorized?: boolean; + downstreamRes?: any; + agent?: WreckObject["agents"] | false; + secureProtocol?: string; + ciphers?: string; + events?: boolean; +} + +interface ReadOptions { + timeout?: number; + json?: true | "strict" | "force"; + gunzip?: boolean | "force"; + maxBytes?: number; +} + +interface RequestResponse { + res: http.IncomingMessage, + payload: any, +} + +declare type RequestCallback = (uri: string, options: RequestOptions & { payload?: any }) => void; +declare type ResponseCallback = (err: Boom | undefined, details: { req: http.ClientRequest, res: http.IncomingMessage | undefined, start: number, url: Url.URL }) => void; + +declare class WreckEventEmitter extends events.EventEmitter { + on(event: "request", listener: RequestCallback): this; + on(event: "response", listener: ResponseCallback): this; +} + +interface WreckObject { + defaults: (options: RequestOptions) => WreckObject; + + request: (method: string, uri: string, options: RequestOptions) => Promise & { req: http.ClientRequest }; + + read: (response: http.IncomingMessage, options: ReadOptions) => Promise; + + get: (uri: string, options: RequestOptions & ReadOptions) => Promise; + post: (uri: string, options: RequestOptions & ReadOptions) => Promise; + patch: (uri: string, options: RequestOptions & ReadOptions) => Promise; + put: (uri: string, options: RequestOptions & ReadOptions) => Promise; + delete: (uri: string, options: RequestOptions & ReadOptions) => Promise; + + toReadableStream: (payload: any, encoding?: string) => stream.Readable; + + parseCacheControl: (field: string) => any; + + agents: { + http: http.Agent, + https: http.Agent, + httpsAllowUnauthorized: http.Agent + }; + + events?: WreckEventEmitter; +} + +declare var wreck: WreckObject; + +export = wreck; diff --git a/types/hapi__wreck/tsconfig.json b/types/hapi__wreck/tsconfig.json new file mode 100644 index 0000000000..486717fc58 --- /dev/null +++ b/types/hapi__wreck/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@hapi/wreck": [ + "hapi__wreck" + ], + "@hapi/boom": [ + "hapi__boom" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi__wreck-tests.ts" + ] +} diff --git a/types/hapi__wreck/tslint.json b/types/hapi__wreck/tslint.json new file mode 100644 index 0000000000..3d59f55fda --- /dev/null +++ b/types/hapi__wreck/tslint.json @@ -0,0 +1,80 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "npm-naming": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} diff --git a/types/hard-rejection/hard-rejection-tests.ts b/types/hard-rejection/hard-rejection-tests.ts deleted file mode 100644 index f83e17a5b1..0000000000 --- a/types/hard-rejection/hard-rejection-tests.ts +++ /dev/null @@ -1,7 +0,0 @@ -import hardRejection = require('hard-rejection'); -import 'hard-rejection/register'; - -hardRejection(); -hardRejection(stack => { - stack; // $ExpectType string | undefined -}); diff --git a/types/hard-rejection/index.d.ts b/types/hard-rejection/index.d.ts deleted file mode 100644 index 5036f30923..0000000000 --- a/types/hard-rejection/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Type definitions for hard-rejection 1.0 -// Project: https://github.com/sindresorhus/hard-rejection#readme -// Definitions by: BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = hardRejection; - -declare function hardRejection(log?: (stack?: string) => void): void; diff --git a/types/hard-rejection/tsconfig.json b/types/hard-rejection/tsconfig.json deleted file mode 100644 index 6c83946da7..0000000000 --- a/types/hard-rejection/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "hard-rejection-tests.ts" - ] -} \ No newline at end of file diff --git a/types/hls.js/hls.js-tests.ts b/types/hls.js/hls.js-tests.ts index 90176ae6b7..e4d2af8c56 100644 --- a/types/hls.js/hls.js-tests.ts +++ b/types/hls.js/hls.js-tests.ts @@ -33,7 +33,11 @@ if (Hls.isSupported()) { const version: string = Hls.version; hls.loadSource('http://www.streambox.fr/playlists/test_001/stream.m3u8'); - hls.attachMedia(video); + if (hls.media === undefined || hls.media === null) { + hls.attachMedia(video); + } else { + console.log('src: ', hls.media.src); + } hls.once(Hls.Events.MANIFEST_PARSED, (event: "hlsManifestParsed", data: Hls.manifestParsedData) => { video.play(); diff --git a/types/hls.js/index.d.ts b/types/hls.js/index.d.ts index a2b6486668..8e6e6fa3a5 100644 --- a/types/hls.js/index.d.ts +++ b/types/hls.js/index.d.ts @@ -1666,6 +1666,10 @@ declare class Hls { * default valus is hls.firstLevel */ startLevel: number; + /** + * get: Return the bound videoElement from the hls instance + */ + readonly media?: HTMLVideoElement | null; /** * hls.js config */ diff --git a/types/hogan.js/hogan.js-tests.ts b/types/hogan.js/hogan.js-tests.ts new file mode 100644 index 0000000000..56cd314aab --- /dev/null +++ b/types/hogan.js/hogan.js-tests.ts @@ -0,0 +1,24 @@ +import Hogan = require('hogan.js'); + +// $ExpectType HoganTemplate +const compiled = Hogan.compile("{{#if}}{{value}}{{/if}}"); + +// $ExpectType string +Hogan.compile("<%_foo%><%value%><%/foo%>", { + asString: true, + sectionTags: [{ + o: '_foo', + c: 'foo' + }], + delimiters: '<% %>', + disableLambda: true +}); + +// $ExpectType string +compiled.render({ value: "test" }); + +// $ExpectType Token[] +const scanned = Hogan.scan("{{#if}}{{value}}{{/if}}"); + +// $ExpectType Leaf[] +Hogan.parse(scanned); diff --git a/types/hogan.js/index.d.ts b/types/hogan.js/index.d.ts new file mode 100644 index 0000000000..27f4d967aa --- /dev/null +++ b/types/hogan.js/index.d.ts @@ -0,0 +1,95 @@ +// Type definitions for hogan.js 3.0 +// Project: http://twitter.github.com/hogan.js/ +// Definitions by: Andrew Leedham +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export interface Context { + [key: string]: any; +} + +export interface SectionTags { + o: string; + c: string; +} + +export interface HoganOptions { + asString?: boolean; + sectionTags?: ReadonlyArray; + delimiters?: string; + disableLambda?: boolean; +} + +export interface Token { + tag: string; + otag?: string; + ctag?: string; + i?: number; + n?: string; + text?: string; +} + +export interface Leaf extends Token { + end: number; + nodes: Token[]; +} + +export type Tree = Leaf[]; + +export interface Partials { + [symbol: string]: HoganTemplate; +} +declare class HoganTemplate { + /** + * Renders the template to a string. + * + * @param context - The data to render the template with. + * @param partials - The partials to render the template with. + * @param indent - The string to indent when rendering the template. + * @returns A rendered template. + */ + render(context: Context, partials?: Partials, indent?: string): string; +} + +export { HoganTemplate as Template, HoganTemplate as template }; + +export function compile( + text: string, + options?: HoganOptions & { asString: false } +): HoganTemplate; +export function compile( + text: string, + options?: HoganOptions & { asString: true } +): string; +/** + * Compiles templates to HoganTemplate objects, which have a render method. + * + * @param text - Raw mustache string to compile. + * @param options - Options to use when compiling. See https://github.com/twitter/hogan.js#compilation-options. + * @returns A HoganTemplate. + */ +export function compile( + text: string, + options?: HoganOptions +): HoganTemplate | string; +/** + * Scans templates returning an array of found tokens. + * + * @param text - Raw mustache string to scan. + * @param delimiters - A string that overrides the default delimiters. Example: "<% %>". + * @returns Found tokens. + */ +export function scan(text: string, delimiters?: string): Token[]; +/** + * Structures tokens into a tree. + * + * @param tokens - An array of scanned tokens. + * @param text - Unused pass undefined. + * @param options - Options to use when parsing. See https://github.com/twitter/hogan.js#compilation-options. + * @returns The tree structure of the given tokens. + */ +export function parse( + tokens: ReadonlyArray, + text?: undefined, + options?: HoganOptions +): Tree; diff --git a/types/serialize-error/tsconfig.json b/types/hogan.js/tsconfig.json similarity index 92% rename from types/serialize-error/tsconfig.json rename to types/hogan.js/tsconfig.json index 83731d0922..cc84847867 100644 --- a/types/serialize-error/tsconfig.json +++ b/types/hogan.js/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "serialize-error-tests.ts" + "hogan.js-tests.ts" ] } diff --git a/types/p-forever/tslint.json b/types/hogan.js/tslint.json similarity index 100% rename from types/p-forever/tslint.json rename to types/hogan.js/tslint.json diff --git a/types/hoist-non-react-statics/package.json b/types/hoist-non-react-statics/package.json new file mode 100644 index 0000000000..833c6ee977 --- /dev/null +++ b/types/hoist-non-react-statics/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "hoist-non-react-statics": "^3.3.0" + } +} diff --git a/types/hummus-recipe/hummus-recipe-tests.ts b/types/hummus-recipe/hummus-recipe-tests.ts new file mode 100644 index 0000000000..062700c8be --- /dev/null +++ b/types/hummus-recipe/hummus-recipe-tests.ts @@ -0,0 +1,21 @@ +import Recipe = require("hummus-recipe"); + +// $ExpectType Recipe +const pdf = new Recipe("new", "test.pdf", { + version: 1.6, + author: "John Doe", + title: "Hummus Recipe", + subject: "A brand new PDF" +}); + +// $ExpectType Recipe +pdf.createPage(595, 842) + .text("Memento Mori", 100, 100) + .endPage() + .endPDF(); + +// $ExpectError +pdf.createPage("A4") + .text("Memento Mori", 100, 100) + .endPage() + .endPDF(); diff --git a/types/hummus-recipe/index.d.ts b/types/hummus-recipe/index.d.ts new file mode 100644 index 0000000000..7c6aa54fb7 --- /dev/null +++ b/types/hummus-recipe/index.d.ts @@ -0,0 +1,281 @@ +// Type definitions for hummus-recipe 1.8 +// Project: https://github.com/chunyenHuang/hummusRecipe +// Definitions by: Erik Berreßem +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +declare namespace Recipe { + type CommentOptionsFlag = + | "invisible" + | "hidden" + | "print" + | "nozoom" + | "norotate" + | "noview" + | "readonly" + | "locked" + | "togglenoview"; + + type AnnotSubtype = + | "Text" + | "FreeText" + | "Line" + | "Square" + | "Circle" + | "Polygon" + | "PolyLine" + | "Highlight" + | "Underline" + | "Squiggly" + | "StrikeOut" + | "Stamp" + | "Caret" + | "Ink" + | "FileAttachment" + | "Sound"; + + type AnnotOptionsFlag = + | "invisible" + | "hidden" + | "print" + | "nozoom" + | "norotate" + | "noview" + | "readonly" + | "locked" + | "togglenoview"; + + type AnnotOptionsIcon = + | "Comment" + | "Key" + | "Note" + | "Help" + | "NewParagraph" + | "Paragraph" + | "Insert"; + + interface RecipeOptions { + version?: number; + author?: string; + title?: string; + subject?: string; + keywords?: string[]; + } + + interface CommentOptions { + title?: string; + date?: string; + open?: boolean; + richText?: boolean; + flag?: CommentOptionsFlag; + } + + interface AnnotOptions { + title?: string; + open?: boolean; + richText?: boolean; + flag?: AnnotOptionsFlag; + icon?: AnnotOptionsIcon; + width?: number; + height?: number; + } + + interface EncryptOptions { + password?: string; + ownerPassword?: string; + userProtectionFlag?: number; + } + + interface ImageOptions { + width?: number; + height?: number; + scale?: number; + keepAspectRatio?: boolean; + opacity?: number; + align?: string; + } + + interface InfoOptions { + version?: string; + author?: string; + title?: string; + subject?: string; + keywords?: string[]; + } + + interface OverlayOptions { + scale?: number; + keepAspectRatio?: boolean; + fitWidth?: boolean; + fitHeight?: boolean; + } + + interface TextBoxStyle { + lineWidth?: number; + stroke?: string | number[]; + dash?: number[]; + fill?: string | number[]; + opacity?: number; + } + + interface TextBox { + width?: number; + height?: number; + minHeight?: number; + padding?: number | number[]; + lineHeight?: number; + textAlign?: string; + style?: TextBoxStyle; + } + + interface TextOptions { + color?: string | number[]; + opacity?: number; + rotation?: number; + rotationOrigin?: number[]; + font?: string; + size?: number; + align?: string; + highlight?: boolean; + underline?: boolean; + strikeOut?: boolean; + textBox?: TextBox; + } + + interface LineToOptions { + color?: string | number[]; + stroke?: string | number[]; + fill?: string | number[]; + lineWidth?: number; + opacity?: number; + dash?: number[]; + } + + interface LineOptions { + color?: string | number[]; + stroke?: string | number[]; + lineWidth?: number; + dash?: number[]; + } + + interface PolygonOptions { + color?: string | number[]; + stroke?: string | number[]; + fill?: string | number[]; + lineWidth?: number; + opacity?: number; + dash?: number[]; + } + + interface CircleOptions { + color?: string | number[]; + stroke?: string | number[]; + fill?: string | number[]; + lineWidth?: number; + opacity?: number; + dash?: number[]; + } + + interface RectangleOptions { + color?: string | number[]; + stroke?: string | number[]; + fill?: string | number[]; + lineWidth?: number; + opacity?: number; + dash?: number[]; + rotation?: number; + rotationOrigin?: number[]; + } +} + +declare class Recipe { + constructor(src: string, output: string, options?: Recipe.RecipeOptions); + + comment( + text: string, + x: number, + y: number, + options?: Recipe.CommentOptions + ): Recipe; + + annot( + x: number, + y: number, + subtype: Recipe.AnnotSubtype, + options?: Recipe.AnnotOptions + ): Recipe; + + appendPage(pdfSrc: string, pages: number | number[]): Recipe; + + encrypt(options: Recipe.EncryptOptions): Recipe; + + registerFont(fontName: string, fontSrcPath: string): Recipe; + + image( + imgSrc: string, + x: number, + y: number, + options?: Recipe.ImageOptions + ): Recipe; + + info(options?: Recipe.InfoOptions): Recipe; + + custom(key?: string, value?: string): Recipe; + + insertPage( + afterPageNumber: number, + pdfSrc: string, + srcPageNumber: number + ): Recipe; + + overlay( + pdfSrc: string, + x: number, + y: number, + options?: Recipe.OverlayOptions + ): Recipe; + + createPage(pageWidth: number, pageHeight: number): Recipe; + + endPage(): Recipe; + + editPage(pageNumber: number): Recipe; + + pageInfo(pageNumber: number): Recipe; + + split(outputDir: string, prefix: string): Recipe; + + text( + text: string, + x: number, + y: number, + options?: Recipe.TextOptions + ): Recipe; + + moveTo(x: number, y: number): Recipe; + + lineTo(x: number, y: number, options?: Recipe.LineToOptions): Recipe; + + line(coordinates: number[][], options?: Recipe.LineOptions): Recipe; + + polygon(coordinates: number[][], options?: Recipe.PolygonOptions): Recipe; + + circle( + x: number, + y: number, + radius: number, + options?: Recipe.CircleOptions + ): Recipe; + + rectangle( + x: number, + y: number, + width: number, + height: number, + options?: Recipe.RectangleOptions + ): Recipe; + + endPDF(callback?: () => any): Recipe; +} + +export = Recipe; diff --git a/types/hummus-recipe/tsconfig.json b/types/hummus-recipe/tsconfig.json new file mode 100644 index 0000000000..a3a5f57e26 --- /dev/null +++ b/types/hummus-recipe/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": ["index.d.ts", "hummus-recipe-tests.ts"] +} diff --git a/types/p-is-promise/tslint.json b/types/hummus-recipe/tslint.json similarity index 100% rename from types/p-is-promise/tslint.json rename to types/hummus-recipe/tslint.json diff --git a/types/imul/imul-tests.ts b/types/imul/imul-tests.ts new file mode 100644 index 0000000000..fa936e3e80 --- /dev/null +++ b/types/imul/imul-tests.ts @@ -0,0 +1,4 @@ +import imul = require("imul"); + +// $ExpectType number +imul(2, 4); diff --git a/types/imul/index.d.ts b/types/imul/index.d.ts new file mode 100644 index 0000000000..09cff7ce17 --- /dev/null +++ b/types/imul/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for imul 1.0 +// Project: https://github.com/sindresorhus/imul#readme +// Definitions by: Daniel Cassidy +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function imul(a: number, b: number): number; + +export = imul; diff --git a/types/junk/tsconfig.json b/types/imul/tsconfig.json similarity index 95% rename from types/junk/tsconfig.json rename to types/imul/tsconfig.json index 06710a9591..6a3b8af70c 100644 --- a/types/junk/tsconfig.json +++ b/types/imul/tsconfig.json @@ -6,8 +6,8 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": true, "strictFunctionTypes": true, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "junk-tests.ts" + "imul-tests.ts" ] } diff --git a/types/p-lazy/tslint.json b/types/imul/tslint.json similarity index 100% rename from types/p-lazy/tslint.json rename to types/imul/tslint.json diff --git a/types/inert/inert-tests.ts b/types/inert/inert-tests.ts index b772a38259..c965e30253 100644 --- a/types/inert/inert-tests.ts +++ b/types/inert/inert-tests.ts @@ -98,7 +98,6 @@ const provision = async () => { } return new Error(''); }, - BAD_listing: true, }, }, options: { files: { relativeTo: __dirname } } diff --git a/types/inert/v4/inert-tests.ts b/types/inert/v4/inert-tests.ts index 9062e13f6b..71adf61bfc 100644 --- a/types/inert/v4/inert-tests.ts +++ b/types/inert/v4/inert-tests.ts @@ -121,8 +121,7 @@ server.route({ return ['']; } return new Error(''); - }, - BAD_listing: true, // TODO change typings to make this error + } }, }, config: { files: { relativeTo: __dirname } } diff --git a/types/is-absolute-url/index.d.ts b/types/is-absolute-url/index.d.ts deleted file mode 100644 index eecb3998e0..0000000000 --- a/types/is-absolute-url/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Type definitions for is-absolute-url 2.1 -// Project: https://github.com/sindresorhus/is-absolute-url#readme -// Definitions by: Mohamed Hegazy -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = is_absolute_url; -declare function is_absolute_url(url: string): boolean; diff --git a/types/is-absolute-url/is-absolute-url-tests.ts b/types/is-absolute-url/is-absolute-url-tests.ts deleted file mode 100644 index 4f8a225dad..0000000000 --- a/types/is-absolute-url/is-absolute-url-tests.ts +++ /dev/null @@ -1,10 +0,0 @@ -import isAbsoluteUrl = require('is-absolute-url'); - -isAbsoluteUrl('http://sindresorhus.com/foo/bar'); -// => true - -isAbsoluteUrl('//sindresorhus.com'); -// => false - -isAbsoluteUrl('foo/bar'); -// => false diff --git a/types/is-fullwidth-code-point/index.d.ts b/types/is-fullwidth-code-point/index.d.ts deleted file mode 100644 index e5e666ad30..0000000000 --- a/types/is-fullwidth-code-point/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Type definitions for is-fullwidth-code-point 2.0 -// Project: https://github.com/sindresorhus/is-fullwidth-code-point#readme -// Definitions by: BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = isFullwidthCodePoint; - -declare function isFullwidthCodePoint(input: number): boolean; diff --git a/types/is-fullwidth-code-point/is-fullwidth-code-point-tests.ts b/types/is-fullwidth-code-point/is-fullwidth-code-point-tests.ts deleted file mode 100644 index 6d2b6a6882..0000000000 --- a/types/is-fullwidth-code-point/is-fullwidth-code-point-tests.ts +++ /dev/null @@ -1,4 +0,0 @@ -import isFullwidthCodePoint = require('is-fullwidth-code-point'); - -const codePoint = 'è°ą'.codePointAt(0) as number; -isFullwidthCodePoint(codePoint); // $ExpectType boolean diff --git a/types/is-image/index.d.ts b/types/is-image/index.d.ts new file mode 100644 index 0000000000..f390206830 --- /dev/null +++ b/types/is-image/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for is-image 2.0 +// Project: https://github.com/sindresorhus/is-image#readme +// Definitions by: Denis Frezzato +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = isImage; + +declare function isImage(filepath: string): boolean; diff --git a/types/is-image/is-image-tests.ts b/types/is-image/is-image-tests.ts new file mode 100644 index 0000000000..2cbdb0bf0c --- /dev/null +++ b/types/is-image/is-image-tests.ts @@ -0,0 +1,3 @@ +import isImage = require('is-image'); + +const res: boolean = isImage('/path/to/img.png'); diff --git a/types/ansi-escapes/tsconfig.json b/types/is-image/tsconfig.json similarity index 87% rename from types/ansi-escapes/tsconfig.json rename to types/is-image/tsconfig.json index 210be31288..2d1799652d 100644 --- a/types/ansi-escapes/tsconfig.json +++ b/types/is-image/tsconfig.json @@ -12,5 +12,5 @@ "noEmit": true, "forceConsistentCasingInFileNames": true }, - "files": ["index.d.ts", "ansi-escapes-tests.ts"] + "files": ["index.d.ts", "is-image-tests.ts"] } diff --git a/types/p-min-delay/tslint.json b/types/is-image/tslint.json similarity index 100% rename from types/p-min-delay/tslint.json rename to types/is-image/tslint.json diff --git a/types/is-relative-url/index.d.ts b/types/is-relative-url/index.d.ts deleted file mode 100644 index ac28dc0d9f..0000000000 --- a/types/is-relative-url/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Type definitions for is-relative-url 2.0 -// Project: https://github.com/sindresorhus/is-relative-url -// Definitions by: Mohamed Hegazy -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = is_relative_url; -declare function is_relative_url(url: string): boolean; diff --git a/types/is-relative-url/is-relative-url-tests.ts b/types/is-relative-url/is-relative-url-tests.ts deleted file mode 100644 index 2e93e6f4ed..0000000000 --- a/types/is-relative-url/is-relative-url-tests.ts +++ /dev/null @@ -1,10 +0,0 @@ -import isRelativeUrl = require('is-relative-url'); - -isRelativeUrl('foo/bar'); -// => true - -isRelativeUrl('http://sindresorhus.com/foo/bar'); -// => false - -isRelativeUrl('//sindresorhus.com'); -// => true diff --git a/types/is-relative-url/tsconfig.json b/types/is-relative-url/tsconfig.json deleted file mode 100644 index 1a85dcf51a..0000000000 --- a/types/is-relative-url/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "is-relative-url-tests.ts" - ] -} \ No newline at end of file diff --git a/types/isarray/index.d.ts b/types/isarray/index.d.ts new file mode 100644 index 0000000000..8466d6cbd6 --- /dev/null +++ b/types/isarray/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for isarray 2.0 +// Project: https://github.com/juliangruber/isarray +// Definitions by: Claas Ahlrichs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +export = isarray; + +declare function isarray(p0: any): boolean; diff --git a/types/isarray/isarray-tests.ts b/types/isarray/isarray-tests.ts new file mode 100644 index 0000000000..d29f7761d2 --- /dev/null +++ b/types/isarray/isarray-tests.ts @@ -0,0 +1,4 @@ +import isArray from "isarray"; + +isArray([]); // => true +isArray({}); // => false diff --git a/types/isarray/tsconfig.json b/types/isarray/tsconfig.json new file mode 100644 index 0000000000..66483911c6 --- /dev/null +++ b/types/isarray/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "isarray-tests.ts" + ] +} diff --git a/types/p-reflect/tslint.json b/types/isarray/tslint.json similarity index 100% rename from types/p-reflect/tslint.json rename to types/isarray/tslint.json diff --git a/types/jexl/index.d.ts b/types/jexl/index.d.ts index dace08345d..6834afe0b7 100644 --- a/types/jexl/index.d.ts +++ b/types/jexl/index.d.ts @@ -1,19 +1,15 @@ -// Type definitions for jexl 1.1 -// Project: https://github.com/tomfrost/jexl +// Type definitions for jexl 2.1 +// Project: https://github.com/TomFrost/Jexl // Definitions by: Marcin Tomczyk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -// Currently maintained by https://github.com/TomFrost/Jexl - type TransformFunction = (value: any, ...args: any[]) => any; type BinaryOpFunction = (left: any, right: any) => any; type UnaryOpFunction = (right: any) => any; -type EvalCallbackFunction = (err: Error | null, result: any) => void; - /** * Jexl is the Javascript Expression Language, capable of parsing and * evaluating basic to complex expression strings, combined with advanced @@ -54,14 +50,14 @@ declare class Jexl { * @param name The name of the transform function, as it will be used * within Jexl expressions * @param fn The function to be executed when this transform is - * invoked. It will be provided with at least one argument: + * invoked. It will be provided with at least one argument: * - {*} value: The value to be transformed * - {...*} args: The arguments for this transform */ addTransform(name: string, fn: TransformFunction): void; /** - * Syntactic sugar for calling {@link #Jexl:addTransform} repeatedly. This function + * Syntactic sugar for calling {@link #addTransform} repeatedly. This function * accepts a map of one or more transform names to their transform function. * @param map A map of transform names to transform functions */ @@ -75,25 +71,23 @@ declare class Jexl { getTransform(name: string): TransformFunction; /** - * Evaluates a Jexl string within an optional context. + * Asynchronously evaluates a Jexl string within an optional context. * @param expression The Jexl expression to be evaluated - * @param context A mapping of variables to values, which will be + * @param [context] A mapping of variables to values, which will be * made accessible to the Jexl expression when evaluating it - * @param cb An optional callback function to be executed when - * evaluation is complete. It will be supplied with two arguments: - * - err: Present if an error occurred - * - result: The result of the evaluation - * @returns resolves with the result of the evaluation. Note that - * if a callback is supplied, the returned promise will already have - * a '.catch' attached to it in order to pass the error to the callback. + * @returns resolves with the result of the evaluation. */ - eval(expression: string, context?: object, cb?: EvalCallbackFunction): Promise; + eval(expression: string, context?: object): Promise; /** - * Removes a binary or unary operator from the Jexl grammar. - * @param operator The operator string to be removed + * Synchronously evaluates a Jexl string within an optional context. + * @param expression The Jexl expression to be evaluated + * @param [context] A mapping of variables to values, which will be + * made accessible to the Jexl expression when evaluating it + * @returns the result of the evaluation. + * @throws on error */ - removeOp(operator: string): void; + evalSync(expression: string, context?: object): any; } /** diff --git a/types/jexl/jexl-tests.ts b/types/jexl/jexl-tests.ts index 872c9e7dd4..e21dd7e73e 100644 --- a/types/jexl/jexl-tests.ts +++ b/types/jexl/jexl-tests.ts @@ -10,74 +10,104 @@ const context = { age: 36 }; -// Filter an array -// Output: Kane +// Dummy console. Comment it out if you want to run this code and see output +class DummyConsole { + log(...args: string[]) { + } +} + +const console = new DummyConsole(); + +// Dummy helper function +function dbSelectByLastName(val: string, stat: string): Promise { + return new Promise(((resolve, reject) => resolve(184))); +} + +/* Type testing */ + // $ExpectType Promise jexl.eval('assoc[.first == "Lana"].last', context); -// Do math -// Output: 72 -// $ExpectType Promise -jexl.eval('age * (3 - 1)', context, (err, res) => { -}); +// $ExpectType any +jexl.evalSync('assoc[.first == "Lana"].last'); + +// $ExpectType Promise +jexl.eval('age * (3 - 1)', context); -// Concatenate -// Output: Sterling Archer // $ExpectType Promise jexl.eval('name.first + " " + name["la" + "st"]', context); -// Compound -// Output: true // $ExpectType Promise jexl.eval('assoc[.last == "Figgis"].first == "Cyril" && assoc[.last == "Poovey"].first == "Pam"', context); -// Use array indexes -// Output: Cyril Figgis // $ExpectType Promise -jexl.eval('assoc[1]', context, (err, res) => { -}); +jexl.eval('assoc[1]', context); -// Use conditional logic -// Output: working // $ExpectType Promise jexl.eval('age > 62 ? "retired" : "working"', context); -// Transform // $ExpectType void -jexl.addTransform('upper', (val) => { - return val.toUpperCase(); -}); -// Output: DUCHESS ARCHER +jexl.addTransform('upper', (val) => val.toUpperCase()); // $ExpectType Promise jexl.eval('"duchess"|upper + " " + name.last|upper', context); -// Transform asynchronously, with arguments // $ExpectType void -jexl.addTransform('getStat', (val, stat) => { - return Promise.resolve('Test'); // Returns a promise -}); -// Output: 184 +jexl.addTransform('getStat', async (val, stat) => dbSelectByLastName(val, stat)); // $ExpectType Promise -jexl.eval('name.last|getStat("weight")', context, (err, res) => { -}); +jexl.eval('name.last|getStat("weight")', context); -// Transform with multiple arguments // $ExpectType void -jexl.addTransform('substring', (val: string, start: number, end?: number) => { - return val.substring(start, end); -}); - -// Add your own (a)synchronous operators -// Here's a case-insensitive string equality -// $ExpectType void -jexl.addBinaryOp('_=', 20, (left, right) => { - return left.toLowerCase() === right.toLowerCase(); -}); -// Output: true +jexl.addBinaryOp('_=', 20, (left, right) => left.toLowerCase() === right.toLowerCase()); // $ExpectType Promise jexl.eval('"Guest" _= "gUeSt"'); -const newJexlInstance = new jexl.Jexl(); +/* Example - runnable code */ +(async function testStuff() { +// Filter an array asynchronously... + jexl.eval('assoc[.first == "Lana"].last', context).then(filterArray => { + console.log('1. Filter Array', filterArray); // Output: Kane + }); -// $ExpectType Promise -newJexlInstance.eval("true == true"); +// Or synchronously! + console.log('2. Filter Array Sync', jexl.evalSync('assoc[.first == "Lana"].last')); // Output: Kane + +// Do math + const match = await jexl.eval('age * (3 - 1)', context); + console.log('3. Match', match); // Output: 72 + +// Concatenate + const concatenate = await jexl.eval('name.first + " " + name["la" + "st"]', context); + console.log('4. Concatenate', concatenate); // "Sterling Archer" + +// Compound + const compound = await jexl.eval('assoc[.last == "Figgis"].first == "Cyril" && assoc[.last == "Poovey"].first == "Pam"', context); + console.log('5. Compound', compound); // true + +// Use array indexes + const arrayIndex = await jexl.eval('assoc[1]', context); + console.log('6. Array Index', arrayIndex); // { first: 'Cyril', last: 'Figgis' } + +// Use conditional logic + const conditional = await jexl.eval('age > 62 ? "retired" : "working"', context); + console.log('7. Conditional', conditional); // "working" + +// Transform + jexl.addTransform('upper', (val) => val.toUpperCase()); + const transform = await jexl.eval('"duchess"|upper + " " + name.last|upper', context); + console.log('8. Transform', transform); // "DUCHESS ARCHER" + +// Transform asynchronously, with arguments + jexl.addTransform('getStat', async (val, stat) => dbSelectByLastName(val, stat)); + try { + const asyncTransform = await jexl.eval('name.last|getStat("weight")', context); + console.log('9. Async Transform', asyncTransform); // Output: 184 + } catch (e) { + console.log('Database Error', e.stack); + } + +// Add your own (a)synchronous operators +// Here's a case-insensitive string equality + jexl.addBinaryOp('_=', 20, (left, right) => left.toLowerCase() === right.toLowerCase()); + const binaryOp = await jexl.eval('"Guest" _= "gUeSt"'); + console.log('10. Binary Op', binaryOp); // true +})().then(() => console.log('Testing done')); diff --git a/types/jquery-typeahead/index.d.ts b/types/jquery-typeahead/index.d.ts new file mode 100644 index 0000000000..ddb5104a85 --- /dev/null +++ b/types/jquery-typeahead/index.d.ts @@ -0,0 +1,531 @@ +// Type definitions for jquery-typeahead 2.10 +// Project: http://www.runningcoder.org/jquerytypeahead +// Definitions by: Hamid Mayeli +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +interface JQuery { + typeahead(options: RunningCoder.Typeahead.Options): JQuery; +} + +interface JQueryStatic { + typeahead(options: RunningCoder.Typeahead.Options): JQuery; +} + +declare namespace RunningCoder.Typeahead { + interface Options { + /** + * The jQuery input selector is only required if the Typeahead was initialized without a jQuery object. + * In that case, if no input is found, the Typeahead is dropped. + */ + input?: string; + + /** + * The number of characters typed inside the search input before searching for results. + * It is possible to set this option to 0 and combine it with `searchOnFocus: true` to display a set of results by default. + * + * @default 2 + */ + minLength?: number; + + /** + * The maximum number of characters typed inside the input to perform a search. + * + * @default false + */ + maxLength?: false | number; + + /** + * The maximum number of search results that will appear inside the list. Set 0 to display ALL search results. + * It is possible to combine `maxItem` with `maxItemPerGroup` to get different results. + * + * @default 8 + */ + maxItem?: false | number; + + /** + * By default, the typeahead will only load once the source data. + * Although you can change this behavior and request the data to be re-loaded on every "input" event (similar to + * keypress). - [Demo](http://www.runningcoder.org/jquerytypeahead/demo/#form-user_v1) + * * Note that you can modify the Ajax request to send the query with `{{query}}` modifier. + * + * @default false + */ + dynamic?: boolean; + + /** + * If `dynamic: true`, the delay (in milliseconds) will add a timer to prevent from sending a request on every key typed. + * Instead the request(s) will be sent once the delay expires. + * + * @default 300 + */ + delay?: number; + + /** + * Takes the default order in which the data was given. + * If `"asc"` or `"desc"` is set, they results will re-order based on display key. + */ + order?: "asc" | "desc"; + + /** + * `false` The position of the matched query can be anywhere inside the result string + * + * `true` The query can only be match if the result string starts by the query characters. + * + * @default false + */ + offset?: boolean; + + /** + * A suggestion text will appear if there is an item inside the result list that starts by the user query. + * Also pressing the right arrow at the end of the search input text will autocomplete the query with the suggested hint and call `callback.onClickBefore` with the selected item. + * + * @default false + */ + hint?: boolean | CssObject; + + /** + * If enabled, the query and search results will ignore accents (`ãàåÀùáșœĂšĂ©Ă«ĂȘÏíïßÔĂČóöÎĂčĂșĂŒĂ»Ă±Ă§`) and display every matches regardless of the punctuation. Ex: `Ă© = e`, `À = a`, etc. + * It is possible to set a custom accent object, by simply setting `from` and `to` keys + * * Using this option on large data sets (10,000+ items) might impact your search performances. + * + * @default false + */ + accent?: boolean | FromToPair; + + /** + * The search result(s) will receive the HTML tag around the matched query. + * + * If set to `true`, only the display keys will be highlighted + * + * If set to `"any"`, any string within the template will be highlighted + * + * @default true + */ + highlight?: "any" | boolean; + + /** `multiselect` configuration */ + multiselect?: MultiSelectSettings; + + /** + * If set to `true`, the results will grouped by the group name specified inside `source`. + * + * If set to `string`, the results will be grouped by the corresponding object key. + * Ex: group: `"conference"` will group the hockey teams by `"Western"` and `"Eastern"` conferences in [hockey_v1 demo](http://www.runningcoder.org/jquerytypeahead/demo/#form-hockey_v1) + * + * If an Object is set: `key`: Grouping key. `template`: Grouping template in the result list (custom header text), can be string or function. + * + * @default false + */ + group?: boolean | string | GroupSetting; + + /** + * By default, the groups will be output in the same order as they are defined in `source`. + * Set `"asc"` or `"desc"` to have the group name sorted ascending or descending + * Set an `Array` to specify the group order to appear in the search result + */ + groupOrder?: "asc" | "desc" | string[] | ((node?: JQuery, query?: string, result?: any, resultCount?: number, resultCountPerGroup?: number) => any[]); + + /** Set a maximum results per group if `group: true` configuration is enabled */ + maxItemPerGroup?: number; + + /** + * If a string a specified, a dropdown filter will be created between the search input and the search submit button using the `source.group` as indexes. + * The string value will appear at the end of the dropdown and will filter through all the sources. + * + * If an array of objects is set, the dropdownFilter will be built based on it. It is then possible to create filters based on item matching key:value. - + * [Demo](http://www.runningcoder.org/jquerytypeahead/demo/#form-hockey_v1) + */ + dropdownFilter?: boolean | "string" | DropdownFilterItem[]; + + /** + * If filters objects are defined, the Typeahead source data will be filtered based on the `"selected"` / `"checked"` checkboxes, + * radios and selects based on `"OR"` and `"AND"` filtering similar to database queries. + * * `selector` is the jquery selector to reach the unique input type `"checkbox"`, `"radio"` or select tag + * * `key` the object key that will be filtered, you can use "dot" notation to reach deep object properties, + * but in that case extra processing will be performed. Ex `object.key.is.deep` + * * `|` key prefix means "OR" filtering, the object key CAN match the value + * * `&` key prefix means "AND" filtering, the object key HAS to match the value + * + * Ex `dynamicFilter: [{ selector: "#assassin", key: "|tags.Assassin" }],` + */ + dynamicFilter?: false | DynamicFilterItem[]; + + /** + * If set to `true`, html will be added to add a backdrop under the search input and results. + * It is possible to override the css options by passing an object to this option. + */ + backdrop?: boolean | CssObject; + + /** + * If set to `true`, as soon as the Typeahead input is focused, the `backdrop` option will be displayed regardless. + */ + backdropOnFocus?: true; + + /** + * * If set to `true` or `localStorage`, the source data will be stored in `localStorage`. + * * If set to `sessionStorage`, the source data will be stored in `sessionStorage`. + */ + cache?: boolean | "localStorage" | "sessionStorage"; + + /** This is a `cache` configuration, it sets the storage time to live in milliseconds. */ + ttl?: number; + + /** + * Enabling this option will compress the data inside Localstorage. + * * Setting `compression: true` requires `cache: true` option to be enabled. + */ + compression?: boolean; + + /** + * If enabled, the typeahead will display results (if any) on input focus. You can combine this option with the input + * attribute `"autofocus"` to display results when the page is loaded. + */ + searchOnFocus?: boolean; + + /** Blur Typeahead when Tab key is pressed, if false Tab will go though search results */ + blurOnTab?: boolean; + + /** + * If a jQuery string selector or jQuery object is specified, the typeahead results will appear in that container instead of the default one. + * If the option is set to `false`, the HTML result list will not be built. + * Use this option for filtering "already on page" HTML list elements with show / hide. + */ + resultContainer?: "string" | false | JQuery; + + /** + * If enabled, the source data will be generated (doing Ajax request and preparing to data to be searched) + * on page load instead of waiting for the input to be focused. + * * This option does not work well with `dynamic: true` unless some other configuration is adjusted. + */ + generateOnLoad?: boolean; + + /** + * If enabled, an item will HAVE TO be selected in order to submit the form. + * Use this option if you want to restrict searching to your data set only. + */ + mustSelectItem?: boolean; + + /** + * If a string is defined, every result item will receive the string as href attribute replacing any `{{itemKey}}` by the `item's value`. + * It is possible to apply an extra operation of `"slugify"` on the value `{{url|slugify}}`. - [Demo](http://www.runningcoder.org/jquerytypeahead/demo/#form-beer_v1) + */ + href?: string | ((item?: any) => string); + + /** + * The key that will be searched for typeahead matching results inside source objects. + * It is possible to search through multiple keys by simply adding them inside the configuration array. + */ + display?: string[]; + + /** + * The template is a HTML string containing keys that will replaced by match results object keys. + * You MUST use `{{variable}}` delimiters for your string to be replaced. + * + * You can also reach multi-level deep object properties using regular `"."` format, `{{variable.secordlevel.thirdlevel}}` + * + * If you need to print the item values inside HTML data attributes, it is possible to use `{{variable|raw}}`. + * That optional modifier will make sure to get the unmodified value. + */ + template?: string | ((query?: string, item?: any) => string); + + /** + * In case there are no results to be displayed, a row will be displayed containing this template. + * It is possible to display the query using `{{query}}` string. + */ + emptyTemplate?: string | ((query?: string) => string | JQuery); + + /** + * When an item is selected / clicked, by default the `"Matched key"` will go inside the input. + * By defining a `templateValue`, the text that will result in the input can be customized. + */ + templateValue?: string; + + /** + * This option provides a small `"x"` on the right side of the input to clear the text, + * similar to some browser's default behavior with `input[type="search"]`. + */ + cancelButton?: boolean; + + /** + * If set to function, every element will be filtered using this custom rule AFTER the regular Typeahead filters have been applied. + */ + filter?: boolean | ((item?: any, displayKey?: string) => boolean); + + /** + * By default, search text matching is reserved to `display` keys. A searched text can't match multiple keys. + * + * If the option is enabled with `true` or `array` of display keys, every item will reveive an additional key called `compiled`. + * This key will then be searched first (using soften matching mechanism) for any matching results, then the `display` keys will + * be searched (using a `"string perfect"` matching mechanism). + * + * If the option is set to true, the `template` option will be compiled into the `"compiled"` item key. + * + * It is also possible to set an Array of display keys instead of the complete template. Try it on + * [Hockey_v1](http://www.runningcoder.org/jquerytypeahead/demo/#form-hockey_v1) + */ + correlativeTemplate?: boolean | any[]; + + /** + * The source option corresponds to the data set(s) that Typeahead will look through to find matches for the user query string. + * Inside the source, you can have multiple lists of data (groups) + * It is possible to send an async request inside the data function using `$.Deferred` + * `source.group` configuration: + */ + source?: Source | Source[] | SourceTable; + + /** Display debug information (RECOMMENDED for dev environment) */ + debug?: boolean; + + /** + * The callbacks are used to customize and add functionality to your Typeahead instance. You will find plenty of examples in the Demo section. + * There are 3 ways to define the callbacks: + * * Function `(recommended)`: Anonymous function calling a local function with parameters. + * * String: Function name (can be namespaced) located on the window scope without any parameters. + * * Array: First element is the function name accessible from the window scope, second element is an array containing the parameters. + */ + callback?: Callback; + + /** Set a custom template for the groups */ + groupTemplate?: null; + + /** Display a loading animation when typeahead is doing request / searching for results */ + loadingAnimation?: true; + + /** If set to function, every element will be filtered using this custom rule AFTER the regular Typeahead filters have been applied. */ + matcher?: ((item?: any, displayKey?: string) => boolean); + + selector?: Selector; + } + + interface Source { + /** Overrides the default configuration for the specified group. */ + minLength?: number; + + /** Overrides the default configuration for the specified group. */ + maxLength?: false | number; + + /** Overrides the default configuration for the specified group. */ + dynamic?: boolean; + + /** Overrides the default configuration for the specified group. */ + filter?: boolean | ((item?: any, displayKey?: string) => boolean); + + /** Overrides the default configuration for the specified group. */ + matcher?: ((item?: any, displayKey?: string) => boolean); + + /** Overrides the default configuration for the specified group. */ + cache?: boolean | "localStorage" | "sessionStorage"; + + /** Overrides the default configuration for the specified group. */ + compression?: boolean; + + /** Overrides the default configuration for the specified group. */ + ttl?: number; + + /** Array or function that returns an Array. The items in your array can either be strings or objects */ + data?: any[] | (() => any[]); + + /** Overrides the default configuration for the specified group. */ + template?: string | ((query?: string, item?: any) => string); + + /** Overrides the default configuration for the specified group. */ + display?: string | string[]; + + /** En extended version of `JQuery Ajax` */ + ajax?: AJaxSettings | ((query?: string) => AJaxSettings); + } + + interface AJaxSettings extends JQueryAjaxSettings { + path?: string; + done?: (data?: JQuery, textStatus?: string, jqXHR?: JQueryXHR) => void; + fail?: (jqXHR?: JQueryXHR, textStatus?: string, errorThrown?: any) => void; + always?: (data?: JQuery, textStatus?: string, jqXHR?: JQueryXHR) => void; + then?: (jqXHR?: JQueryXHR, textStatus?: string) => void; + } + + interface FromToPair { + from: string; + to: string; + } + + interface SourceTable { + [key: string]: Source; + } + + interface CssObject { + [key: string]: string; + } + + interface DynamicFilterItem { + selector: string; + key: string; + } + + interface DropdownFilterItem { + key: string; + template: string | ((item: any) => string); + value: string; + all: string; + } + + interface GroupSetting { + key: string; + template: string | ((item: any) => string); + } + + interface MultiSelectSettings { + /** Optional limit of maximum items to select */ + limit?: number; + + /** Template when the limit is reached */ + limitTemplate?: string | ((query?: string) => string); + + /** Unique item identifier to remove an item from the result list when selected (use any of the item key), by default a JSON of the item will be used */ + matchOn?: string | any[]; + + /** If true, the last label will be deleted if the query is empty and backspace is pressed */ + cancelOnBackspace?: boolean; + + /** Href link on the multiselect item */ + href?: string | ((item?: any) => string); + + /** Default items when Typeahead is loade */ + data?: any[] | (() => any); + + callback?: MultiSelectSettingsCallback; + } + + interface MultiSelectSettingsCallback { + /** Triggered when a multiselect item is clicked */ + onClick?: (node?: JQuery, item?: any, event?: JQueryEventObject) => void; + + /** Triggered when a multiselect item is canceled */ + onCancel?: (node?: JQuery, item?: any, event?: JQueryEventObject) => void; + } + + interface Callback { + /** Will be executed on Typeahead initialization, before anything else. */ + onInit?: (node?: JQuery) => void; + + /** Triggers when the Typeahead initial preparation is completed. */ + onReady?: (node?: JQuery) => void; + + /** Triggers when the Typeahead results layout is displayed. */ + onShowLayout?: (node?: JQuery, query?: string) => void; + + /** Triggers when the Typeahead results layout is requested to hide. */ + onHideLayout?: (node?: JQuery, query?: string) => void; + + /** Triggers every time a new search is executed in Typeahead. */ + onSearch?: (node?: JQuery, query?: string) => void; + + /** Whenever the result changes, this callback will be triggered. */ + onResult?: (node?: JQuery, query?: string, result?: any, resultCount?: number) => void; + + /** + * When the result HTML is build, modify it before it get showed. + * This callback should be used to modify the result DOM before it gets inserted into Typeahead. + * * If you are using this callback, the resultHtmlList param needs to be returned at the end of your function. + */ + onLayoutBuiltBefore?: (node?: JQuery, query?: string, result?: any, resultHtmlList?: JQuery) => JQuery; + + /** Perform an action right after the result HTML gets inserted into Typeahead's DOM. */ + onLayoutBuiltAfter?: (node?: JQuery, query?: string, result?: any) => void; + + /** + * When a key is pressed to navigate the results. It is possible to disable the input text change + * when using up and down arrows when `event.preventInputChange` is set to true + */ + onNavigateBefore?: (node?: JQuery, query?: string, event?: JQueryEventObject) => void; + + /** Called at the end of Navigate (once the `.active` class and other operations are completed). */ + onNavigateAfter?: (node?: JQuery, lis?: JQuery, a?: JQuery, item?: any, query?: string, event?: JQueryEventObject) => void; + + /** Will be executed when a item is hovered inside the result list. */ + onMouseEnter?: (node?: JQuery, a?: JQuery, item?: any, event?: JQueryEventObject) => void; + + /** Will be executed when a result item is hovered out. */ + onMouseLeave?: (node?: JQuery, a?: JQuery, item?: any, event?: JQueryEventObject) => void; + + /** + * Will be executed when a result item is clicked or the right arrow is pressed when an item is selected from + * the results list. This function will trigger before the regular behaviors. + */ + onClick?: (node?: JQuery, a?: JQuery, item?: any, event?: JQueryEventObject) => void; + + /** + * Will be executed when a result item is clicked or the right arrow is pressed when an item is selected from + * the results list. This function will trigger before the regular behaviors. + */ + onClickBefore?: (node?: JQuery, a?: JQuery, item?: any, event?: JQueryEventObject) => void; + + /** + * Will be executed when a result item is clicked or the right arrow is pressed when an item is selected from + * the results list. This function will trigger after the regular behaviors. + */ + onClickAfter?: (node?: JQuery, a?: JQuery, item?: any, event?: JQueryEventObject) => void; + + /** Will be executed when a dropdown filter is selected. Requires `dropdownFilter: true`. */ + onDropdownFilter?: (node?: JQuery, a?: JQuery, item?: any, event?: JQueryEventObject) => void; + + /** Gets called when the Ajax request(s) are sent. Either on initial requests or on every dynamic requests. */ + onSendRequest?: (node?: JQuery, query?: string) => void; + + /** Gets called when the Ajax request(s) are all received */ + onReceiveRequest?: (node?: JQuery, query?: string) => void; + + /** + * Gets called after the Ajax requests are all received and the data is populated inside Typeahead. + * This is the place where extra parsing or filtering should occure before the data gets available inside any Typeahead query + * For example, the Backend sends the "display" key separated by underscores "_" instead of spaces " ". + * * The `data` parameter HAS to be returned after it's transformed. + */ + onPopulateSource?: (node?: JQuery, data?: any[], group?: any, path?: any) => any[]; + + /** Perform operation on the source data before it gets in Typeahead cache */ + onCacheSave?: (node?: JQuery, data?: any, group?: any, path?: any) => void; + + /** + * Override the native onSubmit function by your own. + * If after performing a set of action(s) you want to submit the form, simply do `form.submit()`. + * * The item parameter is not always defined. An item object will be sent if the submit happens after an item from the list has been selected. + */ + onSubmit?: (node?: JQuery, form?: any, item?: any, event?: JQueryEventObject) => void; + + /** + * Any time there is text inside the input and it gets cleared (Backspace, Esc, Cancel button, etc). + * It is possible to track back the event that cleared the input using event.originalEvent + */ + onCancel?: (node?: JQuery, event?: JQueryEventObject) => void; + + /** When an item in the result list is focused */ + onEnter?: (node?: JQuery, item?: any, result?: any, event?: JQueryEventObject) => void; + + /** When an item in the result list is blurred */ + onLeave?: (node?: JQuery, item?: any, result?: any, event?: JQueryEventObject) => void; + } + + interface Selector { + container?: string; + result?: string; + list?: string; + group?: string; + item?: string; + empty?: string; + display?: string; + query?: string; + filter?: string; + filterButton?: string; + dropdown?: string; + dropdownItem?: string; + labelContainer?: string; + label?: string; + button?: string; + backdrop?: string; + hint?: string; + cancelButton?: string; + } +} diff --git a/types/jquery-typeahead/jquery-typeahead-tests.ts b/types/jquery-typeahead/jquery-typeahead-tests.ts new file mode 100644 index 0000000000..92ff1969c6 --- /dev/null +++ b/types/jquery-typeahead/jquery-typeahead-tests.ts @@ -0,0 +1,97 @@ +let t1 = $('input').typeahead({ + order: "desc", + source: { + data: [ + "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", + "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", + "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", + "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burma", + "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", + "Chile", "China", "Colombia", "Comoros", "Congo, Democratic Republic", "Congo, Republic of the", + "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", + "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", + "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", + "Gambia", "Georgia", "Germany", "Ghana", "Greece", "Greenland", "Grenada", "Guatemala", "Guinea", + "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", + "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", + "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", + "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", + "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", + "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Mongolia", "Morocco", "Monaco", + "Mozambique", "Namibia", "Nauru", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Niger", + "Nigeria", "Norway", "Oman", "Pakistan", "Panama", "Papua New Guinea", "Paraguay", "Peru", + "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Samoa", "San Marino", + "Sao Tome", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", + "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", + "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", + "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", + "Turkmenistan", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", + "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe" + ] + }, + callback: { + onInit: (node) => { + console.log('Typeahead Initiated'); + } + } +}); + +let t2 = $.typeahead({ + input: '.js-typeahead-country_v2', + minLength: 1, + maxItem: 20, + order: "asc", + href: "https://en.wikipedia.org/?title={{display}}", + template: "{{display}} {{group}}", + source: { + country: { + ajax: { + url: "/jquerytypeahead/country_v2.json", + path: "data.country" + } + }, + capital: { + ajax: { + type: "POST", + url: "/jquerytypeahead/country_v2.json", + path: "data.capital", + data: { myKey: "myValue" } + } + } + }, + callback: { + onNavigateAfter: (node, lis, a, item, query, event) => { + if (~[38, 40].indexOf(event.keyCode)) { + const resultList = node.closest("form").find("ul.typeahead__list"); + const activeLi = lis.filter("li.active"); + const offsetTop = activeLi[0] && activeLi[0].offsetTop - (resultList.height() / 2) || 0; + + resultList.scrollTop(offsetTop); + } + }, + onClickAfter: (node, a, item, event) => { + console.log("Just log"); + }, + onResult: (node, query, result, resultCount) => { + if (query === "") return; + + let text = ""; + if (result.length > 0 && result.length < resultCount) { + text = `Showing ${result.length} of ${resultCount} elements matching "${query}"`; + } else if (result.length > 0) { + text = `Showing ${result.length} elements matching "${query}"`; + } else { + text = 'No results matching'; + } + $('#result-container').html(text); + }, + onMouseEnter: (node, a, item, event) => { + if (item.group === "country") { + $(a).append(``); + } + }, + onMouseLeave: (node, a, item, event) => { + $(a).find('.flag-chart').remove(); + } + } +}); diff --git a/types/is-absolute-url/tsconfig.json b/types/jquery-typeahead/tsconfig.json similarity index 79% rename from types/is-absolute-url/tsconfig.json rename to types/jquery-typeahead/tsconfig.json index 57c46bb32b..1b5d326f2d 100644 --- a/types/is-absolute-url/tsconfig.json +++ b/types/jquery-typeahead/tsconfig.json @@ -2,11 +2,12 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": true, + "strictNullChecks": false, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -18,6 +19,6 @@ }, "files": [ "index.d.ts", - "is-absolute-url-tests.ts" + "jquery-typeahead-tests.ts" ] } \ No newline at end of file diff --git a/types/jquery-typeahead/tslint.json b/types/jquery-typeahead/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/jquery-typeahead/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/js-yaml/index.d.ts b/types/js-yaml/index.d.ts index b59741e74e..54ae308639 100644 --- a/types/js-yaml/index.d.ts +++ b/types/js-yaml/index.d.ts @@ -15,7 +15,7 @@ export class Type { resolve(data: any): boolean; construct(data: any): any; instanceOf: object | null; - predicate: string | null; + predicate: ((data: object) => boolean) | null; represent: ((data: object) => any) | { [x: string]: (data: object) => any; } | null; defaultStyle: string | null; styleAliases: { [x: string]: any; }; @@ -82,7 +82,7 @@ export interface TypeConstructorOptions { resolve?: (data: any) => boolean; construct?: (data: any) => any; instanceOf?: object; - predicate?: string; + predicate?: (data: object) => boolean; represent?: ((data: object) => any) | { [x: string]: (data: object) => any }; defaultStyle?: string; styleAliases?: { [x: string]: any; }; diff --git a/types/js-yaml/js-yaml-tests.ts b/types/js-yaml/js-yaml-tests.ts index 304da7731d..024054a6fb 100644 --- a/types/js-yaml/js-yaml-tests.ts +++ b/types/js-yaml/js-yaml-tests.ts @@ -23,7 +23,7 @@ const typeConstructorOptions: TypeConstructorOptions = { resolve: fn, construct: fn, instanceOf: obj, - predicate: str, + predicate: (obj) => false, represent: fn, defaultStyle: str, styleAliases: map @@ -104,7 +104,7 @@ type.resolve; type.construct; // $ExpectType object | null type.instanceOf; -// $ExpectType string | null +// $ExpectType ((data: object) => boolean) | null type.predicate; // $ExpectType ((data: object) => any) | { [x: string]: (data: object) => any; } | null type.represent; diff --git a/types/jsonapi-serializer/index.d.ts b/types/jsonapi-serializer/index.d.ts index 4d9344bc28..2368981378 100644 --- a/types/jsonapi-serializer/index.d.ts +++ b/types/jsonapi-serializer/index.d.ts @@ -29,7 +29,7 @@ export interface SerializerOptions { pluralizeType?: boolean; typeForAttribute?: TypeForAttribute; meta?: object; - transform?: (() => void); + transform?: Transform; } export interface KeyForAttribute { diff --git a/types/jsoneditor/index.d.ts b/types/jsoneditor/index.d.ts index 3c74a3d789..6bf6efa857 100644 --- a/types/jsoneditor/index.d.ts +++ b/types/jsoneditor/index.d.ts @@ -22,7 +22,7 @@ declare module 'jsoneditor' { export type JSONEditorMode = 'tree' | 'view' | 'form' | 'code' | 'text'; export interface NodeName { - path: string; + path: ReadonlyArray; type: 'object'|'array'; size: number; } diff --git a/types/jsonld/index.d.ts b/types/jsonld/index.d.ts new file mode 100644 index 0000000000..2dee309455 --- /dev/null +++ b/types/jsonld/index.d.ts @@ -0,0 +1,217 @@ +// Type definitions for jsonld 1.5 +// Project: https://github.com/digitalbazaar/jsonld.js +// Definitions by: Jonas Erbe +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { Context, JsonLd, Document, Url, JsonLdProcessor, RemoteDocument } from './jsonld-spec'; + +// Some typealiases for better readability and some placeholders +type MimeNQuad = 'application/n-quads'; +type RdfDataSet = object; // Placeholder +type RdfOrString = RdfDataSet|string; +type Callback = (err: Error, res: T) => void; +type DocCallback = Callback; + +/* + * Declares interfaces used to type the methods options object. + * The interfaces are usefull to avoid code replication. + */ + +export namespace Options { + interface DocLoader { + documentLoader?: (url: Url, + callback: (err: Error, remoteDoc: RemoteDocument) => void) + => Promise; + } + + interface Common extends DocLoader { + base?: string; + expandContext?: Context; + } + + interface ExpMap { + // TODO: Figure out type of info + expansionMap?: (info: any) => any; + } + + interface Compact extends Common, ExpMap { + compactArrays?: boolean; + appropriate?: boolean; + compactToRelative?: boolean; + graph?: boolean; + skipExpansion?: boolean; + expansion?: boolean; + framing?: boolean; + // TODO: Figure out type of info + compactionMap?: (info: any) => void; + } + + interface Expand extends Common, ExpMap { + keepFreeFloatingNodes?: boolean; + } + + type Flatten = Common; + + interface Frame { + embed?: '@last' | '@always' | '@never' | '@link'; + explicit?: boolean; + requireAll?: boolean; + omitDefault?: boolean; + } + + interface Normalize extends Common { + algorithm?: 'URDNA2015' | `URGNA2012`; + skipExpansion?: boolean; + expansion?: boolean; + inputFormat?: MimeNQuad; + format?: MimeNQuad; + useNative?: boolean; + } + + interface FromRdf { + format?: MimeNQuad; + rdfParser?: any; + useRdfType?: boolean; + useNativeTypes?: boolean; + } + + interface ToRdf extends Common { + skipExpansion?: boolean; + format?: MimeNQuad; + produceGeneralizedRdf?: boolean; + } + + // TODO Complete and uncomment if needed (see comments at the end of the file) + /* NOT USED AT THE MOMENT + // type Link = Common; + interface Issuer { + + issuer?: IdentifierIssuer; // a jsonld.IdentifierIssuer to use to label blank nodes. + } + + type CreateNodeMap = Common&Issuer; + + interface Merge extends Common, Issuer{ + + mergeNodes?: boolean; //true to merge properties for nodes with the same ID, + //false to ignore new properties for nodes with the same ID once + //the ID has been defined; note that this may not prevent merging + //new properties where a node is in the `object` position + //(default: true). + } + + interface Get { + documentLoader?: DocLoader; // the document loader to use. + } + + type ProcessContext = DocLoader; + */ +} + +export function compact(input: Document, ctx: Context, options: Options.Compact, callback: DocCallback): void; +export function compact(input: Document, ctx: Context, callback: DocCallback): void; +export function compact(input: Document, ctx: Context, options?: Options.Compact): Promise; + +export function expand(input: Document, options: Options.Expand, callback: DocCallback): void; +export function expand(input: Document, callback: DocCallback): void; +export function expand(input: Document, options?: Options.Expand): Promise; + +export function flatten(input: Document, ctx: Context|null, options: Options.Flatten, callback: DocCallback): void; +export function flatten(input: Document, ctx: Context|null, callback: DocCallback): void; +export function flatten(input: Document, ctx: Context|null, options?: Options.Flatten): Promise; + +export function frame(input: Document, frame: Document, options: Options.Frame, callback: DocCallback): void; +export function frame(input: Document, frame: Document, callback: DocCallback): void; +export function frame(input: Document, frame: Document, options?: Options.Frame): Promise; + +export function normalize(input: Document, options: Options.Normalize, callback: DocCallback): void; +export function normalize(input: Document, callback: DocCallback): void; +export function normalize(input: Document, options?: Options.Normalize): Promise; + +export function fromRDF(dataset: RdfOrString, options: Options.FromRdf, callback: DocCallback): void; +export function fromRDF(dataset: RdfOrString, callback: DocCallback): void; +export function fromRDF(dataset: RdfOrString, options?: Options.FromRdf): Promise; + +export function toRDF(input: Document, callback: Callback): void; +export function toRDF(input: Document, options: Options.ToRdf, callback: Callback): void; +export function toRDF(input: Document, options?: Options.ToRdf): Promise; + +export let JsonLdProcessor: JsonLdProcessor; + +// disable autoexport +export {}; + +// TODO: Complete and export the following types if needed! +// ************************************************************************************ +// Not exported because of experimental state +// export function link(input: Document, ctx: Context, options: Options.Link, callback: DocCallback): void; +// export function link(input: Document, ctx: Context, callback: DocCallback): void; +// export function link(input: Document, ctx: Context, options?: Options.Link): Promise; + +// Not exported because of experimental state +// export function createNodeMapn(input: Document, options: Options.CreateNodeMap, callback: Callback): void; +// export function createNodeMapn(input: Document, callback: Callback): void; +// export function createNodeMapn(input: Document, options: Options.CreateNodeMap): Promise; + +// Not exported because of experimental state +// export function merge (docs: Document, ctx: Context, options: Options.Merge, callback: DocCallback): void; +// export function merge (docs: Document, ctx: Context, callback: DocCallback): void; +// export function merge (docs: Document, ctx: Context, options: Options.Merge): Promise; + +/* +export namespace documentLoader { + function get(): NormalizedDocLoader; + function set(v: DocLoader): void; +} +*/ + +// default document loader not implemented +// export function documentLoader(url: Url): DocLoader; + +/** + * Deprecated default document loader. Do not use or override. + */ +// export function loadDocument(url: Url): Promise; + +// export function get (url: Url, options: Options.Get): Promise; + +// export function processContext(activeCtx: Context, localCtx: Context, options: Options.ProcessContext): Promise; + +// backwards compatibility +// export function getContextValue(ctx: Context, key: string, type: JsonLDType): any; +/** + * Document loaders. + */ +/* +export namespace documentLoaders { + let node: DocLoader; + let xhr: DocLoader; +} + +export type DocumentLoaders = 'node' | 'xhr'; +*/ + +// export function useDocumentLoader (type: DocumentLoaders, ...params: any): void; + +// type ParserFunction = (input: string, callback: (err: Error, dataset: RdfDataSet) => Promise) => void; +// export function registerRDFParser (contentType: MimeType, parser: ParserFunction): void; + +// export function unregisterRDFParser (contentType: MimeType): void; + +// TODO Still originial source code. Maybe build additional types from it +// ****************************************************************************** +/* URL API */ +// jsonld.url = require('./url'); +/* Utility API */ +// jsonld.util = util; +// backwards compatibility +// Object.assign(jsonld, util); + +// reexpose API as jsonld.promises for backwards compatability +// jsonld.promises = jsonld; + +// backwards compatibility +// declare module 'RequestQueue'; + +// ****************************************************************************** diff --git a/types/jsonld/jsonld-spec.d.ts b/types/jsonld/jsonld-spec.d.ts new file mode 100644 index 0000000000..013d12cad5 --- /dev/null +++ b/types/jsonld/jsonld-spec.d.ts @@ -0,0 +1,40 @@ +/* + * Types from the jsonld Specification: + * https://www.w3.org/TR/json-ld-api/ + * + */ + +// Some aliases and placeholders for better readability +export type JsonLdObj = object; +export type JsonLdArray = [object]; +export type JsonLd = JsonLdObj|JsonLdArray; + +type DOMString = string; +type LoadDocumentCallback = Promise; + +export type Url = DOMString; +export type Iri = Url; +export type Document = JsonLd|Url; +export type Context = Document; + +export interface Options { + base?: DOMString|null; + compactArrays?: boolean; + documentLoader?: LoadDocumentCallback|null; + expandContext?: Context|null; + processingMode?: DOMString; +} + +export interface JsonLdProcessor { + compact(input: Document, context: Context, options?: Options): Promise; + expand(input: Document, options?: Options): Promise; + flatten(input: Document, context?: Context|null, options?: Options): Promise; +} + +export interface RemoteDocument { + contextUrl?: Url; + documentUrl: Url; + document: JsonLd; +} + +export {}; diff --git a/types/jsonld/jsonld-tests.ts b/types/jsonld/jsonld-tests.ts new file mode 100644 index 0000000000..dc7b2b2c4d --- /dev/null +++ b/types/jsonld/jsonld-tests.ts @@ -0,0 +1,203 @@ +import * as jsonld from 'jsonld'; + +const doc = { + "http://schema.org/name": "Manu Sporny", + "http://schema.org/url": {"@id": "http://manu.sporny.org/"}, + "http://schema.org/image": {"@id": "http://manu.sporny.org/images/manu.png"} + }; + +const docNQuads = + `_: "Manu Sporny" . + _: . + _: .`; + +const context = { + name: "http://schema.org/name", + homepage: {"@id": "http://schema.org/url", "@type": "@id"}, + image: {"@id": "http://schema.org/image", "@type": "@id"} + }; + +const baseUrl = 'http://schema.org'; + +const frame = doc; + +const docRDF = jsonld.toRDF(doc); + +let count = 0; +function log(doc: object|string) { + count++; + // Uncomment if testing with node.js + if (typeof doc === 'object') { + // console.log(count + ": " + JSON.stringify(doc) + "\n"); + } else { + // console.log(doc); + } +} + +/** + * compact() test + */ +jsonld.compact(doc, context, (err, compDoc) => { + log(compDoc); +}); + +jsonld.compact(doc, context, {appropriate: true}, (err, compDoc) => { + log(compDoc); +}); + +jsonld.compact(doc, context) +.then((compDoc) => { + log(compDoc); +}); + +jsonld.compact(doc, context, {graph: false}) +.then((compDoc) => { + log(compDoc); +}); + +/** + * expand() test + */ +jsonld.expand(doc, (err, res) => { + log(res); +}); + +jsonld.expand(doc, {keepFreeFloatingNodes: false}, (err, res) => { + log(res); +}); + +jsonld.expand(doc) +.then((res) => { + log(res); +}); + +jsonld.expand(doc, {keepFreeFloatingNodes: false}) +.then((res) => { + log(res); +}); + +/** + * flatten() test + */ +jsonld.flatten(doc, context, (err, res) => { + log(res); +}); + +jsonld.flatten(doc, context, {expandContext: context}, (err, res) => { + log(res); +}); + +jsonld.flatten(doc, context) +.then((res) => { + log(res); +}); + +jsonld.flatten(doc, context, {base: baseUrl}) +.then((res) => { + log(res); +}); + +/** + * frame() test + */ +jsonld.frame(doc, frame, (err, res) => { + log(res); +}); + +jsonld.frame(doc, frame, {embed: "@last", explicit: false}, (err, res) => { + log(res); +}); + +jsonld.frame(doc, frame) +.then((res) => { + log(res); +}); + +jsonld.frame(doc, frame, {requireAll: true}) +.then((res) => { + log(res); +}); + +/** + * normalize() test + */ +jsonld.normalize(doc, (err, res) => { + log(res); +}); + +jsonld.normalize(doc, {algorithm: 'URDNA2015', expansion: false}, (err, res) => { + log(res); +}); + +jsonld.normalize(doc) +.then((res) => { + log(res); +}); + +jsonld.normalize(doc, {expansion: false}) +.then((res) => { + log(res); +}); + +/** + * fromRDF() test + */ +jsonld.fromRDF(docNQuads, (err, res) => { + log(res); +}); + +jsonld.fromRDF(docNQuads, {format: 'application/n-quads'}, (err, res) => { + log(res); +}); + +jsonld.fromRDF(docRDF) +.then((res) => { + log(res); +}); + +jsonld.fromRDF(docRDF, {useRdfType: false}) +.then((res) => { + log(res); +}); + +/** + * toRDF() test + */ +jsonld.toRDF(doc, (err, res) => { + log(res); +}); + +jsonld.toRDF(doc, {format: 'application/n-quads'}, (err, res) => { + log(res); +}); + +jsonld.toRDF(doc) +.then((res) => { + log(res); +}); + +jsonld.toRDF(doc, {produceGeneralizedRdf: false}) +.then((res) => { + log(res); +}); + +/* + * Test class JsonLdProcessor + */ + +const processor = jsonld.JsonLdProcessor; + +processor.compact(doc, context) +.then((res) => { + log(res); +}); + +processor.expand(doc) +.then((res) => { + log(res); +}); + +processor.flatten(doc) +.then((res) => { + log(res); +}); diff --git a/types/jsonld/tsconfig.json b/types/jsonld/tsconfig.json new file mode 100644 index 0000000000..4d9c179ebc --- /dev/null +++ b/types/jsonld/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "strictFunctionTypes": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jsonld-tests.ts", + "jsonld-spec.d.ts" + ] +} diff --git a/types/p-settle/tslint.json b/types/jsonld/tslint.json similarity index 100% rename from types/p-settle/tslint.json rename to types/jsonld/tslint.json diff --git a/types/jspdf/index.d.ts b/types/jspdf/index.d.ts index 63789a7093..c3507fc5e5 100644 --- a/types/jspdf/index.d.ts +++ b/types/jspdf/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for jsPDF 1.2 +// Type definitions for jsPDF 1.3 // Project: https://github.com/MrRio/jsPDF // Definitions by: Amber SchĂŒhmacher // Kevin Gonnord // Jackie Weng +// Frank Brullo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'jspdf' { @@ -76,7 +77,8 @@ declare module 'jspdf' { setLineCap(style:string|number):jsPDF; setLineJoin(style:string|number):jsPDF; output(type?:string, options?:any):any; - save(filename:string):jsPDF; + save(filename:string): void; + save(filename:string, options: {returnPromise: boolean}): Promise; /** * jsPDF plugins below: @@ -184,7 +186,7 @@ declare module 'jspdf' { stroke():void; fill():void; translate(x:number, y:number):void; - measureText(text:string):number; + measureText(text:string):{ width: number }; }; // jsPDF plugin: fromHTML diff --git a/types/junk/index.d.ts b/types/junk/index.d.ts deleted file mode 100644 index 390847e1c0..0000000000 --- a/types/junk/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Type definitions for junk 2.1 -// Project: https://github.com/sindresorhus/junk#readme -// Definitions by: BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/** - * Returns `true` if `filename` matches a junk file. - */ -export function is(filename: string): boolean; -/** - * Returns `true` if `filename` doesn't match a junk file. - */ -export function not(filename: string): boolean; -/** - * Regex used for matching. - */ -export const regex: RegExp; diff --git a/types/junk/junk-tests.ts b/types/junk/junk-tests.ts deleted file mode 100644 index 848eded660..0000000000 --- a/types/junk/junk-tests.ts +++ /dev/null @@ -1,12 +0,0 @@ -/// - -import fs = require('fs'); -import * as junk from 'junk'; - -junk.is('foo'); // $ExpectType boolean -junk.not('foo'); // $ExpectType boolean -junk.regex; // $ExpectType RegExp - -fs.readdir('some/path', (err, files) => { - files.filter(junk.not); -}); diff --git a/types/knockout/test/index.ts b/types/knockout/test/index.ts index 094cab2aa1..c70394ea22 100644 --- a/types/knockout/test/index.ts +++ b/types/knockout/test/index.ts @@ -650,7 +650,7 @@ function test_Components() { ko.components.register("name", { template: "string-template", viewModel: { instance: null } }); // viewModel from createViewModel factory method - ko.components.register("name", { template: "string-template", viewModel: { createViewModel: function (params: any, componentInfo: KnockoutComponentTypes.ComponentInfo) { return null; } } }); + ko.components.register("name", { template: "string-template", viewModel: { createViewModel: function (params?: any, componentInfo?: KnockoutComponentTypes.ComponentInfo) { return null; } } }); // viewModel from an AMD module ko.components.register("name", { template: "string-template", viewModel: { require: "module" } }); diff --git a/types/koa-log4/index.d.ts b/types/koa-log4/index.d.ts index e47cfc4e07..cda6643412 100644 --- a/types/koa-log4/index.d.ts +++ b/types/koa-log4/index.d.ts @@ -11,7 +11,7 @@ export function koaLogger(logger4js: Log4js.Logger, optionsOrFormat?: Options | export interface Options { format?: string; - level?: Log4js.Level; + level?: Log4js.Level | 'auto'; } export * from 'log4js'; diff --git a/types/ldapjs/index.d.ts b/types/ldapjs/index.d.ts index b2444ae232..fb09150000 100644 --- a/types/ldapjs/index.d.ts +++ b/types/ldapjs/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for ldapjs 1.0 // Project: http://ldapjs.org -// Definitions by: Charles Villemure , Peter Kooijmans +// Definitions by: Charles Villemure , Peter Kooijmans , Pablo Moleri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -75,8 +75,19 @@ export var Change: { new(change: Change): Change; } +export type SearchReference = any; + +export interface SearchCallbackResponse extends EventEmitter { + on(event: "searchEntry", listener: (entry: SearchEntry) => void): this; + on(event: "searchReference", listener: (referral: SearchReference) => void): this; + on(event: "page", listener: (res: LDAPResult, cb: (...args: any[]) => void) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "end", listener: (res: LDAPResult | null) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; +} + export interface SearchCallBack { - (error: Error, result: EventEmitter): void; + (error: Error | null, result: SearchCallbackResponse): void; } export type Control = any; @@ -191,7 +202,7 @@ export interface Client extends EventEmitter { * objects or a filter string as the filter option. * * Note that this method is 'special' in that the callback 'res' param will - * have two important events on it, namely 'entry' and 'end' that you can hook + * have two important events on it, namely 'searchEntry' and 'end' that you can hook * to. The former will emit a SearchEntry object for each record that comes * back, and the latter will emit a normal LDAPResult object. * @@ -281,3 +292,94 @@ export class NotFilter extends Filter { export class ApproximateFilter extends Filter { constructor(options: { attribute: string, value: string }) } + +export interface AttributeJson { + type: string; + vals: string[]; +} + +export class Attribute { + private type: string; + readonly buffers: Buffer[]; + + /** + * Array of string values, binaries are represented in base64. + * get: When reading it always returns an array of strings. + * set: When assigning it accepts either an array or a single value. + * `Buffer`s are assigned directly, any other value is converted to string and loaded into a `Buffer`. + */ + vals: string | string[]; + + readonly json: AttributeJson; + + /** Stringified json property */ + toString(): string; + + static isAttribute(object: any): object is Attribute; + static compare(a: Attribute, b: Attribute): number; +} + +interface LDAPMessageJsonObject { + messageID: number; + protocolOp: string | undefined; + controls: Control[]; + [k: string]: any; +} + +export abstract class LDAPMessage { + messageID: number; + protocolOp: string | undefined; + controls: Control[]; + log: any; + readonly id: number; + readonly dn: string; + readonly type: string; + + /** A plain object with main properties */ + readonly json: LDAPMessageJsonObject; + + /** Stringified json property */ + toString(): string; + parse(ber: Buffer): boolean; + toBer(): Buffer; +} + +export class LDAPResult extends LDAPMessage { + readonly type: "LDAPResult"; + /** Result status 0 = success */ + status: number; + matchedDN: string; + errorMessage: string; + referrals: string[]; + connection: any; +} + +export interface SearchEntryObject { + dn: string; + controls: Control[]; + [p: string]: string | string[]; +} + +export interface SearchEntryRaw { + dn: string; + controls: Control[]; + [p: string]: string | Buffer | Buffer[]; +} + +export class SearchEntry extends LDAPMessage { + readonly type: "SearchEntry"; + objectName: string | null; + attributes: Attribute[]; + + readonly json: LDAPMessageJsonObject & { objectName: string, attributes: AttributeJson[]}; + + /** + * Retrieve an object with `dn`, `controls` and every `Atttribute` as a property with their value(s) + */ + readonly object: SearchEntryObject; + + /** + * Retrieve an object with `dn`, `controls` and every `Atttribute` as a property, using raw `Buffer`(s) as attribute values. + */ + readonly raw: SearchEntryRaw; +} diff --git a/types/ldapjs/ldapjs-tests.ts b/types/ldapjs/ldapjs-tests.ts index 51a0edbd77..8e38f395ed 100644 --- a/types/ldapjs/ldapjs-tests.ts +++ b/types/ldapjs/ldapjs-tests.ts @@ -15,8 +15,40 @@ let opts: ldap.SearchOptions = { attributes: ['dn', 'sn', 'cn'] }; -client.search('o=example', opts, (err: Error, res: NodeJS.EventEmitter): void => { - // nothing +client.search('o=example', opts, (err, res): void => { + if (err) { + err.message; + return; + } + + res.on('error', error => { + error.message; + }); + + res.on('searchEntry', (entry) => { + entry.json.objectName; + entry.object.dn; + entry.raw.dn; + }); + + res.on('page', function(result, cb) { + result.status; + + cb(); // Only when opts.pagePause == true + }); + + res.on('searchReference', (ref) => { + ref.uris; + }); + + res.on('end', (res) => { + res.status; + }); + + // Not a known event, just testing the EventEmitter fallback + res.on('unknown-event', (value) => { + value.any; + }); }); let change = new ldap.Change({ diff --git a/types/lightship/index.d.ts b/types/lightship/index.d.ts new file mode 100644 index 0000000000..f4a30fda74 --- /dev/null +++ b/types/lightship/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for lightship 3.0 +// Project: https://github.com/gajus/lightship#readme +// Definitions by: Scott Chang +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + +/** + * A teardown function called when shutdown is initialized. + * @param userConfiguration User configuration object + */ +export function createLightship(userConfiguration?: UserConfigurationType): LightshipType; + +export interface UserConfigurationType { + /* Run Iapetus only if service is detected ro be running in Kubernetes. Default: true. */ + detectKubernetes?: boolean; + /* The port on which the Lightship service listens. This port must be different than your main service port, if any. The default port is 9000.*/ + port?: number; + /* An a array of [signal events]{@link https://nodejs.org/api/process.html#process_signal_events}. Default: [SIGTERM]. */ + signals?: ReadonlyArray; + /* A number of milliseconds before force full termination. Default: 60000. */ + timeout?: number; +} + +export interface LightshipType { + /* Checks if server is in SERVER_IS_READY state */ + isServerReady: () => boolean; + /* Checks if server is in SERVER_IS_SHUTTING_DOWN state */ + isServerShuttingDown: () => boolean; + /** + * Registers teardown functions that are called when shutdown is initialized. + * All registered shutdown handlers are executed in the order they have been registered. + * After all shutdown handlers have been executed, Lightship asks `process.exit()` to terminate the process synchronously. + */ + registerShutdownHandler: (shutdownHandler: ShutdownHandlerType) => void; + /* Changes server state to SERVER_IS_SHUTTING_DOWN and initialises the shutdown of the application.*/ + shutdown: () => Promise; + /* Changes server state to SERVER_IS_NOT_READY. */ + signalNotReady: () => void; + /* Changes server state to SERVER_IS_READY. */ + signalReady: () => void; +} + +export type ShutdownHandlerType = () => Promise | void; diff --git a/types/lightship/lightship-tests.ts b/types/lightship/lightship-tests.ts new file mode 100644 index 0000000000..11d8d35100 --- /dev/null +++ b/types/lightship/lightship-tests.ts @@ -0,0 +1,17 @@ +import { createLightship, UserConfigurationType, LightshipType } from 'lightship'; + +const lightshipParams: UserConfigurationType = { + detectKubernetes: false, + timeout: 1000, + port: 50, + signals: ['SIGBUS'] +}; + +const lightship: LightshipType = createLightship(lightshipParams); + +lightship.isServerReady(); // $ExpectType boolean +lightship.isServerShuttingDown(); // $ExpectType boolean +lightship.registerShutdownHandler(() => {}); // $ExpectType void +lightship.shutdown(); // $ExpectType Promise +lightship.signalNotReady(); // $ExpectType void +lightship.signalReady(); // $ExpectType void diff --git a/types/p-time/tsconfig.json b/types/lightship/tsconfig.json similarity index 94% rename from types/p-time/tsconfig.json rename to types/lightship/tsconfig.json index 13daf0f62a..f28d94a99f 100644 --- a/types/p-time/tsconfig.json +++ b/types/lightship/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "p-time-tests.ts" + "lightship-tests.ts" ] } diff --git a/types/p-time/tslint.json b/types/lightship/tslint.json similarity index 100% rename from types/p-time/tslint.json rename to types/lightship/tslint.json diff --git a/types/load-json-file/index.d.ts b/types/load-json-file/index.d.ts deleted file mode 100644 index ec554289a5..0000000000 --- a/types/load-json-file/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Type definitions for load-json-file 2.0 -// Project: https://github.com/sindresorhus/load-json-file -// Definitions by: Sam Verschueren -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface LoadJsonFile { - /** - * Returns a promise for the parsed JSON. - */ - (filepath: string): Promise; - - /** - * Returns the parsed JSON. - */ - sync(filepath: string): any; -} - -declare const loadJsonFile: LoadJsonFile; - -export = loadJsonFile; diff --git a/types/load-json-file/load-json-file-tests.ts b/types/load-json-file/load-json-file-tests.ts deleted file mode 100644 index ad44fe3df2..0000000000 --- a/types/load-json-file/load-json-file-tests.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as loadJsonFile from 'load-json-file'; - -function assert(actual: string, expected: string): void { - if (actual !== expected) { - throw new Error(`${JSON.stringify(actual)} !== ${JSON.stringify(expected)}`); - } -} - -loadJsonFile('../package.json').then(pkg => { - assert(pkg.name, 'definitely-typed'); -}); - -const pkg = loadJsonFile.sync('../package.json'); -assert(pkg.name, 'definitely-typed'); diff --git a/types/load-json-file/tsconfig.json b/types/load-json-file/tsconfig.json deleted file mode 100644 index 9cbafc8746..0000000000 --- a/types/load-json-file/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "load-json-file-tests.ts" - ] -} \ No newline at end of file diff --git a/types/loadable__server/index.d.ts b/types/loadable__server/index.d.ts index 33a3366ca9..01428eea4b 100644 --- a/types/loadable__server/index.d.ts +++ b/types/loadable__server/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for @loadable/server 5.2 +// Type definitions for @loadable/server 5.8 // Project: https://github.com/smooth-code/loadable-components // Definitions by: Martynas KadiĆĄa +// Luis Herranz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -27,6 +28,24 @@ export type ChunkExtractorOptions = { stats: object; }); +/** + * Chunk that is received by the AttrFn function. + */ +export interface Chunk { + chunk: string; + filename: string; + linkType: string; + path: string; + scriptType: string; + type: string; + url: string; +} + +/** + * Used to insert attributes in the get functions. + */ +export type AttrFn = (chunk: Chunk) => {}; + /** * Used to collect chunks server-side and get them as script tags or script elements */ @@ -51,32 +70,32 @@ export class ChunkExtractor { /** * Get scripts as a string of `