@microsoft/m365-spec-parser 0.2.6-alpha.2932bd2f2.0 → 0.2.6-alpha.2cdd9b693.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/index.esm2017.js +36 -1
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +116 -26
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +36 -1
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +119 -25
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/interfaces.d.ts +6 -1
- package/dist/src/specParser.d.ts +4 -2
- package/dist/src/utils.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm2017.js
CHANGED
|
@@ -41,6 +41,7 @@ var ErrorType;
|
|
|
41
41
|
ErrorType["UrlPathNotExist"] = "url-path-not-exist";
|
|
42
42
|
ErrorType["Cancelled"] = "cancelled";
|
|
43
43
|
ErrorType["Unknown"] = "unknown";
|
|
44
|
+
ErrorType["AddAuthFailed"] = "add-auth-failed";
|
|
44
45
|
})(ErrorType || (ErrorType = {}));
|
|
45
46
|
/**
|
|
46
47
|
* An enum that represents the types of warnings that can occur during validation.
|
|
@@ -71,7 +72,12 @@ var ProjectType;
|
|
|
71
72
|
ProjectType[ProjectType["Copilot"] = 0] = "Copilot";
|
|
72
73
|
ProjectType[ProjectType["SME"] = 1] = "SME";
|
|
73
74
|
ProjectType[ProjectType["TeamsAi"] = 2] = "TeamsAi";
|
|
74
|
-
})(ProjectType || (ProjectType = {}));
|
|
75
|
+
})(ProjectType || (ProjectType = {}));
|
|
76
|
+
var AdaptiveCardUpdateStrategy;
|
|
77
|
+
(function (AdaptiveCardUpdateStrategy) {
|
|
78
|
+
AdaptiveCardUpdateStrategy[AdaptiveCardUpdateStrategy["CreateNew"] = 0] = "CreateNew";
|
|
79
|
+
AdaptiveCardUpdateStrategy[AdaptiveCardUpdateStrategy["KeepExisting"] = 1] = "KeepExisting";
|
|
80
|
+
})(AdaptiveCardUpdateStrategy || (AdaptiveCardUpdateStrategy = {}));
|
|
75
81
|
|
|
76
82
|
// Copyright (c) Microsoft Corporation.
|
|
77
83
|
class SpecParserError extends Error {
|
|
@@ -572,6 +578,35 @@ class Utils {
|
|
|
572
578
|
const serverUrl = operationServer || methodServer || rootServer;
|
|
573
579
|
return serverUrl;
|
|
574
580
|
}
|
|
581
|
+
static getAuthSchemaObject(authType, authParameters) {
|
|
582
|
+
switch (authType) {
|
|
583
|
+
case "oauth":
|
|
584
|
+
case "microsoft-entra":
|
|
585
|
+
return {
|
|
586
|
+
type: "oauth2",
|
|
587
|
+
flows: {
|
|
588
|
+
authorizationCode: {
|
|
589
|
+
authorizationUrl: authParameters.authorizationUrl,
|
|
590
|
+
tokenUrl: authParameters.tokenUrl,
|
|
591
|
+
refreshUrl: authParameters.refreshUrl,
|
|
592
|
+
scopes: authParameters.scopes,
|
|
593
|
+
},
|
|
594
|
+
},
|
|
595
|
+
};
|
|
596
|
+
case "api-key":
|
|
597
|
+
return {
|
|
598
|
+
type: "apiKey",
|
|
599
|
+
in: authParameters.in,
|
|
600
|
+
name: authParameters.name,
|
|
601
|
+
};
|
|
602
|
+
case "bearer-token":
|
|
603
|
+
default:
|
|
604
|
+
return {
|
|
605
|
+
type: "http",
|
|
606
|
+
scheme: "bearer",
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
}
|
|
575
610
|
}
|
|
576
611
|
|
|
577
612
|
// Copyright (c) Microsoft Corporation.
|