@51eat/sdk 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/customer/resources/auth/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/customer/resources/auth/client/Client.js +5 -9
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.ts +2 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/customer/resources/auth/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/customer/resources/auth/client/Client.mjs +6 -10
- package/dist/esm/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.mts +2 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@51eat/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "0.0.
|
|
47
|
-
"User-Agent": "@51eat/sdk/0.0.
|
|
46
|
+
"X-Fern-SDK-Version": "0.0.33",
|
|
47
|
+
"User-Agent": "@51eat/sdk/0.0.33",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -121,9 +121,8 @@ export declare class AuthClient {
|
|
|
121
121
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
122
122
|
*
|
|
123
123
|
* @example
|
|
124
|
-
* import { createReadStream } from "fs";
|
|
125
124
|
* await client.customer.auth.uploadAvatar({
|
|
126
|
-
* avatar:
|
|
125
|
+
* avatar: "avatar"
|
|
127
126
|
* })
|
|
128
127
|
*/
|
|
129
128
|
uploadAvatar(request: FiveOneEat.customer.UploadAvatarRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.UploadAvatarAuthResponse>;
|
|
@@ -406,9 +406,8 @@ class AuthClient {
|
|
|
406
406
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
407
407
|
*
|
|
408
408
|
* @example
|
|
409
|
-
* import { createReadStream } from "fs";
|
|
410
409
|
* await client.customer.auth.uploadAvatar({
|
|
411
|
-
* avatar:
|
|
410
|
+
* avatar: "avatar"
|
|
412
411
|
* })
|
|
413
412
|
*/
|
|
414
413
|
uploadAvatar(request, requestOptions) {
|
|
@@ -417,19 +416,16 @@ class AuthClient {
|
|
|
417
416
|
__uploadAvatar(request, requestOptions) {
|
|
418
417
|
return __awaiter(this, void 0, void 0, function* () {
|
|
419
418
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
420
|
-
const _body = yield core.newFormData();
|
|
421
|
-
yield _body.appendFile("avatar", request.avatar);
|
|
422
|
-
const _maybeEncodedRequest = yield _body.getRequest();
|
|
423
419
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
424
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
420
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
425
421
|
const _response = yield core.fetcher({
|
|
426
422
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/user/avatar"),
|
|
427
423
|
method: "POST",
|
|
428
424
|
headers: _headers,
|
|
425
|
+
contentType: "application/json",
|
|
429
426
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
430
|
-
requestType: "
|
|
431
|
-
|
|
432
|
-
body: _maybeEncodedRequest.body,
|
|
427
|
+
requestType: "json",
|
|
428
|
+
body: request,
|
|
433
429
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
434
430
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
435
431
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
package/dist/cjs/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type * as core from "../../../../../../../core/index.js";
|
|
2
1
|
/**
|
|
3
2
|
* @example
|
|
4
3
|
* {
|
|
5
|
-
* avatar:
|
|
4
|
+
* avatar: "avatar"
|
|
6
5
|
* }
|
|
7
6
|
*/
|
|
8
7
|
export interface UploadAvatarRequest {
|
|
9
|
-
avatar:
|
|
8
|
+
avatar: string;
|
|
10
9
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.33";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@51eat/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "0.0.
|
|
10
|
-
"User-Agent": "@51eat/sdk/0.0.
|
|
9
|
+
"X-Fern-SDK-Version": "0.0.33",
|
|
10
|
+
"User-Agent": "@51eat/sdk/0.0.33",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -121,9 +121,8 @@ export declare class AuthClient {
|
|
|
121
121
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
122
122
|
*
|
|
123
123
|
* @example
|
|
124
|
-
* import { createReadStream } from "fs";
|
|
125
124
|
* await client.customer.auth.uploadAvatar({
|
|
126
|
-
* avatar:
|
|
125
|
+
* avatar: "avatar"
|
|
127
126
|
* })
|
|
128
127
|
*/
|
|
129
128
|
uploadAvatar(request: FiveOneEat.customer.UploadAvatarRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.UploadAvatarAuthResponse>;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -370,9 +370,8 @@ export class AuthClient {
|
|
|
370
370
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
371
371
|
*
|
|
372
372
|
* @example
|
|
373
|
-
* import { createReadStream } from "fs";
|
|
374
373
|
* await client.customer.auth.uploadAvatar({
|
|
375
|
-
* avatar:
|
|
374
|
+
* avatar: "avatar"
|
|
376
375
|
* })
|
|
377
376
|
*/
|
|
378
377
|
uploadAvatar(request, requestOptions) {
|
|
@@ -381,19 +380,16 @@ export class AuthClient {
|
|
|
381
380
|
__uploadAvatar(request, requestOptions) {
|
|
382
381
|
return __awaiter(this, void 0, void 0, function* () {
|
|
383
382
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
384
|
-
const _body = yield core.newFormData();
|
|
385
|
-
yield _body.appendFile("avatar", request.avatar);
|
|
386
|
-
const _maybeEncodedRequest = yield _body.getRequest();
|
|
387
383
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
388
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
384
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
389
385
|
const _response = yield core.fetcher({
|
|
390
386
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/user/avatar"),
|
|
391
387
|
method: "POST",
|
|
392
388
|
headers: _headers,
|
|
389
|
+
contentType: "application/json",
|
|
393
390
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
394
|
-
requestType: "
|
|
395
|
-
|
|
396
|
-
body: _maybeEncodedRequest.body,
|
|
391
|
+
requestType: "json",
|
|
392
|
+
body: request,
|
|
397
393
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
398
394
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
399
395
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
package/dist/esm/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.mts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type * as core from "../../../../../../../core/index.mjs";
|
|
2
1
|
/**
|
|
3
2
|
* @example
|
|
4
3
|
* {
|
|
5
|
-
* avatar:
|
|
4
|
+
* avatar: "avatar"
|
|
6
5
|
* }
|
|
7
6
|
*/
|
|
8
7
|
export interface UploadAvatarRequest {
|
|
9
|
-
avatar:
|
|
8
|
+
avatar: string;
|
|
10
9
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.33";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.33";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -6576,7 +6576,7 @@ Upload and replace the avatar for the authenticated customer. Any existing avata
|
|
|
6576
6576
|
|
|
6577
6577
|
```typescript
|
|
6578
6578
|
await client.customer.auth.uploadAvatar({
|
|
6579
|
-
avatar:
|
|
6579
|
+
avatar: "avatar"
|
|
6580
6580
|
});
|
|
6581
6581
|
|
|
6582
6582
|
```
|