@slates/oauth-microsoft 1.0.0-rc.4 → 1.0.0-rc.5
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.cjs +2 -0
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.module.js +2 -0
- package/package.json +2 -2
- package/src/index.ts +9 -0
package/dist/index.cjs
CHANGED
|
@@ -147,6 +147,7 @@ var createMicrosoftGraphOauth = ({
|
|
|
147
147
|
key,
|
|
148
148
|
tenant,
|
|
149
149
|
scopes,
|
|
150
|
+
docs,
|
|
150
151
|
allowTenantInput = false,
|
|
151
152
|
missingRefreshTokenMessage = "No refresh token available. Ensure offline_access scope is requested.",
|
|
152
153
|
normalizeRedirectUri: shouldNormalizeRedirectUri = false,
|
|
@@ -167,6 +168,7 @@ var createMicrosoftGraphOauth = ({
|
|
|
167
168
|
name,
|
|
168
169
|
key,
|
|
169
170
|
scopes,
|
|
171
|
+
docs,
|
|
170
172
|
getAuthorizationUrl: async (ctx) => {
|
|
171
173
|
let resolvedTenant = getTenant(ctx);
|
|
172
174
|
let params = new URLSearchParams({
|
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,11 @@ type MicrosoftOauthScope = {
|
|
|
6
6
|
scope: string;
|
|
7
7
|
defaultChecked?: boolean;
|
|
8
8
|
};
|
|
9
|
+
type MicrosoftOauthDocsReference = {
|
|
10
|
+
type?: 'docs.auth.oauth' | 'docs.auth.oauth_scopes';
|
|
11
|
+
name: string;
|
|
12
|
+
url: string;
|
|
13
|
+
};
|
|
9
14
|
type MicrosoftGraphProfile = {
|
|
10
15
|
id?: string;
|
|
11
16
|
email?: string;
|
|
@@ -22,6 +27,7 @@ type MicrosoftGraphOauthOptions = {
|
|
|
22
27
|
key: string;
|
|
23
28
|
tenant: string;
|
|
24
29
|
scopes: MicrosoftOauthScope[];
|
|
30
|
+
docs?: MicrosoftOauthDocsReference[];
|
|
25
31
|
allowTenantInput?: boolean;
|
|
26
32
|
missingRefreshTokenMessage?: string;
|
|
27
33
|
/** Normalize loopback redirect URIs for Microsoft app registration compatibility. */
|
|
@@ -78,11 +84,12 @@ declare let normalizeMicrosoftRedirectUriForIntegration: (integration: string, r
|
|
|
78
84
|
declare let resolveMicrosoftTenant: (tenantId: unknown, defaultTenant: string) => string;
|
|
79
85
|
declare let mapAzureDevOpsScopes: (scopes: string[]) => string[];
|
|
80
86
|
declare let buildMicrosoftGraphUploadBody: (fileName: string, content: string, contentType?: string) => string | Buffer<ArrayBuffer>;
|
|
81
|
-
declare let createMicrosoftGraphOauth: ({ name, key, tenant, scopes, allowTenantInput, missingRefreshTokenMessage, normalizeRedirectUri: shouldNormalizeRedirectUri, scopeMapper, extraScopes, onMissingRefreshToken, profile }: MicrosoftGraphOauthOptions) => {
|
|
87
|
+
declare let createMicrosoftGraphOauth: ({ name, key, tenant, scopes, docs, allowTenantInput, missingRefreshTokenMessage, normalizeRedirectUri: shouldNormalizeRedirectUri, scopeMapper, extraScopes, onMissingRefreshToken, profile }: MicrosoftGraphOauthOptions) => {
|
|
82
88
|
type: "auth.oauth";
|
|
83
89
|
name: string;
|
|
84
90
|
key: string;
|
|
85
91
|
scopes: MicrosoftOauthScope[];
|
|
92
|
+
docs: MicrosoftOauthDocsReference[] | undefined;
|
|
86
93
|
getAuthorizationUrl: (ctx: MicrosoftGraphAuthorizationUrlContext) => Promise<{
|
|
87
94
|
url: string;
|
|
88
95
|
}>;
|
|
@@ -97,4 +104,4 @@ declare let createMicrosoftGraphOauth: ({ name, key, tenant, scopes, allowTenant
|
|
|
97
104
|
}>;
|
|
98
105
|
};
|
|
99
106
|
|
|
100
|
-
export { MICROSOFT_GRAPH_BASE, MICROSOFT_LOGIN_BASE, MICROSOFT_OAUTH_INTEGRATION_KEYS, type MicrosoftGraphAuthorizationUrlContext, type MicrosoftGraphCallbackContext, type MicrosoftGraphOauthInput, type MicrosoftGraphOauthOptions, type MicrosoftGraphOauthOutput, type MicrosoftGraphProfile, type MicrosoftGraphProfileContext, type MicrosoftGraphProfileOptions, type MicrosoftGraphTokenRefreshContext, type MicrosoftOauthScope, buildMicrosoftGraphUploadBody, createMicrosoftGraphOauth, mapAzureDevOpsScopes, normalizeMicrosoftRedirectUri, normalizeMicrosoftRedirectUriForIntegration, resolveMicrosoftTenant, usesMicrosoftOAuth };
|
|
107
|
+
export { MICROSOFT_GRAPH_BASE, MICROSOFT_LOGIN_BASE, MICROSOFT_OAUTH_INTEGRATION_KEYS, type MicrosoftGraphAuthorizationUrlContext, type MicrosoftGraphCallbackContext, type MicrosoftGraphOauthInput, type MicrosoftGraphOauthOptions, type MicrosoftGraphOauthOutput, type MicrosoftGraphProfile, type MicrosoftGraphProfileContext, type MicrosoftGraphProfileOptions, type MicrosoftGraphTokenRefreshContext, type MicrosoftOauthDocsReference, type MicrosoftOauthScope, buildMicrosoftGraphUploadBody, createMicrosoftGraphOauth, mapAzureDevOpsScopes, normalizeMicrosoftRedirectUri, normalizeMicrosoftRedirectUriForIntegration, resolveMicrosoftTenant, usesMicrosoftOAuth };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ type MicrosoftOauthScope = {
|
|
|
6
6
|
scope: string;
|
|
7
7
|
defaultChecked?: boolean;
|
|
8
8
|
};
|
|
9
|
+
type MicrosoftOauthDocsReference = {
|
|
10
|
+
type?: 'docs.auth.oauth' | 'docs.auth.oauth_scopes';
|
|
11
|
+
name: string;
|
|
12
|
+
url: string;
|
|
13
|
+
};
|
|
9
14
|
type MicrosoftGraphProfile = {
|
|
10
15
|
id?: string;
|
|
11
16
|
email?: string;
|
|
@@ -22,6 +27,7 @@ type MicrosoftGraphOauthOptions = {
|
|
|
22
27
|
key: string;
|
|
23
28
|
tenant: string;
|
|
24
29
|
scopes: MicrosoftOauthScope[];
|
|
30
|
+
docs?: MicrosoftOauthDocsReference[];
|
|
25
31
|
allowTenantInput?: boolean;
|
|
26
32
|
missingRefreshTokenMessage?: string;
|
|
27
33
|
/** Normalize loopback redirect URIs for Microsoft app registration compatibility. */
|
|
@@ -78,11 +84,12 @@ declare let normalizeMicrosoftRedirectUriForIntegration: (integration: string, r
|
|
|
78
84
|
declare let resolveMicrosoftTenant: (tenantId: unknown, defaultTenant: string) => string;
|
|
79
85
|
declare let mapAzureDevOpsScopes: (scopes: string[]) => string[];
|
|
80
86
|
declare let buildMicrosoftGraphUploadBody: (fileName: string, content: string, contentType?: string) => string | Buffer<ArrayBuffer>;
|
|
81
|
-
declare let createMicrosoftGraphOauth: ({ name, key, tenant, scopes, allowTenantInput, missingRefreshTokenMessage, normalizeRedirectUri: shouldNormalizeRedirectUri, scopeMapper, extraScopes, onMissingRefreshToken, profile }: MicrosoftGraphOauthOptions) => {
|
|
87
|
+
declare let createMicrosoftGraphOauth: ({ name, key, tenant, scopes, docs, allowTenantInput, missingRefreshTokenMessage, normalizeRedirectUri: shouldNormalizeRedirectUri, scopeMapper, extraScopes, onMissingRefreshToken, profile }: MicrosoftGraphOauthOptions) => {
|
|
82
88
|
type: "auth.oauth";
|
|
83
89
|
name: string;
|
|
84
90
|
key: string;
|
|
85
91
|
scopes: MicrosoftOauthScope[];
|
|
92
|
+
docs: MicrosoftOauthDocsReference[] | undefined;
|
|
86
93
|
getAuthorizationUrl: (ctx: MicrosoftGraphAuthorizationUrlContext) => Promise<{
|
|
87
94
|
url: string;
|
|
88
95
|
}>;
|
|
@@ -97,4 +104,4 @@ declare let createMicrosoftGraphOauth: ({ name, key, tenant, scopes, allowTenant
|
|
|
97
104
|
}>;
|
|
98
105
|
};
|
|
99
106
|
|
|
100
|
-
export { MICROSOFT_GRAPH_BASE, MICROSOFT_LOGIN_BASE, MICROSOFT_OAUTH_INTEGRATION_KEYS, type MicrosoftGraphAuthorizationUrlContext, type MicrosoftGraphCallbackContext, type MicrosoftGraphOauthInput, type MicrosoftGraphOauthOptions, type MicrosoftGraphOauthOutput, type MicrosoftGraphProfile, type MicrosoftGraphProfileContext, type MicrosoftGraphProfileOptions, type MicrosoftGraphTokenRefreshContext, type MicrosoftOauthScope, buildMicrosoftGraphUploadBody, createMicrosoftGraphOauth, mapAzureDevOpsScopes, normalizeMicrosoftRedirectUri, normalizeMicrosoftRedirectUriForIntegration, resolveMicrosoftTenant, usesMicrosoftOAuth };
|
|
107
|
+
export { MICROSOFT_GRAPH_BASE, MICROSOFT_LOGIN_BASE, MICROSOFT_OAUTH_INTEGRATION_KEYS, type MicrosoftGraphAuthorizationUrlContext, type MicrosoftGraphCallbackContext, type MicrosoftGraphOauthInput, type MicrosoftGraphOauthOptions, type MicrosoftGraphOauthOutput, type MicrosoftGraphProfile, type MicrosoftGraphProfileContext, type MicrosoftGraphProfileOptions, type MicrosoftGraphTokenRefreshContext, type MicrosoftOauthDocsReference, type MicrosoftOauthScope, buildMicrosoftGraphUploadBody, createMicrosoftGraphOauth, mapAzureDevOpsScopes, normalizeMicrosoftRedirectUri, normalizeMicrosoftRedirectUriForIntegration, resolveMicrosoftTenant, usesMicrosoftOAuth };
|
package/dist/index.module.js
CHANGED
|
@@ -114,6 +114,7 @@ var createMicrosoftGraphOauth = ({
|
|
|
114
114
|
key,
|
|
115
115
|
tenant,
|
|
116
116
|
scopes,
|
|
117
|
+
docs,
|
|
117
118
|
allowTenantInput = false,
|
|
118
119
|
missingRefreshTokenMessage = "No refresh token available. Ensure offline_access scope is requested.",
|
|
119
120
|
normalizeRedirectUri: shouldNormalizeRedirectUri = false,
|
|
@@ -134,6 +135,7 @@ var createMicrosoftGraphOauth = ({
|
|
|
134
135
|
name,
|
|
135
136
|
key,
|
|
136
137
|
scopes,
|
|
138
|
+
docs,
|
|
137
139
|
getAuthorizationUrl: async (ctx) => {
|
|
138
140
|
let resolvedTenant = getTenant(ctx);
|
|
139
141
|
let params = new URLSearchParams({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slates/oauth-microsoft",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"biome:check": "biome check --write src"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"slates": "1.0.0-rc.
|
|
34
|
+
"slates": "1.0.0-rc.14"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^20",
|
package/src/index.ts
CHANGED
|
@@ -16,6 +16,12 @@ export type MicrosoftOauthScope = {
|
|
|
16
16
|
defaultChecked?: boolean;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
export type MicrosoftOauthDocsReference = {
|
|
20
|
+
type?: 'docs.auth.oauth' | 'docs.auth.oauth_scopes';
|
|
21
|
+
name: string;
|
|
22
|
+
url: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
19
25
|
export type MicrosoftGraphProfile = {
|
|
20
26
|
id?: string;
|
|
21
27
|
email?: string;
|
|
@@ -34,6 +40,7 @@ export type MicrosoftGraphOauthOptions = {
|
|
|
34
40
|
key: string;
|
|
35
41
|
tenant: string;
|
|
36
42
|
scopes: MicrosoftOauthScope[];
|
|
43
|
+
docs?: MicrosoftOauthDocsReference[];
|
|
37
44
|
allowTenantInput?: boolean;
|
|
38
45
|
missingRefreshTokenMessage?: string;
|
|
39
46
|
/** Normalize loopback redirect URIs for Microsoft app registration compatibility. */
|
|
@@ -262,6 +269,7 @@ export let createMicrosoftGraphOauth = ({
|
|
|
262
269
|
key,
|
|
263
270
|
tenant,
|
|
264
271
|
scopes,
|
|
272
|
+
docs,
|
|
265
273
|
allowTenantInput = false,
|
|
266
274
|
missingRefreshTokenMessage = 'No refresh token available. Ensure offline_access scope is requested.',
|
|
267
275
|
normalizeRedirectUri: shouldNormalizeRedirectUri = false,
|
|
@@ -288,6 +296,7 @@ export let createMicrosoftGraphOauth = ({
|
|
|
288
296
|
name,
|
|
289
297
|
key,
|
|
290
298
|
scopes,
|
|
299
|
+
docs,
|
|
291
300
|
|
|
292
301
|
getAuthorizationUrl: async (ctx: MicrosoftGraphAuthorizationUrlContext) => {
|
|
293
302
|
let resolvedTenant = getTenant(ctx);
|