Skip to content

v0.4.9

Compare
Choose a tag to compare
@ucatbas ucatbas released this 05 Aug 13:17
· 32 commits to main since this release

Release Notes

  • SDK Generation: SDKs are now generated using the official buf gRPC Node generator.

  • Unified Data Access: All data is accessable through the grpc.payload, grpc.base, or simply grpc properties.

  • Configuration Update: This version requires updating your configuration to include the buf registry in your npm settings. Make sure to add the necessary entries to your npm configuration to leverage the new SDKs.

  • Object-Based Data Handling: Dictionary-typed data bodies are transitioned from sending to requiring objects to be created and set.

In versions earlier than v0.4.6, writing a schema could be done using the client.schema.write function with a dictionary option:

client.schema.write({
    tenantId: "t1",
    schema: `
    entity user {}
    
    entity document {
       relation viewer @user
       
       action view = viewer
    }
    `
});

With this release, writing a schema now involves creating and setting the appropriate request objects:

let schema = `
    entity user {}
    
    entity document {
       relation viewer @user
       
       action view = viewer
    }
`;
let schemaWriteRequest = new permify.grpc.payload.SchemaWriteRequest();
schemaWriteRequest.setTenantId("t1");
schemaWriteRequest.setSchema(schema);

client.schema.write(schemaWriteRequest);

This pattern will be applied to all similar functions, where dictionary-typed data bodies are transitioned to requiring objects to be created and set. Please make sure to migrate your code accordingly.