@alicloud/aliding20230426 2.28.0 → 2.29.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 +188 -0
- package/dist/client.js +307 -30
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +372 -0
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -31777,6 +31777,90 @@ export class SubscribeEventRequestTenantContext extends $dara.Model {
|
|
|
31777
31777
|
}
|
|
31778
31778
|
}
|
|
31779
31779
|
|
|
31780
|
+
export class SwitchMainOrgHeadersAccountContext extends $dara.Model {
|
|
31781
|
+
/**
|
|
31782
|
+
* @remarks
|
|
31783
|
+
* This parameter is required.
|
|
31784
|
+
*
|
|
31785
|
+
* @example
|
|
31786
|
+
* 012345
|
|
31787
|
+
*/
|
|
31788
|
+
accountId?: string;
|
|
31789
|
+
static names(): { [key: string]: string } {
|
|
31790
|
+
return {
|
|
31791
|
+
accountId: 'accountId',
|
|
31792
|
+
};
|
|
31793
|
+
}
|
|
31794
|
+
|
|
31795
|
+
static types(): { [key: string]: any } {
|
|
31796
|
+
return {
|
|
31797
|
+
accountId: 'string',
|
|
31798
|
+
};
|
|
31799
|
+
}
|
|
31800
|
+
|
|
31801
|
+
validate() {
|
|
31802
|
+
super.validate();
|
|
31803
|
+
}
|
|
31804
|
+
|
|
31805
|
+
constructor(map?: { [key: string]: any }) {
|
|
31806
|
+
super(map);
|
|
31807
|
+
}
|
|
31808
|
+
}
|
|
31809
|
+
|
|
31810
|
+
export class SwitchMainOrgRequestTenantContext extends $dara.Model {
|
|
31811
|
+
/**
|
|
31812
|
+
* @example
|
|
31813
|
+
* xxxxxx
|
|
31814
|
+
*/
|
|
31815
|
+
tenantId?: string;
|
|
31816
|
+
static names(): { [key: string]: string } {
|
|
31817
|
+
return {
|
|
31818
|
+
tenantId: 'tenantId',
|
|
31819
|
+
};
|
|
31820
|
+
}
|
|
31821
|
+
|
|
31822
|
+
static types(): { [key: string]: any } {
|
|
31823
|
+
return {
|
|
31824
|
+
tenantId: 'string',
|
|
31825
|
+
};
|
|
31826
|
+
}
|
|
31827
|
+
|
|
31828
|
+
validate() {
|
|
31829
|
+
super.validate();
|
|
31830
|
+
}
|
|
31831
|
+
|
|
31832
|
+
constructor(map?: { [key: string]: any }) {
|
|
31833
|
+
super(map);
|
|
31834
|
+
}
|
|
31835
|
+
}
|
|
31836
|
+
|
|
31837
|
+
export class SwitchMainOrgResponseBodyContent extends $dara.Model {
|
|
31838
|
+
/**
|
|
31839
|
+
* @example
|
|
31840
|
+
* null
|
|
31841
|
+
*/
|
|
31842
|
+
data?: any;
|
|
31843
|
+
static names(): { [key: string]: string } {
|
|
31844
|
+
return {
|
|
31845
|
+
data: 'data',
|
|
31846
|
+
};
|
|
31847
|
+
}
|
|
31848
|
+
|
|
31849
|
+
static types(): { [key: string]: any } {
|
|
31850
|
+
return {
|
|
31851
|
+
data: 'any',
|
|
31852
|
+
};
|
|
31853
|
+
}
|
|
31854
|
+
|
|
31855
|
+
validate() {
|
|
31856
|
+
super.validate();
|
|
31857
|
+
}
|
|
31858
|
+
|
|
31859
|
+
constructor(map?: { [key: string]: any }) {
|
|
31860
|
+
super(map);
|
|
31861
|
+
}
|
|
31862
|
+
}
|
|
31863
|
+
|
|
31780
31864
|
export class SyncDingTypeHeadersAccountContext extends $dara.Model {
|
|
31781
31865
|
/**
|
|
31782
31866
|
* @remarks
|
|
@@ -86830,6 +86914,228 @@ export class SubscribeEventResponse extends $dara.Model {
|
|
|
86830
86914
|
}
|
|
86831
86915
|
}
|
|
86832
86916
|
|
|
86917
|
+
export class SwitchMainOrgHeaders extends $dara.Model {
|
|
86918
|
+
commonHeaders?: { [key: string]: string };
|
|
86919
|
+
accountContext?: SwitchMainOrgHeadersAccountContext;
|
|
86920
|
+
static names(): { [key: string]: string } {
|
|
86921
|
+
return {
|
|
86922
|
+
commonHeaders: 'commonHeaders',
|
|
86923
|
+
accountContext: 'AccountContext',
|
|
86924
|
+
};
|
|
86925
|
+
}
|
|
86926
|
+
|
|
86927
|
+
static types(): { [key: string]: any } {
|
|
86928
|
+
return {
|
|
86929
|
+
commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
86930
|
+
accountContext: SwitchMainOrgHeadersAccountContext,
|
|
86931
|
+
};
|
|
86932
|
+
}
|
|
86933
|
+
|
|
86934
|
+
validate() {
|
|
86935
|
+
if(this.commonHeaders) {
|
|
86936
|
+
$dara.Model.validateMap(this.commonHeaders);
|
|
86937
|
+
}
|
|
86938
|
+
if(this.accountContext && typeof (this.accountContext as any).validate === 'function') {
|
|
86939
|
+
(this.accountContext as any).validate();
|
|
86940
|
+
}
|
|
86941
|
+
super.validate();
|
|
86942
|
+
}
|
|
86943
|
+
|
|
86944
|
+
constructor(map?: { [key: string]: any }) {
|
|
86945
|
+
super(map);
|
|
86946
|
+
}
|
|
86947
|
+
}
|
|
86948
|
+
|
|
86949
|
+
export class SwitchMainOrgShrinkHeaders extends $dara.Model {
|
|
86950
|
+
commonHeaders?: { [key: string]: string };
|
|
86951
|
+
accountContextShrink?: string;
|
|
86952
|
+
static names(): { [key: string]: string } {
|
|
86953
|
+
return {
|
|
86954
|
+
commonHeaders: 'commonHeaders',
|
|
86955
|
+
accountContextShrink: 'AccountContext',
|
|
86956
|
+
};
|
|
86957
|
+
}
|
|
86958
|
+
|
|
86959
|
+
static types(): { [key: string]: any } {
|
|
86960
|
+
return {
|
|
86961
|
+
commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
86962
|
+
accountContextShrink: 'string',
|
|
86963
|
+
};
|
|
86964
|
+
}
|
|
86965
|
+
|
|
86966
|
+
validate() {
|
|
86967
|
+
if(this.commonHeaders) {
|
|
86968
|
+
$dara.Model.validateMap(this.commonHeaders);
|
|
86969
|
+
}
|
|
86970
|
+
super.validate();
|
|
86971
|
+
}
|
|
86972
|
+
|
|
86973
|
+
constructor(map?: { [key: string]: any }) {
|
|
86974
|
+
super(map);
|
|
86975
|
+
}
|
|
86976
|
+
}
|
|
86977
|
+
|
|
86978
|
+
export class SwitchMainOrgRequest extends $dara.Model {
|
|
86979
|
+
/**
|
|
86980
|
+
* @example
|
|
86981
|
+
* 21001
|
|
86982
|
+
*/
|
|
86983
|
+
targetOrgId?: number;
|
|
86984
|
+
tenantContext?: SwitchMainOrgRequestTenantContext;
|
|
86985
|
+
static names(): { [key: string]: string } {
|
|
86986
|
+
return {
|
|
86987
|
+
targetOrgId: 'TargetOrgId',
|
|
86988
|
+
tenantContext: 'TenantContext',
|
|
86989
|
+
};
|
|
86990
|
+
}
|
|
86991
|
+
|
|
86992
|
+
static types(): { [key: string]: any } {
|
|
86993
|
+
return {
|
|
86994
|
+
targetOrgId: 'number',
|
|
86995
|
+
tenantContext: SwitchMainOrgRequestTenantContext,
|
|
86996
|
+
};
|
|
86997
|
+
}
|
|
86998
|
+
|
|
86999
|
+
validate() {
|
|
87000
|
+
if(this.tenantContext && typeof (this.tenantContext as any).validate === 'function') {
|
|
87001
|
+
(this.tenantContext as any).validate();
|
|
87002
|
+
}
|
|
87003
|
+
super.validate();
|
|
87004
|
+
}
|
|
87005
|
+
|
|
87006
|
+
constructor(map?: { [key: string]: any }) {
|
|
87007
|
+
super(map);
|
|
87008
|
+
}
|
|
87009
|
+
}
|
|
87010
|
+
|
|
87011
|
+
export class SwitchMainOrgShrinkRequest extends $dara.Model {
|
|
87012
|
+
/**
|
|
87013
|
+
* @example
|
|
87014
|
+
* 21001
|
|
87015
|
+
*/
|
|
87016
|
+
targetOrgId?: number;
|
|
87017
|
+
tenantContextShrink?: string;
|
|
87018
|
+
static names(): { [key: string]: string } {
|
|
87019
|
+
return {
|
|
87020
|
+
targetOrgId: 'TargetOrgId',
|
|
87021
|
+
tenantContextShrink: 'TenantContext',
|
|
87022
|
+
};
|
|
87023
|
+
}
|
|
87024
|
+
|
|
87025
|
+
static types(): { [key: string]: any } {
|
|
87026
|
+
return {
|
|
87027
|
+
targetOrgId: 'number',
|
|
87028
|
+
tenantContextShrink: 'string',
|
|
87029
|
+
};
|
|
87030
|
+
}
|
|
87031
|
+
|
|
87032
|
+
validate() {
|
|
87033
|
+
super.validate();
|
|
87034
|
+
}
|
|
87035
|
+
|
|
87036
|
+
constructor(map?: { [key: string]: any }) {
|
|
87037
|
+
super(map);
|
|
87038
|
+
}
|
|
87039
|
+
}
|
|
87040
|
+
|
|
87041
|
+
export class SwitchMainOrgResponseBody extends $dara.Model {
|
|
87042
|
+
content?: SwitchMainOrgResponseBodyContent;
|
|
87043
|
+
/**
|
|
87044
|
+
* @example
|
|
87045
|
+
* 0
|
|
87046
|
+
*/
|
|
87047
|
+
errorCode?: string;
|
|
87048
|
+
errorCtx?: { [key: string]: any };
|
|
87049
|
+
errorMsg?: string;
|
|
87050
|
+
/**
|
|
87051
|
+
* @example
|
|
87052
|
+
* 200
|
|
87053
|
+
*/
|
|
87054
|
+
httpStatusCode?: number;
|
|
87055
|
+
/**
|
|
87056
|
+
* @example
|
|
87057
|
+
* 0FAAEC9C-C6C8-5C87-AF8E-1195889BBXXX
|
|
87058
|
+
*/
|
|
87059
|
+
requestId?: string;
|
|
87060
|
+
/**
|
|
87061
|
+
* @example
|
|
87062
|
+
* true
|
|
87063
|
+
*/
|
|
87064
|
+
success?: boolean;
|
|
87065
|
+
static names(): { [key: string]: string } {
|
|
87066
|
+
return {
|
|
87067
|
+
content: 'content',
|
|
87068
|
+
errorCode: 'errorCode',
|
|
87069
|
+
errorCtx: 'errorCtx',
|
|
87070
|
+
errorMsg: 'errorMsg',
|
|
87071
|
+
httpStatusCode: 'httpStatusCode',
|
|
87072
|
+
requestId: 'requestId',
|
|
87073
|
+
success: 'success',
|
|
87074
|
+
};
|
|
87075
|
+
}
|
|
87076
|
+
|
|
87077
|
+
static types(): { [key: string]: any } {
|
|
87078
|
+
return {
|
|
87079
|
+
content: SwitchMainOrgResponseBodyContent,
|
|
87080
|
+
errorCode: 'string',
|
|
87081
|
+
errorCtx: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
|
|
87082
|
+
errorMsg: 'string',
|
|
87083
|
+
httpStatusCode: 'number',
|
|
87084
|
+
requestId: 'string',
|
|
87085
|
+
success: 'boolean',
|
|
87086
|
+
};
|
|
87087
|
+
}
|
|
87088
|
+
|
|
87089
|
+
validate() {
|
|
87090
|
+
if(this.content && typeof (this.content as any).validate === 'function') {
|
|
87091
|
+
(this.content as any).validate();
|
|
87092
|
+
}
|
|
87093
|
+
if(this.errorCtx) {
|
|
87094
|
+
$dara.Model.validateMap(this.errorCtx);
|
|
87095
|
+
}
|
|
87096
|
+
super.validate();
|
|
87097
|
+
}
|
|
87098
|
+
|
|
87099
|
+
constructor(map?: { [key: string]: any }) {
|
|
87100
|
+
super(map);
|
|
87101
|
+
}
|
|
87102
|
+
}
|
|
87103
|
+
|
|
87104
|
+
export class SwitchMainOrgResponse extends $dara.Model {
|
|
87105
|
+
headers?: { [key: string]: string };
|
|
87106
|
+
statusCode?: number;
|
|
87107
|
+
body?: SwitchMainOrgResponseBody;
|
|
87108
|
+
static names(): { [key: string]: string } {
|
|
87109
|
+
return {
|
|
87110
|
+
headers: 'headers',
|
|
87111
|
+
statusCode: 'statusCode',
|
|
87112
|
+
body: 'body',
|
|
87113
|
+
};
|
|
87114
|
+
}
|
|
87115
|
+
|
|
87116
|
+
static types(): { [key: string]: any } {
|
|
87117
|
+
return {
|
|
87118
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
87119
|
+
statusCode: 'number',
|
|
87120
|
+
body: SwitchMainOrgResponseBody,
|
|
87121
|
+
};
|
|
87122
|
+
}
|
|
87123
|
+
|
|
87124
|
+
validate() {
|
|
87125
|
+
if(this.headers) {
|
|
87126
|
+
$dara.Model.validateMap(this.headers);
|
|
87127
|
+
}
|
|
87128
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
87129
|
+
(this.body as any).validate();
|
|
87130
|
+
}
|
|
87131
|
+
super.validate();
|
|
87132
|
+
}
|
|
87133
|
+
|
|
87134
|
+
constructor(map?: { [key: string]: any }) {
|
|
87135
|
+
super(map);
|
|
87136
|
+
}
|
|
87137
|
+
}
|
|
87138
|
+
|
|
86833
87139
|
export class SyncDingTypeHeaders extends $dara.Model {
|
|
86834
87140
|
commonHeaders?: { [key: string]: string };
|
|
86835
87141
|
accountContext?: SyncDingTypeHeadersAccountContext;
|
|
@@ -110202,6 +110508,72 @@ export default class Client extends OpenApi {
|
|
|
110202
110508
|
return await this.subscribeEventWithOptions(request, headers, runtime);
|
|
110203
110509
|
}
|
|
110204
110510
|
|
|
110511
|
+
/**
|
|
110512
|
+
* @param tmpReq - SwitchMainOrgRequest
|
|
110513
|
+
* @param tmpHeader - SwitchMainOrgHeaders
|
|
110514
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
110515
|
+
* @returns SwitchMainOrgResponse
|
|
110516
|
+
*/
|
|
110517
|
+
async switchMainOrgWithOptions(tmpReq: SwitchMainOrgRequest, tmpHeader: SwitchMainOrgHeaders, runtime: $dara.RuntimeOptions): Promise<SwitchMainOrgResponse> {
|
|
110518
|
+
tmpReq.validate();
|
|
110519
|
+
let request = new SwitchMainOrgShrinkRequest({ });
|
|
110520
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
110521
|
+
let headers = new SwitchMainOrgShrinkHeaders({ });
|
|
110522
|
+
OpenApiUtil.convert(tmpHeader, headers);
|
|
110523
|
+
if (!$dara.isNull(tmpHeader.accountContext)) {
|
|
110524
|
+
headers.accountContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpHeader.accountContext, "AccountContext", "json");
|
|
110525
|
+
}
|
|
110526
|
+
|
|
110527
|
+
if (!$dara.isNull(tmpReq.tenantContext)) {
|
|
110528
|
+
request.tenantContextShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tenantContext, "TenantContext", "json");
|
|
110529
|
+
}
|
|
110530
|
+
|
|
110531
|
+
let body : {[key: string ]: any} = { };
|
|
110532
|
+
if (!$dara.isNull(request.targetOrgId)) {
|
|
110533
|
+
body["TargetOrgId"] = request.targetOrgId;
|
|
110534
|
+
}
|
|
110535
|
+
|
|
110536
|
+
if (!$dara.isNull(request.tenantContextShrink)) {
|
|
110537
|
+
body["TenantContext"] = request.tenantContextShrink;
|
|
110538
|
+
}
|
|
110539
|
+
|
|
110540
|
+
let realHeaders : {[key: string ]: string} = { };
|
|
110541
|
+
if (!$dara.isNull(headers.commonHeaders)) {
|
|
110542
|
+
realHeaders = headers.commonHeaders;
|
|
110543
|
+
}
|
|
110544
|
+
|
|
110545
|
+
if (!$dara.isNull(headers.accountContextShrink)) {
|
|
110546
|
+
realHeaders["AccountContext"] = JSON.stringify(headers.accountContextShrink);
|
|
110547
|
+
}
|
|
110548
|
+
|
|
110549
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
110550
|
+
headers: realHeaders,
|
|
110551
|
+
body: OpenApiUtil.parseToMap(body),
|
|
110552
|
+
});
|
|
110553
|
+
let params = new $OpenApiUtil.Params({
|
|
110554
|
+
action: "SwitchMainOrg",
|
|
110555
|
+
version: "2023-04-26",
|
|
110556
|
+
protocol: "HTTPS",
|
|
110557
|
+
pathname: `/aliding/v1/user/switchMainOrg`,
|
|
110558
|
+
method: "POST",
|
|
110559
|
+
authType: "AK",
|
|
110560
|
+
style: "ROA",
|
|
110561
|
+
reqBodyType: "formData",
|
|
110562
|
+
bodyType: "json",
|
|
110563
|
+
});
|
|
110564
|
+
return $dara.cast<SwitchMainOrgResponse>(await this.callApi(params, req, runtime), new SwitchMainOrgResponse({}));
|
|
110565
|
+
}
|
|
110566
|
+
|
|
110567
|
+
/**
|
|
110568
|
+
* @param request - SwitchMainOrgRequest
|
|
110569
|
+
* @returns SwitchMainOrgResponse
|
|
110570
|
+
*/
|
|
110571
|
+
async switchMainOrg(request: SwitchMainOrgRequest): Promise<SwitchMainOrgResponse> {
|
|
110572
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
110573
|
+
let headers = new SwitchMainOrgHeaders({ });
|
|
110574
|
+
return await this.switchMainOrgWithOptions(request, headers, runtime);
|
|
110575
|
+
}
|
|
110576
|
+
|
|
110205
110577
|
/**
|
|
110206
110578
|
* 同步钉钉账号类型
|
|
110207
110579
|
*
|