-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KeyVault] - Update API Extractor version #17702
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ | |
|
||
```ts | ||
|
||
/// <reference lib="esnext.asynciterable" /> | ||
|
||
import { AzureLogger } from '@azure/logger'; | ||
import * as coreHttp from '@azure/core-http'; | ||
import { PagedAsyncIterableIterator } from '@azure/core-paging'; | ||
import { PageSettings } from '@azure/core-paging'; | ||
|
@@ -92,7 +95,7 @@ export interface CreateRsaKeyOptions extends CreateKeyOptions { | |
// @public | ||
export class CryptographyClient { | ||
constructor(key: string | KeyVaultKey, credential: TokenCredential, pipelineOptions?: CryptographyClientOptions); | ||
constructor(key: JsonWebKey); | ||
constructor(key: JsonWebKey_2); | ||
decrypt(decryptParameters: DecryptParameters, options?: DecryptOptions): Promise<DecryptResult>; | ||
// @deprecated | ||
decrypt(algorithm: EncryptionAlgorithm, ciphertext: Uint8Array, options?: DecryptOptions): Promise<DecryptResult>; | ||
|
@@ -134,9 +137,9 @@ export interface DecryptResult { | |
// @public | ||
export interface DeletedKey { | ||
id?: string; | ||
key?: JsonWebKey; | ||
key?: JsonWebKey_2; | ||
keyOperations?: KeyOperation[]; | ||
keyType?: KeyType; | ||
keyType?: KeyType_2; | ||
name: string; | ||
properties: KeyProperties & { | ||
readonly recoveryId?: string; | ||
|
@@ -200,7 +203,7 @@ export interface ImportKeyOptions extends coreHttp.OperationOptions { | |
} | ||
|
||
// @public | ||
export interface JsonWebKey { | ||
interface JsonWebKey_2 { | ||
crv?: KeyCurveName; | ||
d?: Uint8Array; | ||
dp?: Uint8Array; | ||
|
@@ -209,7 +212,7 @@ export interface JsonWebKey { | |
k?: Uint8Array; | ||
keyOps?: KeyOperation[]; | ||
kid?: string; | ||
kty?: KeyType; | ||
kty?: KeyType_2; | ||
n?: Uint8Array; | ||
p?: Uint8Array; | ||
q?: Uint8Array; | ||
|
@@ -218,6 +221,7 @@ export interface JsonWebKey { | |
x?: Uint8Array; | ||
y?: Uint8Array; | ||
} | ||
export { JsonWebKey_2 as JsonWebKey } | ||
|
||
// @public | ||
export class KeyClient { | ||
|
@@ -226,14 +230,14 @@ export class KeyClient { | |
beginDeleteKey(name: string, options?: BeginDeleteKeyOptions): Promise<PollerLike<PollOperationState<DeletedKey>, DeletedKey>>; | ||
beginRecoverDeletedKey(name: string, options?: BeginRecoverDeletedKeyOptions): Promise<PollerLike<PollOperationState<DeletedKey>, DeletedKey>>; | ||
createEcKey(name: string, options?: CreateEcKeyOptions): Promise<KeyVaultKey>; | ||
createKey(name: string, keyType: KeyType, options?: CreateKeyOptions): Promise<KeyVaultKey>; | ||
createKey(name: string, keyType: KeyType_2, options?: CreateKeyOptions): Promise<KeyVaultKey>; | ||
createOctKey(name: string, options?: CreateOctKeyOptions): Promise<KeyVaultKey>; | ||
createRsaKey(name: string, options?: CreateRsaKeyOptions): Promise<KeyVaultKey>; | ||
getCryptographyClient(keyName: string, options?: GetCryptographyClientOptions): CryptographyClient; | ||
getDeletedKey(name: string, options?: GetDeletedKeyOptions): Promise<DeletedKey>; | ||
getKey(name: string, options?: GetKeyOptions): Promise<KeyVaultKey>; | ||
getRandomBytes(count: number, options?: GetRandomBytesOptions): Promise<RandomBytes>; | ||
importKey(name: string, key: JsonWebKey, options?: ImportKeyOptions): Promise<KeyVaultKey>; | ||
importKey(name: string, key: JsonWebKey_2, options?: ImportKeyOptions): Promise<KeyVaultKey>; | ||
listDeletedKeys(options?: ListDeletedKeysOptions): PagedAsyncIterableIterator<DeletedKey>; | ||
listPropertiesOfKeys(options?: ListPropertiesOfKeysOptions): PagedAsyncIterableIterator<KeyProperties>; | ||
listPropertiesOfKeyVersions(name: string, options?: ListPropertiesOfKeyVersionsOptions): PagedAsyncIterableIterator<KeyProperties>; | ||
|
@@ -293,14 +297,15 @@ export interface KeyReleasePolicy { | |
} | ||
|
||
// @public | ||
export type KeyType = string; | ||
type KeyType_2 = string; | ||
export { KeyType_2 as KeyType } | ||
Comment on lines
+300
to
+301
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this has to be some kind of bug, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Speaking of differences - KeyType for us does not mean the same as keyType in node crypto - for us it's the |
||
|
||
// @public | ||
export interface KeyVaultKey { | ||
id?: string; | ||
key?: JsonWebKey; | ||
key?: JsonWebKey_2; | ||
keyOperations?: KeyOperation[]; | ||
keyType?: KeyType; | ||
keyType?: KeyType_2; | ||
name: string; | ||
properties: KeyProperties; | ||
} | ||
|
@@ -403,7 +408,7 @@ export interface ListPropertiesOfKeyVersionsOptions extends coreHttp.OperationOp | |
} | ||
|
||
// @public | ||
export const logger: import("@azure/logger").AzureLogger; | ||
export const logger: AzureLogger; | ||
|
||
export { PagedAsyncIterableIterator } | ||
|
||
|
@@ -520,7 +525,6 @@ export interface WrapResult { | |
result: Uint8Array; | ||
} | ||
|
||
|
||
// (No @packageDocumentation comment for this package) | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is bizarre to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a bug, but it is the reason #9410 is stalled... I believe this is the change that introduced this microsoft/rushstack#1767
My understanding is that names that will conflict / shadow declarations in dom.d.ts, etc will be renamed as such
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#9410 (comment)
But it's super pervasive - any clash will cause this noise...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/microsoft/TypeScript/blob/cec2fda9a53620dc545a2c4d7b0156446ab145b4/lib/lib.webworker.d.ts looks like it's getting declared here, which makes me wonder if this is a common browser type, should we even be exporting this? Or simply declaring a shim?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/microsoft/TypeScript/blob/b2f9432c4064c68862f992b750d7b40c64f194b4/lib/lib.dom.d.ts#L633
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unfortunately not that simple - this JsonWebKey type that we declare here is not conformant with IETF standard for JWK... I believe since the full set is all optional the difference for us is
keyOps
instead ofkey_ops
... other languages have more differences but for us I think that's what we would need.But we already GA'd with this shape...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is just the interface name, can we maybe rename it so it doesn't conflict anymore, but still export the conflict as deprecated alias?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can, sure. But I do want to call out that if we want to upgrade api-extractor for everyone we will keep bumping into this. Some are already showing this issue (like Error_2, Location_2, etc) so I'm not sure what the answer would be globally. Any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #17710 to address this