@alicloud/appstream-center20210218 1.1.3 → 1.2.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.
Files changed (57) hide show
  1. package/dist/client.d.ts +66 -6
  2. package/dist/client.js +143 -10
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/CreateThirdAppAccessTokenRequest.d.ts +74 -0
  5. package/dist/models/CreateThirdAppAccessTokenRequest.js +90 -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 +44 -0
  14. package/dist/models/CreateThirdAppAccessTokenShrinkRequest.js +64 -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 +64 -0
  24. package/dist/models/GetLatestThirdAppAccessTokenRequest.js +86 -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 +36 -0
  33. package/dist/models/GetLatestThirdAppAccessTokenShrinkRequest.js +62 -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 +156 -10
  43. package/src/models/CreateThirdAppAccessTokenRequest.ts +108 -0
  44. package/src/models/CreateThirdAppAccessTokenResponse.ts +40 -0
  45. package/src/models/CreateThirdAppAccessTokenResponseBody.ts +54 -0
  46. package/src/models/CreateThirdAppAccessTokenShrinkRequest.ts +63 -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 +96 -0
  52. package/src/models/GetLatestThirdAppAccessTokenResponse.ts +40 -0
  53. package/src/models/GetLatestThirdAppAccessTokenResponseBody.ts +54 -0
  54. package/src/models/GetLatestThirdAppAccessTokenShrinkRequest.ts +53 -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 the token. 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, represented as a Unix timestamp in 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, which can be used 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,36 @@
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
+ * This parameter is required.
8
+ *
9
+ * @example
10
+ * f1e2d3c4b5a6****
11
+ */
12
+ authorizerId?: string;
13
+ /**
14
+ * @remarks
15
+ * 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 other value is explicitly passed, a parameter error is returned. This parameter does not replace user identity verification.
16
+ *
17
+ * @example
18
+ * Enterprise
19
+ */
20
+ businessChannel?: string;
21
+ /**
22
+ * @remarks
23
+ * 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.
24
+ */
25
+ resourceShrink?: string;
26
+ static names(): {
27
+ [key: string]: string;
28
+ };
29
+ static types(): {
30
+ [key: string]: any;
31
+ };
32
+ validate(): void;
33
+ constructor(map?: {
34
+ [key: string]: any;
35
+ });
36
+ }
@@ -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.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
+ resourceShrink: 'Resource',
45
+ };
46
+ }
47
+ static types() {
48
+ return {
49
+ authorizerId: 'string',
50
+ businessChannel: 'string',
51
+ resourceShrink: 'string',
52
+ };
53
+ }
54
+ validate() {
55
+ super.validate();
56
+ }
57
+ constructor(map) {
58
+ super(map);
59
+ }
60
+ }
61
+ exports.GetLatestThirdAppAccessTokenShrinkRequest = GetLatestThirdAppAccessTokenShrinkRequest;
62
+ //# 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;IAwBxE,MAAM,CAAC,KAAK;QACV,OAAO;YACL,YAAY,EAAE,cAAc;YAC5B,eAAe,EAAE,iBAAiB;YAClC,cAAc,EAAE,UAAU;SAC3B,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO;YACL,YAAY,EAAE,QAAQ;YACtB,eAAe,EAAE,QAAQ;YACzB,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;AA/CD,8FA+CC"}
@@ -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.0",
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,79 @@ 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 for the target cloud desktop. This operation only creates an access token. It does not create a user or add an authorization relationship between the user and the cloud desktop. 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.expiration)) {
67
+ body["Expiration"] = request.expiration;
68
+ }
69
+
70
+ if (!$dara.isNull(request.resourceShrink)) {
71
+ body["Resource"] = request.resourceShrink;
72
+ }
73
+
74
+ let req = new $OpenApiUtil.OpenApiRequest({
75
+ body: OpenApiUtil.parseToMap(body),
76
+ });
77
+ let params = new $OpenApiUtil.Params({
78
+ action: "CreateThirdAppAccessToken",
79
+ version: "2021-02-18",
80
+ protocol: "HTTPS",
81
+ pathname: "/",
82
+ method: "POST",
83
+ authType: "AK",
84
+ style: "RPC",
85
+ reqBodyType: "formData",
86
+ bodyType: "json",
87
+ });
88
+ return $dara.cast<$_model.CreateThirdAppAccessTokenResponse>(await this.callApi(params, req, runtime), new $_model.CreateThirdAppAccessTokenResponse({}));
89
+ }
90
+
91
+ /**
92
+ * Creates a time-limited static access token for a specified user in the current account to access a single cloud desktop.
93
+ *
94
+ * @remarks
95
+ * 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.
96
+ * 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.
97
+ * Before creation, the user must belong to the current calling account and have access permissions for the target cloud desktop. This operation only creates an access token. It does not create a user or add an authorization relationship between the user and the cloud desktop. Each successful call creates a new time-limited token. To obtain an existing token, call GetLatestThirdAppAccessToken and pass the same AuthorizerId and Resource.
98
+ * 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.
99
+ *
100
+ * @param request - CreateThirdAppAccessTokenRequest
101
+ * @returns CreateThirdAppAccessTokenResponse
102
+ */
103
+ async createThirdAppAccessToken(request: $_model.CreateThirdAppAccessTokenRequest): Promise<$_model.CreateThirdAppAccessTokenResponse> {
104
+ let runtime = new $dara.RuntimeOptions({ });
105
+ return await this.createThirdAppAccessTokenWithOptions(request, runtime);
106
+ }
107
+
108
+ /**
109
+ * Invalidates a Wuying Workspace logon session before it naturally expires.
38
110
  *
39
111
  * @param request - ExpireLoginTokenRequest
40
112
  * @param runtime - runtime options for this request RuntimeOptions
@@ -77,7 +149,7 @@ export default class Client extends OpenApi {
77
149
  }
78
150
 
79
151
  /**
80
- * Manually expires a logon token before its automatic expiration.
152
+ * Invalidates a Wuying Workspace logon session before it naturally expires.
81
153
  *
82
154
  * @param request - ExpireLoginTokenRequest
83
155
  * @returns ExpireLoginTokenResponse
@@ -88,7 +160,10 @@ export default class Client extends OpenApi {
88
160
  }
89
161
 
90
162
  /**
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.
163
+ * Retrieves an authorization code that contains user identity and permission information, which can be used to invoke cloud applications in integration scenarios.
164
+ *
165
+ * @remarks
166
+ * Retrieves an authorization code that contains user identity and permission information, which can be used to invoke cloud applications in integration scenarios.
92
167
  *
93
168
  * @param request - GetAuthCodeRequest
94
169
  * @param runtime - runtime options for this request RuntimeOptions
@@ -149,7 +224,10 @@ export default class Client extends OpenApi {
149
224
  }
150
225
 
151
226
  /**
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.
227
+ * Retrieves an authorization code that contains user identity and permission information, which can be used to invoke cloud applications in integration scenarios.
228
+ *
229
+ * @remarks
230
+ * Retrieves an authorization code that contains user identity and permission information, which can be used to invoke cloud applications in integration scenarios.
153
231
  *
154
232
  * @param request - GetAuthCodeRequest
155
233
  * @returns GetAuthCodeResponse
@@ -160,7 +238,75 @@ export default class Client extends OpenApi {
160
238
  }
161
239
 
162
240
  /**
163
- * Gets a Security Token Service (STS) token.
241
+ * 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.
242
+ *
243
+ * @remarks
244
+ * 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.
245
+ * 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.
246
+ * 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.
247
+ * Keep the returned AccessToken secure and avoid displaying the full token in logs or public content.
248
+ *
249
+ * @param tmpReq - GetLatestThirdAppAccessTokenRequest
250
+ * @param runtime - runtime options for this request RuntimeOptions
251
+ * @returns GetLatestThirdAppAccessTokenResponse
252
+ */
253
+ async getLatestThirdAppAccessTokenWithOptions(tmpReq: $_model.GetLatestThirdAppAccessTokenRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetLatestThirdAppAccessTokenResponse> {
254
+ tmpReq.validate();
255
+ let request = new $_model.GetLatestThirdAppAccessTokenShrinkRequest({ });
256
+ OpenApiUtil.convert(tmpReq, request);
257
+ if (!$dara.isNull(tmpReq.resource)) {
258
+ request.resourceShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resource, "Resource", "json");
259
+ }
260
+
261
+ let body : {[key: string ]: any} = { };
262
+ if (!$dara.isNull(request.authorizerId)) {
263
+ body["AuthorizerId"] = request.authorizerId;
264
+ }
265
+
266
+ if (!$dara.isNull(request.businessChannel)) {
267
+ body["BusinessChannel"] = request.businessChannel;
268
+ }
269
+
270
+ if (!$dara.isNull(request.resourceShrink)) {
271
+ body["Resource"] = request.resourceShrink;
272
+ }
273
+
274
+ let req = new $OpenApiUtil.OpenApiRequest({
275
+ body: OpenApiUtil.parseToMap(body),
276
+ });
277
+ let params = new $OpenApiUtil.Params({
278
+ action: "GetLatestThirdAppAccessToken",
279
+ version: "2021-02-18",
280
+ protocol: "HTTPS",
281
+ pathname: "/",
282
+ method: "POST",
283
+ authType: "AK",
284
+ style: "RPC",
285
+ reqBodyType: "formData",
286
+ bodyType: "json",
287
+ });
288
+ return $dara.cast<$_model.GetLatestThirdAppAccessTokenResponse>(await this.callApi(params, req, runtime), new $_model.GetLatestThirdAppAccessTokenResponse({}));
289
+ }
290
+
291
+ /**
292
+ * 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.
293
+ *
294
+ * @remarks
295
+ * 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.
296
+ * 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.
297
+ * 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.
298
+ * Keep the returned AccessToken secure and avoid displaying the full token in logs or public content.
299
+ *
300
+ * @param request - GetLatestThirdAppAccessTokenRequest
301
+ * @returns GetLatestThirdAppAccessTokenResponse
302
+ */
303
+ async getLatestThirdAppAccessToken(request: $_model.GetLatestThirdAppAccessTokenRequest): Promise<$_model.GetLatestThirdAppAccessTokenResponse> {
304
+ let runtime = new $dara.RuntimeOptions({ });
305
+ return await this.getLatestThirdAppAccessTokenWithOptions(request, runtime);
306
+ }
307
+
308
+ /**
309
+ * Retrieves a Wuying STS token (temporary identity credential).
164
310
  *
165
311
  * @param request - GetStsTokenRequest
166
312
  * @param runtime - runtime options for this request RuntimeOptions
@@ -199,7 +345,7 @@ export default class Client extends OpenApi {
199
345
  }
200
346
 
201
347
  /**
202
- * Gets a Security Token Service (STS) token.
348
+ * Retrieves a Wuying STS token (temporary identity credential).
203
349
  *
204
350
  * @param request - GetStsTokenRequest
205
351
  * @returns GetStsTokenResponse