diff --git a/README.md b/README.md index f0c82a068e..60193305cf 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,11 @@ Monorepo for **open-source** Kong UI components and utilities. - [ESLint](#eslint) - [Type Checking](#type-checking) - [Testing](#testing) + - [File naming convensions](#file-naming-convensions) - [Preview sandbox build](#preview-sandbox-build) - [Build for production](#build-for-production) - [Committing Changes](#committing-changes) - - [Generating type interface documentation](#generating-type-interface-documentation) + - [Enforcing Commit Format](#enforcing-commit-format) - [Preview components](#preview-components) - [Running consuming application with local copy of the package](#running-consuming-application-with-local-copy-of-the-package) - [Moving packages to the public/private repo](#moving-packages-to-the-publicprivate-repo) @@ -176,21 +177,6 @@ For more information on different components that compose our commit messages, p Additionally, CI will use `commitlint` to validate the commits associated with a PR in the `Lint and Validate` job. -### Generating type interface documentation - -**This only applies to TypeScript-only packages** - -If your package generates **types**, then add a `build:docs` script to your `package.json` file similar to the one in [@kong-ui-public/analytics-utilities](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilties/package.json#L12) - -```json -"scripts": { - ... other scripts - "build:docs": "{your command for generating docs}" -} -``` - -Please run the `build:docs` command manually to generate the docs and then commit them to your PR. - ### Preview components You are working on the PR and changing component project. Let's say `@kong-ui-public/i18n`. You want to try to deploy consuming application (`khcp-ui` for example) that uses your changed code without merging your changes to main and publishing new version of `@kong-ui-public/i18n`. Here are the steps: diff --git a/packages/analytics/analytics-utilities/docs/analytics-utils.md b/packages/analytics/analytics-utilities/docs/analytics-utils.md deleted file mode 100644 index 3508a698c5..0000000000 --- a/packages/analytics/analytics-utilities/docs/analytics-utils.md +++ /dev/null @@ -1,292 +0,0 @@ -@kong-ui-public/analytics-utilities - -# @kong-ui-public/analytics-utilities - -## Table of contents - -### Enumerations - -- [GranularityKeys](enums/GranularityKeys.md) -- [TimeframeKeys](enums/TimeframeKeys.md) - -### Classes - -- [DeltaQueryTime](classes/DeltaQueryTime.md) -- [Timeframe](classes/Timeframe.md) -- [TimeseriesQueryTime](classes/TimeseriesQueryTime.md) -- [UnaryQueryTime](classes/UnaryQueryTime.md) - -### Interfaces - -- [AnalyticsExploreMeta](interfaces/AnalyticsExploreMeta.md) -- [AnalyticsExploreRecord](interfaces/AnalyticsExploreRecord.md) -- [AnalyticsExploreResult](interfaces/AnalyticsExploreResult.md) -- [AnalyticsExploreV2Meta](interfaces/AnalyticsExploreV2Meta.md) -- [AnalyticsExploreV2Result](interfaces/AnalyticsExploreV2Result.md) -- [AnalyticsExploreV3Meta](interfaces/AnalyticsExploreV3Meta.md) -- [AnalyticsExploreV3Result](interfaces/AnalyticsExploreV3Result.md) -- [BaseExploreMeta](interfaces/BaseExploreMeta.md) -- [DatePickerSelection](interfaces/DatePickerSelection.md) -- [DimensionMap](interfaces/DimensionMap.md) -- [DruidGranularity](interfaces/DruidGranularity.md) -- [GranularityFullObj](interfaces/GranularityFullObj.md) -- [MetricUnit](interfaces/MetricUnit.md) -- [QueryTime](interfaces/QueryTime.md) -- [RecordEvent](interfaces/RecordEvent.md) -- [TimePeriod](interfaces/TimePeriod.md) -- [TimeframeOptions](interfaces/TimeframeOptions.md) - -### Variables - -- [Granularities](analytics-utils.md#granularities) -- [TimePeriods](analytics-utils.md#timeperiods) - -### Functions - -- [ceilToNearestTimeGrain](analytics-utils.md#ceiltonearesttimegrain) -- [datePickerSelectionToTimeframe](analytics-utils.md#datepickerselectiontotimeframe) -- [dstOffsetHours](analytics-utils.md#dstoffsethours) -- [floorToNearestTimeGrain](analytics-utils.md#floortonearesttimegrain) -- [formatISOTimeWithTZ](analytics-utils.md#formatisotimewithtz) -- [granularitiesToOptions](analytics-utils.md#granularitiestooptions) -- [granularityMsToQuery](analytics-utils.md#granularitymstoquery) -- [msToGranularity](analytics-utils.md#mstogranularity) -- [timeframeToDatepickerSelection](analytics-utils.md#timeframetodatepickerselection) -- [timeframeToDatepickerTimeperiod](analytics-utils.md#timeframetodatepickertimeperiod) - -## Variables - -### Granularities - -• `Const` **Granularities**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `Daily` | `number` | -| `Hourly` | `number` | -| `Minutely` | `number` | -| `Weekly` | `number` | - -#### Defined in - -[granularity.ts:6](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/granularity.ts#L6) - -___ - -### TimePeriods - -• `Const` **TimePeriods**: `Map`<`string`, [`Timeframe`](classes/Timeframe.md)\> - -#### Defined in - -[timeframes.ts:227](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L227) - -## Functions - -### ceilToNearestTimeGrain - -▸ **ceilToNearestTimeGrain**(`date`, `granularity`, `tz?`): `Date` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `date` | `Date` | -| `granularity` | [`GranularityKeys`](enums/GranularityKeys.md) | -| `tz?` | `string` | - -#### Returns - -`Date` - -#### Defined in - -[granularity.ts:78](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/granularity.ts#L78) - -___ - -### datePickerSelectionToTimeframe - -▸ **datePickerSelectionToTimeframe**(`datePickerSelection`): [`Timeframe`](classes/Timeframe.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `datePickerSelection` | [`DatePickerSelection`](interfaces/DatePickerSelection.md) | - -#### Returns - -[`Timeframe`](classes/Timeframe.md) - -#### Defined in - -[timeframes.ts:399](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L399) - -___ - -### dstOffsetHours - -▸ **dstOffsetHours**(`d1`, `d2`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `d1` | `Date` | -| `d2` | `Date` | - -#### Returns - -`number` - -#### Defined in - -[timeframes.ts:449](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L449) - -___ - -### floorToNearestTimeGrain - -▸ **floorToNearestTimeGrain**(`date`, `granularity`, `tz?`): `Date` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `date` | `Date` | -| `granularity` | [`GranularityKeys`](enums/GranularityKeys.md) | -| `tz?` | `string` | - -#### Returns - -`Date` - -#### Defined in - -[granularity.ts:74](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/granularity.ts#L74) - -___ - -### formatISOTimeWithTZ - -▸ **formatISOTimeWithTZ**(`ts`): `string` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ts` | `number` \| `Date` | - -#### Returns - -`string` - -#### Defined in - -[format.ts:3](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/format.ts#L3) - -___ - -### granularitiesToOptions - -▸ **granularitiesToOptions**(`values`, `i18n`): { `label`: `string` ; `value`: [`GranularityKeys`](enums/GranularityKeys.md) = v }[] - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `values` | [`GranularityKeys`](enums/GranularityKeys.md)[] | -| `i18n` | `Object` | -| `i18n.t` | (`v`: `string`) => `string` | - -#### Returns - -{ `label`: `string` ; `value`: [`GranularityKeys`](enums/GranularityKeys.md) = v }[] - -#### Defined in - -[granularity.ts:13](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/granularity.ts#L13) - -___ - -### granularityMsToQuery - -▸ **granularityMsToQuery**(`granularity`, `origin?`): [`DruidGranularity`](interfaces/DruidGranularity.md) \| ``null`` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `granularity` | ``null`` \| `number` | -| `origin?` | `string` | - -#### Returns - -[`DruidGranularity`](interfaces/DruidGranularity.md) \| ``null`` - -#### Defined in - -[granularity.ts:23](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/granularity.ts#L23) - -___ - -### msToGranularity - -▸ **msToGranularity**(`ms?`): [`GranularityKeys`](enums/GranularityKeys.md) \| ``null`` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ms?` | `number` | - -#### Returns - -[`GranularityKeys`](enums/GranularityKeys.md) \| ``null`` - -#### Defined in - -[granularity.ts:38](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/granularity.ts#L38) - -___ - -### timeframeToDatepickerSelection - -▸ **timeframeToDatepickerSelection**(`timeframe`): [`DatePickerSelection`](interfaces/DatePickerSelection.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `timeframe` | [`Timeframe`](classes/Timeframe.md) | - -#### Returns - -[`DatePickerSelection`](interfaces/DatePickerSelection.md) - -#### Defined in - -[timeframes.ts:427](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L427) - -___ - -### timeframeToDatepickerTimeperiod - -▸ **timeframeToDatepickerTimeperiod**(`timeframe`): [`TimePeriod`](interfaces/TimePeriod.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `timeframe` | [`Timeframe`](classes/Timeframe.md) | - -#### Returns - -[`TimePeriod`](interfaces/TimePeriod.md) - -#### Defined in - -[timeframes.ts:437](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L437) diff --git a/packages/analytics/analytics-utilities/docs/classes/DeltaQueryTime.md b/packages/analytics/analytics-utilities/docs/classes/DeltaQueryTime.md deleted file mode 100644 index b194ad043c..0000000000 --- a/packages/analytics/analytics-utilities/docs/classes/DeltaQueryTime.md +++ /dev/null @@ -1,289 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / DeltaQueryTime - -# Class: DeltaQueryTime - -## Hierarchy - -- [`UnaryQueryTime`](UnaryQueryTime.md) - - ↳ **`DeltaQueryTime`** - -## Table of contents - -### Constructors - -- [constructor](DeltaQueryTime.md#constructor) - -### Properties - -- [timeframe](DeltaQueryTime.md#timeframe) -- [tz](DeltaQueryTime.md#tz) - -### Methods - -- [calculateStartDate](DeltaQueryTime.md#calculatestartdate) -- [endDate](DeltaQueryTime.md#enddate) -- [endMs](DeltaQueryTime.md#endms) -- [endSeconds](DeltaQueryTime.md#endseconds) -- [granularityDruid](DeltaQueryTime.md#granularitydruid) -- [granularityMs](DeltaQueryTime.md#granularityms) -- [granularitySeconds](DeltaQueryTime.md#granularityseconds) -- [startDate](DeltaQueryTime.md#startdate) -- [startMs](DeltaQueryTime.md#startms) -- [startSeconds](DeltaQueryTime.md#startseconds) -- [withinFreeTier](DeltaQueryTime.md#withinfreetier) - -## Constructors - -### constructor - -• **new DeltaQueryTime**(`timeframe`, `tz?`) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `timeframe` | [`Timeframe`](Timeframe.md) | -| `tz?` | `string` | - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[constructor](UnaryQueryTime.md#constructor) - -#### Defined in - -[queryTime.ts:16](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L16) - -## Properties - -### timeframe - -• `Protected` `Readonly` **timeframe**: [`Timeframe`](Timeframe.md) - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[timeframe](UnaryQueryTime.md#timeframe) - -#### Defined in - -[queryTime.ts:13](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L13) - -___ - -### tz - -• `Protected` `Optional` `Readonly` **tz**: `string` - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[tz](UnaryQueryTime.md#tz) - -#### Defined in - -[queryTime.ts:14](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L14) - -## Methods - -### calculateStartDate - -▸ `Protected` **calculateStartDate**(`isRelative`, `granularity`, `periods?`): `Date` - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `isRelative` | `boolean` | `undefined` | -| `granularity` | [`GranularityKeys`](../enums/GranularityKeys.md) | `undefined` | -| `periods` | `number` | `1` | - -#### Returns - -`Date` - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[calculateStartDate](UnaryQueryTime.md#calculatestartdate) - -#### Defined in - -[queryTime.ts:32](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L32) - -___ - -### endDate - -▸ **endDate**(): `Date` - -#### Returns - -`Date` - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[endDate](UnaryQueryTime.md#enddate) - -#### Defined in - -[queryTime.ts:120](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L120) - -___ - -### endMs - -▸ **endMs**(): `number` - -#### Returns - -`number` - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[endMs](UnaryQueryTime.md#endms) - -#### Defined in - -[queryTime.ts:77](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L77) - -___ - -### endSeconds - -▸ **endSeconds**(): `number` - -#### Returns - -`number` - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[endSeconds](UnaryQueryTime.md#endseconds) - -#### Defined in - -[queryTime.ts:67](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L67) - -___ - -### granularityDruid - -▸ **granularityDruid**(): ``null`` \| [`DruidGranularity`](../interfaces/DruidGranularity.md) - -#### Returns - -``null`` \| [`DruidGranularity`](../interfaces/DruidGranularity.md) - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[granularityDruid](UnaryQueryTime.md#granularitydruid) - -#### Defined in - -[queryTime.ts:57](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L57) - -___ - -### granularityMs - -▸ **granularityMs**(): `number` - -#### Returns - -`number` - -#### Overrides - -[UnaryQueryTime](UnaryQueryTime.md).[granularityMs](UnaryQueryTime.md#granularityms) - -#### Defined in - -[queryTime.ts:137](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L137) - -___ - -### granularitySeconds - -▸ **granularitySeconds**(): `number` - -#### Returns - -`number` - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[granularitySeconds](UnaryQueryTime.md#granularityseconds) - -#### Defined in - -[queryTime.ts:53](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L53) - -___ - -### startDate - -▸ **startDate**(): `Date` - -#### Returns - -`Date` - -#### Overrides - -[UnaryQueryTime](UnaryQueryTime.md).[startDate](UnaryQueryTime.md#startdate) - -#### Defined in - -[queryTime.ts:133](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L133) - -___ - -### startMs - -▸ **startMs**(): `number` - -#### Returns - -`number` - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[startMs](UnaryQueryTime.md#startms) - -#### Defined in - -[queryTime.ts:72](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L72) - -___ - -### startSeconds - -▸ **startSeconds**(): `number` - -#### Returns - -`number` - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[startSeconds](UnaryQueryTime.md#startseconds) - -#### Defined in - -[queryTime.ts:62](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L62) - -___ - -### withinFreeTier - -▸ **withinFreeTier**(): `boolean` - -#### Returns - -`boolean` - -#### Inherited from - -[UnaryQueryTime](UnaryQueryTime.md).[withinFreeTier](UnaryQueryTime.md#withinfreetier) - -#### Defined in - -[queryTime.ts:82](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L82) diff --git a/packages/analytics/analytics-utilities/docs/classes/Timeframe.md b/packages/analytics/analytics-utilities/docs/classes/Timeframe.md deleted file mode 100644 index 208795479f..0000000000 --- a/packages/analytics/analytics-utilities/docs/classes/Timeframe.md +++ /dev/null @@ -1,257 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / Timeframe - -# Class: Timeframe - -## Table of contents - -### Constructors - -- [constructor](Timeframe.md#constructor) - -### Properties - -- [\_endCustom](Timeframe.md#_endcustom) -- [\_startCustom](Timeframe.md#_startcustom) -- [allowedTiers](Timeframe.md#allowedtiers) -- [dataGranularity](Timeframe.md#datagranularity) -- [defaultResponseGranularity](Timeframe.md#defaultresponsegranularity) -- [display](Timeframe.md#display) -- [isRelative](Timeframe.md#isrelative) -- [key](Timeframe.md#key) -- [timeframeLength](Timeframe.md#timeframelength) -- [timeframeText](Timeframe.md#timeframetext) - -### Methods - -- [allowedGranularities](Timeframe.md#allowedgranularities) -- [maximumTimeframeLength](Timeframe.md#maximumtimeframelength) -- [rawEnd](Timeframe.md#rawend) -- [rawStart](Timeframe.md#rawstart) -- [timeframeLengthMs](Timeframe.md#timeframelengthms) -- [tzAdjustedDate](Timeframe.md#tzadjusteddate) - -## Constructors - -### constructor - -• **new Timeframe**(`opts`) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | [`TimeframeOptions`](../interfaces/TimeframeOptions.md) | - -#### Defined in - -[timeframes.ts:60](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L60) - -## Properties - -### \_endCustom - -• `Private` `Optional` **\_endCustom**: `Date` - -#### Defined in - -[timeframes.ts:58](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L58) - -___ - -### \_startCustom - -• `Private` `Optional` **\_startCustom**: `Date` - -#### Defined in - -[timeframes.ts:56](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L56) - -___ - -### allowedTiers - -• `Readonly` **allowedTiers**: `string`[] - -#### Defined in - -[timeframes.ts:38](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L38) - -___ - -### dataGranularity - -• `Readonly` **dataGranularity**: [`GranularityKeys`](../enums/GranularityKeys.md) - -#### Defined in - -[timeframes.ts:47](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L47) - -___ - -### defaultResponseGranularity - -• `Readonly` **defaultResponseGranularity**: [`GranularityKeys`](../enums/GranularityKeys.md) - -#### Defined in - -[timeframes.ts:42](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L42) - -___ - -### display - -• `Readonly` **display**: `string` - -#### Defined in - -[timeframes.ts:34](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L34) - -___ - -### isRelative - -• `Readonly` **isRelative**: `boolean` - -#### Defined in - -[timeframes.ts:54](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L54) - -___ - -### key - -• `Readonly` **key**: `string` - -#### Defined in - -[timeframes.ts:32](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L32) - -___ - -### timeframeLength - -• `Readonly` **timeframeLength**: () => `number` - -#### Type declaration - -▸ (): `number` - -##### Returns - -`number` - -#### Defined in - -[timeframes.ts:36](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L36) - -___ - -### timeframeText - -• `Readonly` **timeframeText**: `string` - -#### Defined in - -[timeframes.ts:30](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L30) - -## Methods - -### allowedGranularities - -▸ **allowedGranularities**(): `Set`<[`GranularityKeys`](../enums/GranularityKeys.md)\> - -#### Returns - -`Set`<[`GranularityKeys`](../enums/GranularityKeys.md)\> - -#### Defined in - -[timeframes.ts:96](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L96) - -___ - -### maximumTimeframeLength - -▸ **maximumTimeframeLength**(): `number` - -#### Returns - -`number` - -#### Defined in - -[timeframes.ts:91](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L91) - -___ - -### rawEnd - -▸ **rawEnd**(`_tz?`): `Date` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `_tz?` | `string` | - -#### Returns - -`Date` - -#### Defined in - -[timeframes.ts:76](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L76) - -___ - -### rawStart - -▸ **rawStart**(`_tz?`): `Date` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `_tz?` | `string` | - -#### Returns - -`Date` - -#### Defined in - -[timeframes.ts:83](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L83) - -___ - -### timeframeLengthMs - -▸ **timeframeLengthMs**(): `number` - -#### Returns - -`number` - -#### Defined in - -[timeframes.ts:87](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L87) - -___ - -### tzAdjustedDate - -▸ `Protected` **tzAdjustedDate**(`tz?`): `Date` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `tz?` | `string` | - -#### Returns - -`Date` - -#### Defined in - -[timeframes.ts:123](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/timeframes.ts#L123) diff --git a/packages/analytics/analytics-utilities/docs/classes/TimeseriesQueryTime.md b/packages/analytics/analytics-utilities/docs/classes/TimeseriesQueryTime.md deleted file mode 100644 index bf0db6287b..0000000000 --- a/packages/analytics/analytics-utilities/docs/classes/TimeseriesQueryTime.md +++ /dev/null @@ -1,301 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / TimeseriesQueryTime - -# Class: TimeseriesQueryTime - -## Hierarchy - -- `BaseQueryTime` - - ↳ **`TimeseriesQueryTime`** - -## Table of contents - -### Constructors - -- [constructor](TimeseriesQueryTime.md#constructor) - -### Properties - -- [granularity](TimeseriesQueryTime.md#granularity) -- [timeframe](TimeseriesQueryTime.md#timeframe) -- [tz](TimeseriesQueryTime.md#tz) - -### Methods - -- [calculateStartDate](TimeseriesQueryTime.md#calculatestartdate) -- [endDate](TimeseriesQueryTime.md#enddate) -- [endMs](TimeseriesQueryTime.md#endms) -- [endSeconds](TimeseriesQueryTime.md#endseconds) -- [granularityDruid](TimeseriesQueryTime.md#granularitydruid) -- [granularityMs](TimeseriesQueryTime.md#granularityms) -- [granularitySeconds](TimeseriesQueryTime.md#granularityseconds) -- [startDate](TimeseriesQueryTime.md#startdate) -- [startMs](TimeseriesQueryTime.md#startms) -- [startSeconds](TimeseriesQueryTime.md#startseconds) -- [withinFreeTier](TimeseriesQueryTime.md#withinfreetier) - -## Constructors - -### constructor - -• **new TimeseriesQueryTime**(`timeframe`, `granularity?`, `tz?`) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `timeframe` | [`Timeframe`](Timeframe.md) | -| `granularity?` | [`GranularityKeys`](../enums/GranularityKeys.md) | -| `tz?` | `string` | - -#### Overrides - -BaseQueryTime.constructor - -#### Defined in - -[queryTime.ts:91](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L91) - -## Properties - -### granularity - -• `Private` `Readonly` **granularity**: [`GranularityKeys`](../enums/GranularityKeys.md) - -#### Defined in - -[queryTime.ts:89](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L89) - -___ - -### timeframe - -• `Protected` `Readonly` **timeframe**: [`Timeframe`](Timeframe.md) - -#### Inherited from - -BaseQueryTime.timeframe - -#### Defined in - -[queryTime.ts:13](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L13) - -___ - -### tz - -• `Protected` `Optional` `Readonly` **tz**: `string` - -#### Inherited from - -BaseQueryTime.tz - -#### Defined in - -[queryTime.ts:14](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L14) - -## Methods - -### calculateStartDate - -▸ `Protected` **calculateStartDate**(`isRelative`, `granularity`, `periods?`): `Date` - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `isRelative` | `boolean` | `undefined` | -| `granularity` | [`GranularityKeys`](../enums/GranularityKeys.md) | `undefined` | -| `periods` | `number` | `1` | - -#### Returns - -`Date` - -#### Inherited from - -BaseQueryTime.calculateStartDate - -#### Defined in - -[queryTime.ts:32](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L32) - -___ - -### endDate - -▸ **endDate**(): `Date` - -#### Returns - -`Date` - -#### Overrides - -BaseQueryTime.endDate - -#### Defined in - -[queryTime.ts:105](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L105) - -___ - -### endMs - -▸ **endMs**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.endMs - -#### Defined in - -[queryTime.ts:77](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L77) - -___ - -### endSeconds - -▸ **endSeconds**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.endSeconds - -#### Defined in - -[queryTime.ts:67](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L67) - -___ - -### granularityDruid - -▸ **granularityDruid**(): ``null`` \| [`DruidGranularity`](../interfaces/DruidGranularity.md) - -#### Returns - -``null`` \| [`DruidGranularity`](../interfaces/DruidGranularity.md) - -#### Inherited from - -BaseQueryTime.granularityDruid - -#### Defined in - -[queryTime.ts:57](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L57) - -___ - -### granularityMs - -▸ **granularityMs**(): `number` - -#### Returns - -`number` - -#### Overrides - -BaseQueryTime.granularityMs - -#### Defined in - -[queryTime.ts:109](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L109) - -___ - -### granularitySeconds - -▸ **granularitySeconds**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.granularitySeconds - -#### Defined in - -[queryTime.ts:53](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L53) - -___ - -### startDate - -▸ **startDate**(): `Date` - -#### Returns - -`Date` - -#### Overrides - -BaseQueryTime.startDate - -#### Defined in - -[queryTime.ts:101](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L101) - -___ - -### startMs - -▸ **startMs**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.startMs - -#### Defined in - -[queryTime.ts:72](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L72) - -___ - -### startSeconds - -▸ **startSeconds**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.startSeconds - -#### Defined in - -[queryTime.ts:62](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L62) - -___ - -### withinFreeTier - -▸ **withinFreeTier**(): `boolean` - -#### Returns - -`boolean` - -#### Inherited from - -BaseQueryTime.withinFreeTier - -#### Defined in - -[queryTime.ts:82](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L82) diff --git a/packages/analytics/analytics-utilities/docs/classes/UnaryQueryTime.md b/packages/analytics/analytics-utilities/docs/classes/UnaryQueryTime.md deleted file mode 100644 index 8cb2190f66..0000000000 --- a/packages/analytics/analytics-utilities/docs/classes/UnaryQueryTime.md +++ /dev/null @@ -1,291 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / UnaryQueryTime - -# Class: UnaryQueryTime - -## Hierarchy - -- `BaseQueryTime` - - ↳ **`UnaryQueryTime`** - - ↳↳ [`DeltaQueryTime`](DeltaQueryTime.md) - -## Table of contents - -### Constructors - -- [constructor](UnaryQueryTime.md#constructor) - -### Properties - -- [timeframe](UnaryQueryTime.md#timeframe) -- [tz](UnaryQueryTime.md#tz) - -### Methods - -- [calculateStartDate](UnaryQueryTime.md#calculatestartdate) -- [endDate](UnaryQueryTime.md#enddate) -- [endMs](UnaryQueryTime.md#endms) -- [endSeconds](UnaryQueryTime.md#endseconds) -- [granularityDruid](UnaryQueryTime.md#granularitydruid) -- [granularityMs](UnaryQueryTime.md#granularityms) -- [granularitySeconds](UnaryQueryTime.md#granularityseconds) -- [startDate](UnaryQueryTime.md#startdate) -- [startMs](UnaryQueryTime.md#startms) -- [startSeconds](UnaryQueryTime.md#startseconds) -- [withinFreeTier](UnaryQueryTime.md#withinfreetier) - -## Constructors - -### constructor - -• **new UnaryQueryTime**(`timeframe`, `tz?`) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `timeframe` | [`Timeframe`](Timeframe.md) | -| `tz?` | `string` | - -#### Inherited from - -BaseQueryTime.constructor - -#### Defined in - -[queryTime.ts:16](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L16) - -## Properties - -### timeframe - -• `Protected` `Readonly` **timeframe**: [`Timeframe`](Timeframe.md) - -#### Inherited from - -BaseQueryTime.timeframe - -#### Defined in - -[queryTime.ts:13](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L13) - -___ - -### tz - -• `Protected` `Optional` `Readonly` **tz**: `string` - -#### Inherited from - -BaseQueryTime.tz - -#### Defined in - -[queryTime.ts:14](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L14) - -## Methods - -### calculateStartDate - -▸ `Protected` **calculateStartDate**(`isRelative`, `granularity`, `periods?`): `Date` - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `isRelative` | `boolean` | `undefined` | -| `granularity` | [`GranularityKeys`](../enums/GranularityKeys.md) | `undefined` | -| `periods` | `number` | `1` | - -#### Returns - -`Date` - -#### Inherited from - -BaseQueryTime.calculateStartDate - -#### Defined in - -[queryTime.ts:32](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L32) - -___ - -### endDate - -▸ **endDate**(): `Date` - -#### Returns - -`Date` - -#### Overrides - -BaseQueryTime.endDate - -#### Defined in - -[queryTime.ts:120](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L120) - -___ - -### endMs - -▸ **endMs**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.endMs - -#### Defined in - -[queryTime.ts:77](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L77) - -___ - -### endSeconds - -▸ **endSeconds**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.endSeconds - -#### Defined in - -[queryTime.ts:67](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L67) - -___ - -### granularityDruid - -▸ **granularityDruid**(): ``null`` \| [`DruidGranularity`](../interfaces/DruidGranularity.md) - -#### Returns - -``null`` \| [`DruidGranularity`](../interfaces/DruidGranularity.md) - -#### Inherited from - -BaseQueryTime.granularityDruid - -#### Defined in - -[queryTime.ts:57](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L57) - -___ - -### granularityMs - -▸ **granularityMs**(): `number` - -#### Returns - -`number` - -#### Overrides - -BaseQueryTime.granularityMs - -#### Defined in - -[queryTime.ts:124](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L124) - -___ - -### granularitySeconds - -▸ **granularitySeconds**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.granularitySeconds - -#### Defined in - -[queryTime.ts:53](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L53) - -___ - -### startDate - -▸ **startDate**(): `Date` - -#### Returns - -`Date` - -#### Overrides - -BaseQueryTime.startDate - -#### Defined in - -[queryTime.ts:116](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L116) - -___ - -### startMs - -▸ **startMs**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.startMs - -#### Defined in - -[queryTime.ts:72](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L72) - -___ - -### startSeconds - -▸ **startSeconds**(): `number` - -#### Returns - -`number` - -#### Inherited from - -BaseQueryTime.startSeconds - -#### Defined in - -[queryTime.ts:62](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L62) - -___ - -### withinFreeTier - -▸ **withinFreeTier**(): `boolean` - -#### Returns - -`boolean` - -#### Inherited from - -BaseQueryTime.withinFreeTier - -#### Defined in - -[queryTime.ts:82](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/queryTime.ts#L82) diff --git a/packages/analytics/analytics-utilities/docs/enums/GranularityKeys.md b/packages/analytics/analytics-utilities/docs/enums/GranularityKeys.md deleted file mode 100644 index eb43c2db09..0000000000 --- a/packages/analytics/analytics-utilities/docs/enums/GranularityKeys.md +++ /dev/null @@ -1,52 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / GranularityKeys - -# Enumeration: GranularityKeys - -## Table of contents - -### Enumeration Members - -- [DAILY](GranularityKeys.md#daily) -- [HOURLY](GranularityKeys.md#hourly) -- [MINUTELY](GranularityKeys.md#minutely) -- [WEEKLY](GranularityKeys.md#weekly) - -## Enumeration Members - -### DAILY - -• **DAILY** = ``"Daily"`` - -#### Defined in - -[types/granularity-keys.ts:5](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/granularity-keys.ts#L5) - -___ - -### HOURLY - -• **HOURLY** = ``"Hourly"`` - -#### Defined in - -[types/granularity-keys.ts:4](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/granularity-keys.ts#L4) - -___ - -### MINUTELY - -• **MINUTELY** = ``"Minutely"`` - -#### Defined in - -[types/granularity-keys.ts:3](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/granularity-keys.ts#L3) - -___ - -### WEEKLY - -• **WEEKLY** = ``"Weekly"`` - -#### Defined in - -[types/granularity-keys.ts:6](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/granularity-keys.ts#L6) diff --git a/packages/analytics/analytics-utilities/docs/enums/TimeframeKeys.md b/packages/analytics/analytics-utilities/docs/enums/TimeframeKeys.md deleted file mode 100644 index 9a1e6afe05..0000000000 --- a/packages/analytics/analytics-utilities/docs/enums/TimeframeKeys.md +++ /dev/null @@ -1,151 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / TimeframeKeys - -# Enumeration: TimeframeKeys - -## Table of contents - -### Enumeration Members - -- [CURRENT\_MONTH](TimeframeKeys.md#current_month) -- [CURRENT\_QUARTER](TimeframeKeys.md#current_quarter) -- [CURRENT\_WEEK](TimeframeKeys.md#current_week) -- [FIFTEEN\_MIN](TimeframeKeys.md#fifteen_min) -- [ONE\_DAY](TimeframeKeys.md#one_day) -- [ONE\_HOUR](TimeframeKeys.md#one_hour) -- [PREVIOUS\_MONTH](TimeframeKeys.md#previous_month) -- [PREVIOUS\_QUARTER](TimeframeKeys.md#previous_quarter) -- [PREVIOUS\_WEEK](TimeframeKeys.md#previous_week) -- [SEVEN\_DAY](TimeframeKeys.md#seven_day) -- [SIX\_HOUR](TimeframeKeys.md#six_hour) -- [THIRTY\_DAY](TimeframeKeys.md#thirty_day) -- [TWELVE\_HOUR](TimeframeKeys.md#twelve_hour) - -## Enumeration Members - -### CURRENT\_MONTH - -• **CURRENT\_MONTH** = ``"current_month"`` - -#### Defined in - -[types/timeframe-keys.ts:11](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L11) - -___ - -### CURRENT\_QUARTER - -• **CURRENT\_QUARTER** = ``"current_quarter"`` - -#### Defined in - -[types/timeframe-keys.ts:12](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L12) - -___ - -### CURRENT\_WEEK - -• **CURRENT\_WEEK** = ``"current_week"`` - -#### Defined in - -[types/timeframe-keys.ts:10](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L10) - -___ - -### FIFTEEN\_MIN - -• **FIFTEEN\_MIN** = ``"15m"`` - -#### Defined in - -[types/timeframe-keys.ts:3](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L3) - -___ - -### ONE\_DAY - -• **ONE\_DAY** = ``"24h"`` - -#### Defined in - -[types/timeframe-keys.ts:7](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L7) - -___ - -### ONE\_HOUR - -• **ONE\_HOUR** = ``"1h"`` - -#### Defined in - -[types/timeframe-keys.ts:4](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L4) - -___ - -### PREVIOUS\_MONTH - -• **PREVIOUS\_MONTH** = ``"previous_month"`` - -#### Defined in - -[types/timeframe-keys.ts:14](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L14) - -___ - -### PREVIOUS\_QUARTER - -• **PREVIOUS\_QUARTER** = ``"previous_quarter"`` - -#### Defined in - -[types/timeframe-keys.ts:15](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L15) - -___ - -### PREVIOUS\_WEEK - -• **PREVIOUS\_WEEK** = ``"previous_week"`` - -#### Defined in - -[types/timeframe-keys.ts:13](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L13) - -___ - -### SEVEN\_DAY - -• **SEVEN\_DAY** = ``"7d"`` - -#### Defined in - -[types/timeframe-keys.ts:8](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L8) - -___ - -### SIX\_HOUR - -• **SIX\_HOUR** = ``"6h"`` - -#### Defined in - -[types/timeframe-keys.ts:5](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L5) - -___ - -### THIRTY\_DAY - -• **THIRTY\_DAY** = ``"30d"`` - -#### Defined in - -[types/timeframe-keys.ts:9](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L9) - -___ - -### TWELVE\_HOUR - -• **TWELVE\_HOUR** = ``"12h"`` - -#### Defined in - -[types/timeframe-keys.ts:6](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-keys.ts#L6) diff --git a/packages/analytics/analytics-utilities/docs/interfaces/BaseExploreMeta.md b/packages/analytics/analytics-utilities/docs/interfaces/BaseExploreMeta.md deleted file mode 100644 index fc0b9f9b00..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/BaseExploreMeta.md +++ /dev/null @@ -1,109 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / BaseExploreMeta - -# Interface: BaseExploreMeta - -## Hierarchy - -- **`BaseExploreMeta`** - - ↳ [`AnalyticsExploreMeta`](AnalyticsExploreMeta.md) - - ↳ [`AnalyticsExploreV2Meta`](AnalyticsExploreV2Meta.md) - -## Table of contents - -### Properties - -- [dimensions](BaseExploreMeta.md#dimensions) -- [granularity](BaseExploreMeta.md#granularity) -- [limit](BaseExploreMeta.md#limit) -- [metricNames](BaseExploreMeta.md#metricnames) -- [metricUnits](BaseExploreMeta.md#metricunits) -- [queryId](BaseExploreMeta.md#queryid) -- [truncated](BaseExploreMeta.md#truncated) - -## Properties - -### dimensions - -• `Optional` **dimensions**: [`DimensionMap`](DimensionMap.md) - -Map of dimension names -Example - { Service: ['service1', 'service2', ... ] } - -#### Defined in - -[types/analytics-data.ts:39](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L39) - -___ - -### granularity - -• `Optional` **granularity**: `number` \| [`GranularityFullObj`](GranularityFullObj.md) - -Granularity of this dataset in milliseconds - -#### Defined in - -[types/analytics-data.ts:52](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L52) - -___ - -### limit - -• `Optional` **limit**: `number` - -Limit applied to the original query - -#### Defined in - -[types/analytics-data.ts:60](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L60) - -___ - -### metricNames - -• `Optional` **metricNames**: `string`[] - -List of metrics in this result - -#### Defined in - -[types/analytics-data.ts:43](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L43) - -___ - -### metricUnits - -• `Optional` **metricUnits**: [`MetricUnit`](MetricUnit.md) - -Mapping of metric names to metric units -Example - { TotalRequests: 'count', Latency: 'ms' } - -#### Defined in - -[types/analytics-data.ts:48](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L48) - -___ - -### queryId - -• **queryId**: `string` - -Optional query id to be used to trace the original query from which this data resulted - -#### Defined in - -[types/analytics-data.ts:34](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L34) - -___ - -### truncated - -• `Optional` **truncated**: `boolean` - -True if results are truncated - -#### Defined in - -[types/analytics-data.ts:56](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L56) diff --git a/packages/analytics/analytics-utilities/docs/interfaces/DatePickerSelection.md b/packages/analytics/analytics-utilities/docs/interfaces/DatePickerSelection.md deleted file mode 100644 index b6529fa1b4..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/DatePickerSelection.md +++ /dev/null @@ -1,41 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / DatePickerSelection - -# Interface: DatePickerSelection - -## Table of contents - -### Properties - -- [end](DatePickerSelection.md#end) -- [start](DatePickerSelection.md#start) -- [timePeriodsKey](DatePickerSelection.md#timeperiodskey) - -## Properties - -### end - -• **end**: `Date` - -#### Defined in - -[types/datepicker-selection.ts:4](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/datepicker-selection.ts#L4) - -___ - -### start - -• **start**: `Date` - -#### Defined in - -[types/datepicker-selection.ts:3](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/datepicker-selection.ts#L3) - -___ - -### timePeriodsKey - -• `Optional` **timePeriodsKey**: `string` - -#### Defined in - -[types/datepicker-selection.ts:2](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/datepicker-selection.ts#L2) diff --git a/packages/analytics/analytics-utilities/docs/interfaces/DimensionMap.md b/packages/analytics/analytics-utilities/docs/interfaces/DimensionMap.md deleted file mode 100644 index 307331d2bb..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/DimensionMap.md +++ /dev/null @@ -1,7 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / DimensionMap - -# Interface: DimensionMap - -## Indexable - -▪ [dimension: `string`]: `string`[] diff --git a/packages/analytics/analytics-utilities/docs/interfaces/GranularityFullObj.md b/packages/analytics/analytics-utilities/docs/interfaces/GranularityFullObj.md deleted file mode 100644 index 27e2558a5e..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/GranularityFullObj.md +++ /dev/null @@ -1,65 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / GranularityFullObj - -# Interface: GranularityFullObj - -Granularity object as accepted by Druid - -## Table of contents - -### Properties - -- [duration](GranularityFullObj.md#duration) -- [origin](GranularityFullObj.md#origin) -- [period](GranularityFullObj.md#period) -- [timeZone](GranularityFullObj.md#timezone) -- [type](GranularityFullObj.md#type) - -## Properties - -### duration - -• `Optional` **duration**: `number` - -#### Defined in - -[types/analytics-data.ts:24](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L24) - -___ - -### origin - -• `Optional` **origin**: `string` \| `number` - -#### Defined in - -[types/analytics-data.ts:27](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L27) - -___ - -### period - -• `Optional` **period**: `string` - -#### Defined in - -[types/analytics-data.ts:25](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L25) - -___ - -### timeZone - -• `Optional` **timeZone**: `string` - -#### Defined in - -[types/analytics-data.ts:26](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L26) - -___ - -### type - -• **type**: `string` - -#### Defined in - -[types/analytics-data.ts:23](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/analytics-data.ts#L23) diff --git a/packages/analytics/analytics-utilities/docs/interfaces/MetricUnit.md b/packages/analytics/analytics-utilities/docs/interfaces/MetricUnit.md deleted file mode 100644 index adbb43b17e..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/MetricUnit.md +++ /dev/null @@ -1,7 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / MetricUnit - -# Interface: MetricUnit - -## Indexable - -▪ [metricName: `string`]: `string` diff --git a/packages/analytics/analytics-utilities/docs/interfaces/QueryTime.md b/packages/analytics/analytics-utilities/docs/interfaces/QueryTime.md deleted file mode 100644 index cb4034d0a2..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/QueryTime.md +++ /dev/null @@ -1,143 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / QueryTime - -# Interface: QueryTime - -## Table of contents - -### Methods - -- [endDate](QueryTime.md#enddate) -- [endMs](QueryTime.md#endms) -- [endSeconds](QueryTime.md#endseconds) -- [granularityDruid](QueryTime.md#granularitydruid) -- [granularityMs](QueryTime.md#granularityms) -- [granularitySeconds](QueryTime.md#granularityseconds) -- [startDate](QueryTime.md#startdate) -- [startMs](QueryTime.md#startms) -- [startSeconds](QueryTime.md#startseconds) - -## Methods - -### endDate - -▸ **endDate**(): `Date` - -#### Returns - -`Date` - -#### Defined in - -[types/query-time.ts:11](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/query-time.ts#L11) - -___ - -### endMs - -▸ **endMs**(): `number` - -#### Returns - -`number` - -#### Defined in - -[types/query-time.ts:9](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/query-time.ts#L9) - -___ - -### endSeconds - -▸ **endSeconds**(): `number` - -#### Returns - -`number` - -#### Defined in - -[types/query-time.ts:7](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/query-time.ts#L7) - -___ - -### granularityDruid - -▸ **granularityDruid**(): ``null`` \| [`DruidGranularity`](DruidGranularity.md) - -#### Returns - -``null`` \| [`DruidGranularity`](DruidGranularity.md) - -#### Defined in - -[types/query-time.ts:5](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/query-time.ts#L5) - -___ - -### granularityMs - -▸ **granularityMs**(): `number` - -#### Returns - -`number` - -#### Defined in - -[types/query-time.ts:12](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/query-time.ts#L12) - -___ - -### granularitySeconds - -▸ **granularitySeconds**(): `number` - -#### Returns - -`number` - -#### Defined in - -[types/query-time.ts:4](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/query-time.ts#L4) - -___ - -### startDate - -▸ **startDate**(): `Date` - -#### Returns - -`Date` - -#### Defined in - -[types/query-time.ts:10](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/query-time.ts#L10) - -___ - -### startMs - -▸ **startMs**(): `number` - -#### Returns - -`number` - -#### Defined in - -[types/query-time.ts:8](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/query-time.ts#L8) - -___ - -### startSeconds - -▸ **startSeconds**(): `number` - -#### Returns - -`number` - -#### Defined in - -[types/query-time.ts:6](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/query-time.ts#L6) diff --git a/packages/analytics/analytics-utilities/docs/interfaces/RecordEvent.md b/packages/analytics/analytics-utilities/docs/interfaces/RecordEvent.md deleted file mode 100644 index 898251f14e..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/RecordEvent.md +++ /dev/null @@ -1,7 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / RecordEvent - -# Interface: RecordEvent - -## Indexable - -▪ [field: `string`]: `string` \| `number` diff --git a/packages/analytics/analytics-utilities/docs/interfaces/TimePeriod.md b/packages/analytics/analytics-utilities/docs/interfaces/TimePeriod.md deleted file mode 100644 index fd5f8c6280..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/TimePeriod.md +++ /dev/null @@ -1,98 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / TimePeriod - -# Interface: TimePeriod - -## Table of contents - -### Properties - -- [display](TimePeriod.md#display) -- [end](TimePeriod.md#end) -- [key](TimePeriod.md#key) -- [start](TimePeriod.md#start) -- [timeframeLength](TimePeriod.md#timeframelength) -- [timeframeText](TimePeriod.md#timeframetext) - -## Properties - -### display - -• **display**: `string` - -#### Defined in - -[types/time-period.ts:3](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/time-period.ts#L3) - -___ - -### end - -• **end**: () => `Date` - -#### Type declaration - -▸ (): `Date` - -##### Returns - -`Date` - -#### Defined in - -[types/time-period.ts:7](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/time-period.ts#L7) - -___ - -### key - -• **key**: `string` - -#### Defined in - -[types/time-period.ts:2](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/time-period.ts#L2) - -___ - -### start - -• **start**: () => `Date` - -#### Type declaration - -▸ (): `Date` - -##### Returns - -`Date` - -#### Defined in - -[types/time-period.ts:6](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/time-period.ts#L6) - -___ - -### timeframeLength - -• **timeframeLength**: () => `string` - -#### Type declaration - -▸ (): `string` - -##### Returns - -`string` - -#### Defined in - -[types/time-period.ts:5](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/time-period.ts#L5) - -___ - -### timeframeText - -• **timeframeText**: `string` - -#### Defined in - -[types/time-period.ts:4](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/time-period.ts#L4) diff --git a/packages/analytics/analytics-utilities/docs/interfaces/Timeframe.md b/packages/analytics/analytics-utilities/docs/interfaces/Timeframe.md deleted file mode 100644 index 8f87fba2c0..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/Timeframe.md +++ /dev/null @@ -1,165 +0,0 @@ -[@kong-ui-public/analytics-utilities](../Timeframe.md) / Timeframe - -# Interface: ITimeframe - -The `ITimeframe` interface represents a contract for objects that define a timeframe within the application. It includes information about the timeframe's display, length, and related granularities, as well as methods for obtaining start and end dates and other timeframe-related calculations. - -## Table of contents - -### Properties - -- [timeframeText](Timeframe.md#timeframeText) -- [key](Timeframe.md#key) -- [display](Timeframe.md#display) -- [timeframeLength](Timeframe.md#timeframeLength) -- [allowedTiers](Timeframe.md#allowedTiers) -- [defaultResponseGranularity](Timeframe.md#defaultResponseGranularity) -- [dataGranularity](Timeframe.md#dataGranularity) -- [isRelative](Timeframe.md#isRelative) - -### Methods - -- [rawEnd](Timeframe.md#rawEnd) -- [rawStart](Timeframe.md#rawStart) -- [timeframeLengthMs](Timeframe.md#timeframeLengthMs) -- [maximumTimeframeLength](Timeframe.md#maximumTimeframeLength) -- [allowedGranularities](Timeframe.md#allowedGranularities) - -## Properties - -### timeframeText - -- **Type**: `string` -- **Readonly**: Yes - -A textual representation of the timeframe. - -### key - -- **Type**: `string` -- **Readonly**: Yes - -A unique key identifying the timeframe. - -### display - -- **Type**: `string` -- **Readonly**: Yes - -The display name of the timeframe. - -### timeframeLength - -- **Type**: `() => number` -- **Readonly**: Yes - -A method that returns the length of the timeframe in a specific unit. - -### allowedTiers - -- **Type**: `Array` -- **Readonly**: Yes - -An array of allowed tiers for the timeframe. - -### defaultResponseGranularity - -- **Type**: `GranularityKeys` -- **Readonly**: Yes - -The default granularity of responses associated with the timeframe. - -### dataGranularity - -- **Type**: `GranularityKeys` -- **Readonly**: Yes - -The granularity of the data within the timeframe. - -### isRelative - -- **Type**: `boolean` -- **Readonly**: Yes - -Indicates whether the timeframe is relative (e.g., "last 7 days") as opposed to absolute (e.g., "Jan 1, 2023 - Jan 7, 2023"). - -## Methods - -### rawEnd - -▸ **rawEnd**(_tz?: `string`): `Date` - -Returns the raw end date of the timeframe, possibly adjusted for the provided timezone. - -#### Returns - -`Date` - -#### Defined in - -[types/timeframe.ts:3](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe.ts) - -___ - -### rawStart - -▸ **rawStart**(_tz?: `string`): `Date` - -Returns the raw start date of the timeframe, possibly adjusted for the provided timezone. - -#### Returns - -`Date` - -#### Defined in - -[types/timeframe.ts:9](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe.ts#L9) - -___ - -### timeframeLengthMs - -▸ **timeframeLengthMs**(): `number` - -Calculates the length of the timeframe in milliseconds. - -#### Returns - -`number` - -#### Defined in - -[types/timeframe.ts:12](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe.ts#L12) - -___ - -### maximumTimeframeLength - -▸ **maximumTimeframeLength**(): `number` - -Determines the maximum allowable length of the timeframe in the same units used by `timeframeLength`. - -#### Returns - -`number` - -#### Defined in - -[types/timeframe.ts:7](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe.ts#L7) - -___ - -### allowedGranularities - -▸ **allowedGranularities**(): `Set` - -Retrieves a set of granularity keys that are permissible for the timeframe. - -#### Returns - -`Set` - -#### Defined in - -[types/timeframe.ts:5](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe.ts#L5) - diff --git a/packages/analytics/analytics-utilities/docs/interfaces/TimeframeOptions.md b/packages/analytics/analytics-utilities/docs/interfaces/TimeframeOptions.md deleted file mode 100644 index b2c34bf5fb..0000000000 --- a/packages/analytics/analytics-utilities/docs/interfaces/TimeframeOptions.md +++ /dev/null @@ -1,126 +0,0 @@ -[@kong-ui-public/analytics-utilities](../analytics-utils.md) / TimeframeOptions - -# Interface: TimeframeOptions - -## Table of contents - -### Properties - -- [allowedTiers](TimeframeOptions.md#allowedtiers) -- [dataGranularity](TimeframeOptions.md#datagranularity) -- [defaultResponseGranularity](TimeframeOptions.md#defaultresponsegranularity) -- [display](TimeframeOptions.md#display) -- [endCustom](TimeframeOptions.md#endcustom) -- [isRelative](TimeframeOptions.md#isrelative) -- [key](TimeframeOptions.md#key) -- [startCustom](TimeframeOptions.md#startcustom) -- [timeframeLength](TimeframeOptions.md#timeframelength) -- [timeframeText](TimeframeOptions.md#timeframetext) - -## Properties - -### allowedTiers - -• **allowedTiers**: `string`[] - -#### Defined in - -[types/timeframe-options.ts:11](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L11) - -___ - -### dataGranularity - -• **dataGranularity**: [`GranularityKeys`](../enums/GranularityKeys.md) - -#### Defined in - -[types/timeframe-options.ts:8](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L8) - -___ - -### defaultResponseGranularity - -• **defaultResponseGranularity**: [`GranularityKeys`](../enums/GranularityKeys.md) - -#### Defined in - -[types/timeframe-options.ts:7](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L7) - -___ - -### display - -• **display**: `string` - -#### Defined in - -[types/timeframe-options.ts:6](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L6) - -___ - -### endCustom - -• `Optional` **endCustom**: `Date` - -#### Defined in - -[types/timeframe-options.ts:13](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L13) - -___ - -### isRelative - -• **isRelative**: `boolean` - -#### Defined in - -[types/timeframe-options.ts:9](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L9) - -___ - -### key - -• **key**: `string` - -#### Defined in - -[types/timeframe-options.ts:4](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L4) - -___ - -### startCustom - -• `Optional` **startCustom**: `Date` - -#### Defined in - -[types/timeframe-options.ts:12](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L12) - -___ - -### timeframeLength - -• **timeframeLength**: () => `number` - -#### Type declaration - -▸ (): `number` - -##### Returns - -`number` - -#### Defined in - -[types/timeframe-options.ts:10](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L10) - -___ - -### timeframeText - -• **timeframeText**: `string` - -#### Defined in - -[types/timeframe-options.ts:5](https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-utilities/src/types/timeframe-options.ts#L5) diff --git a/packages/analytics/analytics-utilities/package.json b/packages/analytics/analytics-utilities/package.json index da5d32eb3a..a087c98abe 100644 --- a/packages/analytics/analytics-utilities/package.json +++ b/packages/analytics/analytics-utilities/package.json @@ -23,7 +23,6 @@ "scripts": { "dev": "cross-env USE_SANDBOX=true vite", "build": "run-s typecheck build:package build:types", - "build:docs": "typedoc --plugin typedoc-plugin-markdown --out docs src/index.ts --entryDocument analytics-utils.md --gitRevision main --githubPages false --readme none --tsconfig ./tsconfig.build.json", "build:package": "BUILD_VISUALIZER='analytics/analytics-utilities' vite build -m production", "build:types": "vue-tsc -p './tsconfig.build.json' --emitDeclarationOnly", "build:sandbox": "cross-env USE_SANDBOX=true vite build -m production",