From 0a3cbe62d35094214fed70b3c81311bf070f8ed1 Mon Sep 17 00:00:00 2001 From: peze <954152927@qq.com> Date: Mon, 25 Nov 2024 20:25:50 +0800 Subject: [PATCH 1/3] Bump 1.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ccd4ad..7353be7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@darabonba/typescript", - "version": "1.0.1", + "version": "1.0.2", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", From 8d94a4a7ff297f4cbc8eb7b866a90c35e2763fa3 Mon Sep 17 00:00:00 2001 From: peze <954152927@qq.com> Date: Fri, 13 Dec 2024 17:19:16 +0800 Subject: [PATCH 2/3] compatible with tea core --- package.json | 1 + src/core.ts | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7353be7..9419c51 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "lodash": "^4.17.21", "moment": "^2.30.1", "moment-timezone": "^0.5.45", + "@alicloud/tea-typescript": "^1.5.1", "xml2js": "^0.6.2" }, "files": [ diff --git a/src/core.ts b/src/core.ts index 7671e05..32ebbfc 100644 --- a/src/core.ts +++ b/src/core.ts @@ -6,6 +6,7 @@ import * as httpx from 'httpx'; import { parse } from 'url'; import { RetryOptions } from './retry'; import { BaseError } from './error'; +import * as $tea from '@alicloud/tea-typescript'; type TeaDict = { [key: string]: string }; type TeaObject = { [key: string]: any }; @@ -212,10 +213,11 @@ export function toMap(value: any = undefined, withoutStream: boolean = false): a return value; } -export class Model { +export class Model extends $tea.Model { [key: string]: any constructor(map?: TeaObject) { + super(); if (map == null) { return; } @@ -390,7 +392,7 @@ export class FileField extends Model { } } -export class ExtendsParameters extends Model { +export class ExtendsParameters extends $tea.Model { headers?: { [key: string]: string }; queries?: { [key: string]: string }; static names(): { [key: string]: string } { @@ -412,7 +414,7 @@ export class ExtendsParameters extends Model { } } -export class RuntimeOptions extends Model { +export class RuntimeOptions extends $tea.Model { retryOptions?: RetryOptions; autoretry?: boolean; ignoreSSL?: boolean; From 3596f61653b5da4c12643b584c123a8706c32451 Mon Sep 17 00:00:00 2001 From: peze <954152927@qq.com> Date: Tue, 18 Feb 2025 21:43:49 +0800 Subject: [PATCH 3/3] fix resp error required field --- src/error.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/error.ts b/src/error.ts index f4dcfdc..1ce2bbc 100644 --- a/src/error.ts +++ b/src/error.ts @@ -16,11 +16,11 @@ export class BaseError extends Error { export class ResponseError extends BaseError { code: string - statusCode: number - retryAfter: number - data: any - description: string - accessDeniedDetail: any + statusCode?: number + retryAfter?: number + data?: any + description?: string + accessDeniedDetail?: any constructor(map: any) { super(map);