Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Shared Kafka/gRPC contracts and common enums between MonadIAM services",
"author": "Daniil Egorov (https://github.com/Lambdius)",
"license": "UNLICENSED",
"version": "3.1.0",
"version": "3.1.1",
"types": "dist/index.d.ts",
"main": "dist/index.js",
"exports": {
Expand Down
52 changes: 52 additions & 0 deletions src/datasets/demo/notification/channel.dataset.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,56 @@
const dataset = [
{
id: "00000011-0000-4000-8000-100000000001",
recipient_id: "00000010-0000-4000-8000-100000000001",
type: "IN_APP",
address: null,
source_identifier: null,
sound_enabled: true,
is_verified: true,
verified_at: new Date("2026-01-01T00:00:00.000Z"),
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
{
id: "00000011-0000-4000-8000-100000000002",
recipient_id: "00000010-0000-4000-8000-100000000001",
type: "EMAIL",
address: "admin@example.com",
source_identifier: "00000001-0000-4000-8000-100000000001",
sound_enabled: null,
is_verified: true,
verified_at: new Date("2026-01-01T00:00:00.000Z"),
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
{
id: "00000011-0000-4000-8000-100000000003",
recipient_id: "00000010-0000-4000-8000-100000000002",
type: "IN_APP",
address: null,
source_identifier: null,
sound_enabled: true,
is_verified: true,
verified_at: new Date("2026-01-01T00:00:00.000Z"),
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
{
id: "00000011-0000-4000-8000-100000000004",
recipient_id: "00000010-0000-4000-8000-100000000002",
type: "EMAIL",
address: "user@example.com",
source_identifier: "00000001-0000-4000-8000-100000000002",
sound_enabled: null,
is_verified: true,
verified_at: new Date("2026-01-01T00:00:00.000Z"),
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
// E001 - Nathaniel Brooks
{
id: "c696c642-9dd6-59f6-8f8a-a16feca26ee5",
Expand Down
60 changes: 60 additions & 0 deletions src/datasets/demo/notification/preference.dataset.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,66 @@
import { NotificationCategory } from "../../../enums";

const dataset = [
{
id: "00000012-0000-4000-8000-100000000001",
recipient_id: "00000010-0000-4000-8000-100000000001",
channel_type: "EMAIL",
category: NotificationCategory.INVITES,
is_duplication_enabled: false,
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000002",
recipient_id: "00000010-0000-4000-8000-100000000001",
channel_type: "EMAIL",
category: NotificationCategory.SYSTEM,
is_duplication_enabled: false,
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000003",
recipient_id: "00000010-0000-4000-8000-100000000001",
channel_type: "EMAIL",
category: NotificationCategory.OTHER,
is_duplication_enabled: false,
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000004",
recipient_id: "00000010-0000-4000-8000-100000000002",
channel_type: "EMAIL",
category: NotificationCategory.INVITES,
is_duplication_enabled: false,
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000005",
recipient_id: "00000010-0000-4000-8000-100000000002",
channel_type: "EMAIL",
category: NotificationCategory.SYSTEM,
is_duplication_enabled: false,
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000006",
recipient_id: "00000010-0000-4000-8000-100000000002",
channel_type: "EMAIL",
category: NotificationCategory.OTHER,
is_duplication_enabled: false,
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
// E001 - Nathaniel Brooks / IN_APP / SECURITY
{
id: "fb30ac88-bf96-5e90-b38f-7062ed2b0923",
Expand Down
20 changes: 20 additions & 0 deletions src/datasets/demo/notification/recipient.dataset.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
const dataset = [
{
id: "00000010-0000-4000-8000-100000000001",
account: "00000000-0000-4000-8000-000000000001",
locale: "en",
timezone: "UTC",
default_otp_channel_id: null,
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
{
id: "00000010-0000-4000-8000-100000000002",
account: "00000000-0000-4000-8000-100000000002",
locale: "en",
timezone: "UTC",
default_otp_channel_id: null,
created_at: new Date("2026-01-01T00:00:00.000Z"),
updated_at: null,
version: 1,
},
// E001 - Nathaniel Brooks
{
id: "064df7bb-184a-5971-a758-d1c11d8d2545",
Expand Down
57 changes: 56 additions & 1 deletion src/datasets/system/notification/channel.dataset.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,59 @@
const dataset: never[] = [];
const CREATED_AT = new Date("2026-01-01T00:00:00.000Z");

const dataset = [
{
id: "00000011-0000-4000-8000-100000000001",
recipient_id: "00000010-0000-4000-8000-100000000001",
type: "IN_APP",
address: null,
source_identifier: null,
sound_enabled: true,
is_verified: true,
verified_at: CREATED_AT,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
{
id: "00000011-0000-4000-8000-100000000002",
recipient_id: "00000010-0000-4000-8000-100000000001",
type: "EMAIL",
address: "admin@example.com",
source_identifier: "00000001-0000-4000-8000-100000000001",
sound_enabled: null,
is_verified: true,
verified_at: CREATED_AT,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
{
id: "00000011-0000-4000-8000-100000000003",
recipient_id: "00000010-0000-4000-8000-100000000002",
type: "IN_APP",
address: null,
source_identifier: null,
sound_enabled: true,
is_verified: true,
verified_at: CREATED_AT,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
{
id: "00000011-0000-4000-8000-100000000004",
recipient_id: "00000010-0000-4000-8000-100000000002",
type: "EMAIL",
address: "user@example.com",
source_identifier: "00000001-0000-4000-8000-100000000002",
sound_enabled: null,
is_verified: true,
verified_at: CREATED_AT,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
];

export const Channels = {
name: "channel",
Expand Down
67 changes: 66 additions & 1 deletion src/datasets/system/notification/preference.dataset.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,69 @@
const dataset: never[] = [];
import { NotificationCategory } from "../../../enums";

const CREATED_AT = new Date("2026-01-01T00:00:00.000Z");

const dataset = [
{
id: "00000012-0000-4000-8000-100000000001",
recipient_id: "00000010-0000-4000-8000-100000000001",
channel_type: "EMAIL",
category: NotificationCategory.INVITES,
is_duplication_enabled: false,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000002",
recipient_id: "00000010-0000-4000-8000-100000000001",
channel_type: "EMAIL",
category: NotificationCategory.SYSTEM,
is_duplication_enabled: false,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000003",
recipient_id: "00000010-0000-4000-8000-100000000001",
channel_type: "EMAIL",
category: NotificationCategory.OTHER,
is_duplication_enabled: false,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000004",
recipient_id: "00000010-0000-4000-8000-100000000002",
channel_type: "EMAIL",
category: NotificationCategory.INVITES,
is_duplication_enabled: false,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000005",
recipient_id: "00000010-0000-4000-8000-100000000002",
channel_type: "EMAIL",
category: NotificationCategory.SYSTEM,
is_duplication_enabled: false,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
{
id: "00000012-0000-4000-8000-100000000006",
recipient_id: "00000010-0000-4000-8000-100000000002",
channel_type: "EMAIL",
category: NotificationCategory.OTHER,
is_duplication_enabled: false,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
];

export const Preferences = {
name: "preference",
Expand Down
27 changes: 26 additions & 1 deletion src/datasets/system/notification/recipient.dataset.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
const dataset: never[] = [];
import { ADMIN_ACCOUNT_ID, USER_ACCOUNT_ID } from "../../../constants";

const CREATED_AT = new Date("2026-01-01T00:00:00.000Z");

const dataset = [
{
id: "00000010-0000-4000-8000-100000000001",
account: ADMIN_ACCOUNT_ID,
locale: "en",
timezone: "UTC",
default_otp_channel_id: null,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
{
id: "00000010-0000-4000-8000-100000000002",
account: USER_ACCOUNT_ID,
locale: "en",
timezone: "UTC",
default_otp_channel_id: null,
created_at: CREATED_AT,
updated_at: null,
version: 1,
},
];

export const Recipients = {
name: "recipient",
Expand Down
Loading