@alicloud/dianjin20240628 1.10.2 → 1.11.0
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/client.d.ts +137 -0
- package/dist/client.js +160 -3
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +242 -0
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -5785,6 +5785,43 @@ export class SubmitChatQuestionResponseBodyData extends $dara.Model {
|
|
|
5785
5785
|
}
|
|
5786
5786
|
}
|
|
5787
5787
|
|
|
5788
|
+
export class UpdateDocumentChunkRequestChunks extends $dara.Model {
|
|
5789
|
+
/**
|
|
5790
|
+
* @remarks
|
|
5791
|
+
* This parameter is required.
|
|
5792
|
+
*
|
|
5793
|
+
* @example
|
|
5794
|
+
* 1987834755763847
|
|
5795
|
+
*/
|
|
5796
|
+
chunkId?: string;
|
|
5797
|
+
/**
|
|
5798
|
+
* @remarks
|
|
5799
|
+
* This parameter is required.
|
|
5800
|
+
*/
|
|
5801
|
+
chunkText?: string;
|
|
5802
|
+
static names(): { [key: string]: string } {
|
|
5803
|
+
return {
|
|
5804
|
+
chunkId: 'chunkId',
|
|
5805
|
+
chunkText: 'chunkText',
|
|
5806
|
+
};
|
|
5807
|
+
}
|
|
5808
|
+
|
|
5809
|
+
static types(): { [key: string]: any } {
|
|
5810
|
+
return {
|
|
5811
|
+
chunkId: 'string',
|
|
5812
|
+
chunkText: 'string',
|
|
5813
|
+
};
|
|
5814
|
+
}
|
|
5815
|
+
|
|
5816
|
+
validate() {
|
|
5817
|
+
super.validate();
|
|
5818
|
+
}
|
|
5819
|
+
|
|
5820
|
+
constructor(map?: { [key: string]: any }) {
|
|
5821
|
+
super(map);
|
|
5822
|
+
}
|
|
5823
|
+
}
|
|
5824
|
+
|
|
5788
5825
|
export class UpdateLibraryRequestIndexSettingChunkStrategy extends $dara.Model {
|
|
5789
5826
|
/**
|
|
5790
5827
|
* @example
|
|
@@ -12652,6 +12689,157 @@ export class UpdateDocumentResponse extends $dara.Model {
|
|
|
12652
12689
|
}
|
|
12653
12690
|
}
|
|
12654
12691
|
|
|
12692
|
+
export class UpdateDocumentChunkRequest extends $dara.Model {
|
|
12693
|
+
/**
|
|
12694
|
+
* @remarks
|
|
12695
|
+
* This parameter is required.
|
|
12696
|
+
*/
|
|
12697
|
+
chunks?: UpdateDocumentChunkRequestChunks[];
|
|
12698
|
+
/**
|
|
12699
|
+
* @remarks
|
|
12700
|
+
* This parameter is required.
|
|
12701
|
+
*
|
|
12702
|
+
* @example
|
|
12703
|
+
* sjdgdsfg
|
|
12704
|
+
*/
|
|
12705
|
+
libraryId?: string;
|
|
12706
|
+
static names(): { [key: string]: string } {
|
|
12707
|
+
return {
|
|
12708
|
+
chunks: 'chunks',
|
|
12709
|
+
libraryId: 'libraryId',
|
|
12710
|
+
};
|
|
12711
|
+
}
|
|
12712
|
+
|
|
12713
|
+
static types(): { [key: string]: any } {
|
|
12714
|
+
return {
|
|
12715
|
+
chunks: { 'type': 'array', 'itemType': UpdateDocumentChunkRequestChunks },
|
|
12716
|
+
libraryId: 'string',
|
|
12717
|
+
};
|
|
12718
|
+
}
|
|
12719
|
+
|
|
12720
|
+
validate() {
|
|
12721
|
+
if(Array.isArray(this.chunks)) {
|
|
12722
|
+
$dara.Model.validateArray(this.chunks);
|
|
12723
|
+
}
|
|
12724
|
+
super.validate();
|
|
12725
|
+
}
|
|
12726
|
+
|
|
12727
|
+
constructor(map?: { [key: string]: any }) {
|
|
12728
|
+
super(map);
|
|
12729
|
+
}
|
|
12730
|
+
}
|
|
12731
|
+
|
|
12732
|
+
export class UpdateDocumentChunkResponseBody extends $dara.Model {
|
|
12733
|
+
/**
|
|
12734
|
+
* @example
|
|
12735
|
+
* null
|
|
12736
|
+
*/
|
|
12737
|
+
cost?: number;
|
|
12738
|
+
/**
|
|
12739
|
+
* @example
|
|
12740
|
+
* SUCCESS
|
|
12741
|
+
*/
|
|
12742
|
+
data?: string;
|
|
12743
|
+
/**
|
|
12744
|
+
* @example
|
|
12745
|
+
* null
|
|
12746
|
+
*/
|
|
12747
|
+
dataType?: string;
|
|
12748
|
+
/**
|
|
12749
|
+
* @example
|
|
12750
|
+
* 0
|
|
12751
|
+
*/
|
|
12752
|
+
errCode?: string;
|
|
12753
|
+
/**
|
|
12754
|
+
* @example
|
|
12755
|
+
* ok
|
|
12756
|
+
*/
|
|
12757
|
+
message?: string;
|
|
12758
|
+
/**
|
|
12759
|
+
* @example
|
|
12760
|
+
* 003D019A-1BB3-53EC-A0D2-CE76DA5D73B1
|
|
12761
|
+
*/
|
|
12762
|
+
requestId?: string;
|
|
12763
|
+
/**
|
|
12764
|
+
* @example
|
|
12765
|
+
* true
|
|
12766
|
+
*/
|
|
12767
|
+
success?: boolean;
|
|
12768
|
+
/**
|
|
12769
|
+
* @example
|
|
12770
|
+
* 2024-01-01 00:00:00
|
|
12771
|
+
*/
|
|
12772
|
+
time?: string;
|
|
12773
|
+
static names(): { [key: string]: string } {
|
|
12774
|
+
return {
|
|
12775
|
+
cost: 'cost',
|
|
12776
|
+
data: 'data',
|
|
12777
|
+
dataType: 'dataType',
|
|
12778
|
+
errCode: 'errCode',
|
|
12779
|
+
message: 'message',
|
|
12780
|
+
requestId: 'requestId',
|
|
12781
|
+
success: 'success',
|
|
12782
|
+
time: 'time',
|
|
12783
|
+
};
|
|
12784
|
+
}
|
|
12785
|
+
|
|
12786
|
+
static types(): { [key: string]: any } {
|
|
12787
|
+
return {
|
|
12788
|
+
cost: 'number',
|
|
12789
|
+
data: 'string',
|
|
12790
|
+
dataType: 'string',
|
|
12791
|
+
errCode: 'string',
|
|
12792
|
+
message: 'string',
|
|
12793
|
+
requestId: 'string',
|
|
12794
|
+
success: 'boolean',
|
|
12795
|
+
time: 'string',
|
|
12796
|
+
};
|
|
12797
|
+
}
|
|
12798
|
+
|
|
12799
|
+
validate() {
|
|
12800
|
+
super.validate();
|
|
12801
|
+
}
|
|
12802
|
+
|
|
12803
|
+
constructor(map?: { [key: string]: any }) {
|
|
12804
|
+
super(map);
|
|
12805
|
+
}
|
|
12806
|
+
}
|
|
12807
|
+
|
|
12808
|
+
export class UpdateDocumentChunkResponse extends $dara.Model {
|
|
12809
|
+
headers?: { [key: string]: string };
|
|
12810
|
+
statusCode?: number;
|
|
12811
|
+
body?: UpdateDocumentChunkResponseBody;
|
|
12812
|
+
static names(): { [key: string]: string } {
|
|
12813
|
+
return {
|
|
12814
|
+
headers: 'headers',
|
|
12815
|
+
statusCode: 'statusCode',
|
|
12816
|
+
body: 'body',
|
|
12817
|
+
};
|
|
12818
|
+
}
|
|
12819
|
+
|
|
12820
|
+
static types(): { [key: string]: any } {
|
|
12821
|
+
return {
|
|
12822
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
12823
|
+
statusCode: 'number',
|
|
12824
|
+
body: UpdateDocumentChunkResponseBody,
|
|
12825
|
+
};
|
|
12826
|
+
}
|
|
12827
|
+
|
|
12828
|
+
validate() {
|
|
12829
|
+
if(this.headers) {
|
|
12830
|
+
$dara.Model.validateMap(this.headers);
|
|
12831
|
+
}
|
|
12832
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
12833
|
+
(this.body as any).validate();
|
|
12834
|
+
}
|
|
12835
|
+
super.validate();
|
|
12836
|
+
}
|
|
12837
|
+
|
|
12838
|
+
constructor(map?: { [key: string]: any }) {
|
|
12839
|
+
super(map);
|
|
12840
|
+
}
|
|
12841
|
+
}
|
|
12842
|
+
|
|
12655
12843
|
export class UpdateLibraryRequest extends $dara.Model {
|
|
12656
12844
|
description?: string;
|
|
12657
12845
|
indexSetting?: UpdateLibraryRequestIndexSetting;
|
|
@@ -15700,6 +15888,60 @@ export default class Client extends OpenApi {
|
|
|
15700
15888
|
return await this.updateDocumentWithOptions(workspaceId, request, headers, runtime);
|
|
15701
15889
|
}
|
|
15702
15890
|
|
|
15891
|
+
/**
|
|
15892
|
+
* 更新文档的chunk
|
|
15893
|
+
*
|
|
15894
|
+
* @param request - UpdateDocumentChunkRequest
|
|
15895
|
+
* @param headers - map
|
|
15896
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
15897
|
+
* @returns UpdateDocumentChunkResponse
|
|
15898
|
+
*/
|
|
15899
|
+
async updateDocumentChunkWithOptions(workspaceId: string, request: UpdateDocumentChunkRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<UpdateDocumentChunkResponse> {
|
|
15900
|
+
request.validate();
|
|
15901
|
+
let body : {[key: string ]: any} = { };
|
|
15902
|
+
if (!$dara.isNull(request.chunks)) {
|
|
15903
|
+
body["chunks"] = request.chunks;
|
|
15904
|
+
}
|
|
15905
|
+
|
|
15906
|
+
if (!$dara.isNull(request.libraryId)) {
|
|
15907
|
+
body["libraryId"] = request.libraryId;
|
|
15908
|
+
}
|
|
15909
|
+
|
|
15910
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
15911
|
+
headers: headers,
|
|
15912
|
+
body: OpenApiUtil.parseToMap(body),
|
|
15913
|
+
});
|
|
15914
|
+
let params = new $OpenApiUtil.Params({
|
|
15915
|
+
action: "UpdateDocumentChunk",
|
|
15916
|
+
version: "2024-06-28",
|
|
15917
|
+
protocol: "HTTPS",
|
|
15918
|
+
pathname: `/${$dara.URL.percentEncode(workspaceId)}/api/library/updateDocumentChunk`,
|
|
15919
|
+
method: "PUT",
|
|
15920
|
+
authType: "AK",
|
|
15921
|
+
style: "ROA",
|
|
15922
|
+
reqBodyType: "json",
|
|
15923
|
+
bodyType: "json",
|
|
15924
|
+
});
|
|
15925
|
+
if ($dara.isNull(this._signatureVersion) || this._signatureVersion != "v4") {
|
|
15926
|
+
return $dara.cast<UpdateDocumentChunkResponse>(await this.callApi(params, req, runtime), new UpdateDocumentChunkResponse({}));
|
|
15927
|
+
} else {
|
|
15928
|
+
return $dara.cast<UpdateDocumentChunkResponse>(await this.execute(params, req, runtime), new UpdateDocumentChunkResponse({}));
|
|
15929
|
+
}
|
|
15930
|
+
|
|
15931
|
+
}
|
|
15932
|
+
|
|
15933
|
+
/**
|
|
15934
|
+
* 更新文档的chunk
|
|
15935
|
+
*
|
|
15936
|
+
* @param request - UpdateDocumentChunkRequest
|
|
15937
|
+
* @returns UpdateDocumentChunkResponse
|
|
15938
|
+
*/
|
|
15939
|
+
async updateDocumentChunk(workspaceId: string, request: UpdateDocumentChunkRequest): Promise<UpdateDocumentChunkResponse> {
|
|
15940
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
15941
|
+
let headers : {[key: string ]: string} = { };
|
|
15942
|
+
return await this.updateDocumentChunkWithOptions(workspaceId, request, headers, runtime);
|
|
15943
|
+
}
|
|
15944
|
+
|
|
15703
15945
|
/**
|
|
15704
15946
|
* 更新文档库配置
|
|
15705
15947
|
*
|