diff --git a/.eslintrc.js b/.eslintrc.js index 5183594db..788e42ce4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { extends: ['airbnb-typescript/base', 'plugin:prettier/recommended'], plugins: ['prettier', 'jest', 'import'], diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 30e32d1f5..b91a9ee6a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + version: 2 updates: - package-ecosystem: "npm" diff --git a/.github/workflows/check-license-header.yml b/.github/workflows/check-license-header.yml new file mode 100644 index 000000000..29a52d430 --- /dev/null +++ b/.github/workflows/check-license-header.yml @@ -0,0 +1,27 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + +name: Check License Header + +on: [push] + +jobs: + license-header: + runs-on: ubuntu-latest + steps: + - name: Checkout Branch + uses: actions/checkout@v2 + + - name: Validate License Headers + run: npm run license:check diff --git a/.github/workflows/hrm-ci.yml b/.github/workflows/hrm-ci.yml index 7eb82672b..b062f5e7e 100644 --- a/.github/workflows/hrm-ci.yml +++ b/.github/workflows/hrm-ci.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + name: hrm-ci on: [push] @@ -19,6 +33,7 @@ jobs: - name: Run Lint run: npm run lint --if-present + test: runs-on: ubuntu-latest diff --git a/.github/workflows/hrm-ecs-ci-multiregion.yml b/.github/workflows/hrm-ecs-ci-multiregion.yml index bf6be7595..7a493f124 100644 --- a/.github/workflows/hrm-ecs-ci-multiregion.yml +++ b/.github/workflows/hrm-ecs-ci-multiregion.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + # This workflow will build and push a new container image to Amazon ECR, # and then will deploy a new task definition to Amazon ECS, when a release is created # diff --git a/.github/workflows/hrm-ecs-reload.yml b/.github/workflows/hrm-ecs-reload.yml index f5629431b..2336c4189 100644 --- a/.github/workflows/hrm-ecs-reload.yml +++ b/.github/workflows/hrm-ecs-reload.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + name: 'Reload HRM configuration via forced update' on: workflow_dispatch: diff --git a/.github/workflows/hrm-lambda-release.yml b/.github/workflows/hrm-lambda-release.yml index 661dc4a99..b121b1e43 100644 --- a/.github/workflows/hrm-lambda-release.yml +++ b/.github/workflows/hrm-lambda-release.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + name: 'Deploy HRM Lambda' on: workflow_dispatch: diff --git a/.github/workflows/hrm-production-release.yml b/.github/workflows/hrm-production-release.yml index 00d0e09ef..c13f3caac 100644 --- a/.github/workflows/hrm-production-release.yml +++ b/.github/workflows/hrm-production-release.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + # Workflow to create a new production release from a given qa tag name: Create a production release diff --git a/.github/workflows/hrm-qa-release.yml b/.github/workflows/hrm-qa-release.yml index 534d38e7f..95b4a1931 100644 --- a/.github/workflows/hrm-qa-release.yml +++ b/.github/workflows/hrm-qa-release.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + # Workflow to create a new pre-release with qa suffix name: "Create a QA candidate release" # Controls when the action will run. diff --git a/cdk/cdkOutput.ts b/cdk/cdkOutput.ts index 21151200b..caf56a6fe 100644 --- a/cdk/cdkOutput.ts +++ b/cdk/cdkOutput.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import cdkOutput from './outputs.json'; export const getStackOutput = (id: string) => { diff --git a/cdk/contact-complete-stack.ts b/cdk/contact-complete-stack.ts index cff618ac6..c2c381632 100644 --- a/cdk/contact-complete-stack.ts +++ b/cdk/contact-complete-stack.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /* eslint-disable no-new */ import * as cdk from '@aws-cdk/core'; import * as lambda from '@aws-cdk/aws-lambda'; diff --git a/cdk/contact-core-stack.ts b/cdk/contact-core-stack.ts index eb70028f3..316ea1544 100644 --- a/cdk/contact-core-stack.ts +++ b/cdk/contact-core-stack.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /* eslint-disable no-new */ import * as cdk from '@aws-cdk/core'; import * as s3 from '@aws-cdk/aws-s3'; diff --git a/cdk/contact-retrieve-stack.ts b/cdk/contact-retrieve-stack.ts index 15a9a0a78..d439939c1 100644 --- a/cdk/contact-retrieve-stack.ts +++ b/cdk/contact-retrieve-stack.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /* eslint-disable no-new */ import * as cdk from '@aws-cdk/core'; import * as iam from '@aws-cdk/aws-iam'; diff --git a/cdk/init-stack.ts b/cdk/init-stack.ts index 6a0a1fb09..da3954403 100644 --- a/cdk/init-stack.ts +++ b/cdk/init-stack.ts @@ -1,4 +1,20 @@ #!/usr/bin/env node +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /* eslint-disable no-new */ import * as cdk from '@aws-cdk/core'; import * as dotenv from 'dotenv'; diff --git a/docker-compose.yml b/docker-compose.yml index b0f2d7e4e..4a8d66cf6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + version: '3' services: localstack: diff --git a/hrm-service/Dockerfile b/hrm-service/Dockerfile index 97c1352da..7efa604ac 100644 --- a/hrm-service/Dockerfile +++ b/hrm-service/Dockerfile @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + FROM node:16-alpine as build # This is a bit complicated by the need for access to the package. diff --git a/hrm-service/db-migrate.js b/hrm-service/db-migrate.js index 77a46778f..2cef86a37 100644 --- a/hrm-service/db-migrate.js +++ b/hrm-service/db-migrate.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // eslint-disable-next-line global-require,import/no-extraneous-dependencies const { Umzug, SequelizeStorage } = require('umzug'); const pathLib = require('path'); diff --git a/hrm-service/docker-compose-test.yml b/hrm-service/docker-compose-test.yml index b73db4f9e..c6e63e8df 100644 --- a/hrm-service/docker-compose-test.yml +++ b/hrm-service/docker-compose-test.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + services: db: build: diff --git a/hrm-service/docker-compose.yml b/hrm-service/docker-compose.yml index b66261fb9..68a261b86 100644 --- a/hrm-service/docker-compose.yml +++ b/hrm-service/docker-compose.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + version: '3' services: job-processor: diff --git a/hrm-service/docker-database/Dockerfile b/hrm-service/docker-database/Dockerfile index 136fcb50b..a537672ff 100644 --- a/hrm-service/docker-database/Dockerfile +++ b/hrm-service/docker-database/Dockerfile @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + FROM library/postgres:12.10 ENV POSTGRES_USER=rdsadmin ENV POSTGRES_HOST_AUTH_METHOD=trust diff --git a/hrm-service/docker-database/docker-compose-persistent.yml b/hrm-service/docker-database/docker-compose-persistent.yml index f5044a9a2..acbe71605 100644 --- a/hrm-service/docker-database/docker-compose-persistent.yml +++ b/hrm-service/docker-database/docker-compose-persistent.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + services: db: build: . diff --git a/hrm-service/docker-database/docker-compose.yml b/hrm-service/docker-database/docker-compose.yml index 2f2e5d85b..ef1b467ae 100644 --- a/hrm-service/docker-database/docker-compose.yml +++ b/hrm-service/docker-database/docker-compose.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + services: db: build: . diff --git a/hrm-service/docker-database/hrmdb.sql b/hrm-service/docker-database/hrmdb.sql index fdf089fae..6181e7fb6 100644 --- a/hrm-service/docker-database/hrmdb.sql +++ b/hrm-service/docker-database/hrmdb.sql @@ -1,3 +1,17 @@ +-- Copyright (C) 2021-2023 Technology Matters +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as published +-- by the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see https://www.gnu.org/licenses/. + -- -- PostgreSQL database dump -- diff --git a/hrm-service/jest.config.js b/hrm-service/jest.config.js index f390d6ac5..29aa62682 100644 --- a/hrm-service/jest.config.js +++ b/hrm-service/jest.config.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = config => { return ( config || { diff --git a/hrm-service/migrations/20200101000000-first_version.js b/hrm-service/migrations/20200101000000-first_version.js index 6f01a9976..f846e360d 100644 --- a/hrm-service/migrations/20200101000000-first_version.js +++ b/hrm-service/migrations/20200101000000-first_version.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: async queryInterface => { await queryInterface.sequelize.transaction(async transaction => { diff --git a/hrm-service/migrations/20200304175210-contact-add-columns.js b/hrm-service/migrations/20200304175210-contact-add-columns.js index 370c565c1..8617fd84c 100644 --- a/hrm-service/migrations/20200304175210-contact-add-columns.js +++ b/hrm-service/migrations/20200304175210-contact-add-columns.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => Promise.all([ diff --git a/hrm-service/migrations/20200310140432-contact-add-conversationDuration.js b/hrm-service/migrations/20200310140432-contact-add-conversationDuration.js index 2df59ce15..7ce1d8d03 100644 --- a/hrm-service/migrations/20200310140432-contact-add-conversationDuration.js +++ b/hrm-service/migrations/20200310140432-contact-add-conversationDuration.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => queryInterface.addColumn('Contacts', 'conversationDuration', Sequelize.INTEGER), diff --git a/hrm-service/migrations/20200427210632-create-case.js b/hrm-service/migrations/20200427210632-create-case.js index 0ff0b6e5a..ef7fd5184 100644 --- a/hrm-service/migrations/20200427210632-create-case.js +++ b/hrm-service/migrations/20200427210632-create-case.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.createTable('Cases', { diff --git a/hrm-service/migrations/20200428160048-case-has-many-contacts.js b/hrm-service/migrations/20200428160048-case-has-many-contacts.js index cbef775a4..ae0d9c65a 100644 --- a/hrm-service/migrations/20200428160048-case-has-many-contacts.js +++ b/hrm-service/migrations/20200428160048-case-has-many-contacts.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.addColumn('Contacts', 'caseId', { diff --git a/hrm-service/migrations/20200506172048-remove-agebracket-subcategory-timestamp-reservationid.js b/hrm-service/migrations/20200506172048-remove-agebracket-subcategory-timestamp-reservationid.js index 7c3784d42..40c423f0c 100644 --- a/hrm-service/migrations/20200506172048-remove-agebracket-subcategory-timestamp-reservationid.js +++ b/hrm-service/migrations/20200506172048-remove-agebracket-subcategory-timestamp-reservationid.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: queryInterface => queryInterface.sequelize.transaction(transaction => diff --git a/hrm-service/migrations/20200507212012-create-case-audit.js b/hrm-service/migrations/20200507212012-create-case-audit.js index d5532f207..5b0ceaaac 100644 --- a/hrm-service/migrations/20200507212012-create-case-audit.js +++ b/hrm-service/migrations/20200507212012-create-case-audit.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.createTable('CaseAudits', { diff --git a/hrm-service/migrations/20200507212342-case-add-column-workerid.js b/hrm-service/migrations/20200507212342-case-add-column-workerid.js index a8080ec2e..e3788267d 100644 --- a/hrm-service/migrations/20200507212342-case-add-column-workerid.js +++ b/hrm-service/migrations/20200507212342-case-add-column-workerid.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.addColumn('Cases', 'twilioWorkerId', { type: Sequelize.STRING }); diff --git a/hrm-service/migrations/20200707174416-contact-remove-taskId.js b/hrm-service/migrations/20200707174416-contact-remove-taskId.js index 24584c0c6..cd11aa3d0 100644 --- a/hrm-service/migrations/20200707174416-contact-remove-taskId.js +++ b/hrm-service/migrations/20200707174416-contact-remove-taskId.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: queryInterface => queryInterface.removeColumn('Contacts', 'taskId'), diff --git a/hrm-service/migrations/20201111150719-all-add-accountSid.js b/hrm-service/migrations/20201111150719-all-add-accountSid.js index ab7aad8a6..9b5ceb6d1 100644 --- a/hrm-service/migrations/20201111150719-all-add-accountSid.js +++ b/hrm-service/migrations/20201111150719-all-add-accountSid.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { // Return a promise to correctly handle asynchronicity, using queryInterface.sequelize.transaction so that all operations would be executed successfully or none of the changes would be made. up: (queryInterface, Sequelize) => { diff --git a/hrm-service/migrations/20201124131224-timeOfContact.js b/hrm-service/migrations/20201124131224-timeOfContact.js index 7a9e88356..3ef2b5df0 100644 --- a/hrm-service/migrations/20201124131224-timeOfContact.js +++ b/hrm-service/migrations/20201124131224-timeOfContact.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.addColumn('Contacts', 'timeOfContact', { type: Sequelize.DATE }); diff --git a/hrm-service/migrations/20210118174350-add-taskId.js b/hrm-service/migrations/20210118174350-add-taskId.js index b1348d8c9..ba7ac9bba 100644 --- a/hrm-service/migrations/20210118174350-add-taskId.js +++ b/hrm-service/migrations/20210118174350-add-taskId.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.addColumn('Contacts', 'taskId', { type: Sequelize.STRING }); diff --git a/hrm-service/migrations/20210312163330-add-createdBy.js b/hrm-service/migrations/20210312163330-add-createdBy.js index c6fde3a74..27224f92d 100644 --- a/hrm-service/migrations/20210312163330-add-createdBy.js +++ b/hrm-service/migrations/20210312163330-add-createdBy.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { // Return a promise to correctly handle asynchronicity, using queryInterface.sequelize.transaction so that all operations would be executed successfully or none of the changes would be made. up: (queryInterface, Sequelize) => { diff --git a/hrm-service/migrations/20210630164641-add-channelsid-servicesid.js b/hrm-service/migrations/20210630164641-add-channelsid-servicesid.js index 41d3ad55b..c6e26096d 100644 --- a/hrm-service/migrations/20210630164641-add-channelsid-servicesid.js +++ b/hrm-service/migrations/20210630164641-add-channelsid-servicesid.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.sequelize.transaction(t => { diff --git a/hrm-service/migrations/20210826214305-create-postSurvey.js b/hrm-service/migrations/20210826214305-create-postSurvey.js index c214d9ccf..da9239b00 100644 --- a/hrm-service/migrations/20210826214305-create-postSurvey.js +++ b/hrm-service/migrations/20210826214305-create-postSurvey.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.createTable('PostSurveys', { diff --git a/hrm-service/migrations/20211122172057-create-CSAMReport.js b/hrm-service/migrations/20211122172057-create-CSAMReport.js index 5a563a003..fb008fe60 100644 --- a/hrm-service/migrations/20211122172057-create-CSAMReport.js +++ b/hrm-service/migrations/20211122172057-create-CSAMReport.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.createTable('CSAMReports', { diff --git a/hrm-service/migrations/20220301134500-migrate-notes-to-counsellor-notes.js b/hrm-service/migrations/20220301134500-migrate-notes-to-counsellor-notes.js index febf1bcc4..9368153c2 100644 --- a/hrm-service/migrations/20220301134500-migrate-notes-to-counsellor-notes.js +++ b/hrm-service/migrations/20220301134500-migrate-notes-to-counsellor-notes.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: async queryInterface => { await queryInterface.sequelize.query(`UPDATE "Cases" AS casesToUpdate diff --git a/hrm-service/migrations/20220324154600-create-CaseSections.js b/hrm-service/migrations/20220324154600-create-CaseSections.js index b79cd9c44..a1535db4a 100644 --- a/hrm-service/migrations/20220324154600-create-CaseSections.js +++ b/hrm-service/migrations/20220324154600-create-CaseSections.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: async queryInterface => { await queryInterface.sequelize.query( diff --git a/hrm-service/migrations/20220415151254-add-updatedBy.js b/hrm-service/migrations/20220415151254-add-updatedBy.js index d41e5b073..ef76a3244 100644 --- a/hrm-service/migrations/20220415151254-add-updatedBy.js +++ b/hrm-service/migrations/20220415151254-add-updatedBy.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + 'use strict'; module.exports = { diff --git a/hrm-service/migrations/20220415170355-create-Audits.js b/hrm-service/migrations/20220415170355-create-Audits.js index 0f9feffe5..fe84b9764 100644 --- a/hrm-service/migrations/20220415170355-create-Audits.js +++ b/hrm-service/migrations/20220415170355-create-Audits.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + 'use strict'; module.exports = { diff --git a/hrm-service/migrations/20220427154028-alter-tables-accountSid-PK.js b/hrm-service/migrations/20220427154028-alter-tables-accountSid-PK.js index cb78d37b0..731a0b4e2 100644 --- a/hrm-service/migrations/20220427154028-alter-tables-accountSid-PK.js +++ b/hrm-service/migrations/20220427154028-alter-tables-accountSid-PK.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + 'use strict'; module.exports = { diff --git a/hrm-service/migrations/20220429173823-create-indexes.js b/hrm-service/migrations/20220429173823-create-indexes.js index d1aa38b52..79c46a30e 100644 --- a/hrm-service/migrations/20220429173823-create-indexes.js +++ b/hrm-service/migrations/20220429173823-create-indexes.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + 'use strict'; module.exports = { diff --git a/hrm-service/migrations/20220701174400-contact-jobs.js b/hrm-service/migrations/20220701174400-contact-jobs.js index 683c7afe2..218129b44 100644 --- a/hrm-service/migrations/20220701174400-contact-jobs.js +++ b/hrm-service/migrations/20220701174400-contact-jobs.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: async queryInterface => { await queryInterface.sequelize.query(` diff --git a/hrm-service/migrations/20221122154821-alter-table-CSAMReport-self-generated.js b/hrm-service/migrations/20221122154821-alter-table-CSAMReport-self-generated.js index 0ff917f92..2ffe96834 100644 --- a/hrm-service/migrations/20221122154821-alter-table-CSAMReport-self-generated.js +++ b/hrm-service/migrations/20221122154821-alter-table-CSAMReport-self-generated.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + 'use strict'; /** @type {import('sequelize-cli').Migration} */ diff --git a/hrm-service/migrations/20230106122325-add-contact-jobs-failures.js b/hrm-service/migrations/20230106122325-add-contact-jobs-failures.js index f8a4d90b1..8d081213e 100644 --- a/hrm-service/migrations/20230106122325-add-contact-jobs-failures.js +++ b/hrm-service/migrations/20230106122325-add-contact-jobs-failures.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + 'use strict'; /** @type {import('sequelize-cli').Migration} */ diff --git a/hrm-service/package.json b/hrm-service/package.json index fa5923d39..d11071814 100644 --- a/hrm-service/package.json +++ b/hrm-service/package.json @@ -33,7 +33,7 @@ "url": "git+https://github.com/tech-matters/hrm.git" }, "author": "", - "license": "ISC", + "license": "AGPL", "bugs": { "url": "https://github.com/tech-matters/hrm/issues" }, diff --git a/hrm-service/seeders/20190813224457-age-brackets-populate.js b/hrm-service/seeders/20190813224457-age-brackets-populate.js index 3f6489835..f4c42ad22 100644 --- a/hrm-service/seeders/20190813224457-age-brackets-populate.js +++ b/hrm-service/seeders/20190813224457-age-brackets-populate.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: queryInterface => queryInterface.bulkInsert( diff --git a/hrm-service/seeders/20190814001815-subcategories-for-first-two-themes.js b/hrm-service/seeders/20190814001815-subcategories-for-first-two-themes.js index f502d40e3..ecc6408b8 100644 --- a/hrm-service/seeders/20190814001815-subcategories-for-first-two-themes.js +++ b/hrm-service/seeders/20190814001815-subcategories-for-first-two-themes.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: queryInterface => queryInterface.bulkInsert( diff --git a/hrm-service/service-tests/case-search.test.ts b/hrm-service/service-tests/case-search.test.ts index 3ded00a2c..f9b3fa9b0 100644 --- a/hrm-service/service-tests/case-search.test.ts +++ b/hrm-service/service-tests/case-search.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /* eslint-disable jest/no-standalone-expect,no-await-in-loop */ import { add, addDays } from 'date-fns'; import each from 'jest-each'; diff --git a/hrm-service/service-tests/case-validation.ts b/hrm-service/service-tests/case-validation.ts index b8b3c658f..9c1794412 100644 --- a/hrm-service/service-tests/case-validation.ts +++ b/hrm-service/service-tests/case-validation.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { WELL_KNOWN_CASE_SECTION_NAMES } from '../src/case/case'; import { NewContactRecord } from '../src/contact/sql/contact-insert-sql'; import { CreateContactPayloadWithFormProperty } from '../src/contact/contact'; diff --git a/hrm-service/service-tests/case.permissions.test.ts b/hrm-service/service-tests/case.permissions.test.ts index 77cedabe4..f69365c6e 100644 --- a/hrm-service/service-tests/case.permissions.test.ts +++ b/hrm-service/service-tests/case.permissions.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /* eslint-disable jest/no-standalone-expect,no-await-in-loop */ import each from 'jest-each'; diff --git a/hrm-service/service-tests/case.test.ts b/hrm-service/service-tests/case.test.ts index 1cbfebda1..c2738e79b 100644 --- a/hrm-service/service-tests/case.test.ts +++ b/hrm-service/service-tests/case.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /* eslint-disable jest/no-standalone-expect,no-await-in-loop */ import each from 'jest-each'; diff --git a/hrm-service/service-tests/contact-job/contact-job-data-access.test.ts b/hrm-service/service-tests/contact-job/contact-job-data-access.test.ts index dc93c3db9..33a54a596 100644 --- a/hrm-service/service-tests/contact-job/contact-job-data-access.test.ts +++ b/hrm-service/service-tests/contact-job/contact-job-data-access.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { performance } from 'perf_hooks'; import { db } from '../../src/connection-pool'; diff --git a/hrm-service/service-tests/contact-job/contact-job-processor.test.ts b/hrm-service/service-tests/contact-job/contact-job-processor.test.ts index 301944a55..6ae4fa0c2 100644 --- a/hrm-service/service-tests/contact-job/contact-job-processor.test.ts +++ b/hrm-service/service-tests/contact-job/contact-job-processor.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import supertest from 'supertest'; import timers from 'timers'; diff --git a/hrm-service/service-tests/contact-job/jobTypes/retrieve-transcript.test.ts b/hrm-service/service-tests/contact-job/jobTypes/retrieve-transcript.test.ts index d3a1d5a4a..280d660a2 100644 --- a/hrm-service/service-tests/contact-job/jobTypes/retrieve-transcript.test.ts +++ b/hrm-service/service-tests/contact-job/jobTypes/retrieve-transcript.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import each from 'jest-each'; import { isAfter } from 'date-fns'; import timers from 'timers'; diff --git a/hrm-service/service-tests/contact-job/mocks.ts b/hrm-service/service-tests/contact-job/mocks.ts index d0da0bbfb..1f0e9328a 100644 --- a/hrm-service/service-tests/contact-job/mocks.ts +++ b/hrm-service/service-tests/contact-job/mocks.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + jest.mock('@tech-matters/hrm-ssm-cache'); jest.mock('aws-sdk', () => { diff --git a/hrm-service/service-tests/contacts.test.ts b/hrm-service/service-tests/contacts.test.ts index 679e8d256..36f49dcc3 100644 --- a/hrm-service/service-tests/contacts.test.ts +++ b/hrm-service/service-tests/contacts.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import each from 'jest-each'; import { subHours, subDays } from 'date-fns'; diff --git a/hrm-service/service-tests/csam-reports.test.ts b/hrm-service/service-tests/csam-reports.test.ts index 330b2e0e9..f66c2e14e 100644 --- a/hrm-service/service-tests/csam-reports.test.ts +++ b/hrm-service/service-tests/csam-reports.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import each from 'jest-each'; import * as mocks from './mocks'; import './case-validation'; diff --git a/hrm-service/service-tests/db-init/dump.sql b/hrm-service/service-tests/db-init/dump.sql index 47387cae8..cf85d19e4 100644 --- a/hrm-service/service-tests/db-init/dump.sql +++ b/hrm-service/service-tests/db-init/dump.sql @@ -1,3 +1,17 @@ +-- Copyright (C) 2021-2023 Technology Matters +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as published +-- by the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see https://www.gnu.org/licenses/. + -- -- PostgreSQL database dump -- diff --git a/hrm-service/service-tests/db-tests/audit_trigger.test.ts b/hrm-service/service-tests/db-tests/audit_trigger.test.ts index 05179cb39..5064ca6fb 100644 --- a/hrm-service/service-tests/db-tests/audit_trigger.test.ts +++ b/hrm-service/service-tests/db-tests/audit_trigger.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /** * This test suit intends to test that the audit_trigger function is set for the target tables and row operations and working as expected. * The shape of the json columns of each table have been simplified to avoid noise in this tests. diff --git a/hrm-service/service-tests/mocks.ts b/hrm-service/service-tests/mocks.ts index 441559d7b..042230130 100644 --- a/hrm-service/service-tests/mocks.ts +++ b/hrm-service/service-tests/mocks.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { Case } from '../src/case/case'; import { channelTypes } from '../src/contact/channelTypes'; import { ContactMediaType, CreateContactPayloadWithFormProperty } from '../src/contact/contact'; diff --git a/hrm-service/service-tests/permissions-overrides.ts b/hrm-service/service-tests/permissions-overrides.ts index fbbae24ac..d56576733 100644 --- a/hrm-service/service-tests/permissions-overrides.ts +++ b/hrm-service/service-tests/permissions-overrides.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + const openRules = require('../permission-rules/open.json'); import { RulesFile } from '../src/permissions/rulesMap'; diff --git a/hrm-service/service-tests/permissions.test.ts b/hrm-service/service-tests/permissions.test.ts index 97b3a56fc..17e8cd456 100644 --- a/hrm-service/service-tests/permissions.test.ts +++ b/hrm-service/service-tests/permissions.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import each from 'jest-each'; import { rulesMap } from '../src/permissions'; import { mockingProxy, mockSuccessfulTwilioAuthentication } from '@tech-matters/testing'; diff --git a/hrm-service/service-tests/post-surveys.test.ts b/hrm-service/service-tests/post-surveys.test.ts index c7e10c6f5..1133c9b0b 100644 --- a/hrm-service/service-tests/post-surveys.test.ts +++ b/hrm-service/service-tests/post-surveys.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { mockingProxy, mockSuccessfulTwilioAuthentication } from '@tech-matters/testing'; import * as mocks from './mocks'; import { db } from '../src/connection-pool'; diff --git a/hrm-service/service-tests/safe-router.test.ts b/hrm-service/service-tests/safe-router.test.ts index 7f24e5435..29e0037dc 100644 --- a/hrm-service/service-tests/safe-router.test.ts +++ b/hrm-service/service-tests/safe-router.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { SafeRouter as MockSafeRouter, publicEndpoint as mockPublicEndpoint, diff --git a/hrm-service/service-tests/server.ts b/hrm-service/service-tests/server.ts index 5a89c881a..0bee2470a 100644 --- a/hrm-service/service-tests/server.ts +++ b/hrm-service/service-tests/server.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // eslint-disable-next-line import/no-extraneous-dependencies import supertest from 'supertest'; diff --git a/hrm-service/setTestEnvVars.js b/hrm-service/setTestEnvVars.js index 2548e8503..aab17be40 100644 --- a/hrm-service/setTestEnvVars.js +++ b/hrm-service/setTestEnvVars.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + process.env.PERMISSIONS_br = 'br'; process.env.PERMISSIONS_ca = 'ca'; process.env.PERMISSIONS_cl = 'cl'; diff --git a/hrm-service/sql/initial-dump.sql b/hrm-service/sql/initial-dump.sql index 70ed237ff..14d58fd53 100644 --- a/hrm-service/sql/initial-dump.sql +++ b/hrm-service/sql/initial-dump.sql @@ -1,3 +1,17 @@ +-- Copyright (C) 2021-2023 Technology Matters +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as published +-- by the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see https://www.gnu.org/licenses/. + -- -- PostgreSQL database dump -- diff --git a/hrm-service/sql/multi-tenant-sample-data.sql b/hrm-service/sql/multi-tenant-sample-data.sql index 4d6d95a46..46e71cdfb 100644 --- a/hrm-service/sql/multi-tenant-sample-data.sql +++ b/hrm-service/sql/multi-tenant-sample-data.sql @@ -1,3 +1,17 @@ +-- Copyright (C) 2021-2023 Technology Matters +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as published +-- by the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see https://www.gnu.org/licenses/. + -- Dump of contacts data that conforms to the revised multi-tenant database structure. Works as of 2021-12-06 INSERT INTO public."Contacts" ("createdAt","updatedAt","rawJson","queueName","twilioWorkerId",helpline,"number",channel,"conversationDuration","caseId","accountSid","timeOfContact","taskId","createdBy","channelSid","serviceSid") VALUES diff --git a/hrm-service/sql/zm-data-pull.sql b/hrm-service/sql/zm-data-pull.sql index 19df2e84a..be4c94fd1 100644 --- a/hrm-service/sql/zm-data-pull.sql +++ b/hrm-service/sql/zm-data-pull.sql @@ -1,3 +1,17 @@ +-- Copyright (C) 2021-2023 Technology Matters +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as published +-- by the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see https://www.gnu.org/licenses/. + SELECT "createdAt", "twilioWorkerId" as counselor, -- TODO: print counselor name in the future diff --git a/hrm-service/src/app.ts b/hrm-service/src/app.ts index 4877d3617..d9a94381f 100644 --- a/hrm-service/src/app.ts +++ b/hrm-service/src/app.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import express, { Express } from 'express'; import 'express-async-errors'; diff --git a/hrm-service/src/async-handler.ts b/hrm-service/src/async-handler.ts index d2ccbbe1a..74480321a 100644 --- a/hrm-service/src/async-handler.ts +++ b/hrm-service/src/async-handler.ts @@ -1 +1,17 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export default fn => (req, res, next) => fn(req, res, next).catch(next); diff --git a/hrm-service/src/bin/jobProcessor.ts b/hrm-service/src/bin/jobProcessor.ts index 55df86b15..8db27aeb2 100644 --- a/hrm-service/src/bin/jobProcessor.ts +++ b/hrm-service/src/bin/jobProcessor.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { processContactJobs } from '../contact-job/contact-job-processor'; import { enableProcessContactJobsFlag } from '../featureFlags'; diff --git a/hrm-service/src/bin/www.ts b/hrm-service/src/bin/www.ts index d30e9a3a2..1ed794c91 100644 --- a/hrm-service/src/bin/www.ts +++ b/hrm-service/src/bin/www.ts @@ -1,4 +1,19 @@ #!/usr/bin/env node +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ import express from 'express'; diff --git a/hrm-service/src/case/case-data-access.ts b/hrm-service/src/case/case-data-access.ts index 2d38568f1..355badd7a 100644 --- a/hrm-service/src/case/case-data-access.ts +++ b/hrm-service/src/case/case-data-access.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { db, pgp } from '../connection-pool'; import { getPaginationElements } from '../search'; import { updateByIdSql } from './sql/case-update-sql'; diff --git a/hrm-service/src/case/case-routes-v0.ts b/hrm-service/src/case/case-routes-v0.ts index 90d8f110c..f115830cc 100644 --- a/hrm-service/src/case/case-routes-v0.ts +++ b/hrm-service/src/case/case-routes-v0.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import createError from 'http-errors'; import * as casesDb from './case-data-access'; import * as caseApi from './case'; diff --git a/hrm-service/src/case/case.ts b/hrm-service/src/case/case.ts index 913862426..8fed17515 100644 --- a/hrm-service/src/case/case.ts +++ b/hrm-service/src/case/case.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /** * This is the 'business logic' module for Case CRUD operations. * For the moment it just does some light mapping between the types used for the REST layer, and the types used for the database layer. diff --git a/hrm-service/src/case/sql/case-delete-sql.ts b/hrm-service/src/case/sql/case-delete-sql.ts index d49819936..e8a558074 100644 --- a/hrm-service/src/case/sql/case-delete-sql.ts +++ b/hrm-service/src/case/sql/case-delete-sql.ts @@ -1 +1,17 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export const DELETE_BY_ID = `DELETE FROM "Cases" WHERE "Cases"."accountSid" = $1 AND "Cases"."id" = $2 RETURNING *`; diff --git a/hrm-service/src/case/sql/case-get-sql.ts b/hrm-service/src/case/sql/case-get-sql.ts index 6fedfd65a..0b7eac893 100644 --- a/hrm-service/src/case/sql/case-get-sql.ts +++ b/hrm-service/src/case/sql/case-get-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { selectCoalesceCsamReportsByContactId } from '../../csam-report/sql/csam-report-get-sql'; const ID_WHERE_CLAUSE = `WHERE "cases"."accountSid" = $ AND "cases"."id" = $`; diff --git a/hrm-service/src/case/sql/case-search-sql.ts b/hrm-service/src/case/sql/case-search-sql.ts index d4efba632..604de41b8 100644 --- a/hrm-service/src/case/sql/case-search-sql.ts +++ b/hrm-service/src/case/sql/case-search-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { pgp } from '../../connection-pool'; import { SELECT_CASE_SECTIONS } from './case-sections-sql'; import { diff --git a/hrm-service/src/case/sql/case-sections-sql.ts b/hrm-service/src/case/sql/case-sections-sql.ts index d0697e771..aa9d49e9a 100644 --- a/hrm-service/src/case/sql/case-sections-sql.ts +++ b/hrm-service/src/case/sql/case-sections-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { pgp } from '../../connection-pool'; // eslint-disable-next-line prettier/prettier import { CaseSectionRecord } from '../case-data-access'; diff --git a/hrm-service/src/case/sql/case-update-sql.ts b/hrm-service/src/case/sql/case-update-sql.ts index 8b8396b9b..6ba655c60 100644 --- a/hrm-service/src/case/sql/case-update-sql.ts +++ b/hrm-service/src/case/sql/case-update-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { pgp } from '../../connection-pool'; import { selectSingleCaseByIdSql } from './case-get-sql'; diff --git a/hrm-service/src/config/db.ts b/hrm-service/src/config/db.ts index ffa715777..ea54a633a 100644 --- a/hrm-service/src/config/db.ts +++ b/hrm-service/src/config/db.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import env from 'dotenv'; env.config(); diff --git a/hrm-service/src/config/ssmCache.ts b/hrm-service/src/config/ssmCache.ts index 83ad79aee..04ec37c9b 100644 --- a/hrm-service/src/config/ssmCache.ts +++ b/hrm-service/src/config/ssmCache.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { loadSsmCache as loadSsmCacheRoot } from '@tech-matters/hrm-ssm-cache'; export { getSsmParameter, hasCacheExpired, ssmCache } from '@tech-matters/hrm-ssm-cache'; diff --git a/hrm-service/src/connection-pool.ts b/hrm-service/src/connection-pool.ts index fa779e69b..ff05857df 100644 --- a/hrm-service/src/connection-pool.ts +++ b/hrm-service/src/connection-pool.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import pgPromise from 'pg-promise'; import config from './config/db'; diff --git a/hrm-service/src/contact-job/assertExhaustive.ts b/hrm-service/src/contact-job/assertExhaustive.ts index a80eceb21..9699d01dc 100644 --- a/hrm-service/src/contact-job/assertExhaustive.ts +++ b/hrm-service/src/contact-job/assertExhaustive.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // Function to test that there are no unhandled cases in a switch statement export const assertExhaustive = (param: never) => { const exhaustiveCheck: never = param; diff --git a/hrm-service/src/contact-job/client-sqs.ts b/hrm-service/src/contact-job/client-sqs.ts index 3e1b069b3..145e3087b 100644 --- a/hrm-service/src/contact-job/client-sqs.ts +++ b/hrm-service/src/contact-job/client-sqs.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { SQS } from 'aws-sdk'; import { getSsmParameter } from '../config/ssmCache'; diff --git a/hrm-service/src/contact-job/contact-job-complete.ts b/hrm-service/src/contact-job/contact-job-complete.ts index 18320f6aa..ac58721bf 100644 --- a/hrm-service/src/contact-job/contact-job-complete.ts +++ b/hrm-service/src/contact-job/contact-job-complete.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { ContactJobType, completeContactJob, diff --git a/hrm-service/src/contact-job/contact-job-data-access.ts b/hrm-service/src/contact-job/contact-job-data-access.ts index 84ab91400..e9a6c1025 100644 --- a/hrm-service/src/contact-job/contact-job-data-access.ts +++ b/hrm-service/src/contact-job/contact-job-data-access.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { ITask } from 'pg-promise'; import { db, pgp } from '../connection-pool'; import { Contact } from '../contact/contact-data-access'; diff --git a/hrm-service/src/contact-job/contact-job-error.ts b/hrm-service/src/contact-job/contact-job-error.ts index 5cb930928..8864ad3eb 100644 --- a/hrm-service/src/contact-job/contact-job-error.ts +++ b/hrm-service/src/contact-job/contact-job-error.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export class ContactJobCompleteProcessorError extends Error { payload: any; diff --git a/hrm-service/src/contact-job/contact-job-processor.ts b/hrm-service/src/contact-job/contact-job-processor.ts index 949269333..ea873f2f2 100644 --- a/hrm-service/src/contact-job/contact-job-processor.ts +++ b/hrm-service/src/contact-job/contact-job-processor.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { setInterval } from 'timers'; import { subMilliseconds } from 'date-fns'; import { pullDueContactJobs } from './contact-job-data-access'; diff --git a/hrm-service/src/contact-job/contact-job-publish.ts b/hrm-service/src/contact-job/contact-job-publish.ts index 2fa932d23..3b23575e7 100644 --- a/hrm-service/src/contact-job/contact-job-publish.ts +++ b/hrm-service/src/contact-job/contact-job-publish.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { format } from 'date-fns'; import { ContactJob, RetrieveContactTranscriptJob } from './contact-job-data-access'; import { ContactJobPollerError } from './contact-job-error'; diff --git a/hrm-service/src/contact-job/contact-job.ts b/hrm-service/src/contact-job/contact-job.ts index e69de29bb..188493b6a 100644 --- a/hrm-service/src/contact-job/contact-job.ts +++ b/hrm-service/src/contact-job/contact-job.ts @@ -0,0 +1,15 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ diff --git a/hrm-service/src/contact-job/sql/contact-job-sql.ts b/hrm-service/src/contact-job/sql/contact-job-sql.ts index 59f866d35..6b7098619 100644 --- a/hrm-service/src/contact-job/sql/contact-job-sql.ts +++ b/hrm-service/src/contact-job/sql/contact-job-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { selectContactsWithCsamReports } from '../../contact/sql/contact-get-sql'; export const PULL_DUE_JOBS_SQL = ` diff --git a/hrm-service/src/contact/categories.ts b/hrm-service/src/contact/categories.ts index 9a5aac5d8..864157337 100644 --- a/hrm-service/src/contact/categories.ts +++ b/hrm-service/src/contact/categories.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /** * @param {string[]} accumulator * @param {[string, boolean]} currentValue diff --git a/hrm-service/src/contact/channelTypes.ts b/hrm-service/src/contact/channelTypes.ts index 0b82c5daf..0e0581ce8 100644 --- a/hrm-service/src/contact/channelTypes.ts +++ b/hrm-service/src/contact/channelTypes.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // This should be in sync with the fronted (src/states/DomainConstants.ts) export const channelTypes = { diff --git a/hrm-service/src/contact/contact-data-access.ts b/hrm-service/src/contact/contact-data-access.ts index 7e6d3920f..4cca12b06 100644 --- a/hrm-service/src/contact/contact-data-access.ts +++ b/hrm-service/src/contact/contact-data-access.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { db } from '../connection-pool'; import { enableCreateContactJobsFlag } from '../featureFlags'; import { diff --git a/hrm-service/src/contact/contact-json.ts b/hrm-service/src/contact/contact-json.ts index 3890aac12..fd4faafee 100644 --- a/hrm-service/src/contact/contact-json.ts +++ b/hrm-service/src/contact/contact-json.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + type NestedInformation = { name?: { firstName: string; lastName: string } }; export type PersonInformation = NestedInformation & { diff --git a/hrm-service/src/contact/contact-routes-v0.ts b/hrm-service/src/contact/contact-routes-v0.ts index 3b4c87fc4..1852e6bbc 100644 --- a/hrm-service/src/contact/contact-routes-v0.ts +++ b/hrm-service/src/contact/contact-routes-v0.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { SafeRouter, publicEndpoint, actionsMaps } from '../permissions'; import createError from 'http-errors'; import { patchContact, connectContactToCase, searchContacts, createContact, getContactById } from './contact'; diff --git a/hrm-service/src/contact/contact.ts b/hrm-service/src/contact/contact.ts index 688afe025..aa5da2152 100644 --- a/hrm-service/src/contact/contact.ts +++ b/hrm-service/src/contact/contact.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { connectToCase, Contact, diff --git a/hrm-service/src/contact/sql/contact-get-sql.ts b/hrm-service/src/contact/sql/contact-get-sql.ts index 4abdb9b6e..93ff64d4a 100644 --- a/hrm-service/src/contact/sql/contact-get-sql.ts +++ b/hrm-service/src/contact/sql/contact-get-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { selectCoalesceCsamReportsByContactId } from '../../csam-report/sql/csam-report-get-sql'; const ID_WHERE_CLAUSE = `WHERE c."accountSid" = $ AND c."id" = $`; diff --git a/hrm-service/src/contact/sql/contact-insert-sql.ts b/hrm-service/src/contact/sql/contact-insert-sql.ts index eb9a54ab9..feda86927 100644 --- a/hrm-service/src/contact/sql/contact-insert-sql.ts +++ b/hrm-service/src/contact/sql/contact-insert-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { pgp } from '../../connection-pool'; import { ContactRawJson } from '../contact-json'; diff --git a/hrm-service/src/contact/sql/contact-search-sql.ts b/hrm-service/src/contact/sql/contact-search-sql.ts index 2e8e89715..3d1171f30 100644 --- a/hrm-service/src/contact/sql/contact-search-sql.ts +++ b/hrm-service/src/contact/sql/contact-search-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { selectCoalesceCsamReportsByContactId } from '../../csam-report/sql/csam-report-get-sql'; export const SELECT_CONTACT_SEARCH = ` diff --git a/hrm-service/src/contact/sql/contact-update-sql.ts b/hrm-service/src/contact/sql/contact-update-sql.ts index fe1b738d3..dd79798b0 100644 --- a/hrm-service/src/contact/sql/contact-update-sql.ts +++ b/hrm-service/src/contact/sql/contact-update-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { selectSingleContactByIdSql } from './contact-get-sql'; const ID_WHERE_CLAUSE = `WHERE "accountSid" = $ AND "id"=$`; diff --git a/hrm-service/src/csam-report/csam-report-data-access.ts b/hrm-service/src/csam-report/csam-report-data-access.ts index 2f49baff0..5ebb11595 100644 --- a/hrm-service/src/csam-report/csam-report-data-access.ts +++ b/hrm-service/src/csam-report/csam-report-data-access.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { db } from '../connection-pool'; import { insertCSAMReportSql } from './sql/csam-report-insert-sql'; import { diff --git a/hrm-service/src/csam-report/csam-report-routes-v0.ts b/hrm-service/src/csam-report/csam-report-routes-v0.ts index b0f3629eb..568b16c87 100644 --- a/hrm-service/src/csam-report/csam-report-routes-v0.ts +++ b/hrm-service/src/csam-report/csam-report-routes-v0.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import createError from 'http-errors'; import { SafeRouter, publicEndpoint } from '../permissions'; import { acknowledgeCsamReport, createCSAMReport } from './csam-report'; diff --git a/hrm-service/src/csam-report/csam-report.ts b/hrm-service/src/csam-report/csam-report.ts index ccea3447f..341fbf229 100644 --- a/hrm-service/src/csam-report/csam-report.ts +++ b/hrm-service/src/csam-report/csam-report.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { randomUUID } from 'crypto'; import { NewCSAMReport, diff --git a/hrm-service/src/csam-report/sql/csam-report-get-sql.ts b/hrm-service/src/csam-report/sql/csam-report-get-sql.ts index 7d8f68349..72f59b6fd 100644 --- a/hrm-service/src/csam-report/sql/csam-report-get-sql.ts +++ b/hrm-service/src/csam-report/sql/csam-report-get-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + const ID_WHERE_CLAUSE = `WHERE r."accountSid" = $ AND r."id" = $`; const CONTACT_ID_WHERE_CLAUSE = `WHERE r."accountSid" = $ AND r."contactId" = $`; diff --git a/hrm-service/src/csam-report/sql/csam-report-insert-sql.ts b/hrm-service/src/csam-report/sql/csam-report-insert-sql.ts index 3f7af6b1a..462b00110 100644 --- a/hrm-service/src/csam-report/sql/csam-report-insert-sql.ts +++ b/hrm-service/src/csam-report/sql/csam-report-insert-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { pgp } from '../../connection-pool'; import { NewCSAMReport } from '../csam-report-data-access'; diff --git a/hrm-service/src/csam-report/sql/csam-report-update-sql.ts b/hrm-service/src/csam-report/sql/csam-report-update-sql.ts index d41a61f85..5437a3af7 100644 --- a/hrm-service/src/csam-report/sql/csam-report-update-sql.ts +++ b/hrm-service/src/csam-report/sql/csam-report-update-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + const ID_WHERE_CLAUSE = `WHERE "accountSid" = $ AND "id" = $`; const IN_IDS_WHERE_CLAUSE = `WHERE "accountSid" = $ AND "id" IN ($)`; diff --git a/hrm-service/src/featureFlags.ts b/hrm-service/src/featureFlags.ts index 983f2246b..66dd97936 100644 --- a/hrm-service/src/featureFlags.ts +++ b/hrm-service/src/featureFlags.ts @@ -1,2 +1,18 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export const enableCreateContactJobsFlag = /^true$/i.test(process.env.ENABLE_CREATE_CONTACT_JOBS); export const enableProcessContactJobsFlag = /^true$/i.test(process.env.ENABLE_PROCESS_CONTACT_JOBS); diff --git a/hrm-service/src/permissions/actions.ts b/hrm-service/src/permissions/actions.ts index effb00b9c..351b291fa 100644 --- a/hrm-service/src/permissions/actions.ts +++ b/hrm-service/src/permissions/actions.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { diff, Diff, DiffNew, DiffEdit, DiffArray } from 'deep-diff'; export const actionsMaps = { diff --git a/hrm-service/src/permissions/helpers.ts b/hrm-service/src/permissions/helpers.ts index c027c0440..fb66dc96c 100644 --- a/hrm-service/src/permissions/helpers.ts +++ b/hrm-service/src/permissions/helpers.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { TwilioUser } from '@tech-matters/twilio-worker-auth'; export const isCounselorWhoCreated = (user: TwilioUser, caseObj: any) => diff --git a/hrm-service/src/permissions/index.ts b/hrm-service/src/permissions/index.ts index 7c0f9a5ce..7b913bb63 100644 --- a/hrm-service/src/permissions/index.ts +++ b/hrm-service/src/permissions/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { SafeRouterRequest } from './safe-router'; export { SafeRouter, publicEndpoint } from './safe-router'; diff --git a/hrm-service/src/permissions/json-permissions.ts b/hrm-service/src/permissions/json-permissions.ts index 00e371183..551c03741 100644 --- a/hrm-service/src/permissions/json-permissions.ts +++ b/hrm-service/src/permissions/json-permissions.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { rulesMap } from './rulesMap'; import { Permissions } from './index'; diff --git a/hrm-service/src/permissions/permissions-routes-v0.ts b/hrm-service/src/permissions/permissions-routes-v0.ts index 794e046b4..8078d4dd6 100644 --- a/hrm-service/src/permissions/permissions-routes-v0.ts +++ b/hrm-service/src/permissions/permissions-routes-v0.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { SafeRouter, publicEndpoint, Permissions } from '../permissions'; // eslint-disable-next-line prettier/prettier import type { Request, Response } from 'express'; diff --git a/hrm-service/src/permissions/rulesMap.ts b/hrm-service/src/permissions/rulesMap.ts index 3d55b0afb..e508ea0e4 100644 --- a/hrm-service/src/permissions/rulesMap.ts +++ b/hrm-service/src/permissions/rulesMap.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + const openRules = require('../../permission-rules/open.json'); const demoRules = require('../../permission-rules/demo.json'); const devRules = require('../../permission-rules/dev.json'); diff --git a/hrm-service/src/permissions/safe-router.ts b/hrm-service/src/permissions/safe-router.ts index 78b2f42c1..d6a4e8031 100644 --- a/hrm-service/src/permissions/safe-router.ts +++ b/hrm-service/src/permissions/safe-router.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /** * SAFE ROUTER * This router ensures that an endpoint is only run if any middleware has authorized it previously. diff --git a/hrm-service/src/permissions/setupCanForRules.ts b/hrm-service/src/permissions/setupCanForRules.ts index a1b129f86..713fc7564 100644 --- a/hrm-service/src/permissions/setupCanForRules.ts +++ b/hrm-service/src/permissions/setupCanForRules.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { isCounselorWhoCreated, isCaseOpen, isContactOwner } from './helpers'; import { actionsMaps, Actions, isTargetKind } from './actions'; // eslint-disable-next-line prettier/prettier diff --git a/hrm-service/src/post-survey/post-survey-data-access.ts b/hrm-service/src/post-survey/post-survey-data-access.ts index 9b5d84b36..20977341d 100644 --- a/hrm-service/src/post-survey/post-survey-data-access.ts +++ b/hrm-service/src/post-survey/post-survey-data-access.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { db } from '../connection-pool'; import { SELECT_POST_SURVEYS_BY_CONTACT_TASK } from './sql/post-survey-get-sql'; import { insertPostSurveySql } from './sql/post-survey-insert-sql'; diff --git a/hrm-service/src/post-survey/post-survey-routes-v0.ts b/hrm-service/src/post-survey/post-survey-routes-v0.ts index 52b8a675a..1e967935b 100644 --- a/hrm-service/src/post-survey/post-survey-routes-v0.ts +++ b/hrm-service/src/post-survey/post-survey-routes-v0.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // eslint-disable-next-line prettier/prettier import type { Request, Response } from 'express'; import { SafeRouter, publicEndpoint, actionsMaps, RequestWithPermissions } from '../permissions'; diff --git a/hrm-service/src/post-survey/post-survey.ts b/hrm-service/src/post-survey/post-survey.ts index cde09951a..394f92ce2 100644 --- a/hrm-service/src/post-survey/post-survey.ts +++ b/hrm-service/src/post-survey/post-survey.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { create, filterByContactTaskId, diff --git a/hrm-service/src/post-survey/sql/post-survey-get-sql.ts b/hrm-service/src/post-survey/sql/post-survey-get-sql.ts index 22295bab5..41d602712 100644 --- a/hrm-service/src/post-survey/sql/post-survey-get-sql.ts +++ b/hrm-service/src/post-survey/sql/post-survey-get-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export const SELECT_POST_SURVEYS_BY_CONTACT_TASK = ` SELECT "contactTaskId", diff --git a/hrm-service/src/post-survey/sql/post-survey-insert-sql.ts b/hrm-service/src/post-survey/sql/post-survey-insert-sql.ts index 11ca050d6..9f2760270 100644 --- a/hrm-service/src/post-survey/sql/post-survey-insert-sql.ts +++ b/hrm-service/src/post-survey/sql/post-survey-insert-sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { NewPostSurvey } from '../post-survey-data-access'; import { pgp } from '../../connection-pool'; diff --git a/hrm-service/src/routes.ts b/hrm-service/src/routes.ts index 070ba42d8..ea44dd5d0 100644 --- a/hrm-service/src/routes.ts +++ b/hrm-service/src/routes.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { IRouter, Router } from 'express'; import cases from './case/case-routes-v0'; diff --git a/hrm-service/src/search.ts b/hrm-service/src/search.ts index bbe53b24a..6c7490dc0 100644 --- a/hrm-service/src/search.ts +++ b/hrm-service/src/search.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { OrderByDirection } from './sql'; export type PaginationQuery = { diff --git a/hrm-service/src/setUpHrmRoutes.ts b/hrm-service/src/setUpHrmRoutes.ts index 6a7c4a287..427add6aa 100644 --- a/hrm-service/src/setUpHrmRoutes.ts +++ b/hrm-service/src/setUpHrmRoutes.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { Express } from 'express'; import { Permissions, setupPermissions } from './permissions'; import { apiV0, HRM_ROUTES } from './routes'; diff --git a/hrm-service/src/sql.ts b/hrm-service/src/sql.ts index 200a259a0..44425e0de 100644 --- a/hrm-service/src/sql.ts +++ b/hrm-service/src/sql.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export const OrderByDirection = { ascendingNullsLast: 'ASC NULLS LAST', descendingNullsLast: 'DESC NULLS LAST', diff --git a/hrm-service/unit-tests/case/case-data-access.test.ts b/hrm-service/unit-tests/case/case-data-access.test.ts index 16c94f38e..2fcca4ea7 100644 --- a/hrm-service/unit-tests/case/case-data-access.test.ts +++ b/hrm-service/unit-tests/case/case-data-access.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { createMockCaseInsert, createMockCaseRecord } from './mock-cases'; import * as pgPromise from 'pg-promise'; import { mockConnection, mockTask, mockTransaction } from '../mock-db'; diff --git a/hrm-service/unit-tests/case/case.test.ts b/hrm-service/unit-tests/case/case.test.ts index 686a0bd44..7794128c2 100644 --- a/hrm-service/unit-tests/case/case.test.ts +++ b/hrm-service/unit-tests/case/case.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import * as caseDb from '../../src/case/case-data-access'; import * as caseApi from '../../src/case/case'; import { createMockCase, createMockCaseRecord } from './mock-cases'; diff --git a/hrm-service/unit-tests/case/mock-cases.ts b/hrm-service/unit-tests/case/mock-cases.ts index 6dd00ab9d..85f8c5740 100644 --- a/hrm-service/unit-tests/case/mock-cases.ts +++ b/hrm-service/unit-tests/case/mock-cases.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { CaseRecord, NewCaseRecord } from '../../src/case/case-data-access'; import { Case } from '../../src/case/case'; import { workerSid } from '../../service-tests/mocks'; diff --git a/hrm-service/unit-tests/contact-job/contact-job-complete.test.ts b/hrm-service/unit-tests/contact-job/contact-job-complete.test.ts index ba7a92a7d..305605d99 100644 --- a/hrm-service/unit-tests/contact-job/contact-job-complete.test.ts +++ b/hrm-service/unit-tests/contact-job/contact-job-complete.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import each from 'jest-each'; import * as SQSClient from '../../src/contact-job/client-sqs'; diff --git a/hrm-service/unit-tests/contact-job/contact-job-publish.test.ts b/hrm-service/unit-tests/contact-job/contact-job-publish.test.ts index e6f89523a..5fcd0ed39 100644 --- a/hrm-service/unit-tests/contact-job/contact-job-publish.test.ts +++ b/hrm-service/unit-tests/contact-job/contact-job-publish.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import * as SQSClient from '../../src/contact-job/client-sqs'; import * as contactJobPublish from '../../src/contact-job/contact-job-publish'; import { ContactJob, ContactJobType } from '../../src/contact-job/contact-job-data-access'; diff --git a/hrm-service/unit-tests/contact/categories.test.ts b/hrm-service/unit-tests/contact/categories.test.ts index ebb667d3e..659b74817 100644 --- a/hrm-service/unit-tests/contact/categories.test.ts +++ b/hrm-service/unit-tests/contact/categories.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { retrieveCategories } from '../../src/contact/categories'; describe('test retrieveCategories', () => { diff --git a/hrm-service/unit-tests/contact/contact-builder.ts b/hrm-service/unit-tests/contact/contact-builder.ts index 9aacf4c50..4b4eeed70 100644 --- a/hrm-service/unit-tests/contact/contact-builder.ts +++ b/hrm-service/unit-tests/contact/contact-builder.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { Contact } from '../../src/contact/contact-data-access'; const defaultContact: Contact = { diff --git a/hrm-service/unit-tests/contact/contact-data-access.test.ts b/hrm-service/unit-tests/contact/contact-data-access.test.ts index 32d3b25a8..88e7aa6d5 100644 --- a/hrm-service/unit-tests/contact/contact-data-access.test.ts +++ b/hrm-service/unit-tests/contact/contact-data-access.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import * as pgPromise from 'pg-promise'; import { mockConnection, mockTask, mockTransaction } from '../mock-db'; import { search, create } from '../../src/contact/contact-data-access'; diff --git a/hrm-service/unit-tests/contact/contact-json.test.ts b/hrm-service/unit-tests/contact/contact-json.test.ts index 042759008..c4d324da4 100644 --- a/hrm-service/unit-tests/contact/contact-json.test.ts +++ b/hrm-service/unit-tests/contact/contact-json.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { getPersonsName } from '../../src/contact/contact-json'; describe('getPersonsName', () => { diff --git a/hrm-service/unit-tests/contact/contact.test.ts b/hrm-service/unit-tests/contact/contact.test.ts index 531acce1a..327513f4b 100644 --- a/hrm-service/unit-tests/contact/contact.test.ts +++ b/hrm-service/unit-tests/contact/contact.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import * as contactDb from '../../src/contact/contact-data-access'; import { connectContactToCase, diff --git a/hrm-service/unit-tests/mock-db.ts b/hrm-service/unit-tests/mock-db.ts index a30dfd8a7..1735d03e8 100644 --- a/hrm-service/unit-tests/mock-db.ts +++ b/hrm-service/unit-tests/mock-db.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import * as pgPromise from 'pg-promise'; // eslint-disable-next-line import/no-extraneous-dependencies import * as pgMocking from '@tech-matters/testing'; diff --git a/hrm-service/unit-tests/permissions/actions.test.js b/hrm-service/unit-tests/permissions/actions.test.js index ac64450c3..6a5b75e0f 100644 --- a/hrm-service/unit-tests/permissions/actions.test.js +++ b/hrm-service/unit-tests/permissions/actions.test.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /* eslint-disable jest/no-standalone-expect */ const each = require('jest-each').default; diff --git a/hrm-service/unit-tests/permissions/setupCanForRules.test.ts b/hrm-service/unit-tests/permissions/setupCanForRules.test.ts index f1c31f6bf..b1625b0f3 100644 --- a/hrm-service/unit-tests/permissions/setupCanForRules.test.ts +++ b/hrm-service/unit-tests/permissions/setupCanForRules.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + /* eslint-disable jest/no-standalone-expect */ import each from 'jest-each'; import { setupCanForRules } from '../../src/permissions/setupCanForRules'; diff --git a/hrm-service/unit-tests/post-survey/post-survey-data-access.test.ts b/hrm-service/unit-tests/post-survey/post-survey-data-access.test.ts index 9501688a4..d5f180844 100644 --- a/hrm-service/unit-tests/post-survey/post-survey-data-access.test.ts +++ b/hrm-service/unit-tests/post-survey/post-survey-data-access.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { mockConnection, mockTask } from '../mock-db'; import * as pgPromise from 'pg-promise'; import { subDays } from 'date-fns'; diff --git a/hrm-service/unit-tests/search.test.ts b/hrm-service/unit-tests/search.test.ts index eb195395a..dbc80820a 100644 --- a/hrm-service/unit-tests/search.test.ts +++ b/hrm-service/unit-tests/search.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { getPaginationElements } from '../src/search'; describe('getPaginationElements()', () => { diff --git a/jest.config.js b/jest.config.js index 00a4e84ee..483d5218b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = (config) => { return ( config || { diff --git a/jobs/Dockerfile b/jobs/Dockerfile index 5e345a48d..b0fb1b44b 100644 --- a/jobs/Dockerfile +++ b/jobs/Dockerfile @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + FROM public.ecr.aws/lambda/nodejs:16 as build ARG lambda_name diff --git a/jobs/contact-complete/index.ts b/jobs/contact-complete/index.ts index 7421b1dbe..0f67e5420 100644 --- a/jobs/contact-complete/index.ts +++ b/jobs/contact-complete/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { ContactJobProcessorError } from '@tech-matters/hrm-job-errors'; // eslint-disable-next-line prettier/prettier diff --git a/jobs/contact-complete/package.json b/jobs/contact-complete/package.json index 46838ee6a..1677fc78b 100644 --- a/jobs/contact-complete/package.json +++ b/jobs/contact-complete/package.json @@ -4,7 +4,7 @@ "description": "", "main": "dist/index.js", "author": "", - "license": "ISC", + "license": "AGPL", "dependencies": { "@tech-matters/hrm-job-errors": "^1.0.0", "@tech-matters/hrm-ssm-cache": "^1.0.0", diff --git a/jobs/contact-complete/tests/generateMockMessageBody.ts b/jobs/contact-complete/tests/generateMockMessageBody.ts index cb938f9c2..d33713779 100644 --- a/jobs/contact-complete/tests/generateMockMessageBody.ts +++ b/jobs/contact-complete/tests/generateMockMessageBody.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + const accountSids = ['testSid1', 'testSid2']; export const generateMockMessageBody = () => { diff --git a/jobs/contact-retrieve-recording-url/index.ts b/jobs/contact-retrieve-recording-url/index.ts index aa731be74..8071a577c 100644 --- a/jobs/contact-retrieve-recording-url/index.ts +++ b/jobs/contact-retrieve-recording-url/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // eslint-disable-next-line import/no-extraneous-dependencies import { SQS } from 'aws-sdk'; diff --git a/jobs/contact-retrieve-recording-url/package.json b/jobs/contact-retrieve-recording-url/package.json index 6eecc8811..24bc9e619 100644 --- a/jobs/contact-retrieve-recording-url/package.json +++ b/jobs/contact-retrieve-recording-url/package.json @@ -4,7 +4,7 @@ "description": "", "main": "dist/index.js", "author": "", - "license": "ISC", + "license": "AGPL", "dependencies": { "@tech-matters/hrm-job-errors": "^1.0.0", "@tech-matters/hrm-ssm-cache": "^1.0.0", diff --git a/jobs/contact-retrieve-recording-url/tests/generateMockMessageBody.ts b/jobs/contact-retrieve-recording-url/tests/generateMockMessageBody.ts index 32d13f696..1d38a5b88 100644 --- a/jobs/contact-retrieve-recording-url/tests/generateMockMessageBody.ts +++ b/jobs/contact-retrieve-recording-url/tests/generateMockMessageBody.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + const accountSids = ['testSid1', 'testSid2']; export const generateMockMessageBody = () => { diff --git a/jobs/contact-retrieve-transcript/exportTranscript.ts b/jobs/contact-retrieve-transcript/exportTranscript.ts index 6016670a6..03f775f6d 100644 --- a/jobs/contact-retrieve-transcript/exportTranscript.ts +++ b/jobs/contact-retrieve-transcript/exportTranscript.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { getClient } from '@tech-matters/hrm-twilio-client'; import RestException from 'twilio/lib/base/RestException'; diff --git a/jobs/contact-retrieve-transcript/index.ts b/jobs/contact-retrieve-transcript/index.ts index 694080993..c2f93eabc 100644 --- a/jobs/contact-retrieve-transcript/index.ts +++ b/jobs/contact-retrieve-transcript/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // eslint-disable-next-line import/no-extraneous-dependencies import { SQS } from 'aws-sdk'; diff --git a/jobs/contact-retrieve-transcript/jest.config.js b/jobs/contact-retrieve-transcript/jest.config.js index 985e2944b..0fc0f29ff 100644 --- a/jobs/contact-retrieve-transcript/jest.config.js +++ b/jobs/contact-retrieve-transcript/jest.config.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = (config) => { return ( config || { diff --git a/jobs/contact-retrieve-transcript/package.json b/jobs/contact-retrieve-transcript/package.json index f776cec4a..9eaa70813 100644 --- a/jobs/contact-retrieve-transcript/package.json +++ b/jobs/contact-retrieve-transcript/package.json @@ -4,7 +4,7 @@ "description": "", "main": "dist/index.js", "author": "", - "license": "ISC", + "license": "AGPL", "dependencies": { "@tech-matters/hrm-job-errors": "^1.0.0", "@tech-matters/hrm-s3-client": "^1.0.0", diff --git a/jobs/contact-retrieve-transcript/tests/e2e/contact-retrieve-transcript.test.ts b/jobs/contact-retrieve-transcript/tests/e2e/contact-retrieve-transcript.test.ts index fbc4a7c95..24c6e28b2 100644 --- a/jobs/contact-retrieve-transcript/tests/e2e/contact-retrieve-transcript.test.ts +++ b/jobs/contact-retrieve-transcript/tests/e2e/contact-retrieve-transcript.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { S3, SQS } from 'aws-sdk'; import { generateMockMessageBody } from '../generateMockMessageBody'; import { getStackOutput } from '../../../../cdk/cdkOutput'; diff --git a/jobs/contact-retrieve-transcript/tests/generateMockMessageBody.ts b/jobs/contact-retrieve-transcript/tests/generateMockMessageBody.ts index 244367b1b..bc0573b8e 100644 --- a/jobs/contact-retrieve-transcript/tests/generateMockMessageBody.ts +++ b/jobs/contact-retrieve-transcript/tests/generateMockMessageBody.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + const accountSids = ['testSid1', 'testSid2']; export const generateMockMessageBody = () => { diff --git a/jobs/contact-retrieve-transcript/tests/unit/exportTranscript.test.ts b/jobs/contact-retrieve-transcript/tests/unit/exportTranscript.test.ts index 9009243d8..58211ded4 100644 --- a/jobs/contact-retrieve-transcript/tests/unit/exportTranscript.test.ts +++ b/jobs/contact-retrieve-transcript/tests/unit/exportTranscript.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import RestException from 'twilio/lib/base/RestException'; import { exportTranscript } from '../../exportTranscript'; diff --git a/jobs/contact-retrieve-transcript/uploadTranscript.ts b/jobs/contact-retrieve-transcript/uploadTranscript.ts index 637dbf7d7..1f107cdd8 100644 --- a/jobs/contact-retrieve-transcript/uploadTranscript.ts +++ b/jobs/contact-retrieve-transcript/uploadTranscript.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { s3 } from '@tech-matters/hrm-s3-client'; // eslint-disable-next-line prettier/prettier diff --git a/jobs/docker-compose.yml b/jobs/docker-compose.yml index 2afb7a551..7466d2bd2 100644 --- a/jobs/docker-compose.yml +++ b/jobs/docker-compose.yml @@ -1,3 +1,17 @@ +# Copyright (C) 2021-2023 Technology Matters +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + # This is used for testing the built lambda docker image locally # which isn't currently supported by localstack. We could pay # for a localstack pro license so we could use docker images diff --git a/jobs/tests/getContactCompleteQueueUrl.ts b/jobs/tests/getContactCompleteQueueUrl.ts index d1b7ac097..ca4f0ce24 100644 --- a/jobs/tests/getContactCompleteQueueUrl.ts +++ b/jobs/tests/getContactCompleteQueueUrl.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { getStackOutput } from '../../cdk/cdkOutput'; console.log(getStackOutput('contact-complete').queueUrl.replace('localhost', 'localstack')); diff --git a/jobs/tests/getMockMessage.ts b/jobs/tests/getMockMessage.ts index 87a508d5d..6ec292d57 100644 --- a/jobs/tests/getMockMessage.ts +++ b/jobs/tests/getMockMessage.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export const getMockMessage = async ({ lambdaName }: { lambdaName: string }) => { const generator = await import(`../src/${lambdaName}/tests/generateMockMessageBody`); return generator.generateMockMessageBody(); diff --git a/jobs/tests/sendMessage.ts b/jobs/tests/sendMessage.ts index 3813d695f..526aaefa2 100644 --- a/jobs/tests/sendMessage.ts +++ b/jobs/tests/sendMessage.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { SQS } from 'aws-sdk'; // eslint-disable-line import/no-extraneous-dependencies import { getStackOutput } from '../../cdk/cdkOutput'; diff --git a/license-header.tpl b/license-header.tpl new file mode 100644 index 000000000..054dcc433 --- /dev/null +++ b/license-header.tpl @@ -0,0 +1,13 @@ +Copyright (C) {{.Year}} {{.Holder}} +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see https://www.gnu.org/licenses/. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8651351c0..2cde76605 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "@tech-matters/hrm-base", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "workspaces": [ "packages/*", "hrm-service", @@ -59,7 +59,7 @@ "hrm-service": { "name": "@tech-matters/hrm-service", "version": "0.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "@tech-matters/hrm-ssm-cache": "^1.0.0", "@tech-matters/http": "^1.0.0", @@ -125,7 +125,7 @@ "jobs/contact-complete": { "name": "@tech-matters/hrm-jobs-contact-complete", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "@tech-matters/hrm-job-errors": "^1.0.0", "@tech-matters/hrm-ssm-cache": "^1.0.0", @@ -139,7 +139,7 @@ "jobs/contact-retrieve-recording-url": { "name": "@tech-matters/hrm-jobs-contact-retrieve-recording-url", "version": "0.0.1", - "license": "ISC", + "license": "AGPL", "dependencies": { "@tech-matters/hrm-job-errors": "^1.0.0", "@tech-matters/hrm-ssm-cache": "^1.0.0", @@ -156,7 +156,7 @@ "jobs/contact-retrieve-transcript": { "name": "@tech-matters/hrm-jobs-contact-retrieve-transcript", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "@tech-matters/hrm-job-errors": "^1.0.0", "@tech-matters/hrm-s3-client": "^1.0.0", @@ -1153,7 +1153,7 @@ "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/lru-cache": { "version": "6.0.0", "inBundle": true, - "license": "ISC", + "license": "AGPL", "dependencies": { "yallist": "^4.0.0" }, @@ -1164,7 +1164,7 @@ "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver": { "version": "7.3.8", "inBundle": true, - "license": "ISC", + "license": "AGPL", "dependencies": { "lru-cache": "^6.0.0" }, @@ -1178,7 +1178,7 @@ "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/yallist": { "version": "4.0.0", "inBundle": true, - "license": "ISC" + "license": "AGPL" }, "node_modules/@aws-cdk/core": { "version": "1.178.0", @@ -1218,7 +1218,7 @@ "node_modules/@aws-cdk/core/node_modules/at-least-node": { "version": "1.0.0", "inBundle": true, - "license": "ISC", + "license": "AGPL", "engines": { "node": ">= 4.0.0" } @@ -1259,7 +1259,7 @@ "node_modules/@aws-cdk/core/node_modules/graceful-fs": { "version": "4.2.10", "inBundle": true, - "license": "ISC" + "license": "AGPL" }, "node_modules/@aws-cdk/core/node_modules/ignore": { "version": "5.2.0", @@ -1283,7 +1283,7 @@ "node_modules/@aws-cdk/core/node_modules/minimatch": { "version": "3.1.2", "inBundle": true, - "license": "ISC", + "license": "AGPL", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1348,7 +1348,7 @@ "node_modules/@aws-cdk/cx-api/node_modules/lru-cache": { "version": "6.0.0", "inBundle": true, - "license": "ISC", + "license": "AGPL", "dependencies": { "yallist": "^4.0.0" }, @@ -1359,7 +1359,7 @@ "node_modules/@aws-cdk/cx-api/node_modules/semver": { "version": "7.3.8", "inBundle": true, - "license": "ISC", + "license": "AGPL", "dependencies": { "lru-cache": "^6.0.0" }, @@ -1373,7 +1373,7 @@ "node_modules/@aws-cdk/cx-api/node_modules/yallist": { "version": "4.0.0", "inBundle": true, - "license": "ISC" + "license": "AGPL" }, "node_modules/@aws-cdk/region-info": { "version": "1.178.0", @@ -11959,7 +11959,7 @@ "packages/http": { "name": "@tech-matters/http", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "cors": "^2.8.5", "express": "^4.17.1", @@ -11988,13 +11988,13 @@ "packages/job-errors": { "name": "@tech-matters/hrm-job-errors", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "devDependencies": {} }, "packages/s3-client": { "name": "@tech-matters/hrm-s3-client", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "aws-sdk": "^2.1225.0" } @@ -12002,7 +12002,7 @@ "packages/ssm-cache": { "name": "@tech-matters/hrm-ssm-cache", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "aws-sdk": "^2.1225.0", "typescript": "^4.8.4" @@ -12014,7 +12014,7 @@ "packages/testing": { "name": "@tech-matters/testing", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "global-agent": "^3.0.0", "mockttp": "^3.2.2", @@ -12025,7 +12025,7 @@ "packages/twilio-client": { "name": "@tech-matters/hrm-twilio-client", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "twilio": "^3.80.0" } @@ -12033,7 +12033,7 @@ "packages/twilio-worker-auth": { "name": "@tech-matters/twilio-worker-auth", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "@tech-matters/http": "^1.0.0", "twilio-flex-token-validator": "^1.5.6" @@ -12045,13 +12045,13 @@ "packages/types": { "name": "@tech-matters/hrm-types", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "devDependencies": {} }, "resources-service": { "name": "@tech-matters/resources-service", "version": "1.0.0", - "license": "ISC", + "license": "AGPL", "dependencies": { "@tech-matters/twilio-worker-auth": "^1.0.0", "dotenv": "^8.6.0", diff --git a/package.json b/package.json index aca22f4b4..a521ce10e 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "", "author": "", - "license": "ISC", + "license": "AGPL", "workspaces": [ "packages/*", "hrm-service", @@ -95,6 +95,8 @@ "ssm:local": "run-p ssm:local:*", "ssm:local:base": "run-p ssm:local:base:*", "ssm:local:base:cdk": "docker run --rm -v ~/.aws:/home/aws/.aws -e AWS_DEFAULT_REGION -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY interrobangc/awscli2 ssm get-parameter --name \"/local/hrm/cdk/.env\" --with-decryption --query \"Parameter.Value\" --output text > ./cdk/.env", - "ssm:local:workspaces": "npm run ssm:local --workspaces --if-present" + "ssm:local:workspaces": "npm run ssm:local --workspaces --if-present", + "license:add": "docker run --rm -v ${PWD}:/src ghcr.io/google/addlicense -c \"Technology Matters\" -y \"2021-2023\" -f license-header.tpl .", + "license:check": "docker run --rm -v ${PWD}:/src ghcr.io/google/addlicense -check -c \"Technology Matters\" -y \"2021-2023\" -f license-header.tpl ." } } diff --git a/packages/http/index.ts b/packages/http/index.ts index c2c9911b5..6d3869f69 100644 --- a/packages/http/index.ts +++ b/packages/http/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export { unauthorized } from './unauthorized'; export { configureDefaultPostMiddlewares, diff --git a/packages/http/logging.ts b/packages/http/logging.ts index ffa3c6312..56c089eb9 100644 --- a/packages/http/logging.ts +++ b/packages/http/logging.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import morgan from 'morgan'; /** diff --git a/packages/http/package.json b/packages/http/package.json index 97445754e..11aea3910 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "HTTP lib to help Aselo service conform to common practices when using express", "author": "", - "license": "ISC", + "license": "AGPL", "main": "dist/index.js", "dependencies": { "cors": "^2.8.5", diff --git a/packages/http/unauthorized.ts b/packages/http/unauthorized.ts index 5c6bc7e68..967faab54 100644 --- a/packages/http/unauthorized.ts +++ b/packages/http/unauthorized.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { Response } from 'express'; export const unauthorized = (res: Response) => { diff --git a/packages/http/webServerConfiguration.ts b/packages/http/webServerConfiguration.ts index 518111546..123f6a4fd 100644 --- a/packages/http/webServerConfiguration.ts +++ b/packages/http/webServerConfiguration.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import express, { Express } from 'express'; import cors from 'cors'; import httpLogger from './logging'; diff --git a/packages/job-errors/index.ts b/packages/job-errors/index.ts index 2cae8a82c..e37d3b800 100644 --- a/packages/job-errors/index.ts +++ b/packages/job-errors/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export class ContactJobProcessorError extends Error { constructor(message: string) { super(message); diff --git a/packages/job-errors/package.json b/packages/job-errors/package.json index eaf1e3cb1..bb89de3f7 100644 --- a/packages/job-errors/package.json +++ b/packages/job-errors/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "Shared errors for HRM jobs", "author": "", - "license": "ISC", + "license": "AGPL", "main": "dist/index.js", "devDependencies": {}, "scripts": { diff --git a/packages/s3-client/index.ts b/packages/s3-client/index.ts index 346382e7b..c452f4b8a 100644 --- a/packages/s3-client/index.ts +++ b/packages/s3-client/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { S3 } from 'aws-sdk'; /** diff --git a/packages/s3-client/package.json b/packages/s3-client/package.json index a3cb65784..185f8842a 100644 --- a/packages/s3-client/package.json +++ b/packages/s3-client/package.json @@ -7,7 +7,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", - "license": "ISC", + "license": "AGPL", "dependencies": { "aws-sdk": "^2.1225.0" } diff --git a/packages/ssm-cache/index.ts b/packages/ssm-cache/index.ts index c6abb856b..5fc173987 100644 --- a/packages/ssm-cache/index.ts +++ b/packages/ssm-cache/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { SSM } from 'aws-sdk'; // This is based around the pattern found in https://github.com/ryands17/lambda-ssm-cache diff --git a/packages/ssm-cache/jest.config.js b/packages/ssm-cache/jest.config.js index 985e2944b..0fc0f29ff 100644 --- a/packages/ssm-cache/jest.config.js +++ b/packages/ssm-cache/jest.config.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = (config) => { return ( config || { diff --git a/packages/ssm-cache/package.json b/packages/ssm-cache/package.json index 6db2600da..7c9893f37 100644 --- a/packages/ssm-cache/package.json +++ b/packages/ssm-cache/package.json @@ -16,7 +16,7 @@ "homepage": "https://github.com/techmatters/hrm#readme", "description": "", "author": "", - "license": "ISC", + "license": "AGPL", "dependencies": { "aws-sdk": "^2.1225.0", "typescript": "^4.8.4" diff --git a/packages/ssm-cache/tests/unit/index.test.ts b/packages/ssm-cache/tests/unit/index.test.ts index dbd76afd7..a57813010 100644 --- a/packages/ssm-cache/tests/unit/index.test.ts +++ b/packages/ssm-cache/tests/unit/index.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { isAfter } from 'date-fns'; import * as SsmCache from '../../index'; diff --git a/packages/testing/index.ts b/packages/testing/index.ts index 34d9b5671..36d4c6246 100644 --- a/packages/testing/index.ts +++ b/packages/testing/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export * from './mock-pgpromise'; export * from './mock-twilio-auth-endpoint'; import { start, stop } from './mocking-proxy'; diff --git a/packages/testing/mock-pgpromise.ts b/packages/testing/mock-pgpromise.ts index 4a46cff7e..6ec251fd9 100644 --- a/packages/testing/mock-pgpromise.ts +++ b/packages/testing/mock-pgpromise.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import * as pgPromise from 'pg-promise'; import { IDatabase, QueryParam } from 'pg-promise'; diff --git a/packages/testing/mock-twilio-auth-endpoint.ts b/packages/testing/mock-twilio-auth-endpoint.ts index 58ad5ae7f..cd1687c5c 100644 --- a/packages/testing/mock-twilio-auth-endpoint.ts +++ b/packages/testing/mock-twilio-auth-endpoint.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { mockttpServer } from './mocking-proxy'; type TokenValidatorResponse = { diff --git a/packages/testing/mocking-proxy.ts b/packages/testing/mocking-proxy.ts index fa015319a..c5508895d 100644 --- a/packages/testing/mocking-proxy.ts +++ b/packages/testing/mocking-proxy.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { Mockttp, getLocal, generateCACertificate } from 'mockttp'; // @ts-ignore import { createGlobalProxyAgent } from 'global-agent'; diff --git a/packages/testing/package.json b/packages/testing/package.json index 9cc8a6105..042b6f8cb 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "Utilities to facilitate backend unit & service testing with jest", "author": "", - "license": "ISC", + "license": "AGPL", "main": "dist/index.js", "dependencies": { "pg-promise": "^10.11.1", @@ -23,6 +23,5 @@ "url": "https://github.com/techmatters/hrm/issues" }, "homepage": "https://github.com/techmatters/hrm#readme", - "devDependencies": { - } + "devDependencies": {} } diff --git a/packages/twilio-client/index.ts b/packages/twilio-client/index.ts index 8919a0d1b..add039785 100644 --- a/packages/twilio-client/index.ts +++ b/packages/twilio-client/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { Twilio } from 'twilio'; import { getMockClient } from './mockClient'; diff --git a/packages/twilio-client/mockClient/chatMessageList.ts b/packages/twilio-client/mockClient/chatMessageList.ts index dc4494354..e68d2a8b1 100644 --- a/packages/twilio-client/mockClient/chatMessageList.ts +++ b/packages/twilio-client/mockClient/chatMessageList.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export const chatMessageList = [ { sid: 'IM1d8801dc8d0d432787fa896add069ff4', diff --git a/packages/twilio-client/mockClient/getMockClient.ts b/packages/twilio-client/mockClient/getMockClient.ts index b8e8b044c..38928fa36 100644 --- a/packages/twilio-client/mockClient/getMockClient.ts +++ b/packages/twilio-client/mockClient/getMockClient.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import RestException from 'twilio/lib/base/RestException'; import { chatMessageList } from './chatMessageList'; diff --git a/packages/twilio-client/mockClient/index.ts b/packages/twilio-client/mockClient/index.ts index fd9514769..e430e6ae6 100644 --- a/packages/twilio-client/mockClient/index.ts +++ b/packages/twilio-client/mockClient/index.ts @@ -1 +1,17 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export * from './getMockClient'; diff --git a/packages/twilio-client/package.json b/packages/twilio-client/package.json index 63e25ad16..35026e2d0 100644 --- a/packages/twilio-client/package.json +++ b/packages/twilio-client/package.json @@ -7,7 +7,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", - "license": "ISC", + "license": "AGPL", "dependencies": { "twilio": "^3.80.0" } diff --git a/packages/twilio-worker-auth/jest.config.js b/packages/twilio-worker-auth/jest.config.js index 6366291c0..7bb51ded3 100644 --- a/packages/twilio-worker-auth/jest.config.js +++ b/packages/twilio-worker-auth/jest.config.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = config => { return ( config || { diff --git a/packages/twilio-worker-auth/package.json b/packages/twilio-worker-auth/package.json index 577c40d54..7ea149449 100644 --- a/packages/twilio-worker-auth/package.json +++ b/packages/twilio-worker-auth/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "Authenticate Twilio workers using their flex token", "author": "", - "license": "ISC", + "license": "AGPL", "main": "dist/index.js", "directories": { "test": "tests" diff --git a/packages/twilio-worker-auth/src/addAccountSidMiddleware.ts b/packages/twilio-worker-auth/src/addAccountSidMiddleware.ts index 7f9c7792d..ff6d7ba77 100644 --- a/packages/twilio-worker-auth/src/addAccountSidMiddleware.ts +++ b/packages/twilio-worker-auth/src/addAccountSidMiddleware.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import './index'; // eslint-disable-next-line prettier/prettier import type { Request, Response, NextFunction } from "express"; diff --git a/packages/twilio-worker-auth/src/index.ts b/packages/twilio-worker-auth/src/index.ts index ad5244e05..0aa7b5710 100644 --- a/packages/twilio-worker-auth/src/index.ts +++ b/packages/twilio-worker-auth/src/index.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export { getAuthorizationMiddleware } from './twilioWorkerAuthMiddleware'; export { addAccountSidMiddleware } from './addAccountSidMiddleware'; export { twilioUser, TwilioUser } from './twilioUser'; diff --git a/packages/twilio-worker-auth/src/twilioUser.ts b/packages/twilio-worker-auth/src/twilioUser.ts index 2f187bbbd..617c41373 100644 --- a/packages/twilio-worker-auth/src/twilioUser.ts +++ b/packages/twilio-worker-auth/src/twilioUser.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export type TwilioUser = { workerSid: string; diff --git a/packages/twilio-worker-auth/src/twilioWorkerAuthMiddleware.ts b/packages/twilio-worker-auth/src/twilioWorkerAuthMiddleware.ts index fa6b73b1f..7214d5adc 100644 --- a/packages/twilio-worker-auth/src/twilioWorkerAuthMiddleware.ts +++ b/packages/twilio-worker-auth/src/twilioWorkerAuthMiddleware.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { validator as TokenValidator } from 'twilio-flex-token-validator'; import crypto from 'crypto'; diff --git a/packages/twilio-worker-auth/tests/unit/twilioWorkerAuthMiddleware.test.ts b/packages/twilio-worker-auth/tests/unit/twilioWorkerAuthMiddleware.test.ts index 2c7aa90ef..9a4227b5a 100644 --- a/packages/twilio-worker-auth/tests/unit/twilioWorkerAuthMiddleware.test.ts +++ b/packages/twilio-worker-auth/tests/unit/twilioWorkerAuthMiddleware.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { twilioUser } from '../../src'; const tftv = require('twilio-flex-token-validator'); diff --git a/packages/types/ContactJob.ts b/packages/types/ContactJob.ts index 004cc93a5..12d3e025b 100644 --- a/packages/types/ContactJob.ts +++ b/packages/types/ContactJob.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export enum ContactJobType { RETRIEVE_CONTACT_TRANSCRIPT = 'retrieve-transcript', } diff --git a/packages/types/package.json b/packages/types/package.json index 931725654..c187048b6 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "Shared library for HRM", "author": "", - "license": "ISC", + "license": "AGPL", "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/resources-service/create-db.js b/resources-service/create-db.js index f4f8c1585..49e14e3a6 100644 --- a/resources-service/create-db.js +++ b/resources-service/create-db.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + require('dotenv').config(); const pgPromise = require('pg-promise'); diff --git a/resources-service/db-migrate.js b/resources-service/db-migrate.js index 100f7ef7c..b6a036170 100644 --- a/resources-service/db-migrate.js +++ b/resources-service/db-migrate.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // eslint-disable-next-line global-require,import/no-extraneous-dependencies const { Umzug, SequelizeStorage } = require('umzug'); const pathLib = require('path'); diff --git a/resources-service/jest.config.js b/resources-service/jest.config.js index bfc0356b3..f1f71aac8 100644 --- a/resources-service/jest.config.js +++ b/resources-service/jest.config.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = config => { return ( config || { diff --git a/resources-service/migrations/20230120154500-create-resources-table.js b/resources-service/migrations/20230120154500-create-resources-table.js index af26e9955..f4a2f9bce 100644 --- a/resources-service/migrations/20230120154500-create-resources-table.js +++ b/resources-service/migrations/20230120154500-create-resources-table.js @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + module.exports = { up: async queryInterface => { await queryInterface.sequelize.query(` diff --git a/resources-service/package.json b/resources-service/package.json index b6b516460..d483a38e3 100644 --- a/resources-service/package.json +++ b/resources-service/package.json @@ -33,7 +33,7 @@ "url": "git+https://github.com/techmatters/hrm.git" }, "author": "", - "license": "ISC", + "license": "AGPL", "bugs": { "url": "https://github.com/techmatters/hrm/issues" }, diff --git a/resources-service/src/config/db.ts b/resources-service/src/config/db.ts index 8367a26b4..46ddc2038 100644 --- a/resources-service/src/config/db.ts +++ b/resources-service/src/config/db.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import env from 'dotenv'; env.config(); diff --git a/resources-service/src/connection-pool.ts b/resources-service/src/connection-pool.ts index 249c90318..56231f510 100644 --- a/resources-service/src/connection-pool.ts +++ b/resources-service/src/connection-pool.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import pgPromise from 'pg-promise'; import config from './config/db'; diff --git a/resources-service/src/index.ts b/resources-service/src/index.ts index 997a0ffe8..5d5004a79 100644 --- a/resources-service/src/index.ts +++ b/resources-service/src/index.ts @@ -1,2 +1,18 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // Export configuration function for when it's used as part of another service export { configureService as configureResourcesService } from './service'; diff --git a/resources-service/src/resource/resource-data-access.ts b/resources-service/src/resource/resource-data-access.ts index 5ad323052..ff8f89fbc 100644 --- a/resources-service/src/resource/resource-data-access.ts +++ b/resources-service/src/resource/resource-data-access.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { db } from '../connection-pool'; import { AccountSID } from '@tech-matters/twilio-worker-auth'; import { SELECT_RESOURCE_BY_ID } from './sql/resource-get-sql'; diff --git a/resources-service/src/resource/resource-model.ts b/resources-service/src/resource/resource-model.ts index 487b8330c..f95d1dfa6 100644 --- a/resources-service/src/resource/resource-model.ts +++ b/resources-service/src/resource/resource-model.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { AccountSID } from '@tech-matters/twilio-worker-auth'; import { getById, ReferreableResource } from './resource-data-access'; diff --git a/resources-service/src/resource/resource-routes-v0.ts b/resources-service/src/resource/resource-routes-v0.ts index dd2535cb4..787f9befb 100644 --- a/resources-service/src/resource/resource-routes-v0.ts +++ b/resources-service/src/resource/resource-routes-v0.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { IRouter, Router } from 'express'; import { getResource } from './resource-model'; import { AccountSID } from '@tech-matters/twilio-worker-auth'; diff --git a/resources-service/src/resource/sql/resource-get-sql.ts b/resources-service/src/resource/sql/resource-get-sql.ts index bcab59bc9..c42bfdb75 100644 --- a/resources-service/src/resource/sql/resource-get-sql.ts +++ b/resources-service/src/resource/sql/resource-get-sql.ts @@ -1 +1,17 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + export const SELECT_RESOURCE_BY_ID = `SELECT id, "name" FROM resources."Resources" AS r WHERE r."accountSid" = $ AND r."id" = $`; diff --git a/resources-service/src/routes.ts b/resources-service/src/routes.ts index 3a38c509c..3f0ea1fc5 100644 --- a/resources-service/src/routes.ts +++ b/resources-service/src/routes.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { IRouter, Router } from 'express'; import resourceRoutes from './resource/resource-routes-v0'; diff --git a/resources-service/src/service.ts b/resources-service/src/service.ts index d899003ca..75d448bac 100644 --- a/resources-service/src/service.ts +++ b/resources-service/src/service.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import express from 'express'; import 'express-async-errors'; import { apiV0 } from './routes'; diff --git a/resources-service/tests/service/resources.test.ts b/resources-service/tests/service/resources.test.ts index 526f6f3a0..aaa3affe5 100644 --- a/resources-service/tests/service/resources.test.ts +++ b/resources-service/tests/service/resources.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { mockingProxy, mockSuccessfulTwilioAuthentication } from '@tech-matters/testing'; import { headers, getRequest, getServer } from './server'; import { db } from '../../src/connection-pool'; diff --git a/resources-service/tests/service/server.ts b/resources-service/tests/service/server.ts index a7f0ede2a..9c0c663c7 100644 --- a/resources-service/tests/service/server.ts +++ b/resources-service/tests/service/server.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + // eslint-disable-next-line import/no-extraneous-dependencies import supertest from 'supertest'; // eslint-disable-next-line import/no-extraneous-dependencies diff --git a/resources-service/tests/unit/mock-db.ts b/resources-service/tests/unit/mock-db.ts index 1b6c1b1df..306b266f1 100644 --- a/resources-service/tests/unit/mock-db.ts +++ b/resources-service/tests/unit/mock-db.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import * as pgPromise from 'pg-promise'; // eslint-disable-next-line import/no-extraneous-dependencies import * as pgMocking from '@tech-matters/testing'; diff --git a/resources-service/tests/unit/resource/resource-data-access.test.ts b/resources-service/tests/unit/resource/resource-data-access.test.ts index 69e1d7bdd..6b168adb5 100644 --- a/resources-service/tests/unit/resource/resource-data-access.test.ts +++ b/resources-service/tests/unit/resource/resource-data-access.test.ts @@ -1,3 +1,19 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import * as pgPromise from 'pg-promise'; import { mockConnection, mockTask } from '../mock-db'; import * as resourceDb from '../../../src/resource/resource-data-access';