Skip to content

Commit b266550

Browse files
algolia-botmorganleroimillotp
committed
chore: generated code for commit b9b4ba3. [skip ci]
Co-authored-by: Morgan Leroi <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent b9b4ba3 commit b266550

File tree

9 files changed

+86
-34
lines changed

9 files changed

+86
-34
lines changed

clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export * from './listDestinationsResponse';
3636
export * from './listEventsResponse';
3737
export * from './listSourcesResponse';
3838
export * from './listTasksResponse';
39+
export * from './mappingTypeCSV';
3940
export * from './methodType';
4041
export * from './onDemandTrigger';
4142
export * from './onDemandTriggerType';
@@ -55,17 +56,17 @@ export * from './scheduleTriggerInput';
5556
export * from './scheduleTriggerType';
5657
export * from './source';
5758
export * from './sourceBigCommerce';
59+
export * from './sourceCSV';
5860
export * from './sourceCommercetools';
5961
export * from './sourceCreate';
6062
export * from './sourceCreateResponse';
6163
export * from './sourceInput';
62-
export * from './sourceJson';
64+
export * from './sourceJSON';
6365
export * from './sourceSearch';
6466
export * from './sourceType';
6567
export * from './sourceUpdate';
6668
export * from './sourceUpdateCommercetools';
6769
export * from './sourceUpdateInput';
68-
export * from './sourceUpdateJson';
6970
export * from './sourceUpdateResponse';
7071
export * from './subscriptionTrigger';
7172
export * from './task';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2+
3+
export type MappingTypeCSV =
4+
| 'boolean'
5+
| 'float'
6+
| 'integer'
7+
| 'json'
8+
| 'string';
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2+
3+
import type { MappingTypeCSV } from './mappingTypeCSV';
4+
import type { MethodType } from './methodType';
5+
6+
export type SourceCSV = {
7+
/**
8+
* The URL of the file.
9+
*/
10+
url: string;
11+
12+
/**
13+
* The name of the column that contains the unique ID, used as `objectID` in Algolia.
14+
*/
15+
uniqueIDColumn?: string;
16+
17+
/**
18+
* Mapping of type for every column. For example {\"myColumn\": \"boolean\", \"myOtherColumn\": \"json\"}.
19+
*/
20+
mapping?: Record<string, MappingTypeCSV>;
21+
22+
method?: MethodType;
23+
};
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
22

33
import type { SourceBigCommerce } from './sourceBigCommerce';
4+
import type { SourceCSV } from './sourceCSV';
45
import type { SourceCommercetools } from './sourceCommercetools';
5-
import type { SourceJson } from './sourceJson';
6+
import type { SourceJSON } from './sourceJSON';
67

7-
export type SourceInput = SourceBigCommerce | SourceCommercetools | SourceJson;
8+
export type SourceInput =
9+
| SourceBigCommerce
10+
| SourceCommercetools
11+
| SourceCSV
12+
| SourceJSON;

clients/algoliasearch-client-javascript/packages/ingestion/model/sourceJson.ts renamed to clients/algoliasearch-client-javascript/packages/ingestion/model/sourceJSON.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type { MethodType } from './methodType';
44

5-
export type SourceJson = {
5+
export type SourceJSON = {
66
/**
77
* The URL of the file.
88
*/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
22

3-
export type SourceType = 'bigcommerce' | 'commercetools' | 'json';
3+
export type SourceType = 'bigcommerce' | 'commercetools' | 'csv' | 'json';
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
22

3+
import type { SourceCSV } from './sourceCSV';
4+
import type { SourceJSON } from './sourceJSON';
35
import type { SourceUpdateCommercetools } from './sourceUpdateCommercetools';
4-
import type { SourceUpdateJson } from './sourceUpdateJson';
56

6-
export type SourceUpdateInput = SourceUpdateCommercetools | SourceUpdateJson;
7+
export type SourceUpdateInput =
8+
| SourceCSV
9+
| SourceJSON
10+
| SourceUpdateCommercetools;

clients/algoliasearch-client-javascript/packages/ingestion/model/sourceUpdateJson.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

specs/bundled/ingestion.yml

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ components:
627627
- bigcommerce
628628
- commercetools
629629
- json
630+
- csv
630631
sourceID:
631632
type: string
632633
description: The source UUID.
@@ -668,7 +669,7 @@ components:
668669
enum:
669670
- GET
670671
- POST
671-
SourceJson:
672+
SourceJSON:
672673
type: object
673674
additionalProperties: false
674675
properties:
@@ -679,11 +680,43 @@ components:
679680
$ref: '#/components/schemas/MethodType'
680681
required:
681682
- url
683+
MappingTypeCSV:
684+
type: string
685+
enum:
686+
- string
687+
- integer
688+
- float
689+
- boolean
690+
- json
691+
SourceCSV:
692+
type: object
693+
additionalProperties: false
694+
properties:
695+
url:
696+
type: string
697+
description: The URL of the file.
698+
uniqueIDColumn:
699+
type: string
700+
description: >-
701+
The name of the column that contains the unique ID, used as
702+
`objectID` in Algolia.
703+
mapping:
704+
type: object
705+
description: >
706+
Mapping of type for every column. For example {"myColumn":
707+
"boolean", "myOtherColumn": "json"}.
708+
additionalProperties:
709+
$ref: '#/components/schemas/MappingTypeCSV'
710+
method:
711+
$ref: '#/components/schemas/MethodType'
712+
required:
713+
- url
682714
SourceInput:
683715
oneOf:
684716
- $ref: '#/components/schemas/SourceCommercetools'
685717
- $ref: '#/components/schemas/SourceBigCommerce'
686-
- $ref: '#/components/schemas/SourceJson'
718+
- $ref: '#/components/schemas/SourceJSON'
719+
- $ref: '#/components/schemas/SourceCSV'
687720
Source:
688721
type: object
689722
additionalProperties: false
@@ -765,21 +798,11 @@ components:
765798
^[a-z]{2}(-[A-Z]{2})?$. For example ["fr-FR", "en"].
766799
items:
767800
type: string
768-
SourceUpdateJson:
769-
type: object
770-
additionalProperties: false
771-
properties:
772-
url:
773-
type: string
774-
description: The URL of the file.
775-
method:
776-
$ref: '#/components/schemas/MethodType'
777-
required:
778-
- url
779801
SourceUpdateInput:
780802
oneOf:
781803
- $ref: '#/components/schemas/SourceUpdateCommercetools'
782-
- $ref: '#/components/schemas/SourceUpdateJson'
804+
- $ref: '#/components/schemas/SourceJSON'
805+
- $ref: '#/components/schemas/SourceCSV'
783806
SourceUpdate:
784807
type: object
785808
additionalProperties: false

0 commit comments

Comments
 (0)