New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bodidata/events

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bodidata/events - npm Package Compare versions

Comparing version 1.10.0 to 1.14.0

build/Ethnicity.js

84

build/scanner.js

@@ -6,3 +6,3 @@ 'use strict';

});
exports.Events$Scanner$UserUpdated = exports.Events$Scanner$UserCreated = undefined;
exports.Events$Account$ClientOrganizationActivated = exports.Events$Account$ClientOrganizationDeactivated = exports.Events$Account$ClientOrganizationNameChanged = exports.Events$Account$ClientOrganizationCreated = exports.Events$Scanner$LicenseeUpdated = exports.Events$Scanner$LicenseeCreated = exports.Events$Scanner$PasswordChangedEmailDelivered = exports.Events$Scanner$PasswordChangedEmailFailed = exports.Events$Scanner$PasswordChangedEmailQueued = exports.Events$Scanner$PasswordResetEmailDelivered = exports.Events$Scanner$PasswordResetEmailFailed = exports.Events$Scanner$PasswordResetEmailQueued = exports.Events$Scanner$AccountVerificationEmailDelivered = exports.Events$Scanner$AccountVerificationEmailFailed = exports.Events$Scanner$AccountVerificationEmailQueued = exports.Events$Scanner$Delivered = exports.Events$Scanner$EmailFailed = exports.Events$Scanner$EmailQueued = exports.Events$Scanner$UserUpdated = exports.Events$Scanner$UserCreated = exports.UserProfileUpdate = exports.UserProfileCreate = undefined;

@@ -15,10 +15,82 @@ var _flowRuntime = require('flow-runtime');

const UserProfile = _flowRuntime2.default.type('UserProfile', _flowRuntime2.default.object(_flowRuntime2.default.property('id', _flowRuntime2.default.string()), _flowRuntime2.default.property('email', _flowRuntime2.default.string()), _flowRuntime2.default.property('password', _flowRuntime2.default.string()), _flowRuntime2.default.property('fullname', _flowRuntime2.default.string()), _flowRuntime2.default.property('role', _flowRuntime2.default.union(_flowRuntime2.default.string('owner'), _flowRuntime2.default.string('admin'), _flowRuntime2.default.string('operator'))), _flowRuntime2.default.property('verified', _flowRuntime2.default.boolean()), _flowRuntime2.default.property('deleted', _flowRuntime2.default.boolean(), true), _flowRuntime2.default.property('created_at', _flowRuntime2.default.number(), true), _flowRuntime2.default.property('updated_at', _flowRuntime2.default.number(), true), _flowRuntime2.default.property('deleted_at', _flowRuntime2.default.number(), true)));
const DefaultMeta = _flowRuntime2.default.type('DefaultMeta', _flowRuntime2.default.object(_flowRuntime2.default.property('occurredAt', _flowRuntime2.default.number()), _flowRuntime2.default.property('clientVersion', _flowRuntime2.default.string()), _flowRuntime2.default.property('client', _flowRuntime2.default.string())));
const UserProfileUpdate = _flowRuntime2.default.type('UserProfileUpdate', _flowRuntime2.default.object(_flowRuntime2.default.property('id', _flowRuntime2.default.string()), _flowRuntime2.default.property('email', _flowRuntime2.default.string(), true), _flowRuntime2.default.property('password', _flowRuntime2.default.string(), true), _flowRuntime2.default.property('fullname', _flowRuntime2.default.string(), true), _flowRuntime2.default.property('role', _flowRuntime2.default.union(_flowRuntime2.default.string('owner'), _flowRuntime2.default.string('admin'), _flowRuntime2.default.string('operator')), true), _flowRuntime2.default.property('verified', _flowRuntime2.default.boolean(), true), _flowRuntime2.default.property('deleted', _flowRuntime2.default.boolean(), true), _flowRuntime2.default.property('created_at', _flowRuntime2.default.number(), true), _flowRuntime2.default.property('updated_at', _flowRuntime2.default.number(), true), _flowRuntime2.default.property('deleted_at', _flowRuntime2.default.number(), true)));
const SimpleStringID = _flowRuntime2.default.type('SimpleStringID', _flowRuntime2.default.object(_flowRuntime2.default.property('id', _flowRuntime2.default.string())));
const DefaultMeta = _flowRuntime2.default.type('DefaultMeta', _flowRuntime2.default.object(_flowRuntime2.default.property('occurredAt', _flowRuntime2.default.number()), _flowRuntime2.default.property('clientVersion', _flowRuntime2.default.string()), _flowRuntime2.default.property('client', _flowRuntime2.default.string())));
const Timestamps = _flowRuntime2.default.type('Timestamps', _flowRuntime2.default.object(_flowRuntime2.default.property('created_at', _flowRuntime2.default.number(), true), _flowRuntime2.default.property('updated_at', _flowRuntime2.default.number(), true), _flowRuntime2.default.property('deleted_at', _flowRuntime2.default.number(), true)));
const Events$Scanner$UserCreated = exports.Events$Scanner$UserCreated = _flowRuntime2.default.type('Events$Scanner$UserCreated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('SCANNER:USER_CREATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', UserProfile), _flowRuntime2.default.property('company_id', _flowRuntime2.default.string()))), _flowRuntime2.default.property('meta', DefaultMeta)));
const Updaters = _flowRuntime2.default.type('Updaters', _flowRuntime2.default.object(_flowRuntime2.default.property('created_by', _flowRuntime2.default.string(), true), _flowRuntime2.default.property('updated_by', _flowRuntime2.default.string(), true), _flowRuntime2.default.property('deleted_by', _flowRuntime2.default.string(), true)));
const Events$Scanner$UserUpdated = exports.Events$Scanner$UserUpdated = _flowRuntime2.default.type('Events$Scanner$UserUpdated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('SCANNER:USER_UPDATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', UserProfileUpdate))), _flowRuntime2.default.property('meta', DefaultMeta)));
const UserProfile = _flowRuntime2.default.type('UserProfile', _flowRuntime2.default.object(_flowRuntime2.default.property('email', _flowRuntime2.default.string()), _flowRuntime2.default.property('password', _flowRuntime2.default.string()), _flowRuntime2.default.property('fullname', _flowRuntime2.default.string()), _flowRuntime2.default.property('isVerified', _flowRuntime2.default.boolean()), _flowRuntime2.default.property('role', _flowRuntime2.default.union(_flowRuntime2.default.string('bodidata_admin'), _flowRuntime2.default.string('owner'), _flowRuntime2.default.string('admin'), _flowRuntime2.default.string('operator'))), _flowRuntime2.default.property('deleted', _flowRuntime2.default.boolean(), true)));
const UserTokens = _flowRuntime2.default.type('UserTokens', _flowRuntime2.default.object(_flowRuntime2.default.property('verifyToken', _flowRuntime2.default.nullable(_flowRuntime2.default.string()), true), _flowRuntime2.default.property('verifyShortToken', _flowRuntime2.default.nullable(_flowRuntime2.default.string()), true), _flowRuntime2.default.property('verifyExpires', _flowRuntime2.default.any(), true), _flowRuntime2.default.property('verifyChanges', _flowRuntime2.default.any(), true), _flowRuntime2.default.property('resetToken', _flowRuntime2.default.nullable(_flowRuntime2.default.string()), true), _flowRuntime2.default.property('resetShortToken', _flowRuntime2.default.nullable(_flowRuntime2.default.string()), true), _flowRuntime2.default.property('resetExpires', _flowRuntime2.default.any(), true)));
const UserProfileCreate = exports.UserProfileCreate = _flowRuntime2.default.type('UserProfileCreate', _flowRuntime2.default.intersection(SimpleStringID, Timestamps, Updaters, UserProfile, UserTokens));
const UserProfileUpdate = exports.UserProfileUpdate = _flowRuntime2.default.type('UserProfileUpdate', _flowRuntime2.default.intersection(SimpleStringID, Timestamps, Updaters, _flowRuntime2.default.$shape(UserProfile), _flowRuntime2.default.$shape(UserTokens)));
// users
const Events$Scanner$UserCreated = exports.Events$Scanner$UserCreated = _flowRuntime2.default.type('Events$Scanner$UserCreated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('SCANNER:USER_CREATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', UserProfileCreate), _flowRuntime2.default.property('licensee_id', _flowRuntime2.default.string()))), _flowRuntime2.default.property('meta', DefaultMeta)));
const Events$Scanner$UserUpdated = exports.Events$Scanner$UserUpdated = _flowRuntime2.default.type('Events$Scanner$UserUpdated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('SCANNER:USER_UPDATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', UserProfileUpdate))), _flowRuntime2.default.property('meta', DefaultMeta)));
// emails
const Events$Scanner$EmailQueued = exports.Events$Scanner$EmailQueued = _flowRuntime2.default.type('Events$Scanner$EmailQueued', Events$Scanner$EmailQueued => {
const T = Events$Scanner$EmailQueued.typeParameter('T');
return _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', T), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', UserProfileUpdate))), _flowRuntime2.default.property('meta', DefaultMeta));
});
const Events$Scanner$EmailFailed = exports.Events$Scanner$EmailFailed = _flowRuntime2.default.type('Events$Scanner$EmailFailed', Events$Scanner$EmailFailed => {
const T = Events$Scanner$EmailFailed.typeParameter('T');
return _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', T), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', UserProfileUpdate), _flowRuntime2.default.property('error', _flowRuntime2.default.object(_flowRuntime2.default.property('code', _flowRuntime2.default.number(), true), _flowRuntime2.default.property('message', _flowRuntime2.default.string()))))), _flowRuntime2.default.property('meta', DefaultMeta));
});
const Events$Scanner$Delivered = exports.Events$Scanner$Delivered = _flowRuntime2.default.type('Events$Scanner$Delivered', Events$Scanner$Delivered => {
const T = Events$Scanner$Delivered.typeParameter('T');
return _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', T), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', UserProfileUpdate), _flowRuntime2.default.property('maildata', _flowRuntime2.default.object(_flowRuntime2.default.property('messageId', _flowRuntime2.default.string()))))), _flowRuntime2.default.property('meta', DefaultMeta));
});
// email: account verification
const Events$Scanner$AccountVerificationEmailQueued = exports.Events$Scanner$AccountVerificationEmailQueued = _flowRuntime2.default.type('Events$Scanner$AccountVerificationEmailQueued', _flowRuntime2.default.ref(Events$Scanner$EmailQueued, _flowRuntime2.default.string('SCANNER:ACCOUNT_VERIFICATION_EMAIL_QUEUED')));
const Events$Scanner$AccountVerificationEmailFailed = exports.Events$Scanner$AccountVerificationEmailFailed = _flowRuntime2.default.type('Events$Scanner$AccountVerificationEmailFailed', _flowRuntime2.default.ref(Events$Scanner$EmailQueued, _flowRuntime2.default.string('SCANNER:ACCOUNT_VERIFICATION_EMAIL_FAILED')));
const Events$Scanner$AccountVerificationEmailDelivered = exports.Events$Scanner$AccountVerificationEmailDelivered = _flowRuntime2.default.type('Events$Scanner$AccountVerificationEmailDelivered', _flowRuntime2.default.ref(Events$Scanner$EmailQueued, _flowRuntime2.default.string('SCANNER:ACCOUNT_VERIFICATION_EMAIL_DELIVERED')));
// email: password reset
const Events$Scanner$PasswordResetEmailQueued = exports.Events$Scanner$PasswordResetEmailQueued = _flowRuntime2.default.type('Events$Scanner$PasswordResetEmailQueued', _flowRuntime2.default.ref(Events$Scanner$EmailQueued, _flowRuntime2.default.string('SCANNER:PASSWORD_RESET_EMAIL_QUEUED')));
const Events$Scanner$PasswordResetEmailFailed = exports.Events$Scanner$PasswordResetEmailFailed = _flowRuntime2.default.type('Events$Scanner$PasswordResetEmailFailed', _flowRuntime2.default.ref(Events$Scanner$EmailQueued, _flowRuntime2.default.string('SCANNER:PASSWORD_RESET_EMAIL_FAILED')));
const Events$Scanner$PasswordResetEmailDelivered = exports.Events$Scanner$PasswordResetEmailDelivered = _flowRuntime2.default.type('Events$Scanner$PasswordResetEmailDelivered', _flowRuntime2.default.ref(Events$Scanner$EmailQueued, _flowRuntime2.default.string('SCANNER:PASSWORD_RESET_EMAIL_DELIVERED')));
// email: password changed
const Events$Scanner$PasswordChangedEmailQueued = exports.Events$Scanner$PasswordChangedEmailQueued = _flowRuntime2.default.type('Events$Scanner$PasswordChangedEmailQueued', _flowRuntime2.default.ref(Events$Scanner$EmailQueued, _flowRuntime2.default.string('SCANNER:PASSWORD_CHANGED_EMAIL_QUEUED')));
const Events$Scanner$PasswordChangedEmailFailed = exports.Events$Scanner$PasswordChangedEmailFailed = _flowRuntime2.default.type('Events$Scanner$PasswordChangedEmailFailed', _flowRuntime2.default.ref(Events$Scanner$EmailQueued, _flowRuntime2.default.string('SCANNER:PASSWORD_CHANGED_EMAIL_FAILED')));
const Events$Scanner$PasswordChangedEmailDelivered = exports.Events$Scanner$PasswordChangedEmailDelivered = _flowRuntime2.default.type('Events$Scanner$PasswordChangedEmailDelivered', _flowRuntime2.default.ref(Events$Scanner$EmailQueued, _flowRuntime2.default.string('SCANNER:PASSWORD_CHANGED_EMAIL_DELIVERED')));
// licensee
const LicenseeProfile = _flowRuntime2.default.type('LicenseeProfile', _flowRuntime2.default.object(_flowRuntime2.default.property('name', _flowRuntime2.default.string()), _flowRuntime2.default.property('deleted', _flowRuntime2.default.boolean(), true)));
const Events$Scanner$LicenseeCreated = exports.Events$Scanner$LicenseeCreated = _flowRuntime2.default.type('Events$Scanner$LicenseeCreated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('SCANNER:LICENSEE_CREATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.intersection(SimpleStringID, Timestamps, Updaters, LicenseeProfile)), _flowRuntime2.default.property('meta', DefaultMeta)));
const Events$Scanner$LicenseeUpdated = exports.Events$Scanner$LicenseeUpdated = _flowRuntime2.default.type('Events$Scanner$LicenseeUpdated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('SCANNER:LICENSEE_UPDATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.intersection(SimpleStringID, Timestamps, Updaters, LicenseeProfile)), _flowRuntime2.default.property('meta', DefaultMeta)));
const Events$Account$ClientOrganizationCreated = exports.Events$Account$ClientOrganizationCreated = _flowRuntime2.default.type('Events$Account$ClientOrganizationCreated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('ACCOUNT:CLIENT_ORGANIZATION_CREATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.intersection(SimpleStringID, Updaters, _flowRuntime2.default.object(_flowRuntime2.default.property('licensee_id', _flowRuntime2.default.string()), _flowRuntime2.default.property('name', _flowRuntime2.default.string()), _flowRuntime2.default.property('activated', _flowRuntime2.default.boolean())))), _flowRuntime2.default.property('meta', DefaultMeta)));
const Events$Account$ClientOrganizationNameChanged = exports.Events$Account$ClientOrganizationNameChanged = _flowRuntime2.default.type('Events$Account$ClientOrganizationNameChanged', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('ACCOUNT:CLIENT_ORGANIZATION_NAME_CHANGED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.intersection(SimpleStringID, Updaters, _flowRuntime2.default.object(_flowRuntime2.default.property('name', _flowRuntime2.default.string())))), _flowRuntime2.default.property('meta', DefaultMeta)));
const Events$Account$ClientOrganizationDeactivated = exports.Events$Account$ClientOrganizationDeactivated = _flowRuntime2.default.type('Events$Account$ClientOrganizationDeactivated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('ACCOUNT:CLIENT_ORGANIZATION_DEACTIVATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.intersection(SimpleStringID, Updaters)), _flowRuntime2.default.property('meta', DefaultMeta)));
const Events$Account$ClientOrganizationActivated = exports.Events$Account$ClientOrganizationActivated = _flowRuntime2.default.type('Events$Account$ClientOrganizationActivated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('ACCOUNT:CLIENT_ORGANIZATION_ACTIVATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.intersection(SimpleStringID, Updaters)), _flowRuntime2.default.property('meta', DefaultMeta)));

@@ -6,4 +6,8 @@ 'use strict';

});
exports.Events$Uniform$CompanyRegistered = exports.CompanyRegisterPayload = undefined;
exports.Events$Uniform$EmployeeMeasurementsChanged = exports.Events$Uniform$EmployeeProfileChanged = exports.Events$Uniform$EmployeeCreated = exports.Events$Uniform$CompanyRegistered = exports.CompanyRegisterPayload = undefined;
var _Ethnicity2 = require('./Ethnicity');
var _Measurements2 = require('./Measurements');
var _flowRuntime = require('flow-runtime');

@@ -15,2 +19,6 @@

const Measurements = _flowRuntime2.default.tdz(() => _Measurements2.Measurements);
const Ethnicity = _flowRuntime2.default.tdz(() => _Ethnicity2.Ethnicity);
const CompanyRegisterPayload = exports.CompanyRegisterPayload = _flowRuntime2.default.type('CompanyRegisterPayload', _flowRuntime2.default.object(_flowRuntime2.default.property('id', _flowRuntime2.default.string()), _flowRuntime2.default.property('name', _flowRuntime2.default.string()), _flowRuntime2.default.property('user', _flowRuntime2.default.object(_flowRuntime2.default.property('id', _flowRuntime2.default.string()), _flowRuntime2.default.property('email', _flowRuntime2.default.string()), _flowRuntime2.default.property('password', _flowRuntime2.default.string()), _flowRuntime2.default.property('fullname', _flowRuntime2.default.string(), true))), _flowRuntime2.default.property('created_at', _flowRuntime2.default.number(), true), _flowRuntime2.default.property('updated_at', _flowRuntime2.default.number(), true)));

@@ -20,2 +28,12 @@

const Events$Uniform$CompanyRegistered = exports.Events$Uniform$CompanyRegistered = _flowRuntime2.default.type('Events$Uniform$CompanyRegistered', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('UNIFORM:COMPANY_REGISTERED')), _flowRuntime2.default.property('payload', CompanyRegisterPayload), _flowRuntime2.default.property('meta', DefaultMeta)));
const Events$Uniform$CompanyRegistered = exports.Events$Uniform$CompanyRegistered = _flowRuntime2.default.type('Events$Uniform$CompanyRegistered', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('UNIFORM:COMPANY_REGISTERED')), _flowRuntime2.default.property('payload', CompanyRegisterPayload), _flowRuntime2.default.property('meta', DefaultMeta)));
const Model$EmployeeProfile = _flowRuntime2.default.type('Model$EmployeeProfile', _flowRuntime2.default.object(_flowRuntime2.default.property('first_name', _flowRuntime2.default.string()), _flowRuntime2.default.property('last_name', _flowRuntime2.default.string()), _flowRuntime2.default.property('birth_year', _flowRuntime2.default.number()), _flowRuntime2.default.property('email', _flowRuntime2.default.string()), _flowRuntime2.default.property('ethnicity', _flowRuntime2.default.ref(Ethnicity), true)));
const Model$EmployeeEmployment = _flowRuntime2.default.type('Model$EmployeeEmployment', _flowRuntime2.default.object(_flowRuntime2.default.property('organization_id', _flowRuntime2.default.string()), _flowRuntime2.default.property('licensee_id', _flowRuntime2.default.string()), _flowRuntime2.default.property('employee_id', _flowRuntime2.default.string())));
const Events$Uniform$EmployeeCreated = exports.Events$Uniform$EmployeeCreated = _flowRuntime2.default.type('Events$Uniform$EmployeeCreated', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('UNIFORM:EMPLOYEE_CREATED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', _flowRuntime2.default.intersection(_flowRuntime2.default.object(_flowRuntime2.default.property('id', _flowRuntime2.default.string())), Model$EmployeeProfile)), _flowRuntime2.default.property('employment', Model$EmployeeEmployment), _flowRuntime2.default.property('measurements', _flowRuntime2.default.ref(Measurements)))), _flowRuntime2.default.property('meta', DefaultMeta)));
const Events$Uniform$EmployeeProfileChanged = exports.Events$Uniform$EmployeeProfileChanged = _flowRuntime2.default.type('Events$Uniform$EmployeeProfileChanged', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('UNIFORM:EMPLOYEE_PROFILE_CHANGED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', _flowRuntime2.default.intersection(_flowRuntime2.default.object(_flowRuntime2.default.property('id', _flowRuntime2.default.string())), _flowRuntime2.default.$shape(Model$EmployeeProfile))))), _flowRuntime2.default.property('meta', DefaultMeta)));
const Events$Uniform$EmployeeMeasurementsChanged = exports.Events$Uniform$EmployeeMeasurementsChanged = _flowRuntime2.default.type('Events$Uniform$EmployeeMeasurementsChanged', _flowRuntime2.default.exactObject(_flowRuntime2.default.property('id', _flowRuntime2.default.number()), _flowRuntime2.default.property('type', _flowRuntime2.default.string('UNIFORM:EMPLOYEE_MEASUREMENTS_CHANGED')), _flowRuntime2.default.property('payload', _flowRuntime2.default.object(_flowRuntime2.default.property('profile', _flowRuntime2.default.object(_flowRuntime2.default.property('id', _flowRuntime2.default.string()))), _flowRuntime2.default.property('measurements', _flowRuntime2.default.ref(Measurements)))), _flowRuntime2.default.property('meta', DefaultMeta)));

@@ -6,2 +6,25 @@ # Change Log

<a name="1.14.0"></a>
# [1.14.0](https://github.com/bodidatainc/bodidata/compare/v1.13.0...v1.14.0) (2017-11-08)
### Bug Fixes
* email command types don't match their values ([9a362c0](https://github.com/bodidatainc/bodidata/commit/9a362c0))
* type definition for Uniform.Employee events ([55c682c](https://github.com/bodidatainc/bodidata/commit/55c682c))
### Features
* add basic support for role `bodidata_admin` ([aa570a8](https://github.com/bodidatainc/bodidata/commit/aa570a8))
* add email verification ([559bf9d](https://github.com/bodidatainc/bodidata/commit/559bf9d))
* add event definition for Uniform.Employee ([36d1b93](https://github.com/bodidatainc/bodidata/commit/36d1b93))
* basic e2e email feature ([b92c86c](https://github.com/bodidatainc/bodidata/commit/b92c86c))
* declare events for Account.ClientOrganization ([c486ba4](https://github.com/bodidatainc/bodidata/commit/c486ba4))
* implement reset password process ([9a8705c](https://github.com/bodidatainc/bodidata/commit/9a8705c))
* send verification mail after password changed ([35d5590](https://github.com/bodidatainc/bodidata/commit/35d5590))
<a name="1.10.0"></a>

@@ -8,0 +31,0 @@ # [1.10.0](https://github.com/bodidatainc/bodidata/compare/v1.8.1...v1.10.0) (2017-10-24)

2

package.json
{
"name": "@bodidata/events",
"version": "1.10.0",
"version": "1.14.0",
"description": "strongly typed events dictionary",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -1,9 +0,12 @@

type UserProfile = {
type DefaultMeta = {
occurredAt: number,
clientVersion: string,
client: string,
};
type SimpleStringID = {
id: string,
email: string,
password: string,
fullname: string,
role: 'owner' | 'admin' | 'operator',
verified: boolean,
deleted?: boolean,
};
type Timestamps = {
created_at?: number,

@@ -14,21 +17,40 @@ updated_at?: number,

type UserProfileUpdate = {
id: string,
email?: string,
password?: string,
fullname?: string,
role?: 'owner' | 'admin' | 'operator',
verified?: boolean,
type Updaters = {
created_by?: string,
updated_by?: string,
deleted_by?: string,
};
type UserProfile = {
email: string,
password: string,
fullname: string,
isVerified: boolean,
role: 'bodidata_admin' | 'owner' | 'admin' | 'operator',
deleted?: boolean,
created_at?: number,
updated_at?: number,
deleted_at?: number,
};
type DefaultMeta = {
occurredAt: number,
clientVersion: string,
client: string,
type UserTokens = {
verifyToken?: ?string,
verifyShortToken?: ?string,
verifyExpires?: any,
verifyChanges?: any,
resetToken?: ?string,
resetShortToken?: ?string,
resetExpires?: any,
};
export type UserProfileCreate = SimpleStringID &
Timestamps &
Updaters &
UserProfile &
UserTokens;
export type UserProfileUpdate = SimpleStringID &
Timestamps &
Updaters &
$Shape<UserProfile> &
$Shape<UserTokens>;
// users
export type Events$Scanner$UserCreated = {|

@@ -38,4 +60,4 @@ id: number,

payload: {
profile: UserProfile,
company_id: string,
profile: UserProfileCreate,
licensee_id: string,
},

@@ -53,1 +75,135 @@ meta: DefaultMeta,

|};
// emails
export type Events$Scanner$EmailQueued<T> = {|
id: number,
type: T,
payload: {
profile: UserProfileUpdate,
},
meta: DefaultMeta,
|};
export type Events$Scanner$EmailFailed<T> = {|
id: number,
type: T,
payload: {
profile: UserProfileUpdate,
error: {
code?: number,
message: string,
},
},
meta: DefaultMeta,
|};
export type Events$Scanner$Delivered<T> = {|
id: number,
type: T,
payload: {
profile: UserProfileUpdate,
// https://nodemailer.com/usage/
maildata: {
messageId: string,
},
},
meta: DefaultMeta,
|};
// email: account verification
export type Events$Scanner$AccountVerificationEmailQueued = Events$Scanner$EmailQueued<
'SCANNER:ACCOUNT_VERIFICATION_EMAIL_QUEUED'
>;
export type Events$Scanner$AccountVerificationEmailFailed = Events$Scanner$EmailQueued<
'SCANNER:ACCOUNT_VERIFICATION_EMAIL_FAILED'
>;
export type Events$Scanner$AccountVerificationEmailDelivered = Events$Scanner$EmailQueued<
'SCANNER:ACCOUNT_VERIFICATION_EMAIL_DELIVERED'
>;
// email: password reset
export type Events$Scanner$PasswordResetEmailQueued = Events$Scanner$EmailQueued<
'SCANNER:PASSWORD_RESET_EMAIL_QUEUED'
>;
export type Events$Scanner$PasswordResetEmailFailed = Events$Scanner$EmailQueued<
'SCANNER:PASSWORD_RESET_EMAIL_FAILED'
>;
export type Events$Scanner$PasswordResetEmailDelivered = Events$Scanner$EmailQueued<
'SCANNER:PASSWORD_RESET_EMAIL_DELIVERED'
>;
// email: password changed
export type Events$Scanner$PasswordChangedEmailQueued = Events$Scanner$EmailQueued<
'SCANNER:PASSWORD_CHANGED_EMAIL_QUEUED'
>;
export type Events$Scanner$PasswordChangedEmailFailed = Events$Scanner$EmailQueued<
'SCANNER:PASSWORD_CHANGED_EMAIL_FAILED'
>;
export type Events$Scanner$PasswordChangedEmailDelivered = Events$Scanner$EmailQueued<
'SCANNER:PASSWORD_CHANGED_EMAIL_DELIVERED'
>;
// licensee
type LicenseeProfile = {
name: string,
deleted?: boolean,
};
export type Events$Scanner$LicenseeCreated = {|
id: number,
type: 'SCANNER:LICENSEE_CREATED',
payload: SimpleStringID & Timestamps & Updaters & LicenseeProfile,
meta: DefaultMeta,
|};
export type Events$Scanner$LicenseeUpdated = {|
id: number,
type: 'SCANNER:LICENSEE_UPDATED',
payload: SimpleStringID & Timestamps & Updaters & LicenseeProfile,
meta: DefaultMeta,
|};
export type Events$Account$ClientOrganizationCreated = {|
id: number,
type: 'ACCOUNT:CLIENT_ORGANIZATION_CREATED',
payload: SimpleStringID &
Updaters & {
licensee_id: string,
name: string,
activated: boolean,
},
meta: DefaultMeta,
|};
export type Events$Account$ClientOrganizationNameChanged = {|
id: number,
type: 'ACCOUNT:CLIENT_ORGANIZATION_NAME_CHANGED',
payload: SimpleStringID &
Updaters & {
name: string,
},
meta: DefaultMeta,
|};
export type Events$Account$ClientOrganizationDeactivated = {|
id: number,
type: 'ACCOUNT:CLIENT_ORGANIZATION_DEACTIVATED',
payload: SimpleStringID & Updaters,
meta: DefaultMeta,
|};
export type Events$Account$ClientOrganizationActivated = {|
id: number,
type: 'ACCOUNT:CLIENT_ORGANIZATION_ACTIVATED',
payload: SimpleStringID & Updaters,
meta: DefaultMeta,
|};

@@ -0,1 +1,5 @@

/* @flow */
import type { Ethnicity } from './Ethnicity';
import type { Measurements } from './Measurements';
export type CompanyRegisterPayload = {

@@ -26,1 +30,45 @@ id: string,

|};
type Model$EmployeeProfile = {
first_name: string,
last_name: string,
birth_year: number,
email: string,
ethnicity?: Ethnicity,
};
type Model$EmployeeEmployment = {
organization_id: string,
licensee_id: string,
employee_id: string,
};
export type Events$Uniform$EmployeeCreated = {|
id: number,
type: 'UNIFORM:EMPLOYEE_CREATED',
payload: {
profile: { id: string } & Model$EmployeeProfile,
employment: Model$EmployeeEmployment,
measurements: Measurements,
},
meta: DefaultMeta,
|};
export type Events$Uniform$EmployeeProfileChanged = {|
id: number,
type: 'UNIFORM:EMPLOYEE_PROFILE_CHANGED',
payload: {
profile: { id: string } & $Shape<Model$EmployeeProfile>,
},
meta: DefaultMeta,
|};
export type Events$Uniform$EmployeeMeasurementsChanged = {|
id: number,
type: 'UNIFORM:EMPLOYEE_MEASUREMENTS_CHANGED',
payload: {
profile: { id: string },
measurements: Measurements,
},
meta: DefaultMeta,
|};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc