Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Fancy exports #615

Merged
merged 18 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Working export view
  • Loading branch information
Theophile-Madet committed Jan 30, 2025
commit 8e51732d06261d893b8f029c4aeef7800a86b149
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
Loading