Skip to content

Commit

Permalink
chore: generated code for commit 859c0a9. [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
  • Loading branch information
algolia-bot and mehmetaligok committed Jan 31, 2023
1 parent 859c0a9 commit 9f4ad8f
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ export * from './sourceJson';
export * from './sourceSearch';
export * from './sourceType';
export * from './sourceUpdate';
export * from './sourceUpdateCommercetools';
export * from './sourceUpdateInput';
export * from './sourceUpdateJson';
export * from './sourceUpdateResponse';
export * from './task';
export * from './taskCreate';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

export type SourceBigCommerce = {
/**
* The store hash identifying the store the shopper is signing in to.
*/
storeHash?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import type { MethodType } from './methodType';

export type SourceJson = {
/**
* The URL of the file.
*/
url: string;

method?: MethodType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

import type { SourceInput } from './sourceInput';
import type { SourceType } from './sourceType';
import type { SourceUpdateInput } from './sourceUpdateInput';

export type SourceUpdate = {
type?: SourceType;

name?: string;

input?: SourceInput;
input?: SourceUpdateInput;

authenticationID?: string;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

export type SourceUpdateCommercetools = {
/**
* Unique and immutable key of the referenced Store.
*/
storeKeys?: string[];

/**
* Array of locales that must match the following pattern: ^[a-z]{2}(-[A-Z]{2})?$. For example [\"fr-FR\", \"en\"].
*/
locales?: string[];
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

import type { SourceUpdateCommercetools } from './sourceUpdateCommercetools';
import type { SourceUpdateJson } from './sourceUpdateJson';

export type SourceUpdateInput = SourceUpdateCommercetools | SourceUpdateJson;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

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

export type SourceUpdateJson = {
/**
* The URL of the file.
*/
url: string;

method?: MethodType;
};
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@ export function createIngestionClient({
);
}

if (!sourceCreate.type) {
throw new Error(
'Parameter `sourceCreate.type` is required when calling `createSource`.'
);
}
if (!sourceCreate.input) {
throw new Error(
'Parameter `sourceCreate.input` is required when calling `createSource`.'
);
}

const requestPath = '/1/sources';
const headers: Headers = {};
const queryParameters: QueryParameters = {};
Expand Down Expand Up @@ -1347,7 +1358,7 @@ export function createIngestionClient({
const queryParameters: QueryParameters = {};

const request: Request = {
method: 'POST',
method: 'PUT',
path: requestPath,
queryParameters,
headers,
Expand Down
40 changes: 36 additions & 4 deletions specs/bundled/ingestion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ components:
storeKeys:
type: array
items:
description: Unique and immutable key of the referenced Store.
type: string
locales:
type: array
Expand All @@ -597,6 +598,7 @@ components:
properties:
storeHash:
type: string
description: The store hash identifying the store the shopper is signing in to.
required:
- store_hash
MethodType:
Expand All @@ -610,6 +612,7 @@ components:
properties:
url:
type: string
description: The URL of the file.
method:
$ref: '#/components/schemas/MethodType'
required:
Expand Down Expand Up @@ -684,16 +687,45 @@ components:
type: string
required:
- sourceIDs
SourceUpdateCommercetools:
type: object
additionalProperties: false
properties:
storeKeys:
type: array
description: Unique and immutable key of the referenced Store.
items:
type: string
locales:
type: array
description: >
Array of locales that must match the following pattern:
^[a-z]{2}(-[A-Z]{2})?$. For example ["fr-FR", "en"].
items:
type: string
SourceUpdateJson:
type: object
additionalProperties: false
properties:
url:
type: string
description: The URL of the file.
method:
$ref: '#/components/schemas/MethodType'
required:
- url
SourceUpdateInput:
oneOf:
- $ref: '#/components/schemas/SourceUpdateCommercetools'
- $ref: '#/components/schemas/SourceUpdateJson'
SourceUpdate:
type: object
additionalProperties: false
properties:
type:
$ref: '#/components/schemas/SourceType'
name:
type: string
input:
$ref: '#/components/schemas/SourceInput'
$ref: '#/components/schemas/SourceUpdateInput'
authenticationID:
type: string
SourceUpdateResponse:
Expand Down Expand Up @@ -1377,7 +1409,7 @@ paths:
$ref: '#/components/schemas/Source'
'400':
$ref: '#/components/responses/BadRequest'
post:
put:
tags:
- ingestion
summary: Update a source.
Expand Down

0 comments on commit 9f4ad8f

Please sign in to comment.