Skip to content

Commit 2b7d96e

Browse files
committed
Canary version bump + missing file
1 parent 642f830 commit 2b7d96e

File tree

2 files changed

+126
-3
lines changed

2 files changed

+126
-3
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@elastic/elasticsearch",
3-
"version": "8.9.0",
4-
"versionCanary": "8.9.0-canary.0",
2+
"name": "@elastic/elasticsearch-canary",
3+
"version": "8.9.0-canary.1",
4+
"versionCanary": "8.9.0-canary.1",
55
"description": "The official Elasticsearch client for Node.js",
66
"main": "index.js",
77
"types": "index.d.ts",

src/api/api/synonyms.ts

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
/* eslint-disable import/export */
21+
/* eslint-disable @typescript-eslint/no-misused-new */
22+
/* eslint-disable @typescript-eslint/no-extraneous-class */
23+
/* eslint-disable @typescript-eslint/no-unused-vars */
24+
25+
// This file was automatically generated by elastic/elastic-client-generator-js
26+
// DO NOT MODIFY IT BY HAND. Instead, modify the source open api file,
27+
// and elastic/elastic-client-generator-js to regenerate this file again.
28+
29+
import {
30+
Transport,
31+
TransportRequestOptions,
32+
TransportRequestOptionsWithMeta,
33+
TransportRequestOptionsWithOutMeta,
34+
TransportResult
35+
} from '@elastic/transport'
36+
import * as T from '../types'
37+
import * as TB from '../typesWithBodyKey'
38+
interface That { transport: Transport }
39+
40+
export default class Synonyms {
41+
transport: Transport
42+
constructor (transport: Transport) {
43+
this.transport = transport
44+
}
45+
46+
/**
47+
* Deletes a synonym set
48+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/delete-synonyms.html Elasticsearch API docs}
49+
*/
50+
async delete (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
51+
async delete (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
52+
async delete (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
53+
async delete (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
54+
const acceptedPath: string[] = ['synonyms_set']
55+
const querystring: Record<string, any> = {}
56+
const body = undefined
57+
58+
params = params ?? {}
59+
for (const key in params) {
60+
if (acceptedPath.includes(key)) {
61+
continue
62+
} else if (key !== 'body') {
63+
querystring[key] = params[key]
64+
}
65+
}
66+
67+
const method = 'DELETE'
68+
const path = `/_synonyms/${encodeURIComponent(params.synonyms_set.toString())}`
69+
return await this.transport.request({ path, method, querystring, body }, options)
70+
}
71+
72+
/**
73+
* Retrieves a synonym set
74+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/get-synonyms.html Elasticsearch API docs}
75+
*/
76+
async get (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
77+
async get (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
78+
async get (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
79+
async get (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
80+
const acceptedPath: string[] = ['synonyms_set']
81+
const querystring: Record<string, any> = {}
82+
const body = undefined
83+
84+
params = params ?? {}
85+
for (const key in params) {
86+
if (acceptedPath.includes(key)) {
87+
continue
88+
} else if (key !== 'body') {
89+
querystring[key] = params[key]
90+
}
91+
}
92+
93+
const method = 'GET'
94+
const path = `/_synonyms/${encodeURIComponent(params.synonyms_set.toString())}`
95+
return await this.transport.request({ path, method, querystring, body }, options)
96+
}
97+
98+
/**
99+
* Creates or updates a synonyms set
100+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.9/put-synonyms.html Elasticsearch API docs}
101+
*/
102+
async put (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
103+
async put (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
104+
async put (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
105+
async put (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
106+
const acceptedPath: string[] = ['synonyms_set']
107+
const querystring: Record<string, any> = {}
108+
const body = undefined
109+
110+
params = params ?? {}
111+
for (const key in params) {
112+
if (acceptedPath.includes(key)) {
113+
continue
114+
} else if (key !== 'body') {
115+
querystring[key] = params[key]
116+
}
117+
}
118+
119+
const method = 'PUT'
120+
const path = `/_synonyms/${encodeURIComponent(params.synonyms_set.toString())}`
121+
return await this.transport.request({ path, method, querystring, body }, options)
122+
}
123+
}

0 commit comments

Comments
 (0)