@microsoft/m365-spec-parser 0.2.6-beta.2025022507.0 → 0.2.6-rc.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 +88 -9
- 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 +89 -8
- 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 +3 -2
- package/dist/src/utils.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm5.js
CHANGED
|
@@ -71,6 +71,7 @@ var ErrorType;
|
|
|
71
71
|
ErrorType["UrlPathNotExist"] = "url-path-not-exist";
|
|
72
72
|
ErrorType["Cancelled"] = "cancelled";
|
|
73
73
|
ErrorType["Unknown"] = "unknown";
|
|
74
|
+
ErrorType["AddAuthFailed"] = "add-auth-failed";
|
|
74
75
|
})(ErrorType || (ErrorType = {}));
|
|
75
76
|
/**
|
|
76
77
|
* An enum that represents the types of warnings that can occur during validation.
|
|
@@ -101,7 +102,12 @@ var ProjectType;
|
|
|
101
102
|
ProjectType[ProjectType["Copilot"] = 0] = "Copilot";
|
|
102
103
|
ProjectType[ProjectType["SME"] = 1] = "SME";
|
|
103
104
|
ProjectType[ProjectType["TeamsAi"] = 2] = "TeamsAi";
|
|
104
|
-
})(ProjectType || (ProjectType = {}));
|
|
105
|
+
})(ProjectType || (ProjectType = {}));
|
|
106
|
+
var AdaptiveCardUpdateStrategy;
|
|
107
|
+
(function (AdaptiveCardUpdateStrategy) {
|
|
108
|
+
AdaptiveCardUpdateStrategy[AdaptiveCardUpdateStrategy["CreateNew"] = 0] = "CreateNew";
|
|
109
|
+
AdaptiveCardUpdateStrategy[AdaptiveCardUpdateStrategy["KeepExisting"] = 1] = "KeepExisting";
|
|
110
|
+
})(AdaptiveCardUpdateStrategy || (AdaptiveCardUpdateStrategy = {}));
|
|
105
111
|
|
|
106
112
|
// Copyright (c) Microsoft Corporation.
|
|
107
113
|
class SpecParserError extends Error {
|
|
@@ -602,6 +608,35 @@ class Utils {
|
|
|
602
608
|
const serverUrl = operationServer || methodServer || rootServer;
|
|
603
609
|
return serverUrl;
|
|
604
610
|
}
|
|
611
|
+
static getAuthSchemaObject(authType, authParameters) {
|
|
612
|
+
switch (authType) {
|
|
613
|
+
case "oauth":
|
|
614
|
+
case "microsoft-entra":
|
|
615
|
+
return {
|
|
616
|
+
type: "oauth2",
|
|
617
|
+
flows: {
|
|
618
|
+
authorizationCode: {
|
|
619
|
+
authorizationUrl: authParameters.authorizationUrl,
|
|
620
|
+
tokenUrl: authParameters.tokenUrl,
|
|
621
|
+
refreshUrl: authParameters.refreshUrl,
|
|
622
|
+
scopes: authParameters.scopes,
|
|
623
|
+
},
|
|
624
|
+
},
|
|
625
|
+
};
|
|
626
|
+
case "api-key":
|
|
627
|
+
return {
|
|
628
|
+
type: "apiKey",
|
|
629
|
+
in: authParameters.in,
|
|
630
|
+
name: authParameters.name,
|
|
631
|
+
};
|
|
632
|
+
case "bearer-token":
|
|
633
|
+
default:
|
|
634
|
+
return {
|
|
635
|
+
type: "http",
|
|
636
|
+
scheme: "bearer",
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
}
|
|
605
640
|
}
|
|
606
641
|
|
|
607
642
|
// Copyright (c) Microsoft Corporation.
|