From 04956e8e881e98d6e43021e8984df1eab214b0fe Mon Sep 17 00:00:00 2001 From: monabot Date: Tue, 11 Jul 2023 18:22:52 +0000 Subject: [PATCH] feat(docs): update docs Updates the Wing docs. See details in [workflow run]. [Workflow Run]: https://github.com/winglang/docsite/actions/runs/5523525017 ------ *Automatically created via the "update-docs" workflow* Signed-off-by: monabot --- .../01-start-here/06-learn-more.md | 42 ++- .../01-cloud/api-reference.md | 138 ++------ .../02-std/api-reference.md | 2 +- .../03-http/api-reference.md | 335 ++++++++---------- .../04-util/api-reference.md | 127 +++---- .../05-ex/api-reference.md | 216 +++++------ versioned_docs/version-latest/09-analytics.md | 31 ++ 7 files changed, 406 insertions(+), 485 deletions(-) create mode 100644 versioned_docs/version-latest/09-analytics.md diff --git a/versioned_docs/version-latest/01-start-here/06-learn-more.md b/versioned_docs/version-latest/01-start-here/06-learn-more.md index 6b2f891df..aa7775377 100644 --- a/versioned_docs/version-latest/01-start-here/06-learn-more.md +++ b/versioned_docs/version-latest/01-start-here/06-learn-more.md @@ -1,13 +1,45 @@ --- title: Learn more id: learn-more -description: Tutorials and Workshopts -keywords: [Wing] +description: Tutorials, Documentation and more resources to help with learning Wing +keywords: [Wing, Tutorial, Documentation, Learn, Resources] --- -To learn more, check out the rest of our docs where we cover all the basics with Wing, or check out our [examples repository](https://github.com/winglang/examples) to see some samples of Wing applications. +To learn more, you can check out our various tutorials and documentation pages and other resources. +### Documentation + +Learn about Wing's [core concepts](https://www.winglang.io/docs/category/core-concepts), including Wing's main differentiator, the [preflight and inflight execution phases](https://www.winglang.io/docs/concepts/inflights). + +Or check out the documentation of the varios resources in Wing's [standard library](https://www.winglang.io/docs/category/standard-library) which abstracts the cloud. + +You can also check out Wing's [toolchain](https://www.winglang.io/docs/category/tools), including the [compiler plugins](https://www.winglang.io/docs/tools/compiler-plugins) that allow you to go below the abstraction layer and tweak the infrastructure definitions directly. + +### Interactive Tutorials + +[Intro to Wing](https://www.winglang.io/learn/) + +[Preflight and Inflight execution phases](https://www.winglang.io/learn/preflight-inflight) + +[The Bucket resource](https://www.winglang.io/learn/bucket) + +[Introduction to Counter](https://www.winglang.io/learn/counter) + +[Working with Queue](https://www.winglang.io/learn/queue) + +[The Topic resource](https://www.winglang.io/learn/topic) + +### Guides +Check out our [guides](https://www.winglang.io/docs/category/guides) to learn how to use Wing to build real-world applications. + +### Examples +Check out our [examples repository](https://github.com/winglang/examples) to see some samples of Wing applications. +There are also smaller code examples by theme in the [docs](https://www.winglang.io/docs/category/examples). + +### Playground +Put your skills to the test using the [playground](https://docs.winglang.io/getting-started). + +### Community We also have a [YouTube channel](https://www.youtube.com/@winglangio) where we share clips of demos and guest interviews on our [Twitch show](https://www.twitch.tv/winglangio), and a [blog](https://www.winglang.io/blog). -Finally, we encourage you to join our [Wing Slack](http://t.winglang.io/slack). -We're here to help each other, answer questions, and share our cloud adventures. +Finally, we encourage you to join our [Wing Slack](http://t.winglang.io/slack) where we help each other, answer questions, and share our cloud adventures. \ No newline at end of file diff --git a/versioned_docs/version-latest/04-standard-library/01-cloud/api-reference.md b/versioned_docs/version-latest/04-standard-library/01-cloud/api-reference.md index 5bfe4360c..1aa45d034 100644 --- a/versioned_docs/version-latest/04-standard-library/01-cloud/api-reference.md +++ b/versioned_docs/version-latest/04-standard-library/01-cloud/api-reference.md @@ -1307,6 +1307,7 @@ The website's url. --- + ## Structs ### ApiConnectProps @@ -2600,7 +2601,6 @@ The website's custom domain name. ``` - ## Protocols ### IApiClient @@ -2672,11 +2672,9 @@ Inflight client for `IApiEndpointHandler`. ##### `handle` ```wing -handle(request: ApiRequest): ApiResponse +inflight handle(request: ApiRequest): ApiResponse ``` -**Inflight client:** [true](#true) - Inflight that will be called when a request is made to the endpoint. ###### `request`Required @@ -2713,11 +2711,9 @@ Inflight interface for `Bucket`. ##### `delete` ```wing -delete(key: str, opts?: BucketDeleteOptions): void +inflight delete(key: str, opts?: BucketDeleteOptions): void ``` -**Inflight client:** [true](#true) - Delete an existing object using a key from the bucket. ###### `key`Required @@ -2739,11 +2735,9 @@ Options available for delete an item from a bucket. ##### `exists` ```wing -exists(key: str): bool +inflight exists(key: str): bool ``` -**Inflight client:** [true](#true) - Check if an object exists in the bucket. ###### `key`Required @@ -2757,11 +2751,9 @@ Key of the object. ##### `get` ```wing -get(key: str): str +inflight get(key: str): str ``` -**Inflight client:** [true](#true) - Retrieve an object from the bucket. ###### `key`Required @@ -2775,11 +2767,9 @@ Key of the object. ##### `getJson` ```wing -getJson(key: str): Json +inflight getJson(key: str): Json ``` -**Inflight client:** [true](#true) - Retrieve a Json object from the bucket. ###### `key`Required @@ -2793,11 +2783,9 @@ Key of the object. ##### `list` ```wing -list(prefix?: str): MutArray +inflight list(prefix?: str): MutArray ``` -**Inflight client:** [true](#true) - Retrieve existing objects keys from the bucket. ###### `prefix`Optional @@ -2811,11 +2799,9 @@ Limits the response to keys that begin with the specified prefix. ##### `publicUrl` ```wing -publicUrl(key: str): str +inflight publicUrl(key: str): str ``` -**Inflight client:** [true](#true) - Returns a url to the given file. ###### `key`Required @@ -2827,11 +2813,9 @@ Returns a url to the given file. ##### `put` ```wing -put(key: str, body: str): void +inflight put(key: str, body: str): void ``` -**Inflight client:** [true](#true) - Put an object in the bucket. ###### `key`Required @@ -2853,11 +2837,9 @@ Content of the object we want to store into the bucket. ##### `putJson` ```wing -putJson(key: str, body: Json): void +inflight putJson(key: str, body: Json): void ``` -**Inflight client:** [true](#true) - Put a Json object in the bucket. ###### `key`Required @@ -2879,11 +2861,9 @@ Json object that we want to store into the bucket. ##### `tryDelete` ```wing -tryDelete(key: str): bool +inflight tryDelete(key: str): bool ``` -**Inflight client:** [true](#true) - Delete an object from the bucket if it exists. ###### `key`Required @@ -2897,11 +2877,9 @@ Key of the object. ##### `tryGet` ```wing -tryGet(key: str): str +inflight tryGet(key: str): str ``` -**Inflight client:** [true](#true) - Get an object from the bucket if it exists. ###### `key`Required @@ -2915,11 +2893,9 @@ Key of the object. ##### `tryGetJson` ```wing -tryGetJson(key: str): Json +inflight tryGetJson(key: str): Json ``` -**Inflight client:** [true](#true) - Gets an object from the bucket if it exists, parsing it as Json. ###### `key`Required @@ -2992,11 +2968,9 @@ A resource with an inflight "handle" method that can be passed to the bucket eve ##### `handle` ```wing -handle(key: str, type: BucketEventType): void +inflight handle(key: str, type: BucketEventType): void ``` -**Inflight client:** [true](#true) - Function that will be called when an event notification is fired. ###### `key`Required @@ -3032,11 +3006,9 @@ Inflight interface for `Counter`. ##### `dec` ```wing -dec(amount?: num, key?: str): num +inflight dec(amount?: num, key?: str): num ``` -**Inflight client:** [true](#true) - Decrement the counter, returning the previous value. ###### `amount`Optional @@ -3058,11 +3030,9 @@ specify the key to be decremented. ##### `inc` ```wing -inc(amount?: num, key?: str): num +inflight inc(amount?: num, key?: str): num ``` -**Inflight client:** [true](#true) - Increments the counter atomically by a certain amount and returns the previous value. ###### `amount`Optional @@ -3084,11 +3054,9 @@ specify the key to be incremented. ##### `peek` ```wing -peek(key?: str): num +inflight peek(key?: str): num ``` -**Inflight client:** [true](#true) - Get the current value of the counter. Using this API may introduce race conditions since the value can change between @@ -3105,11 +3073,9 @@ specify the key to be retrieved. ##### `set` ```wing -set(value: num, key?: str): void +inflight set(value: num, key?: str): void ``` -**Inflight client:** [true](#true) - Set a counter to a given value. ###### `value`Required @@ -3146,11 +3112,9 @@ Inflight interface for `Function`. ##### `invoke` ```wing -invoke(payload: str): str +inflight invoke(payload: str): str ``` -**Inflight client:** [true](#true) - Invoke the function asynchronously with a given payload. ###### `payload`Required @@ -3221,11 +3185,9 @@ Inflight client for `IFunctionHandler`. ##### `handle` ```wing -handle(event: str): void +inflight handle(event: str): void ``` -**Inflight client:** [true](#true) - Entrypoint function that will be called when the cloud function is invoked. ###### `event`Required @@ -3255,41 +3217,33 @@ Inflight interface for `Queue`. ##### `approxSize` ```wing -approxSize(): num +inflight approxSize(): num ``` -**Inflight client:** [true](#true) - Retrieve the approximate number of messages in the queue. ##### `pop` ```wing -pop(): str +inflight pop(): str ``` -**Inflight client:** [true](#true) - Pop a message from the queue. ##### `purge` ```wing -purge(): void +inflight purge(): void ``` -**Inflight client:** [true](#true) - Purge all of the messages in the queue. ##### `push` ```wing -push(message: str): void +inflight push(message: str): void ``` -**Inflight client:** [true](#true) - Push a message to the queue. ###### `message`Required @@ -3362,11 +3316,9 @@ Inflight client for `IQueueSetConsumerHandler`. ##### `handle` ```wing -handle(message: str): void +inflight handle(message: str): void ``` -**Inflight client:** [true](#true) - Function that will be called when a message is received from the queue. ###### `message`Required @@ -3445,11 +3397,9 @@ Inflight client for `IScheduleOnTickHandler`. ##### `handle` ```wing -handle(): void +inflight handle(): void ``` -**Inflight client:** [true](#true) - Function that will be called when a message is received from the schedule. @@ -3471,11 +3421,9 @@ Inflight interface for `Secret`. ##### `value` ```wing -value(options?: GetSecretValueOptions): str +inflight value(options?: GetSecretValueOptions): str ``` -**Inflight client:** [true](#true) - Retrieve the value of the secret. ###### `options`Optional @@ -3487,11 +3435,9 @@ Retrieve the value of the secret. ##### `valueJson` ```wing -valueJson(options?: GetSecretValueOptions): Json +inflight valueJson(options?: GetSecretValueOptions): Json ``` -**Inflight client:** [true](#true) - Retrieve the Json value of the secret. ###### `options`Optional @@ -3519,21 +3465,17 @@ Inflight interface for `Service`. ##### `start` ```wing -start(): void +inflight start(): void ``` -**Inflight client:** [true](#true) - Start the service. ##### `stop` ```wing -stop(): void +inflight stop(): void ``` -**Inflight client:** [true](#true) - Stop the service. @@ -3554,11 +3496,9 @@ Inflight client for `IServiceOnEventHandler`. ##### `handle` ```wing -handle(): void +inflight handle(): void ``` -**Inflight client:** [true](#true) - Function that will be called for service events. @@ -3624,21 +3564,17 @@ Inflight interface for `TestRunner`. ##### `listTests` ```wing -listTests(): MutArray +inflight listTests(): MutArray ``` -**Inflight client:** [true](#true) - List all tests available for this test engine. ##### `runTest` ```wing -runTest(path: str): TestResult +inflight runTest(path: str): TestResult ``` -**Inflight client:** [true](#true) - Run a test with a given path and return the result. ###### `path`Required @@ -3665,11 +3601,9 @@ Inflight interface for `Topic`. ##### `publish` ```wing -publish(message: str): void +inflight publish(message: str): void ``` -**Inflight client:** [true](#true) - Publish message to topic. ###### `message`Required @@ -3742,11 +3676,9 @@ Inflight client for `ITopicOnMessageHandler`. ##### `handle` ```wing -handle(event: str): void +inflight handle(event: str): void ``` -**Inflight client:** [true](#true) - Function that will be called when a message is received from the topic. ###### `event`Required diff --git a/versioned_docs/version-latest/04-standard-library/02-std/api-reference.md b/versioned_docs/version-latest/04-standard-library/02-std/api-reference.md index 9ea7d402e..52431913e 100644 --- a/versioned_docs/version-latest/04-standard-library/02-std/api-reference.md +++ b/versioned_docs/version-latest/04-standard-library/02-std/api-reference.md @@ -12,7 +12,6 @@ sidebar_position: 100 # API Reference - ## Classes ### Array @@ -1789,3 +1788,4 @@ The length of the string. + diff --git a/versioned_docs/version-latest/04-standard-library/03-http/api-reference.md b/versioned_docs/version-latest/04-standard-library/03-http/api-reference.md index d2830a000..4cebc17e4 100644 --- a/versioned_docs/version-latest/04-standard-library/03-http/api-reference.md +++ b/versioned_docs/version-latest/04-standard-library/03-http/api-reference.md @@ -12,6 +12,160 @@ sidebar_position: 100 # API Reference +## Classes + +### Http + +the Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources. + + +#### Static Functions + +| **Name** | **Description** | +| --- | --- | +| delete | Sends a DELETE request. | +| fetch | Sends an HTTP request to a URL, returning a fulfilled or failed response. | +| get | Sends a GET request. | +| patch | Sends a PATCH request. | +| post | Sends a POST request. | +| put | Sends a PUT request. | + +--- + +##### `delete` + +```wing +bring http; + +inflight http.delete(url: str, options?: RequestOptions); +``` + +Sends a DELETE request. + +###### `url`Required + +- *Type:* str + +--- + +###### `options`Optional + +- *Type:* RequestOptions + +--- + +##### `fetch` + +```wing +bring http; + +inflight http.fetch(url: str, options?: RequestOptions); +``` + +Sends an HTTP request to a URL, returning a fulfilled or failed response. + +###### `url`Required + +- *Type:* str + +--- + +###### `options`Optional + +- *Type:* RequestOptions + +--- + +##### `get` + +```wing +bring http; + +inflight http.get(url: str, options?: RequestOptions); +``` + +Sends a GET request. + +###### `url`Required + +- *Type:* str + +--- + +###### `options`Optional + +- *Type:* RequestOptions + +--- + +##### `patch` + +```wing +bring http; + +inflight http.patch(url: str, options?: RequestOptions); +``` + +Sends a PATCH request. + +###### `url`Required + +- *Type:* str + +--- + +###### `options`Optional + +- *Type:* RequestOptions + +--- + +##### `post` + +```wing +bring http; + +inflight http.post(url: str, options?: RequestOptions); +``` + +Sends a POST request. + +###### `url`Required + +- *Type:* str + +--- + +###### `options`Optional + +- *Type:* RequestOptions + +--- + +##### `put` + +```wing +bring http; + +inflight http.put(url: str, options?: RequestOptions); +``` + +Sends a PUT request. + +###### `url`Required + +- *Type:* str + +--- + +###### `options`Optional + +- *Type:* RequestOptions + +--- + + + ## Structs ### RequestOptions @@ -206,187 +360,6 @@ A string representation of the body contents. --- -## Classes - -### Util - -**Inflight client:** [true](#true) - -the Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources. - -#### Initializers - -```wing -bring http; - -new http.Util(); -``` - -| **Name** | **Type** | **Description** | -| --- | --- | --- | - ---- - - -#### Static Functions - -| **Name** | **Description** | -| --- | --- | -| delete | Sends a DELETE request. | -| fetch | Sends an HTTP request to a URL, returning a fulfilled or failed response. | -| get | Sends a GET request. | -| patch | Sends a PATCH request. | -| post | Sends a POST request. | -| put | Sends a PUT request. | - ---- - -##### `delete` - -```wing -bring http; - -http.Util.delete(url: str, options?: RequestOptions); -``` - -**Inflight client:** [true](#true) - -Sends a DELETE request. - -###### `url`Required - -- *Type:* str - ---- - -###### `options`Optional - -- *Type:* RequestOptions - ---- - -##### `fetch` - -```wing -bring http; - -http.Util.fetch(url: str, options?: RequestOptions); -``` - -**Inflight client:** [true](#true) - -Sends an HTTP request to a URL, returning a fulfilled or failed response. - -###### `url`Required - -- *Type:* str - ---- - -###### `options`Optional - -- *Type:* RequestOptions - ---- - -##### `get` - -```wing -bring http; - -http.Util.get(url: str, options?: RequestOptions); -``` - -**Inflight client:** [true](#true) - -Sends a GET request. - -###### `url`Required - -- *Type:* str - ---- - -###### `options`Optional - -- *Type:* RequestOptions - ---- - -##### `patch` - -```wing -bring http; - -http.Util.patch(url: str, options?: RequestOptions); -``` - -**Inflight client:** [true](#true) - -Sends a PATCH request. - -###### `url`Required - -- *Type:* str - ---- - -###### `options`Optional - -- *Type:* RequestOptions - ---- - -##### `post` - -```wing -bring http; - -http.Util.post(url: str, options?: RequestOptions); -``` - -**Inflight client:** [true](#true) - -Sends a POST request. - -###### `url`Required - -- *Type:* str - ---- - -###### `options`Optional - -- *Type:* RequestOptions - ---- - -##### `put` - -```wing -bring http; - -http.Util.put(url: str, options?: RequestOptions); -``` - -**Inflight client:** [true](#true) - -Sends a PUT request. - -###### `url`Required - -- *Type:* str - ---- - -###### `options`Optional - -- *Type:* RequestOptions - ---- - - - ## Enums diff --git a/versioned_docs/version-latest/04-standard-library/04-util/api-reference.md b/versioned_docs/version-latest/04-standard-library/04-util/api-reference.md index 3302142a8..4b890f937 100644 --- a/versioned_docs/version-latest/04-standard-library/04-util/api-reference.md +++ b/versioned_docs/version-latest/04-standard-library/04-util/api-reference.md @@ -12,74 +12,12 @@ sidebar_position: 100 # API Reference -## Structs - -### WaitUntilProps - -Properties for `util.waitUntil`. - -#### Initializer - -```wing -bring util; - -let WaitUntilProps = util.WaitUntilProps{ ... }; -``` - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| interval | duration | Interval between predicate retries. | -| timeout | duration | The timeout for keep trying predicate. | - ---- - -##### `interval`Optional - -```wing -interval: duration; -``` - -- *Type:* duration -- *Default:* 0.1s - -Interval between predicate retries. - ---- - -##### `timeout`Optional - -```wing -timeout: duration; -``` - -- *Type:* duration -- *Default:* 1m - -The timeout for keep trying predicate. - ---- - ## Classes ### Util Utility functions. -#### Initializers - -```wing -bring util; - -new util.Util(); -``` - -| **Name** | **Type** | **Description** | -| --- | --- | --- | - ---- - #### Static Functions @@ -97,7 +35,7 @@ new util.Util(); ```wing bring util; -util.Util.env(name: str); +util.env(name: str); ``` Returns the value of an environment variable. @@ -117,11 +55,9 @@ The name of the environment variable. ```wing bring util; -util.Util.sleep(delay: duration); +util.sleep(delay: duration); ``` -**Inflight client:** [true](#true) - Suspends execution for a given duration. ###### `delay`Required @@ -137,7 +73,7 @@ The time to suspend execution. ```wing bring util; -util.Util.tryEnv(name: str); +util.tryEnv(name: str); ``` Returns the value of an environment variable. @@ -157,11 +93,9 @@ The name of the environment variable. ```wing bring util; -util.Util.waitUntil(predicate: IPredicateHandler, props?: WaitUntilProps); +util.waitUntil(predicate: IPredicateHandler, props?: WaitUntilProps); ``` -**Inflight client:** [true](#true) - Run a predicate repeatedly, waiting until it returns true or until the timeout elapses. ###### `predicate`Required @@ -182,6 +116,55 @@ Timeout and interval values, default to one 1m timeout and 0.1sec interval. +## Structs + +### WaitUntilProps + +Properties for `util.waitUntil`. + +#### Initializer + +```wing +bring util; + +let WaitUntilProps = util.WaitUntilProps{ ... }; +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| interval | duration | Interval between predicate retries. | +| timeout | duration | The timeout for keep trying predicate. | + +--- + +##### `interval`Optional + +```wing +interval: duration; +``` + +- *Type:* duration +- *Default:* 0.1s + +Interval between predicate retries. + +--- + +##### `timeout`Optional + +```wing +timeout: duration; +``` + +- *Type:* duration +- *Default:* 1m + +The timeout for keep trying predicate. + +--- + ## Protocols ### IPredicateHandler @@ -245,11 +228,9 @@ Inflight client for `IPredicateHandler`. ##### `handle` ```wing -handle(): bool +inflight handle(): bool ``` -**Inflight client:** [true](#true) - The Predicate function that is called. diff --git a/versioned_docs/version-latest/04-standard-library/05-ex/api-reference.md b/versioned_docs/version-latest/04-standard-library/05-ex/api-reference.md index bc067c5f5..9973fde3f 100644 --- a/versioned_docs/version-latest/04-standard-library/05-ex/api-reference.md +++ b/versioned_docs/version-latest/04-standard-library/05-ex/api-reference.md @@ -196,86 +196,6 @@ Table primary key name. --- -## Structs - -### TableProps - -Properties for `Table`. - -#### Initializer - -```wing -bring ex; - -let TableProps = ex.TableProps{ ... }; -``` - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| columns | MutMap<ColumnType> | The table's columns. | -| initialRows | MutMap<Json> | The table's initial rows. | -| name | str | The table's name. | -| primaryKey | str | The table's primary key. | - ---- - -##### `columns`Optional - -```wing -columns: MutMap; -``` - -- *Type:* MutMap<ColumnType> -- *Default:* undefined - -The table's columns. - ---- - -##### `initialRows`Optional - -```wing -initialRows: MutMap; -``` - -- *Type:* MutMap<Json> -- *Default:* undefined - -The table's initial rows. - ---- - -##### `name`Optional - -```wing -name: str; -``` - -- *Type:* str -- *Default:* undefined - -The table's name. - ---- - -##### `primaryKey`Optional - -```wing -primaryKey: str; -``` - -- *Type:* str -- *Default:* undefined - -The table's primary key. - -No two rows can have the same value for the -primary key. - ---- - ## Classes ### RedisClientBase @@ -460,6 +380,86 @@ Get url of redis server. +## Structs + +### TableProps + +Properties for `Table`. + +#### Initializer + +```wing +bring ex; + +let TableProps = ex.TableProps{ ... }; +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| columns | MutMap<ColumnType> | The table's columns. | +| initialRows | MutMap<Json> | The table's initial rows. | +| name | str | The table's name. | +| primaryKey | str | The table's primary key. | + +--- + +##### `columns`Optional + +```wing +columns: MutMap; +``` + +- *Type:* MutMap<ColumnType> +- *Default:* undefined + +The table's columns. + +--- + +##### `initialRows`Optional + +```wing +initialRows: MutMap; +``` + +- *Type:* MutMap<Json> +- *Default:* undefined + +The table's initial rows. + +--- + +##### `name`Optional + +```wing +name: str; +``` + +- *Type:* str +- *Default:* undefined + +The table's name. + +--- + +##### `primaryKey`Optional + +```wing +primaryKey: str; +``` + +- *Type:* str +- *Default:* undefined + +The table's primary key. + +No two rows can have the same value for the +primary key. + +--- + ## Protocols ### IRedisClient @@ -487,11 +487,9 @@ Inflight interface for `Redis`. ##### `del` ```wing -del(key: str): num +inflight del(key: str): num ``` -**Inflight client:** [true](#true) - Removes the specified key. ###### `key`Required @@ -505,11 +503,9 @@ the key. ##### `get` ```wing -get(key: str): str +inflight get(key: str): str ``` -**Inflight client:** [true](#true) - Get value at given key. ###### `key`Required @@ -523,11 +519,9 @@ the key to get. ##### `hget` ```wing -hget(key: str, field: str): str +inflight hget(key: str, field: str): str ``` -**Inflight client:** [true](#true) - Returns the value associated with field in the hash stored at key. ###### `key`Required @@ -549,11 +543,9 @@ the field at given key. ##### `hset` ```wing -hset(key: str, field: str, value: str): num +inflight hset(key: str, field: str, value: str): num ``` -**Inflight client:** [true](#true) - Sets the specified field to respective value in the hash stored at key. ###### `key`Required @@ -583,21 +575,17 @@ value to set at field in key. ##### `rawClient` ```wing -rawClient(): any +inflight rawClient(): any ``` -**Inflight client:** [true](#true) - Get raw redis client (currently IoRedis). ##### `sadd` ```wing -sadd(key: str, value: str): num +inflight sadd(key: str, value: str): num ``` -**Inflight client:** [true](#true) - Add the specified members to the set stored at key. ###### `key`Required @@ -619,11 +607,9 @@ the value to add to the set at given key. ##### `set` ```wing -set(key: str, value: str): void +inflight set(key: str, value: str): void ``` -**Inflight client:** [true](#true) - Set key value pair. ###### `key`Required @@ -645,11 +631,9 @@ the value to store at given key. ##### `smembers` ```wing -smembers(key: str): MutArray +inflight smembers(key: str): MutArray ``` -**Inflight client:** [true](#true) - Returns all the members of the set value stored at key. ###### `key`Required @@ -663,11 +647,9 @@ the key. ##### `url` ```wing -url(): str +inflight url(): str ``` -**Inflight client:** [true](#true) - Get url of redis server. @@ -692,11 +674,9 @@ Inflight interface for `Table`. ##### `delete` ```wing -delete(key: str): void +inflight delete(key: str): void ``` -**Inflight client:** [true](#true) - Delete a row from the table, by primary key. ###### `key`Required @@ -710,11 +690,9 @@ primary key to delete the row. ##### `get` ```wing -get(key: str): Json +inflight get(key: str): Json ``` -**Inflight client:** [true](#true) - Get a row from the table, by primary key. ###### `key`Required @@ -728,11 +706,9 @@ primary key to search. ##### `insert` ```wing -insert(key: str, row: Json): void +inflight insert(key: str, row: Json): void ``` -**Inflight client:** [true](#true) - Insert a row into the table. ###### `key`Required @@ -754,21 +730,17 @@ data to be inserted. ##### `list` ```wing -list(): MutArray +inflight list(): MutArray ``` -**Inflight client:** [true](#true) - List all rows in the table. ##### `update` ```wing -update(key: str, row: Json): void +inflight update(key: str, row: Json): void ``` -**Inflight client:** [true](#true) - Update a row in the table. ###### `key`Required diff --git a/versioned_docs/version-latest/09-analytics.md b/versioned_docs/version-latest/09-analytics.md new file mode 100644 index 000000000..fbc9f991c --- /dev/null +++ b/versioned_docs/version-latest/09-analytics.md @@ -0,0 +1,31 @@ +--- +title: Analytics +id: analytics +keywords: [Analytics, Telemetry] +--- + +## Analytics Collection + +The Wing CLI collects anonymous usage data in order to help us improve. The intent is to collect data that will help us understand how it is being used throughout the community, with hopes that this will help us build the right features and improve the right areas. + +You may not feel comfortable sharing this data with us, and that is ok. The gathering of these analytics is completely optional to use the Wing CLI, and can be opted out of at any time. + +### Opting out + +If you would like to opt out of the analytics gathering, then you can do so by simply setting the environment variable `WING_CLI_DISABLE_ANALYTICS=1`. You can also use the flag `--no-analytics` when running any command. + +```sh +wing compile -t sim app.w --no-analytics +``` + +### What data is collected + +Each run of the Wing cli collects information about various aspects of the environment it is running in. Below are the analytics we gather. As well +you can always head over to our Github and view the code that collects these metrics, as the code is open source. + +- The Wing CLI, SDK, and Console versions +- The command information, including the command name, arguments, and flags +- Operating system information, including the architecture, version, and platform +- Node.js version +- CI environment name (if applicable) +- Git repo (if applicable) is assigned a hashed anonymous id. This is used to understand how many unique repos are using Wing. \ No newline at end of file