nodejs-storage icon indicating copy to clipboard operation
nodejs-storage copied to clipboard

Incorrect types on PolicyDocument interface

Open reichjustin opened this issue 7 years ago • 0 comments

The types for PolicyDocument are incorrect with what is returned when calling getSignedPolicy.

The response is:

{
  string: '{"expiration":"2099-06-16T11:11:11.000Z","conditions":[["eq","$key","test.png"],{"bucket":"test"},["starts-with","content-type","image"],["content-length-range",0,1000000]]}',
  base64: 'asdasd=',
  signature: 'qasdasd'
}

But the PolicyDocument interface is:

export interface PolicyDocument {
    expiration: string;
    conditions: Array<Array<string | number>>;
    string: string;
}

reichjustin avatar Nov 22 '19 01:11 reichjustin