Bad typing for `SignedIdentifier` in @azure/storage-file-share
craxal opened this issue · comments
- Package Name: @azure/storage-file-share
- Package Version: 12.26.0
- Operating system: N/A
- nodejs
- version: 22
- browser
- name/version:
- typescript
- version: 5
- Is the bug related to documentation in
- README.md
- source code documentation
- SDK API docs on https://learn.microsoft.com
Describe the bug
Stored access policies can optionally define any of the following properties (see https://docs.microsoft.com/en-us/rest/api/storageservices/define-stored-access-policy#creating-or-modifying-a-stored-access-policy)
- Permissons
- Start time
- Expiry time
However, the type for SignedIdentifier
as defined in the @azure/storage-file-share package requires all three properties:
export declare interface SignedIdentifier {
id: string;
accessPolicy: {
startsOn: Date;
expiresOn: Date;
permissions: string;
};
}
For comparison, the @azure/storage-blob package defines SignedIdentifier
as expected:
export declare interface SignedIdentifier {
id: string;
accessPolicy: {
startsOn?: Date;
expiresOn?: Date;
permissions?: string;
};
}
To Reproduce
Steps to reproduce the behavior:
- Install the npm package and search for the
SignedIdentifier
declaration.
Expected behavior
The properties of the accessPolicy
should be optional.
Screenshots
N/A
Additional context
This issue was originally reported in #13540. Additional clarification was requested by the issue author, but the conversation was not picked up by the repo owners, and the issue was closed without resolution.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.