Skip to content

Commit

Permalink
Working export view
Browse files Browse the repository at this point in the history
  • Loading branch information
Theophile-Madet committed Jan 30, 2025
1 parent 4e7b613 commit 8e51732
Show file tree
Hide file tree
Showing 8 changed files with 700 additions and 36 deletions.
99 changes: 99 additions & 0 deletions schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,42 @@ paths:
items:
$ref: '#/components/schemas/Column'
description: ''
/statistics/export_dataset:
get:
operationId: statistics_export_dataset_list
description: Verify that the current user is authenticated.
parameters:
- in: query
name: at_date
schema:
type: string
format: date
required: true
- in: query
name: dataset
schema:
type: string
required: true
- in: query
name: export_columns
schema:
type: array
items:
type: string
required: true
tags:
- statistics
security:
- cookieAuth: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DatapointExport'
description: ''
/welcomedesk/api/search:
get:
operationId: welcomedesk_api_search_list
Expand Down Expand Up @@ -69,6 +105,69 @@ components:
type: string
required:
- column_name
DatapointExport:
type: object
properties:
member_number:
type: integer
display_name:
type: string
is_company:
type: boolean
company_name:
type: string
first_name:
type: string
last_name:
type: string
usage_name:
type: string
pronouns:
type: string
email:
type: string
phone_number:
type: string
birthdate:
type: string
street:
type: string
street_2:
type: string
postcode:
type: string
city:
type: string
country:
type: string
preferred_language:
type: string
is_investing:
type: boolean
ratenzahlung:
type: boolean
attended_welcome_session:
type: boolean
co_purchaser:
type: string
allows_purchase_tracking:
type: boolean
shift_capabilities:
type: array
items:
type: string
shift_partner:
type: integer
shift_status:
type: string
is_working:
type: boolean
is_exempted:
type: boolean
is_paused:
type: boolean
can_shop:
type: boolean
Dataset:
type: object
properties:
Expand Down
1 change: 1 addition & 0 deletions src/api-client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apis/WelcomedeskApi.ts
apis/index.ts
index.ts
models/Column.ts
models/DatapointExport.ts
models/Dataset.ts
models/ShareOwnerForWelcomeDesk.ts
models/index.ts
Expand Down
68 changes: 68 additions & 0 deletions src/api-client/apis/StatisticsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,24 @@
import * as runtime from '../runtime';
import type {
Column,
DatapointExport,
Dataset,
} from '../models/index';
import {
ColumnFromJSON,
ColumnToJSON,
DatapointExportFromJSON,
DatapointExportToJSON,
DatasetFromJSON,
DatasetToJSON,
} from '../models/index';

export interface StatisticsExportDatasetListRequest {
atDate: Date;
dataset: string;
exportColumns: Array<string>;
}

/**
*
*/
Expand Down Expand Up @@ -82,4 +91,63 @@ export class StatisticsApi extends runtime.BaseAPI {
return await response.value();
}

/**
* Verify that the current user is authenticated.
*/
async statisticsExportDatasetListRaw(requestParameters: StatisticsExportDatasetListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<DatapointExport>>> {
if (requestParameters['atDate'] == null) {
throw new runtime.RequiredError(
'atDate',
'Required parameter "atDate" was null or undefined when calling statisticsExportDatasetList().'
);
}

if (requestParameters['dataset'] == null) {
throw new runtime.RequiredError(
'dataset',
'Required parameter "dataset" was null or undefined when calling statisticsExportDatasetList().'
);
}

if (requestParameters['exportColumns'] == null) {
throw new runtime.RequiredError(
'exportColumns',
'Required parameter "exportColumns" was null or undefined when calling statisticsExportDatasetList().'
);
}

const queryParameters: any = {};

if (requestParameters['atDate'] != null) {
queryParameters['at_date'] = (requestParameters['atDate'] as any).toISOString().substring(0,10);
}

if (requestParameters['dataset'] != null) {
queryParameters['dataset'] = requestParameters['dataset'];
}

if (requestParameters['exportColumns'] != null) {
queryParameters['export_columns'] = requestParameters['exportColumns'];
}

const headerParameters: runtime.HTTPHeaders = {};

const response = await this.request({
path: `/statistics/export_dataset`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DatapointExportFromJSON));
}

/**
* Verify that the current user is authenticated.
*/
async statisticsExportDatasetList(requestParameters: StatisticsExportDatasetListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<DatapointExport>> {
const response = await this.statisticsExportDatasetListRaw(requestParameters, initOverrides);
return await response.value();
}

}
1 change: 1 addition & 0 deletions src/api-client/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* tslint:disable */
/* eslint-disable */
export * from './Column';
export * from './DatapointExport';
export * from './Dataset';
export * from './ShareOwnerForWelcomeDesk';
Loading

0 comments on commit 8e51732

Please sign in to comment.