@alicloud/appstream-center20210218 1.1.3 → 1.2.1

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.
Files changed (57) hide show
  1. package/dist/client.d.ts +66 -6
  2. package/dist/client.js +149 -10
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/CreateThirdAppAccessTokenRequest.d.ts +80 -0
  5. package/dist/models/CreateThirdAppAccessTokenRequest.js +92 -0
  6. package/dist/models/CreateThirdAppAccessTokenRequest.js.map +1 -0
  7. package/dist/models/CreateThirdAppAccessTokenResponse.d.ts +19 -0
  8. package/dist/models/CreateThirdAppAccessTokenResponse.js +69 -0
  9. package/dist/models/CreateThirdAppAccessTokenResponse.js.map +1 -0
  10. package/dist/models/CreateThirdAppAccessTokenResponseBody.d.ts +37 -0
  11. package/dist/models/CreateThirdAppAccessTokenResponseBody.js +62 -0
  12. package/dist/models/CreateThirdAppAccessTokenResponseBody.js.map +1 -0
  13. package/dist/models/CreateThirdAppAccessTokenShrinkRequest.d.ts +50 -0
  14. package/dist/models/CreateThirdAppAccessTokenShrinkRequest.js +66 -0
  15. package/dist/models/CreateThirdAppAccessTokenShrinkRequest.js.map +1 -0
  16. package/dist/models/ExpireLoginTokenRequest.d.ts +1 -1
  17. package/dist/models/ExpireLoginTokenResponseBody.d.ts +1 -1
  18. package/dist/models/GetAuthCodeRequest.d.ts +36 -8
  19. package/dist/models/GetAuthCodeRequest.js.map +1 -1
  20. package/dist/models/GetAuthCodeResponseBody.d.ts +3 -5
  21. package/dist/models/GetAuthCodeResponseBody.js +0 -2
  22. package/dist/models/GetAuthCodeResponseBody.js.map +1 -1
  23. package/dist/models/GetLatestThirdAppAccessTokenRequest.d.ts +70 -0
  24. package/dist/models/GetLatestThirdAppAccessTokenRequest.js +88 -0
  25. package/dist/models/GetLatestThirdAppAccessTokenRequest.js.map +1 -0
  26. package/dist/models/GetLatestThirdAppAccessTokenResponse.d.ts +19 -0
  27. package/dist/models/GetLatestThirdAppAccessTokenResponse.js +69 -0
  28. package/dist/models/GetLatestThirdAppAccessTokenResponse.js.map +1 -0
  29. package/dist/models/GetLatestThirdAppAccessTokenResponseBody.d.ts +37 -0
  30. package/dist/models/GetLatestThirdAppAccessTokenResponseBody.js +62 -0
  31. package/dist/models/GetLatestThirdAppAccessTokenResponseBody.js.map +1 -0
  32. package/dist/models/GetLatestThirdAppAccessTokenShrinkRequest.d.ts +42 -0
  33. package/dist/models/GetLatestThirdAppAccessTokenShrinkRequest.js +64 -0
  34. package/dist/models/GetLatestThirdAppAccessTokenShrinkRequest.js.map +1 -0
  35. package/dist/models/GetStsTokenRequest.d.ts +5 -4
  36. package/dist/models/GetStsTokenRequest.js.map +1 -1
  37. package/dist/models/GetStsTokenResponseBody.d.ts +4 -4
  38. package/dist/models/model.d.ts +10 -0
  39. package/dist/models/model.js +21 -1
  40. package/dist/models/model.js.map +1 -1
  41. package/package.json +3 -2
  42. package/src/client.ts +164 -10
  43. package/src/models/CreateThirdAppAccessTokenRequest.ts +116 -0
  44. package/src/models/CreateThirdAppAccessTokenResponse.ts +40 -0
  45. package/src/models/CreateThirdAppAccessTokenResponseBody.ts +54 -0
  46. package/src/models/CreateThirdAppAccessTokenShrinkRequest.ts +71 -0
  47. package/src/models/ExpireLoginTokenRequest.ts +1 -1
  48. package/src/models/ExpireLoginTokenResponseBody.ts +1 -1
  49. package/src/models/GetAuthCodeRequest.ts +36 -8
  50. package/src/models/GetAuthCodeResponseBody.ts +3 -5
  51. package/src/models/GetLatestThirdAppAccessTokenRequest.ts +104 -0
  52. package/src/models/GetLatestThirdAppAccessTokenResponse.ts +40 -0
  53. package/src/models/GetLatestThirdAppAccessTokenResponseBody.ts +54 -0
  54. package/src/models/GetLatestThirdAppAccessTokenShrinkRequest.ts +61 -0
  55. package/src/models/GetStsTokenRequest.ts +5 -4
  56. package/src/models/GetStsTokenResponseBody.ts +4 -4
  57. package/src/models/model.ts +10 -0
@@ -0,0 +1,37 @@
1
+ import * as $dara from '@darabonba/typescript';
2
+ export declare class GetLatestThirdAppAccessTokenResponseBody extends $dara.Model {
3
+ /**
4
+ * @remarks
5
+ * The current valid static access token for the specified user and single cloud desktop. The original saved token is returned, and the query does not renew it. This is a sensitive credential. Do not log or expose the full value.
6
+ *
7
+ * @example
8
+ * taatv1.v2****
9
+ */
10
+ accessToken?: string;
11
+ /**
12
+ * @remarks
13
+ * The absolute expiration time of the token, in UNIX milliseconds. This parameter is not empty when the call is successful. GetLatestThirdAppAccessToken returns the original expiration time and does not renew the token.
14
+ *
15
+ * @example
16
+ * 1795450500000
17
+ */
18
+ expiresAt?: number;
19
+ /**
20
+ * @remarks
21
+ * The unique identifier of the request. You can use it to locate and troubleshoot issues.
22
+ *
23
+ * @example
24
+ * 6DAB2D15-7345-4C33-9D77-48A1A756B9E1
25
+ */
26
+ requestId?: string;
27
+ static names(): {
28
+ [key: string]: string;
29
+ };
30
+ static types(): {
31
+ [key: string]: any;
32
+ };
33
+ validate(): void;
34
+ constructor(map?: {
35
+ [key: string]: any;
36
+ });
37
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.GetLatestThirdAppAccessTokenResponseBody = void 0;
37
+ // This file is auto-generated, don't edit it
38
+ const $dara = __importStar(require("@darabonba/typescript"));
39
+ class GetLatestThirdAppAccessTokenResponseBody extends $dara.Model {
40
+ static names() {
41
+ return {
42
+ accessToken: 'AccessToken',
43
+ expiresAt: 'ExpiresAt',
44
+ requestId: 'RequestId',
45
+ };
46
+ }
47
+ static types() {
48
+ return {
49
+ accessToken: 'string',
50
+ expiresAt: 'number',
51
+ requestId: 'string',
52
+ };
53
+ }
54
+ validate() {
55
+ super.validate();
56
+ }
57
+ constructor(map) {
58
+ super(map);
59
+ }
60
+ }
61
+ exports.GetLatestThirdAppAccessTokenResponseBody = GetLatestThirdAppAccessTokenResponseBody;
62
+ //# sourceMappingURL=GetLatestThirdAppAccessTokenResponseBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetLatestThirdAppAccessTokenResponseBody.js","sourceRoot":"","sources":["../../src/models/GetLatestThirdAppAccessTokenResponseBody.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,6DAA+C;AAG/C,MAAa,wCAAyC,SAAQ,KAAK,CAAC,KAAK;IAyBvE,MAAM,CAAC,KAAK;QACV,OAAO;YACL,WAAW,EAAE,aAAa;YAC1B,SAAS,EAAE,WAAW;YACtB,SAAS,EAAE,WAAW;SACvB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,QAAQ;YACnB,SAAS,EAAE,QAAQ;SACpB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AAhDD,4FAgDC"}
@@ -0,0 +1,42 @@
1
+ import * as $dara from '@darabonba/typescript';
2
+ export declare class GetLatestThirdAppAccessTokenShrinkRequest extends $dara.Model {
3
+ /**
4
+ * @remarks
5
+ * The WyId of the user used when the token was created. It must correspond to the current account and the target cloud desktop, and cannot be replaced by a username.
6
+ *
7
+ * @example
8
+ * f1e2d3c4b5a6****
9
+ */
10
+ authorizerId?: string;
11
+ /**
12
+ * @remarks
13
+ * The business channel. Valid values: Enterprise and Business. The value is case-insensitive. If omitted, the default value is Enterprise. If an empty string or any other value is explicitly passed, a parameter error is returned. This parameter does not replace user identity verification.
14
+ *
15
+ * @example
16
+ * Enterprise
17
+ */
18
+ businessChannel?: string;
19
+ /**
20
+ * @remarks
21
+ * The convenience username under the current tenant. Used when AuthorizerId is not provided or is empty.
22
+ *
23
+ * @example
24
+ * test
25
+ */
26
+ endUserId?: string;
27
+ /**
28
+ * @remarks
29
+ * The target single cloud desktop resource. You must provide this object along with ResourceType and ResourceId when calling this operation. Pass it as a JSON object to specify only one cloud desktop. Wildcards or authorization for all cloud desktops are not supported.
30
+ */
31
+ resourceShrink?: string;
32
+ static names(): {
33
+ [key: string]: string;
34
+ };
35
+ static types(): {
36
+ [key: string]: any;
37
+ };
38
+ validate(): void;
39
+ constructor(map?: {
40
+ [key: string]: any;
41
+ });
42
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.GetLatestThirdAppAccessTokenShrinkRequest = void 0;
37
+ // This file is auto-generated, don't edit it
38
+ const $dara = __importStar(require("@darabonba/typescript"));
39
+ class GetLatestThirdAppAccessTokenShrinkRequest extends $dara.Model {
40
+ static names() {
41
+ return {
42
+ authorizerId: 'AuthorizerId',
43
+ businessChannel: 'BusinessChannel',
44
+ endUserId: 'EndUserId',
45
+ resourceShrink: 'Resource',
46
+ };
47
+ }
48
+ static types() {
49
+ return {
50
+ authorizerId: 'string',
51
+ businessChannel: 'string',
52
+ endUserId: 'string',
53
+ resourceShrink: 'string',
54
+ };
55
+ }
56
+ validate() {
57
+ super.validate();
58
+ }
59
+ constructor(map) {
60
+ super(map);
61
+ }
62
+ }
63
+ exports.GetLatestThirdAppAccessTokenShrinkRequest = GetLatestThirdAppAccessTokenShrinkRequest;
64
+ //# sourceMappingURL=GetLatestThirdAppAccessTokenShrinkRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetLatestThirdAppAccessTokenShrinkRequest.js","sourceRoot":"","sources":["../../src/models/GetLatestThirdAppAccessTokenShrinkRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,6DAA+C;AAG/C,MAAa,yCAA0C,SAAQ,KAAK,CAAC,KAAK;IA8BxE,MAAM,CAAC,KAAK;QACV,OAAO;YACL,YAAY,EAAE,cAAc;YAC5B,eAAe,EAAE,iBAAiB;YAClC,SAAS,EAAE,WAAW;YACtB,cAAc,EAAE,UAAU;SAC3B,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,YAAY,EAAE,QAAQ;YACtB,eAAe,EAAE,QAAQ;YACzB,SAAS,EAAE,QAAQ;YACnB,cAAc,EAAE,QAAQ;SACzB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AAvDD,8FAuDC"}
@@ -2,9 +2,10 @@ import * as $dara from '@darabonba/typescript';
2
2
  export declare class GetStsTokenRequest extends $dara.Model {
3
3
  /**
4
4
  * @remarks
5
- * The Elastic Desktop Service (EDS) username.
5
+ * The Wuying username.
6
6
  *
7
- * > Either EndUserId or ExternalId is required.
7
+ *
8
+ * > Either the Wuying username or the external ID is required.
8
9
  *
9
10
  * @example
10
11
  * Alex
@@ -12,7 +13,7 @@ export declare class GetStsTokenRequest extends $dara.Model {
12
13
  endUserId?: string;
13
14
  /**
14
15
  * @remarks
15
- * The validity period of the token, in seconds. The maximum period is two days.
16
+ * The expiration time in seconds. The maximum validity period is two days.
16
17
  *
17
18
  * @example
18
19
  * 600
@@ -20,7 +21,7 @@ export declare class GetStsTokenRequest extends $dara.Model {
20
21
  expiration?: number;
21
22
  /**
22
23
  * @remarks
23
- * The ID of the external user.
24
+ * The external user ID.
24
25
  *
25
26
  * @example
26
27
  * Alex
@@ -1 +1 @@
1
- {"version":3,"file":"GetStsTokenRequest.js","sourceRoot":"","sources":["../../src/models/GetStsTokenRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,6DAA+C;AAG/C,MAAa,kBAAmB,SAAQ,KAAK,CAAC,KAAK;IA2BjD,MAAM,CAAC,KAAK;QACV,OAAO;YACL,SAAS,EAAE,WAAW;YACtB,UAAU,EAAE,YAAY;YACxB,UAAU,EAAE,YAAY;SACzB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,QAAQ;YACpB,UAAU,EAAE,QAAQ;SACrB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AAlDD,gDAkDC"}
1
+ {"version":3,"file":"GetStsTokenRequest.js","sourceRoot":"","sources":["../../src/models/GetStsTokenRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,6DAA+C;AAG/C,MAAa,kBAAmB,SAAQ,KAAK,CAAC,KAAK;IA4BjD,MAAM,CAAC,KAAK;QACV,OAAO;YACL,SAAS,EAAE,WAAW;YACtB,UAAU,EAAE,YAAY;YACxB,UAAU,EAAE,YAAY;SACzB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,QAAQ;YACpB,UAAU,EAAE,QAAQ;SACrB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,YAAY,GAA4B;QACtC,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AAnDD,gDAmDC"}
@@ -2,7 +2,7 @@ import * as $dara from '@darabonba/typescript';
2
2
  export declare class GetStsTokenResponseBodyStsTokenModel extends $dara.Model {
3
3
  /**
4
4
  * @remarks
5
- * The tenant ID, which is the UID of the Alibaba Cloud account.
5
+ * The tenant ID (Alibaba Cloud account UID).
6
6
  *
7
7
  * @example
8
8
  * 105552640689****
@@ -18,7 +18,7 @@ export declare class GetStsTokenResponseBodyStsTokenModel extends $dara.Model {
18
18
  sessionId?: string;
19
19
  /**
20
20
  * @remarks
21
- * The temporary credentials.
21
+ * The temporary identity credential.
22
22
  *
23
23
  * @example
24
24
  * sts****
@@ -26,7 +26,7 @@ export declare class GetStsTokenResponseBodyStsTokenModel extends $dara.Model {
26
26
  stsToken?: string;
27
27
  /**
28
28
  * @remarks
29
- * The tenant ID, which is the UID of the Alibaba Cloud account.
29
+ * The tenant ID (Alibaba Cloud account UID).
30
30
  *
31
31
  * @example
32
32
  * 105552640689****
@@ -54,7 +54,7 @@ export declare class GetStsTokenResponseBody extends $dara.Model {
54
54
  requestId?: string;
55
55
  /**
56
56
  * @remarks
57
- * The details of the token.
57
+ * The token details.
58
58
  */
59
59
  stsTokenModel?: GetStsTokenResponseBodyStsTokenModel;
60
60
  static names(): {
@@ -1,11 +1,21 @@
1
+ export { CreateThirdAppAccessTokenRequestResource } from './CreateThirdAppAccessTokenRequest';
1
2
  export { GetAuthCodeResponseBodyAuthModel } from './GetAuthCodeResponseBody';
3
+ export { GetLatestThirdAppAccessTokenRequestResource } from './GetLatestThirdAppAccessTokenRequest';
2
4
  export { GetStsTokenResponseBodyStsTokenModel } from './GetStsTokenResponseBody';
5
+ export { CreateThirdAppAccessTokenRequest } from './CreateThirdAppAccessTokenRequest';
6
+ export { CreateThirdAppAccessTokenShrinkRequest } from './CreateThirdAppAccessTokenShrinkRequest';
7
+ export { CreateThirdAppAccessTokenResponseBody } from './CreateThirdAppAccessTokenResponseBody';
8
+ export { CreateThirdAppAccessTokenResponse } from './CreateThirdAppAccessTokenResponse';
3
9
  export { ExpireLoginTokenRequest } from './ExpireLoginTokenRequest';
4
10
  export { ExpireLoginTokenResponseBody } from './ExpireLoginTokenResponseBody';
5
11
  export { ExpireLoginTokenResponse } from './ExpireLoginTokenResponse';
6
12
  export { GetAuthCodeRequest } from './GetAuthCodeRequest';
7
13
  export { GetAuthCodeResponseBody } from './GetAuthCodeResponseBody';
8
14
  export { GetAuthCodeResponse } from './GetAuthCodeResponse';
15
+ export { GetLatestThirdAppAccessTokenRequest } from './GetLatestThirdAppAccessTokenRequest';
16
+ export { GetLatestThirdAppAccessTokenShrinkRequest } from './GetLatestThirdAppAccessTokenShrinkRequest';
17
+ export { GetLatestThirdAppAccessTokenResponseBody } from './GetLatestThirdAppAccessTokenResponseBody';
18
+ export { GetLatestThirdAppAccessTokenResponse } from './GetLatestThirdAppAccessTokenResponse';
9
19
  export { GetStsTokenRequest } from './GetStsTokenRequest';
10
20
  export { GetStsTokenResponseBody } from './GetStsTokenResponseBody';
11
21
  export { GetStsTokenResponse } from './GetStsTokenResponse';
@@ -1,10 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetStsTokenResponse = exports.GetStsTokenResponseBody = exports.GetStsTokenRequest = exports.GetAuthCodeResponse = exports.GetAuthCodeResponseBody = exports.GetAuthCodeRequest = exports.ExpireLoginTokenResponse = exports.ExpireLoginTokenResponseBody = exports.ExpireLoginTokenRequest = exports.GetStsTokenResponseBodyStsTokenModel = exports.GetAuthCodeResponseBodyAuthModel = void 0;
3
+ exports.GetStsTokenResponse = exports.GetStsTokenResponseBody = exports.GetStsTokenRequest = exports.GetLatestThirdAppAccessTokenResponse = exports.GetLatestThirdAppAccessTokenResponseBody = exports.GetLatestThirdAppAccessTokenShrinkRequest = exports.GetLatestThirdAppAccessTokenRequest = exports.GetAuthCodeResponse = exports.GetAuthCodeResponseBody = exports.GetAuthCodeRequest = exports.ExpireLoginTokenResponse = exports.ExpireLoginTokenResponseBody = exports.ExpireLoginTokenRequest = exports.CreateThirdAppAccessTokenResponse = exports.CreateThirdAppAccessTokenResponseBody = exports.CreateThirdAppAccessTokenShrinkRequest = exports.CreateThirdAppAccessTokenRequest = exports.GetStsTokenResponseBodyStsTokenModel = exports.GetLatestThirdAppAccessTokenRequestResource = exports.GetAuthCodeResponseBodyAuthModel = exports.CreateThirdAppAccessTokenRequestResource = void 0;
4
+ var CreateThirdAppAccessTokenRequest_1 = require("./CreateThirdAppAccessTokenRequest");
5
+ Object.defineProperty(exports, "CreateThirdAppAccessTokenRequestResource", { enumerable: true, get: function () { return CreateThirdAppAccessTokenRequest_1.CreateThirdAppAccessTokenRequestResource; } });
4
6
  var GetAuthCodeResponseBody_1 = require("./GetAuthCodeResponseBody");
5
7
  Object.defineProperty(exports, "GetAuthCodeResponseBodyAuthModel", { enumerable: true, get: function () { return GetAuthCodeResponseBody_1.GetAuthCodeResponseBodyAuthModel; } });
8
+ var GetLatestThirdAppAccessTokenRequest_1 = require("./GetLatestThirdAppAccessTokenRequest");
9
+ Object.defineProperty(exports, "GetLatestThirdAppAccessTokenRequestResource", { enumerable: true, get: function () { return GetLatestThirdAppAccessTokenRequest_1.GetLatestThirdAppAccessTokenRequestResource; } });
6
10
  var GetStsTokenResponseBody_1 = require("./GetStsTokenResponseBody");
7
11
  Object.defineProperty(exports, "GetStsTokenResponseBodyStsTokenModel", { enumerable: true, get: function () { return GetStsTokenResponseBody_1.GetStsTokenResponseBodyStsTokenModel; } });
12
+ var CreateThirdAppAccessTokenRequest_2 = require("./CreateThirdAppAccessTokenRequest");
13
+ Object.defineProperty(exports, "CreateThirdAppAccessTokenRequest", { enumerable: true, get: function () { return CreateThirdAppAccessTokenRequest_2.CreateThirdAppAccessTokenRequest; } });
14
+ var CreateThirdAppAccessTokenShrinkRequest_1 = require("./CreateThirdAppAccessTokenShrinkRequest");
15
+ Object.defineProperty(exports, "CreateThirdAppAccessTokenShrinkRequest", { enumerable: true, get: function () { return CreateThirdAppAccessTokenShrinkRequest_1.CreateThirdAppAccessTokenShrinkRequest; } });
16
+ var CreateThirdAppAccessTokenResponseBody_1 = require("./CreateThirdAppAccessTokenResponseBody");
17
+ Object.defineProperty(exports, "CreateThirdAppAccessTokenResponseBody", { enumerable: true, get: function () { return CreateThirdAppAccessTokenResponseBody_1.CreateThirdAppAccessTokenResponseBody; } });
18
+ var CreateThirdAppAccessTokenResponse_1 = require("./CreateThirdAppAccessTokenResponse");
19
+ Object.defineProperty(exports, "CreateThirdAppAccessTokenResponse", { enumerable: true, get: function () { return CreateThirdAppAccessTokenResponse_1.CreateThirdAppAccessTokenResponse; } });
8
20
  var ExpireLoginTokenRequest_1 = require("./ExpireLoginTokenRequest");
9
21
  Object.defineProperty(exports, "ExpireLoginTokenRequest", { enumerable: true, get: function () { return ExpireLoginTokenRequest_1.ExpireLoginTokenRequest; } });
10
22
  var ExpireLoginTokenResponseBody_1 = require("./ExpireLoginTokenResponseBody");
@@ -17,6 +29,14 @@ var GetAuthCodeResponseBody_2 = require("./GetAuthCodeResponseBody");
17
29
  Object.defineProperty(exports, "GetAuthCodeResponseBody", { enumerable: true, get: function () { return GetAuthCodeResponseBody_2.GetAuthCodeResponseBody; } });
18
30
  var GetAuthCodeResponse_1 = require("./GetAuthCodeResponse");
19
31
  Object.defineProperty(exports, "GetAuthCodeResponse", { enumerable: true, get: function () { return GetAuthCodeResponse_1.GetAuthCodeResponse; } });
32
+ var GetLatestThirdAppAccessTokenRequest_2 = require("./GetLatestThirdAppAccessTokenRequest");
33
+ Object.defineProperty(exports, "GetLatestThirdAppAccessTokenRequest", { enumerable: true, get: function () { return GetLatestThirdAppAccessTokenRequest_2.GetLatestThirdAppAccessTokenRequest; } });
34
+ var GetLatestThirdAppAccessTokenShrinkRequest_1 = require("./GetLatestThirdAppAccessTokenShrinkRequest");
35
+ Object.defineProperty(exports, "GetLatestThirdAppAccessTokenShrinkRequest", { enumerable: true, get: function () { return GetLatestThirdAppAccessTokenShrinkRequest_1.GetLatestThirdAppAccessTokenShrinkRequest; } });
36
+ var GetLatestThirdAppAccessTokenResponseBody_1 = require("./GetLatestThirdAppAccessTokenResponseBody");
37
+ Object.defineProperty(exports, "GetLatestThirdAppAccessTokenResponseBody", { enumerable: true, get: function () { return GetLatestThirdAppAccessTokenResponseBody_1.GetLatestThirdAppAccessTokenResponseBody; } });
38
+ var GetLatestThirdAppAccessTokenResponse_1 = require("./GetLatestThirdAppAccessTokenResponse");
39
+ Object.defineProperty(exports, "GetLatestThirdAppAccessTokenResponse", { enumerable: true, get: function () { return GetLatestThirdAppAccessTokenResponse_1.GetLatestThirdAppAccessTokenResponse; } });
20
40
  var GetStsTokenRequest_1 = require("./GetStsTokenRequest");
21
41
  Object.defineProperty(exports, "GetStsTokenRequest", { enumerable: true, get: function () { return GetStsTokenRequest_1.GetStsTokenRequest; } });
22
42
  var GetStsTokenResponseBody_2 = require("./GetStsTokenResponseBody");
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/models/model.ts"],"names":[],"mappings":";;;AAAA,qEAA6E;AAApE,2IAAA,gCAAgC,OAAA;AACzC,qEAAiF;AAAxE,+IAAA,oCAAoC,OAAA;AAC7C,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,+EAA8E;AAArE,4IAAA,4BAA4B,OAAA;AACrC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA"}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/models/model.ts"],"names":[],"mappings":";;;AAAA,uFAA8F;AAArF,4JAAA,wCAAwC,OAAA;AACjD,qEAA6E;AAApE,2IAAA,gCAAgC,OAAA;AACzC,6FAAoG;AAA3F,kKAAA,2CAA2C,OAAA;AACpD,qEAAiF;AAAxE,+IAAA,oCAAoC,OAAA;AAC7C,uFAAsF;AAA7E,oJAAA,gCAAgC,OAAA;AACzC,mGAAkG;AAAzF,gKAAA,sCAAsC,OAAA;AAC/C,iGAAgG;AAAvF,8JAAA,qCAAqC,OAAA;AAC9C,yFAAwF;AAA/E,sJAAA,iCAAiC,OAAA;AAC1C,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,+EAA8E;AAArE,4IAAA,4BAA4B,OAAA;AACrC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,6FAA4F;AAAnF,0JAAA,mCAAmC,OAAA;AAC5C,yGAAwG;AAA/F,sKAAA,yCAAyC,OAAA;AAClD,uGAAsG;AAA7F,oKAAA,wCAAwC,OAAA;AACjD,+FAA8F;AAArF,4JAAA,oCAAoC,OAAA;AAC7C,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/appstream-center20210218",
3
- "version": "1.1.3",
3
+ "version": "1.2.1",
4
4
  "description": "",
5
5
  "main": "dist/client.js",
6
6
  "scripts": {
@@ -20,7 +20,8 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@darabonba/typescript": "^1.0.0",
23
- "@alicloud/openapi-core": "^1.0.0"
23
+ "@alicloud/gateway-pop": "^0.0.8",
24
+ "@alicloud/openapi-core": "^1.0.8"
24
25
  },
25
26
  "files": [
26
27
  "dist",
package/src/client.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  // This file is auto-generated, don't edit it
2
2
  import * as $dara from '@darabonba/typescript';
3
+ import GatewayClient from '@alicloud/gateway-pop';
3
4
  import OpenApi from '@alicloud/openapi-core';
4
5
  import { OpenApiUtil, $OpenApiUtil }from '@alicloud/openapi-core';
5
6
 
@@ -11,11 +12,10 @@ export default class Client extends OpenApi {
11
12
 
12
13
  constructor(config: $OpenApiUtil.Config) {
13
14
  super(config);
15
+ this._productId = "appstream-center";
16
+ let gatewayClient = new GatewayClient();
17
+ this._spi = gatewayClient;
14
18
  this._endpointRule = "regional";
15
- this._endpointMap = {
16
- 'cn-shanghai': "appstream-center.cn-shanghai.aliyuncs.com",
17
- 'ap-southeast-1': "appstream-center.ap-southeast-1.aliyuncs.com",
18
- };
19
19
  this.checkConfig(config);
20
20
  this._endpoint = this.getEndpoint("appstream-center", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
21
21
  }
@@ -34,7 +34,83 @@ export default class Client extends OpenApi {
34
34
  }
35
35
 
36
36
  /**
37
- * Manually expires a logon token before its automatic expiration.
37
+ * Creates a time-limited static access token for a specified user in the current account to access a single cloud desktop.
38
+ *
39
+ * @remarks
40
+ * When you call this operation, you must provide Resource and specify both ResourceType and ResourceId. Only a single cloud desktop is supported. You cannot omit Resource to authorize or query all cloud desktops.
41
+ * AuthorizerId is the WyId of the user and cannot be replaced by a username. BusinessChannel supports Enterprise and Business. If omitted, the default value is Enterprise.
42
+ * Before creation, the user must belong to the current calling account and have access permissions to the target cloud desktop. This operation only creates an access token. It does not create users or add authorization relationships between users and cloud desktops. Each successful call creates a new time-limited token. To obtain an existing token, call GetLatestThirdAppAccessToken and pass the same AuthorizerId and Resource.
43
+ * The unit of Expiration is seconds. Valid values: 1 to 15552000. If omitted, the default value is 15552000, which equals 180 days. Permanent validity is not supported. Keep the returned AccessToken secure and avoid displaying the full token in logs or public content.
44
+ *
45
+ * @param tmpReq - CreateThirdAppAccessTokenRequest
46
+ * @param runtime - runtime options for this request RuntimeOptions
47
+ * @returns CreateThirdAppAccessTokenResponse
48
+ */
49
+ async createThirdAppAccessTokenWithOptions(tmpReq: $_model.CreateThirdAppAccessTokenRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateThirdAppAccessTokenResponse> {
50
+ tmpReq.validate();
51
+ let request = new $_model.CreateThirdAppAccessTokenShrinkRequest({ });
52
+ OpenApiUtil.convert(tmpReq, request);
53
+ if (!$dara.isNull(tmpReq.resource)) {
54
+ request.resourceShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resource, "Resource", "json");
55
+ }
56
+
57
+ let body : {[key: string ]: any} = { };
58
+ if (!$dara.isNull(request.authorizerId)) {
59
+ body["AuthorizerId"] = request.authorizerId;
60
+ }
61
+
62
+ if (!$dara.isNull(request.businessChannel)) {
63
+ body["BusinessChannel"] = request.businessChannel;
64
+ }
65
+
66
+ if (!$dara.isNull(request.endUserId)) {
67
+ body["EndUserId"] = request.endUserId;
68
+ }
69
+
70
+ if (!$dara.isNull(request.expiration)) {
71
+ body["Expiration"] = request.expiration;
72
+ }
73
+
74
+ if (!$dara.isNull(request.resourceShrink)) {
75
+ body["Resource"] = request.resourceShrink;
76
+ }
77
+
78
+ let req = new $OpenApiUtil.OpenApiRequest({
79
+ body: OpenApiUtil.parseToMap(body),
80
+ });
81
+ let params = new $OpenApiUtil.Params({
82
+ action: "CreateThirdAppAccessToken",
83
+ version: "2021-02-18",
84
+ protocol: "HTTPS",
85
+ pathname: "/",
86
+ method: "POST",
87
+ authType: "AK",
88
+ style: "RPC",
89
+ reqBodyType: "formData",
90
+ bodyType: "json",
91
+ });
92
+ return $dara.cast<$_model.CreateThirdAppAccessTokenResponse>(await this.callApi(params, req, runtime), new $_model.CreateThirdAppAccessTokenResponse({}));
93
+ }
94
+
95
+ /**
96
+ * Creates a time-limited static access token for a specified user in the current account to access a single cloud desktop.
97
+ *
98
+ * @remarks
99
+ * When you call this operation, you must provide Resource and specify both ResourceType and ResourceId. Only a single cloud desktop is supported. You cannot omit Resource to authorize or query all cloud desktops.
100
+ * AuthorizerId is the WyId of the user and cannot be replaced by a username. BusinessChannel supports Enterprise and Business. If omitted, the default value is Enterprise.
101
+ * Before creation, the user must belong to the current calling account and have access permissions to the target cloud desktop. This operation only creates an access token. It does not create users or add authorization relationships between users and cloud desktops. Each successful call creates a new time-limited token. To obtain an existing token, call GetLatestThirdAppAccessToken and pass the same AuthorizerId and Resource.
102
+ * The unit of Expiration is seconds. Valid values: 1 to 15552000. If omitted, the default value is 15552000, which equals 180 days. Permanent validity is not supported. Keep the returned AccessToken secure and avoid displaying the full token in logs or public content.
103
+ *
104
+ * @param request - CreateThirdAppAccessTokenRequest
105
+ * @returns CreateThirdAppAccessTokenResponse
106
+ */
107
+ async createThirdAppAccessToken(request: $_model.CreateThirdAppAccessTokenRequest): Promise<$_model.CreateThirdAppAccessTokenResponse> {
108
+ let runtime = new $dara.RuntimeOptions({ });
109
+ return await this.createThirdAppAccessTokenWithOptions(request, runtime);
110
+ }
111
+
112
+ /**
113
+ * Invalidates a Wuying Workspace logon session before it naturally expires.
38
114
  *
39
115
  * @param request - ExpireLoginTokenRequest
40
116
  * @param runtime - runtime options for this request RuntimeOptions
@@ -77,7 +153,7 @@ export default class Client extends OpenApi {
77
153
  }
78
154
 
79
155
  /**
80
- * Manually expires a logon token before its automatic expiration.
156
+ * Invalidates a Wuying Workspace logon session before it naturally expires.
81
157
  *
82
158
  * @param request - ExpireLoginTokenRequest
83
159
  * @returns ExpireLoginTokenResponse
@@ -88,7 +164,10 @@ export default class Client extends OpenApi {
88
164
  }
89
165
 
90
166
  /**
91
- * Obtains an authorization code that contains user identity and permission information. The authorization code can be used to launch a cloud application in integration scenarios.
167
+ * Retrieves an authorization code that contains user identity and permission information, which can be used to invoke cloud applications in integration scenarios.
168
+ *
169
+ * @remarks
170
+ * Retrieves an authorization code that contains user identity and permission information, which can be used to invoke cloud applications in integration scenarios.
92
171
  *
93
172
  * @param request - GetAuthCodeRequest
94
173
  * @param runtime - runtime options for this request RuntimeOptions
@@ -149,7 +228,10 @@ export default class Client extends OpenApi {
149
228
  }
150
229
 
151
230
  /**
152
- * Obtains an authorization code that contains user identity and permission information. The authorization code can be used to launch a cloud application in integration scenarios.
231
+ * Retrieves an authorization code that contains user identity and permission information, which can be used to invoke cloud applications in integration scenarios.
232
+ *
233
+ * @remarks
234
+ * Retrieves an authorization code that contains user identity and permission information, which can be used to invoke cloud applications in integration scenarios.
153
235
  *
154
236
  * @param request - GetAuthCodeRequest
155
237
  * @returns GetAuthCodeResponse
@@ -160,7 +242,79 @@ export default class Client extends OpenApi {
160
242
  }
161
243
 
162
244
  /**
163
- * Gets a Security Token Service (STS) token.
245
+ * Retrieves the current valid static access token for a specified user and a single cloud desktop under the current account, keeping the original expiration time.
246
+ *
247
+ * @remarks
248
+ * You must provide Resource and specify both ResourceType and ResourceId when calling this operation. Only a single cloud desktop is supported. You cannot omit Resource to authorize or query all cloud desktops.
249
+ * AuthorizerId is the WyId of the user and cannot be replaced by a username. BusinessChannel supports Enterprise and Business. If omitted, the default value is Enterprise.
250
+ * The AuthorizerId and Resource in the query conditions must be consistent with those used when the token was created. This operation only returns the current valid token for the current account, user, and cloud desktop. It does not create a new token, renew the token, or restore or roll back to a historical token. If no valid token is found, the token has expired, or the corresponding cache has been cleared, AccessToken.NotFound is returned. To obtain a new token, call CreateThirdAppAccessToken.
251
+ * Keep the returned AccessToken secure and avoid displaying the full token in logs or public content.
252
+ *
253
+ * @param tmpReq - GetLatestThirdAppAccessTokenRequest
254
+ * @param runtime - runtime options for this request RuntimeOptions
255
+ * @returns GetLatestThirdAppAccessTokenResponse
256
+ */
257
+ async getLatestThirdAppAccessTokenWithOptions(tmpReq: $_model.GetLatestThirdAppAccessTokenRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetLatestThirdAppAccessTokenResponse> {
258
+ tmpReq.validate();
259
+ let request = new $_model.GetLatestThirdAppAccessTokenShrinkRequest({ });
260
+ OpenApiUtil.convert(tmpReq, request);
261
+ if (!$dara.isNull(tmpReq.resource)) {
262
+ request.resourceShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resource, "Resource", "json");
263
+ }
264
+
265
+ let body : {[key: string ]: any} = { };
266
+ if (!$dara.isNull(request.authorizerId)) {
267
+ body["AuthorizerId"] = request.authorizerId;
268
+ }
269
+
270
+ if (!$dara.isNull(request.businessChannel)) {
271
+ body["BusinessChannel"] = request.businessChannel;
272
+ }
273
+
274
+ if (!$dara.isNull(request.endUserId)) {
275
+ body["EndUserId"] = request.endUserId;
276
+ }
277
+
278
+ if (!$dara.isNull(request.resourceShrink)) {
279
+ body["Resource"] = request.resourceShrink;
280
+ }
281
+
282
+ let req = new $OpenApiUtil.OpenApiRequest({
283
+ body: OpenApiUtil.parseToMap(body),
284
+ });
285
+ let params = new $OpenApiUtil.Params({
286
+ action: "GetLatestThirdAppAccessToken",
287
+ version: "2021-02-18",
288
+ protocol: "HTTPS",
289
+ pathname: "/",
290
+ method: "POST",
291
+ authType: "AK",
292
+ style: "RPC",
293
+ reqBodyType: "formData",
294
+ bodyType: "json",
295
+ });
296
+ return $dara.cast<$_model.GetLatestThirdAppAccessTokenResponse>(await this.callApi(params, req, runtime), new $_model.GetLatestThirdAppAccessTokenResponse({}));
297
+ }
298
+
299
+ /**
300
+ * Retrieves the current valid static access token for a specified user and a single cloud desktop under the current account, keeping the original expiration time.
301
+ *
302
+ * @remarks
303
+ * You must provide Resource and specify both ResourceType and ResourceId when calling this operation. Only a single cloud desktop is supported. You cannot omit Resource to authorize or query all cloud desktops.
304
+ * AuthorizerId is the WyId of the user and cannot be replaced by a username. BusinessChannel supports Enterprise and Business. If omitted, the default value is Enterprise.
305
+ * The AuthorizerId and Resource in the query conditions must be consistent with those used when the token was created. This operation only returns the current valid token for the current account, user, and cloud desktop. It does not create a new token, renew the token, or restore or roll back to a historical token. If no valid token is found, the token has expired, or the corresponding cache has been cleared, AccessToken.NotFound is returned. To obtain a new token, call CreateThirdAppAccessToken.
306
+ * Keep the returned AccessToken secure and avoid displaying the full token in logs or public content.
307
+ *
308
+ * @param request - GetLatestThirdAppAccessTokenRequest
309
+ * @returns GetLatestThirdAppAccessTokenResponse
310
+ */
311
+ async getLatestThirdAppAccessToken(request: $_model.GetLatestThirdAppAccessTokenRequest): Promise<$_model.GetLatestThirdAppAccessTokenResponse> {
312
+ let runtime = new $dara.RuntimeOptions({ });
313
+ return await this.getLatestThirdAppAccessTokenWithOptions(request, runtime);
314
+ }
315
+
316
+ /**
317
+ * Retrieves a Wuying STS token (temporary identity credential).
164
318
  *
165
319
  * @param request - GetStsTokenRequest
166
320
  * @param runtime - runtime options for this request RuntimeOptions
@@ -199,7 +353,7 @@ export default class Client extends OpenApi {
199
353
  }
200
354
 
201
355
  /**
202
- * Gets a Security Token Service (STS) token.
356
+ * Retrieves a Wuying STS token (temporary identity credential).
203
357
  *
204
358
  * @param request - GetStsTokenRequest
205
359
  * @returns GetStsTokenResponse