-
Notifications
You must be signed in to change notification settings - Fork 188
/
constants.ts
120 lines (109 loc) · 4.16 KB
/
constants.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
"use strict";
export class ConstantString {
static readonly CancelledMessage = "Operation is cancelled.";
static readonly NoServerInformation =
"No server information is found in the OpenAPI description document.";
static readonly RemoteRefNotSupported = "Remote reference is not supported: %s.";
static readonly MissingOperationId = "Missing operationIds: %s.";
static readonly NoSupportedApi =
"No supported API is found in the OpenAPI description document: only GET and POST methods are supported, additionally, there can be at most one required parameter, and no auth is allowed.";
static readonly AdditionalPropertiesNotSupported =
"'additionalProperties' is not supported, and will be ignored.";
static readonly SchemaNotSupported = "'oneOf', 'anyOf', and 'not' schema are not supported: %s.";
static readonly UnknownSchema = "Unknown schema: %s.";
static readonly UrlProtocolNotSupported =
"Server url is not correct: protocol %s is not supported, you should use https protocol instead.";
static readonly RelativeServerUrlNotSupported =
"Server url is not correct: relative server url is not supported.";
static readonly ResolveServerUrlFailed =
"Unable to resolve the server URL: please make sure that the environment variable %s is defined.";
static readonly OperationOnlyContainsOptionalParam =
"Operation %s contains multiple optional parameters. The first optional parameter is used for this command.";
static readonly ConvertSwaggerToOpenAPI =
"The Swagger 2.0 file has been converted to OpenAPI 3.0.";
static readonly SwaggerNotSupported =
"Swagger 2.0 is not supported. Please convert to OpenAPI 3.0 manually before proceeding.";
static readonly SpecVersionNotSupported =
"Unsupported OpenAPI version %s. Please use version 3.0.x.";
static readonly MultipleAuthNotSupported =
"Multiple authentication methods are unsupported. Ensure all selected APIs use identical authentication.";
static readonly UnsupportedSchema = "Unsupported schema in %s %s: %s";
static readonly WrappedCardVersion = "devPreview";
static readonly WrappedCardSchema =
"https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.ResponseRenderingTemplate.schema.json";
static readonly WrappedCardResponseLayout = "list";
static readonly GetMethod = "get";
static readonly PostMethod = "post";
static readonly AdaptiveCardVersion = "1.5";
static readonly AdaptiveCardSchema = "http://adaptivecards.io/schemas/adaptive-card.json";
static readonly AdaptiveCardType = "AdaptiveCard";
static readonly TextBlockType = "TextBlock";
static readonly ImageType = "Image";
static readonly ContainerType = "Container";
static readonly RegistrationIdPostfix = "REGISTRATION_ID";
static readonly OAuthRegistrationIdPostFix = "OAUTH_REGISTRATION_ID";
static readonly ResponseCodeFor20X = [
"200",
"201",
"202",
"203",
"204",
"205",
"206",
"207",
"208",
"226",
"default",
];
static readonly AllOperationMethods = [
"get",
"post",
"put",
"delete",
"patch",
"head",
"options",
"trace",
];
// TODO: update after investigating the usage of these constants.
static readonly WellknownResultNames = [
"result",
"data",
"items",
"root",
"matches",
"queries",
"list",
"output",
];
static readonly WellknownTitleName = ["title", "name", "summary", "caption", "subject", "label"];
static readonly WellknownSubtitleName = [
"subtitle",
"id",
"uid",
"description",
"desc",
"detail",
];
static readonly WellknownImageName = [
"image",
"icon",
"avatar",
"picture",
"photo",
"logo",
"pic",
"thumbnail",
"img",
];
static readonly ShortDescriptionMaxLens = 80;
static readonly FullDescriptionMaxLens = 4000;
static readonly CommandDescriptionMaxLens = 128;
static readonly ParameterDescriptionMaxLens = 128;
static readonly CommandTitleMaxLens = 32;
static readonly ParameterTitleMaxLens = 32;
static readonly SMERequiredParamsMaxNum = 5;
static readonly DefaultPluginId = "plugin_1";
}