Skip to content

Commit

Permalink
feat(specs): add analytics specs and client. (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Dec 15, 2021
1 parent a4e750f commit 18fa5fa
Show file tree
Hide file tree
Showing 105 changed files with 4,307 additions and 56 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ module.exports = {
// there's a conflict when declaring `type` and `namespaces`, even with `ignoreDeclarationMerge`
'no-redeclare': 0,
'@typescript-eslint/no-redeclare': 0,
// Some endpoints have A LOT of parameters
'max-params': 0,

'@typescript-eslint/no-unused-vars': 2,
'unused-imports/no-unused-imports-ts': 2,
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Checking personalization specs
run: yarn specs personalization

- name: Checking analytics specs
run: yarn specs analytics

- name: Lint
run: yamllint specs

Expand Down Expand Up @@ -59,6 +62,12 @@ jobs:
- name: Build personalization client
run: yarn client:build-js:personalization

- name: Generate analytics client
run: yarn generate javascript analytics

- name: Build analytics client
run: yarn client:build-js:analytics

- name: Lint
run: yarn lint

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.openapi-generator
.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

git_push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This is the entrypoint for the package
export * from './src/apis';
export * from './model/models';
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Error.
*/
export type ErrorBase = {
message?: string;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { GetAverageClickPositionResponseDates } from './getAverageClickPositionResponseDates';

export type GetAverageClickPositionResponse = {
/**
* The average of all the click count event.
*/
average: number;
/**
* The number of click event.
*/
clickCount: number;
/**
* A list of average click position with their date.
*/
dates: GetAverageClickPositionResponseDates[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export type GetAverageClickPositionResponseDates = {
/**
* The average of all the click count event.
*/
average: number;
/**
* The number of click event.
*/
clickCount: number;
/**
* Date of the event.
*/
date: Date;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { GetClickPositionsResponsePositions } from './getClickPositionsResponsePositions';

export type GetClickPositionsResponse = {
/**
* A list of the click positions with their click count.
*/
positions: GetClickPositionsResponsePositions[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export type GetClickPositionsResponsePositions = {
/**
* Range of positions with the following pattern: Positions from 1 to 10 included are displayed in separated groups. Positions from 11 to 20 included are grouped together. Positions from 21 and up are grouped together.
*/
position: number[];
/**
* The number of click event.
*/
clickCount: number;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { GetClickThroughRateResponseDates } from './getClickThroughRateResponseDates';

export type GetClickThroughRateResponse = {
/**
* The click-through rate.
*/
rate: number;
/**
* The number of click event.
*/
clickCount: number;
/**
* The number of tracked search click.
*/
trackedSearchCount: number;
/**
* A list of click-through rate events with their date.
*/
dates: GetClickThroughRateResponseDates[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export type GetClickThroughRateResponseDates = {
/**
* The click-through rate.
*/
rate: number;
/**
* The number of click event.
*/
clickCount: number;
/**
* The number of tracked search click.
*/
trackedSearchCount: number;
/**
* Date of the event.
*/
date: Date;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { GetConversationRateResponseDates } from './getConversationRateResponseDates';

export type GetConversationRateResponse = {
/**
* The click-through rate.
*/
rate: number;
/**
* The number of tracked search click.
*/
trackedSearchCount: number;
/**
* The number of converted clicks.
*/
conversionCount: number;
/**
* A list of conversion events with their date.
*/
dates: GetConversationRateResponseDates[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export type GetConversationRateResponseDates = {
/**
* The click-through rate.
*/
rate: number;
/**
* The number of tracked search click.
*/
trackedSearchCount: number;
/**
* The number of converted clicks.
*/
conversionCount: number;
/**
* Date of the event.
*/
date: Date;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { GetNoClickRateResponseDates } from './getNoClickRateResponseDates';

export type GetNoClickRateResponse = {
/**
* The click-through rate.
*/
rate: number;
/**
* The number of click event.
*/
count: number;
/**
* The number of click event.
*/
noClickCount: number;
/**
* A list of searches without clicks with their date, rate and counts.
*/
dates: GetNoClickRateResponseDates[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export type GetNoClickRateResponseDates = {
/**
* The click-through rate.
*/
rate: number;
/**
* The number of click event.
*/
count: number;
/**
* The number of click event.
*/
noClickCount: number;
/**
* Date of the event.
*/
date: Date;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { GetNoResultsRateResponseDates } from './getNoResultsRateResponseDates';

export type GetNoResultsRateResponse = {
/**
* The click-through rate.
*/
rate: number;
/**
* The number of occurrences.
*/
count: number;
/**
* The number of occurrences.
*/
noResultCount: number;
/**
* A list of searches without results with their date, rate and counts.
*/
dates: GetNoResultsRateResponseDates[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export type GetNoResultsRateResponseDates = {
/**
* Date of the event.
*/
date: Date;
/**
* The number of occurrences.
*/
noResultCount: number;
/**
* The number of occurrences.
*/
count: number;
/**
* The click-through rate.
*/
rate: number;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { GetSearchesCountResponseDates } from './getSearchesCountResponseDates';

export type GetSearchesCountResponse = {
/**
* The number of occurrences.
*/
count: number;
/**
* A list of search events with their date and count.
*/
dates: GetSearchesCountResponseDates[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export type GetSearchesCountResponseDates = {
/**
* Date of the event.
*/
date: Date;
/**
* The number of occurrences.
*/
count: number;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { GetSearchesNoClicksResponseSearches } from './getSearchesNoClicksResponseSearches';

export type GetSearchesNoClicksResponse = {
/**
* A list of searches with no clicks and their count.
*/
searches: GetSearchesNoClicksResponseSearches[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export type GetSearchesNoClicksResponseSearches = {
/**
* The search query.
*/
search: string;
/**
* The number of occurrences.
*/
count: number;
/**
* The number of occurrences.
*/
withFilterCount: number;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { GetSearchesNoResultsResponseSearches } from './getSearchesNoResultsResponseSearches';

export type GetSearchesNoResultsResponse = {
/**
* A list of searches with no results and their count.
*/
searches: GetSearchesNoResultsResponseSearches[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export type GetSearchesNoResultsResponseSearches = {
/**
* The search query.
*/
search: string;
/**
* The number of occurrences.
*/
count: number;
/**
* Number of hits that the search query matched.
*/
nbHits: number;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export type GetStatusResponse = {
/**
* Date of last update (ISO-8601 format).
*/
updatedAt: Date;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { GetTopCountriesResponseCountries } from './getTopCountriesResponseCountries';

export type GetTopCountriesResponse = {
/**
* A list of countries with their count.
*/
countries: GetTopCountriesResponseCountries[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export type GetTopCountriesResponseCountries = {
/**
* The country.
*/
country: string;
/**
* The number of occurrences.
*/
count: number;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export type GetTopFilterAttribute = {
/**
* The attribute.
*/
attribute: string;
/**
* The number of occurrences.
*/
count: number;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { GetTopFilterAttribute } from './getTopFilterAttribute';

export type GetTopFilterAttributesResponse = {
/**
* A list of attributes with their count.
*/
attributes: GetTopFilterAttribute[];
};
Loading

0 comments on commit 18fa5fa

Please sign in to comment.