0.3.0 • Published 3 years ago

firebase-callable-builder v0.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Features

  • Ajv validation with JTD schema
  • Type safety
  • Region selection
  • Flexible settings copy
  • Guards

Usage example

FunctionsBuilder.init({
    defaultRegions: ['europe-west3'],
    schemas: {registerUserSchema},
    guards: [AuthGuard()],
});

const registerUserSchema = {
    properties: {
        name: {type: 'string'},
        email: {type: 'string'},
        password: {type: 'string'},
        phone: {type: 'string'},
    },
} as const;

export const registerUser = FunctionsBuilder.instance
    .buildCallable<JTDDataType<typeof registerUserSchema>>(
        async (data) => {
            // ...
        }, 'registerUserSchema');
0.3.0

3 years ago

0.1.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago