From 5d5db50bb5211e91ba753518f1bc52b44edbbaee Mon Sep 17 00:00:00 2001 From: Amit Barletz Date: Wed, 3 Apr 2024 16:10:35 +0300 Subject: [PATCH 1/5] remove auth0 test case --- test-cases/mysql-auth0/dsg.env | 2 - test-cases/mysql-auth0/input.json | 1351 -------------------------- test-cases/postgres-auth0/dsg.env | 2 - test-cases/postgres-auth0/input.json | 1351 -------------------------- types.ts | 2 - 5 files changed, 2708 deletions(-) delete mode 100644 test-cases/mysql-auth0/dsg.env delete mode 100644 test-cases/mysql-auth0/input.json delete mode 100644 test-cases/postgres-auth0/dsg.env delete mode 100644 test-cases/postgres-auth0/input.json diff --git a/test-cases/mysql-auth0/dsg.env b/test-cases/mysql-auth0/dsg.env deleted file mode 100644 index 1069ab9..0000000 --- a/test-cases/mysql-auth0/dsg.env +++ /dev/null @@ -1,2 +0,0 @@ -BUILD_SPEC_PATH=/data/test-cases/mysql-auth0/input.json -BUILD_OUTPUT_PATH=/data/test-cases/mysql-auth0/generated \ No newline at end of file diff --git a/test-cases/mysql-auth0/input.json b/test-cases/mysql-auth0/input.json deleted file mode 100644 index ea94e59..0000000 --- a/test-cases/mysql-auth0/input.json +++ /dev/null @@ -1,1351 +0,0 @@ -{ - "buildId": "1", - "entities": [ - { - "id": "aed41776-99ca-4674-b26d-0458fd440875", - "name": "User", - "displayName": "User", - "pluralDisplayName": "Users", - "pluralName": "users", - "fields": [ - { - "id": "053e75d0-9f02-4182-8f61-46fbdbaa71bd", - "permanentId": "053e75d0-9f02-4182-8f61-46fbdbaa71b1", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": { - "idType": "CUID" - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "053e75d0-9f02-4182-8f61-46fbdbaa71bd", - "permanentId": "053e75d0-9f02-4182-8f61-46fbdbaa71b1", - "name": "username", - "displayName": "Username", - "dataType": "Username", - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "053e75d0-9f02-4182-8f61-46fbdbaa71bd", - "permanentId": "053e75d0-9f02-4182-8f61-46fbdbaa71b1", - "name": "roles", - "displayName": "Roles", - "dataType": "Roles", - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "053e75d0-9f02-4182-8f61-46fbdbaa71bd", - "permanentId": "053e75d0-9f02-4182-8f61-46fbdbaa71b1", - "name": "password", - "displayName": "Password", - "dataType": "Password", - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "a4e0c058-5768-4481-9da9-e48c73ab224d", - "permanentId": "a4e0c058-5768-4481-9da9-e48c73ab2241", - "name": "name", - "displayName": "Name", - "required": true, - "unique": false, - "searchable": true, - "dataType": "SingleLineText" - }, - { - "id": "e3fa6ddd-ad36-48ce-8042-9c0aa576e5a9", - "permanentId": "e3fa6ddd-ad36-48ce-8042-9c0aa576e5a1", - "name": "bio", - "displayName": "Bio", - "required": true, - "unique": false, - "searchable": true, - "dataType": "MultiLineText" - }, - { - "id": "8c5c4130-94b0-4ce4-a4cb-4e42bf7a9b37", - "permanentId": "8c5c4130-94b0-4ce4-a4cb-4e42bf7a9b31", - "name": "email", - "displayName": "Email", - "required": true, - "unique": true, - "searchable": true, - "dataType": "Email" - }, - { - "id": "71ba3f5e-7324-4ace-af95-d4bcea8f8368", - "permanentId": "71ba3f5e-7324-4ace-af95-d4bcea8f8361", - "name": "age", - "displayName": "Age", - "required": true, - "unique": false, - "searchable": true, - "dataType": "WholeNumber" - }, - { - "id": "b491038d-f588-45e3-b97f-9074f3ed8c83", - "permanentId": "b491038d-f588-45e3-b97f-9074f3ed8c81", - "name": "birthDate", - "displayName": "Birth Date", - "required": true, - "unique": false, - "searchable": true, - "dataType": "DateTime", - "properties": { - "dataOnly": false - } - }, - { - "id": "9fa9604e-f9ab-45fb-b8bd-557ae10eda8c", - "permanentId": "9fa9604e-f9ab-45fb-b8bd-557ae10eda81", - "name": "score", - "displayName": "Score", - "required": true, - "unique": false, - "searchable": false, - "dataType": "DecimalNumber" - }, - { - "id": "a7b32c49-e73d-4b6f-9efb-fcb77e60b303", - "permanentId": "9bb55fcc-1c3a-4b99-8bcf-6ea85d052c3d", - "name": "manager", - "displayName": "Manager", - "required": false, - "unique": false, - "searchable": true, - "dataType": "Lookup", - "properties": { - "relatedEntityId": "aed41776-99ca-4674-b26d-0458fd440875", - "relatedFieldId": "7bb3d5c1-f5b9-4fa4-8087-87f0c549d5f2", - "allowMultipleSelection": false - } - }, - { - "id": "3787591a-333b-45c5-9e9d-362d9697bb38", - "permanentId": "7bb3d5c1-f5b9-4fa4-8087-87f0c549d5f2", - "name": "employees", - "displayName": "Employees", - "required": false, - "unique": false, - "searchable": false, - "dataType": "Lookup", - "properties": { - "relatedEntityId": "aed41776-99ca-4674-b26d-0458fd440875", - "relatedFieldId": "9bb55fcc-1c3a-4b99-8bcf-6ea85d052c3d", - "allowMultipleSelection": true - } - }, - { - "id": "9fa9604e-f9ab-45fb-b8bd-557ae1011111", - "permanentId": "ae21f2fb-9174-49de-9576-632d859a5dd1", - "name": "organizations", - "displayName": "Organizations", - "required": false, - "unique": false, - "searchable": true, - "dataType": "Lookup", - "properties": { - "relatedEntityId": "3426e3f7-c316-416e-b7a1-d2a1bce17a4", - "relatedFieldId": "3c5f6e76-a124-4f9a-a944-c75f55495859", - "allowMultipleSelection": true - } - }, - { - "id": "daa757a6-4e15-4afc-a6e3-d4366d64367a", - "permanentId": "daa757a6-4e15-4afc-a6e3-d4366d643671", - "name": "priority", - "displayName": "Priority", - "required": true, - "unique": false, - "searchable": true, - "dataType": "OptionSet", - "properties": { - "options": [ - { - "label": "High", - "value": "high" - }, - { - "label": "Medium", - "value": "medium" - }, - { - "label": "Low", - "value": "low" - } - ] - } - }, - { - "id": "e88e745f-e4a0-414a-b43d-99d7728d1207", - "permanentId": "e88e745f-e4a0-414a-b43d-99d7728d1201", - "name": "isCurious", - "displayName": "Is Curious", - "required": true, - "unique": false, - "searchable": true, - "dataType": "Boolean" - }, - { - "id": "e8b7aca3-e761-4d0c-9196-b983d63ae80d", - "permanentId": "e8b7aca3-e761-4d0c-9196-b983d63ae801", - "name": "location", - "displayName": "Location", - "required": true, - "unique": false, - "searchable": true, - "dataType": "GeographicLocation" - }, - { - "id": "e8b7aca3-e761-4d0c-9196-b983d63ae755", - "permanentId": "e8b7aca3-e761-4d0c-9196-b983d63ae755", - "name": "extendedProperties", - "displayName": "Extended Properties", - "required": true, - "unique": false, - "searchable": true, - "dataType": "Json" - }, - { - "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26111b7", - "permanentId": "118e407b-30f7-48da-af9c-de1393548b4c", - "name": "profile", - "displayName": "Profile", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "f36aa4e3-d275-41d0-843a-876ec66bc2f7", - "relatedFieldId": "42d31012-6164-472a-92d0-a8f5dc0486d4", - "allowMultipleSelection": false - }, - "required": false, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - }, - { - "id": "f36aa4e3-d275-41d0-843a-876ec66bc2f7", - "name": "Profile", - "displayName": "Profile", - "pluralDisplayName": "Profiles", - "pluralName": "profiles", - "fields": [ - { - "id": "fbf703ef-c844-4ccc-9e0b-519bb5865dd4", - "permanentId": "34306463-d040-40cf-8027-732256a2f09a", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": { - "idType": "CUID" - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "9fb9d3a7-dbb9-446d-86c6-64288f155376", - "permanentId": "0f95129d-21bc-4356-b654-06bb6bc716d9", - "name": "createdIn", - "displayName": "Created In", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "9fb9d3a7-dbb9-446d-86c6-64288f155376", - "permanentId": "0f95129d-21bc-4356-b654-06bb6bc716d9", - "name": "createdAt", - "displayName": "Created At", - "dataType": "DateTime", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "6c373d03-3e01-4b49-9a24-abae9a019acb", - "permanentId": "540c2056-7b17-4d9f-b880-d151f3d09e36", - "name": "updatedIn", - "displayName": "Updated In", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "6c373d03-3e01-4b49-9a24-abae9a019acb", - "permanentId": "540c2056-7b17-4d9f-b880-d151f3d09e36", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "DateTime", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "73ae2f7e-be53-4ad1-9e0a-e67b4813f152", - "permanentId": "50068313-7da1-406a-a6d0-99600ef0291a", - "name": "email", - "displayName": "Email", - "dataType": "Email", - "properties": {}, - "required": true, - "unique": true, - "searchable": true - }, - { - "id": "c98933ba-1fbb-46b3-9460-07328bc3b08b", - "permanentId": "42d31012-6164-472a-92d0-a8f5dc0486d4", - "name": "user", - "displayName": "User", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "aed41776-99ca-4674-b26d-0458fd440875", - "relatedFieldId": "118e407b-30f7-48da-af9c-de1393548b4c", - "allowMultipleSelection": false - }, - "required": false, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - }, - { - "id": "dc63b5ef-e386-4a1c-b764-8926dd3066b8", - "name": "Order", - "displayName": "Order", - "pluralDisplayName": "Orders", - "pluralName": "Orders", - "fields": [ - { - "id": "77f9b90c-d304-4d2f-a4de-82d9d08ab291", - "permanentId": "77f9b90c-d304-4d2f-a4de-82d9d08ab292", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "67063f41-e123-4c19-9707-5df92df469a4", - "permanentId": "67063f41-e123-4c19-9707-5df92df469a1", - "name": "createdAt", - "displayName": "Created At", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "b77e5adf-71ce-4b22-b37b-f8641e277032", - "permanentId": "b77e5adf-71ce-4b22-b37b-f8641e277031", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "77c79b5e-b298-44b2-9648-d417c92a282b", - "permanentId": "77c79b5e-b298-44b2-9648-d417c92a282b", - "name": "customer", - "displayName": "Customer", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "b8d49afb-8c12-49fa-9d6e-eb64be0ddded", - "relatedFieldId": "a766a160-506c-4212-9e5e-8ecd1d530eb4" - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "474eda0e-4ad1-4ab6-9cd5-bfde089a833c", - "permanentId": "474eda0e-4ad1-4ab6-9cd5-bfde089a8331", - "name": "status", - "displayName": "Status", - "dataType": "OptionSet", - "properties": { - "options": [ - { - "label": "Pending", - "value": "pending" - }, - { - "label": "In Progress", - "value": "inProgress" - }, - { - "label": "Done", - "value": "done" - } - ] - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "8ee1d632-078e-4932-8fbd-1470df109821", - "permanentId": "8ee1d632-078e-4932-8fbd-1470df109822", - "name": "label", - "displayName": "Label", - "dataType": "OptionSet", - "properties": { - "options": [ - { - "label": "Fragile", - "value": "fragile" - } - ] - }, - "required": false, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - } - ] - }, - { - "id": "3426e3f7-c316-416e-b7a1-d2a1bce17a4", - "name": "Organization", - "displayName": "Organization", - "pluralDisplayName": "Organizations", - "pluralName": "Organizations", - "fields": [ - { - "id": "afcc24cf-e302-46f7-9457-843a0ec7a9d5", - "permanentId": "afcc24cf-e302-46f7-9457-843a0ec7a9d1", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "4c22d45e-997c-4c9a-8bb8-c7b69c273da1", - "permanentId": "4c22d45e-997c-4c9a-8bb8-c7b69c273da2", - "name": "createdAt", - "displayName": "Created At", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "3f34a87a-f392-47bf-bfab-2eb23cdbffd4", - "permanentId": "3f34a87a-f392-47bf-bfab-2eb23cdbffd1", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "22c4a27a-6490-4fb8-b951-7f42ded681bc", - "permanentId": "22c4a27a-6490-4fb8-b951-7f42ded681b1", - "name": "name", - "displayName": "Name", - "dataType": "SingleLineText", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "22c4a27a-6490-4fb8-b951-7f42ded6a766", - "permanentId": "3c5f6e76-a124-4f9a-a944-c75f55495859", - "name": "users", - "displayName": "Users", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "aed41776-99ca-4674-b26d-0458fd440875", - "relatedFieldId": "ae21f2fb-9174-49de-9576-632d859a5dd1", - "allowMultipleSelection": true - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "22c4a27a-6490-4fb8-b951-7f42ded68b99", - "permanentId": "8d84e22b-ced7-46d7-8ffb-78b74477553a", - "name": "customers", - "displayName": "Customers", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "b8d49afb-8c12-49fa-9d6e-eb64be0ddded", - "relatedFieldId": "e4ea7c84-e998-482e-8bd2-34657a3ff23c", - "allowMultipleSelection": true - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "22c4a27a-6490-4fb8-b951-7f42d77a7b99", - "permanentId": "e0c1e5c4-71ae-4584-9e8b-fd1ac8c3b577", - "name": "vipCustomers", - "displayName": "VIP Customers", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "b8d49afb-8c12-49fa-9d6e-eb64be0ddded", - "relatedFieldId": "3e64e7d1-b1d2-4c5a-a546-b4f493dc4f57", - "allowMultipleSelection": true - }, - "required": true, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - }, - { - "id": "b8d49afb-8c12-49fa-9d6e-eb64be0ddded", - "name": "Customer", - "displayName": "The Customer", - "pluralDisplayName": "The Customers", - "pluralName": "TheCustomer", - "fields": [ - { - "id": "492ba140-5dde-419a-a087-199ddb8b2dc0", - "permanentId": "492ba140-5dde-419a-a087-199ddb8b2dc1", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": { - "idType": "CUID" - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "d4d95cff-e8f4-4bd4-b102-fd10c93d5dea", - "permanentId": "d4d95cff-e8f4-4bd4-b102-fd10c93d5de1", - "name": "createdAt", - "displayName": "Created At", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "68435ba2-711c-4a86-aa8f-af3b693c4433", - "permanentId": "68435ba2-711c-4a86-aa8f-af3b693c4431", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "15ca8761-2b26-4893-9306-a6fd384efdce", - "permanentId": "15ca8761-2b26-4893-9306-a6fd384efdc1", - "name": "email", - "displayName": "Email", - "dataType": "Email", - "properties": {}, - "required": true, - "unique": true, - "searchable": true - }, - { - "id": "ad93150b-615a-4b95-837e-3b3ab4d378eb", - "permanentId": "ad93150b-615a-4b95-837e-3b3ab4d378e1", - "name": "firstName", - "displayName": "First Name", - "dataType": "SingleLineText", - "properties": {}, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "6a12fcaa-9e0f-4d4a-b2ce-67d7d896f438", - "permanentId": "6a12fcaa-9e0f-4d4a-b2ce-67d7d896f431", - "name": "lastName", - "displayName": "Last Name", - "dataType": "SingleLineText", - "properties": {}, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "9f1681d5-59ac-4d6a-9fe5-d90832cd32fe", - "permanentId": "9f1681d5-59ac-4d6a-9fe5-d90832cd32f1", - "name": "isVip", - "displayName": "VIP", - "dataType": "Boolean", - "properties": {}, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "02242b3d-7f0b-489b-ae83-b772975dea06", - "permanentId": "02242b3d-7f0b-489b-ae83-b772975dea01", - "name": "birthData", - "displayName": "Birth Data", - "dataType": "DateTime", - "properties": { - "timeZone": "localTime", - "dateOnly": true - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "fa359cdb-60b1-4a8c-a59b-d70a2370fbd6", - "permanentId": "fa359cdb-60b1-4a8c-a59b-d70a2370fbd1", - "name": "averageSale", - "displayName": "Average Sale (-1500.00 - 1500.00)", - "dataType": "DecimalNumber", - "properties": { - "minimumValue": 1500, - "maximumValue": -1500, - "precision": 2 - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "88931847-cfff-4345-8faf-82a762160340", - "permanentId": "88931847-cfff-4345-8faf-82a762160341", - "name": "favoriteNumber", - "displayName": "Favorite Number (1 - 20)", - "dataType": "WholeNumber", - "properties": { - "minimumValue": 1, - "maximumValue": 20 - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "75f4b8c8-a1e7-4b83-aef2-b3b0b0c5d0bc", - "permanentId": "75f4b8c8-a1e7-4b83-aef2-b3b0b0c5d0b1", - "name": "geoLocation", - "displayName": "Geographic Location", - "dataType": "GeographicLocation", - "properties": {}, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "ecd8dbca-3524-4e38-985e-cc72c28f0b99", - "permanentId": "ecd8dbca-3524-4e38-985e-cc72c28f0b91", - "name": "comments", - "displayName": "Comments (up to 500 characters)", - "dataType": "MultiLineText", - "properties": { - "maxLength": 500 - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a8", - "permanentId": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a1", - "name": "customerType", - "displayName": "Customer Type", - "dataType": "OptionSet", - "properties": { - "options": [ - { - "label": "Platinum", - "value": "platinum" - }, - { - "label": "Gold", - "value": "gold" - }, - { - "label": "Bronze", - "value": "bronze" - }, - { - "label": "Regular", - "value": "regular" - } - ] - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26111b7", - "permanentId": "e4ea7c84-e998-482e-8bd2-34657a3ff23c", - "name": "organization", - "displayName": "Organization", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "3426e3f7-c316-416e-b7a1-d2a1bce17a4", - "relatedFieldId": "8d84e22b-ced7-46d7-8ffb-78b74477553a", - "allowMultipleSelection": false - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26113a2", - "permanentId": "3e64e7d1-b1d2-4c5a-a546-b4f493dc4f57", - "name": "vipOrganization", - "displayName": "VIP Organization", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "3426e3f7-c316-416e-b7a1-d2a1bce17a4", - "relatedFieldId": "e0c1e5c4-71ae-4584-9e8b-fd1ac8c3b577", - "allowMultipleSelection": false - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "e0d70a60-6a1c-47be-8687-2d07f3e9399a", - "permanentId": "a766a160-506c-4212-9e5e-8ecd1d530eb4", - "name": "orders", - "displayName": "Orders", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "dc63b5ef-e386-4a1c-b764-8926dd3066b8", - "relatedFieldId": "77c79b5e-b298-44b2-9648-d417c92a282b", - "allowMultipleSelection": true - }, - "required": false, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - }, - { - "id": "0c5ad4df-0467-444a-a249-94c2465ae90d", - "name": "Empty", - "displayName": "Empty", - "pluralDisplayName": "Empties", - "pluralName": "Empties", - "fields": [ - { - "id": "d5e8346e-5382-41cb-bcf7-563678709bea", - "permanentId": "d5e8346e-5382-41cb-bcf7-563678709be1", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "26273293-4cd3-4765-b316-07d68ca99d44", - "permanentId": "26273293-4cd3-4765-b316-07d68ca99d41", - "name": "createdAt", - "displayName": "Created At", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "97c4cded-8b11-4907-8079-861b2d83125f", - "permanentId": "97c4cded-8b11-4907-8079-861b2d831251", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - } - ], - "roles": [ - { - "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", - "displayName": "User", - "name": "user" - }, - { - "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", - "displayName": "Admin", - "name": "admin" - }, - { - "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", - "displayName": "Area Manager", - "name": "areaManager" - } - ], - "resourceInfo": { - "name": "Sample Application", - "description": "Sample application for testing", - "version": "0.1.3", - "id": "ckl0ow1xj00763cjnch10k6mc", - "url": "https://app.amplication.com/ckl0ow1xj00763cjnch10k6mc", - "settings": { - "resourceId": "ckl0ow1xj00763cjnch10k6mc", - "authProvider": "Http", - "serverSettings": { - "generateGraphQL": true, - "generateRestApi": true, - "serverPath": "" - }, - "adminUISettings": { - "generateAdminUI": true, - "adminUIPath": "" - }, - "authEntityName": "User" - }, - "codeGeneratorVersionOptions": { - "codeGeneratorVersion": null, - "codeGeneratorStrategy": "LatestMajor" - } - }, - "resourceType": "Service", - "pluginInstallations": [ - { - "id": "mysql-id", - "pluginId": "db-mysql", - "npm": "@amplication/plugin-db-mysql", - "enabled": true, - "version": "latest" - }, - { - "id": "auth-core-id", - "pluginId": "auth-core", - "npm": "@amplication/plugin-auth-core", - "enabled": true, - "version": "latest" - }, - { - "id": "auth-jwt-id", - "pluginId": "auth-auth0", - "npm": "@amplication/plugin-auth-auth0", - "enabled": true, - "version": "latest" - } - ], - "moduleActions": [ - { - "id": "clraten5x000rc9yh29927zwf", - "displayName": "Promote User", - "description": "Promote one User to admin", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "promoteUser", - "path": "/:id/promote", - "enabled": true, - "restVerb": "Post", - "actionType": "Custom", - "gqlOperation": "Mutation", - "outputType": { - "isArray": true, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - }, - "inputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserArgsDtoId" - }, - "restInputSource": "Split", - "restInputParamsPropertyName": "where", - "restInputBodyPropertyName": "data", - "restInputQueryPropertyName": "query" - }, - { - "id": "clraten5x000rc9yh29927zwf", - "displayName": "Send Password Reset Email", - "description": "Send password reset email to one User", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "sendPasswordResetEmail", - "path": "/:id/sendPasswordResetEmail", - "enabled": true, - "restVerb": "Patch", - "actionType": "Custom", - "gqlOperation": "Mutation", - "outputType": { - "isArray": false, - "type": "Boolean", - "dtoId": "" - }, - "inputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - } - }, - { - "id": "clraten5x000rc9yh29927zwf", - "displayName": "Resend Invite Email", - "description": "Resend invite email to one User", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "resendInviteEmail", - "path": "/:id/resendInviteEmail", - "enabled": true, - "restVerb": "Get", - "actionType": "Custom", - "gqlOperation": "Query", - "outputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - }, - "inputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - } - }, - { - "id": "clraten5x000rc9yh29927zwf", - "displayName": "Soft Delete User", - "description": "Soft delete one User", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "softDeleteUser", - "path": "/:id/softDeleteUser", - "enabled": true, - "restVerb": "Delete", - "actionType": "Custom", - "gqlOperation": "Mutation", - "outputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - }, - "inputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - } - } - ], - "moduleContainers": [ - { - "id": "clraten4g000fc9yhr62nxheo", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": null, - "name": "User", - "enabled": true, - "entityId": "aed41776-99ca-4674-b26d-0458fd440875" - } - ], - "moduleDtos": [ - { - "id": "clraten970011c9yhe7fmtc2p", - "description": "Args type for User deletion", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "DeleteUserArgs", - "dtoType": "DeleteArgs", - "enabled": true, - "properties": [] - }, - { - "id": "clraten980019c9yhv4pjmzqp", - "description": "Args type for User creation", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "CreateUserArgs", - "dtoType": "CreateArgs", - "enabled": true, - "properties": [] - }, - { - "id": "UserWhereUniqueInput_ID", - "description": "", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "UserWhereUniqueInput", - "dtoType": "WhereUniqueInput", - "enabled": true, - "properties": [] - }, - { - "id": "promoteUserArgsDtoId", - "description": "", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "PromoteUserArgs", - "dtoType": "Custom", - "enabled": true, - "properties": [ - { - "name": "data", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Dto", - "dtoId": "promoteUserInputDtoId", - "isArray": false - } - ] - }, - { - "name": "where", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "Dto", - "dtoId": "UserWhereUniqueInput_ID", - "isArray": false - } - ] - }, - { - "name": "query", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "Dto", - "dtoId": "UserWhereUniqueInput_ID", - "isArray": false - } - ] - } - ] - }, - { - "id": "promoteUserInputDtoId", - "description": "", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "PromoteUserInput", - "dtoType": "Custom", - "enabled": true, - "properties": [ - { - "name": "userId", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "String", - "dtoId": null, - "isArray": true - } - ] - }, - { - "name": "score", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "Integer", - "isArray": false - } - ] - }, - { - "name": "isAdmin", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "Boolean", - "isArray": false - } - ] - }, - { - "name": "lastLogin", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "DateTime", - "isArray": false - } - ] - }, - { - "name": "weightedScore", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Float", - "isArray": false - } - ] - }, - { - "name": "extendedProfile", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Json", - "isArray": false - } - ] - }, - { - "name": "selfReference", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Dto", - "isArray": false, - "dtoId": "promoteUserInputDtoId" - } - ] - }, - { - "name": "selfReferenceArray", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Dto", - "isArray": true, - "dtoId": "promoteUserInputDtoId" - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/test-cases/postgres-auth0/dsg.env b/test-cases/postgres-auth0/dsg.env deleted file mode 100644 index 004df52..0000000 --- a/test-cases/postgres-auth0/dsg.env +++ /dev/null @@ -1,2 +0,0 @@ -BUILD_SPEC_PATH=/data/test-cases/postgres-auth0/input.json -BUILD_OUTPUT_PATH=/data/test-cases/postgres-auth0/generated \ No newline at end of file diff --git a/test-cases/postgres-auth0/input.json b/test-cases/postgres-auth0/input.json deleted file mode 100644 index 69f3471..0000000 --- a/test-cases/postgres-auth0/input.json +++ /dev/null @@ -1,1351 +0,0 @@ -{ - "buildId": "1", - "entities": [ - { - "id": "aed41776-99ca-4674-b26d-0458fd440875", - "name": "User", - "displayName": "User", - "pluralDisplayName": "Users", - "pluralName": "users", - "fields": [ - { - "id": "053e75d0-9f02-4182-8f61-46fbdbaa71bd", - "permanentId": "053e75d0-9f02-4182-8f61-46fbdbaa71b1", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": { - "idType": "CUID" - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "053e75d0-9f02-4182-8f61-46fbdbaa71bd", - "permanentId": "053e75d0-9f02-4182-8f61-46fbdbaa71b1", - "name": "username", - "displayName": "Username", - "dataType": "Username", - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "053e75d0-9f02-4182-8f61-46fbdbaa71bd", - "permanentId": "053e75d0-9f02-4182-8f61-46fbdbaa71b1", - "name": "roles", - "displayName": "Roles", - "dataType": "Roles", - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "053e75d0-9f02-4182-8f61-46fbdbaa71bd", - "permanentId": "053e75d0-9f02-4182-8f61-46fbdbaa71b1", - "name": "password", - "displayName": "Password", - "dataType": "Password", - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "a4e0c058-5768-4481-9da9-e48c73ab224d", - "permanentId": "a4e0c058-5768-4481-9da9-e48c73ab2241", - "name": "name", - "displayName": "Name", - "required": true, - "unique": false, - "searchable": true, - "dataType": "SingleLineText" - }, - { - "id": "e3fa6ddd-ad36-48ce-8042-9c0aa576e5a9", - "permanentId": "e3fa6ddd-ad36-48ce-8042-9c0aa576e5a1", - "name": "bio", - "displayName": "Bio", - "required": true, - "unique": false, - "searchable": true, - "dataType": "MultiLineText" - }, - { - "id": "8c5c4130-94b0-4ce4-a4cb-4e42bf7a9b37", - "permanentId": "8c5c4130-94b0-4ce4-a4cb-4e42bf7a9b31", - "name": "email", - "displayName": "Email", - "required": true, - "unique": true, - "searchable": true, - "dataType": "Email" - }, - { - "id": "71ba3f5e-7324-4ace-af95-d4bcea8f8368", - "permanentId": "71ba3f5e-7324-4ace-af95-d4bcea8f8361", - "name": "age", - "displayName": "Age", - "required": true, - "unique": false, - "searchable": true, - "dataType": "WholeNumber" - }, - { - "id": "b491038d-f588-45e3-b97f-9074f3ed8c83", - "permanentId": "b491038d-f588-45e3-b97f-9074f3ed8c81", - "name": "birthDate", - "displayName": "Birth Date", - "required": true, - "unique": false, - "searchable": true, - "dataType": "DateTime", - "properties": { - "dataOnly": false - } - }, - { - "id": "9fa9604e-f9ab-45fb-b8bd-557ae10eda8c", - "permanentId": "9fa9604e-f9ab-45fb-b8bd-557ae10eda81", - "name": "score", - "displayName": "Score", - "required": true, - "unique": false, - "searchable": false, - "dataType": "DecimalNumber" - }, - { - "id": "a7b32c49-e73d-4b6f-9efb-fcb77e60b303", - "permanentId": "9bb55fcc-1c3a-4b99-8bcf-6ea85d052c3d", - "name": "manager", - "displayName": "Manager", - "required": false, - "unique": false, - "searchable": true, - "dataType": "Lookup", - "properties": { - "relatedEntityId": "aed41776-99ca-4674-b26d-0458fd440875", - "relatedFieldId": "7bb3d5c1-f5b9-4fa4-8087-87f0c549d5f2", - "allowMultipleSelection": false - } - }, - { - "id": "3787591a-333b-45c5-9e9d-362d9697bb38", - "permanentId": "7bb3d5c1-f5b9-4fa4-8087-87f0c549d5f2", - "name": "employees", - "displayName": "Employees", - "required": false, - "unique": false, - "searchable": false, - "dataType": "Lookup", - "properties": { - "relatedEntityId": "aed41776-99ca-4674-b26d-0458fd440875", - "relatedFieldId": "9bb55fcc-1c3a-4b99-8bcf-6ea85d052c3d", - "allowMultipleSelection": true - } - }, - { - "id": "9fa9604e-f9ab-45fb-b8bd-557ae1011111", - "permanentId": "ae21f2fb-9174-49de-9576-632d859a5dd1", - "name": "organizations", - "displayName": "Organizations", - "required": false, - "unique": false, - "searchable": true, - "dataType": "Lookup", - "properties": { - "relatedEntityId": "3426e3f7-c316-416e-b7a1-d2a1bce17a4", - "relatedFieldId": "3c5f6e76-a124-4f9a-a944-c75f55495859", - "allowMultipleSelection": true - } - }, - { - "id": "daa757a6-4e15-4afc-a6e3-d4366d64367a", - "permanentId": "daa757a6-4e15-4afc-a6e3-d4366d643671", - "name": "priority", - "displayName": "Priority", - "required": true, - "unique": false, - "searchable": true, - "dataType": "OptionSet", - "properties": { - "options": [ - { - "label": "High", - "value": "high" - }, - { - "label": "Medium", - "value": "medium" - }, - { - "label": "Low", - "value": "low" - } - ] - } - }, - { - "id": "e88e745f-e4a0-414a-b43d-99d7728d1207", - "permanentId": "e88e745f-e4a0-414a-b43d-99d7728d1201", - "name": "isCurious", - "displayName": "Is Curious", - "required": true, - "unique": false, - "searchable": true, - "dataType": "Boolean" - }, - { - "id": "e8b7aca3-e761-4d0c-9196-b983d63ae80d", - "permanentId": "e8b7aca3-e761-4d0c-9196-b983d63ae801", - "name": "location", - "displayName": "Location", - "required": true, - "unique": false, - "searchable": true, - "dataType": "GeographicLocation" - }, - { - "id": "e8b7aca3-e761-4d0c-9196-b983d63ae755", - "permanentId": "e8b7aca3-e761-4d0c-9196-b983d63ae755", - "name": "extendedProperties", - "displayName": "Extended Properties", - "required": true, - "unique": false, - "searchable": true, - "dataType": "Json" - }, - { - "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26111b7", - "permanentId": "118e407b-30f7-48da-af9c-de1393548b4c", - "name": "profile", - "displayName": "Profile", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "f36aa4e3-d275-41d0-843a-876ec66bc2f7", - "relatedFieldId": "42d31012-6164-472a-92d0-a8f5dc0486d4", - "allowMultipleSelection": false - }, - "required": false, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - }, - { - "id": "f36aa4e3-d275-41d0-843a-876ec66bc2f7", - "name": "Profile", - "displayName": "Profile", - "pluralDisplayName": "Profiles", - "pluralName": "profiles", - "fields": [ - { - "id": "fbf703ef-c844-4ccc-9e0b-519bb5865dd4", - "permanentId": "34306463-d040-40cf-8027-732256a2f09a", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": { - "idType": "CUID" - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "9fb9d3a7-dbb9-446d-86c6-64288f155376", - "permanentId": "0f95129d-21bc-4356-b654-06bb6bc716d9", - "name": "createdIn", - "displayName": "Created In", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "9fb9d3a7-dbb9-446d-86c6-64288f155376", - "permanentId": "0f95129d-21bc-4356-b654-06bb6bc716d9", - "name": "createdAt", - "displayName": "Created At", - "dataType": "DateTime", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "6c373d03-3e01-4b49-9a24-abae9a019acb", - "permanentId": "540c2056-7b17-4d9f-b880-d151f3d09e36", - "name": "updatedIn", - "displayName": "Updated In", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "6c373d03-3e01-4b49-9a24-abae9a019acb", - "permanentId": "540c2056-7b17-4d9f-b880-d151f3d09e36", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "DateTime", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "73ae2f7e-be53-4ad1-9e0a-e67b4813f152", - "permanentId": "50068313-7da1-406a-a6d0-99600ef0291a", - "name": "email", - "displayName": "Email", - "dataType": "Email", - "properties": {}, - "required": true, - "unique": true, - "searchable": true - }, - { - "id": "c98933ba-1fbb-46b3-9460-07328bc3b08b", - "permanentId": "42d31012-6164-472a-92d0-a8f5dc0486d4", - "name": "user", - "displayName": "User", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "aed41776-99ca-4674-b26d-0458fd440875", - "relatedFieldId": "118e407b-30f7-48da-af9c-de1393548b4c", - "allowMultipleSelection": false - }, - "required": false, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - }, - { - "id": "dc63b5ef-e386-4a1c-b764-8926dd3066b8", - "name": "Order", - "displayName": "Order", - "pluralDisplayName": "Orders", - "pluralName": "Orders", - "fields": [ - { - "id": "77f9b90c-d304-4d2f-a4de-82d9d08ab291", - "permanentId": "77f9b90c-d304-4d2f-a4de-82d9d08ab292", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "67063f41-e123-4c19-9707-5df92df469a4", - "permanentId": "67063f41-e123-4c19-9707-5df92df469a1", - "name": "createdAt", - "displayName": "Created At", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "b77e5adf-71ce-4b22-b37b-f8641e277032", - "permanentId": "b77e5adf-71ce-4b22-b37b-f8641e277031", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "77c79b5e-b298-44b2-9648-d417c92a282b", - "permanentId": "77c79b5e-b298-44b2-9648-d417c92a282b", - "name": "customer", - "displayName": "Customer", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "b8d49afb-8c12-49fa-9d6e-eb64be0ddded", - "relatedFieldId": "a766a160-506c-4212-9e5e-8ecd1d530eb4" - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "474eda0e-4ad1-4ab6-9cd5-bfde089a833c", - "permanentId": "474eda0e-4ad1-4ab6-9cd5-bfde089a8331", - "name": "status", - "displayName": "Status", - "dataType": "OptionSet", - "properties": { - "options": [ - { - "label": "Pending", - "value": "pending" - }, - { - "label": "In Progress", - "value": "inProgress" - }, - { - "label": "Done", - "value": "done" - } - ] - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "8ee1d632-078e-4932-8fbd-1470df109821", - "permanentId": "8ee1d632-078e-4932-8fbd-1470df109822", - "name": "label", - "displayName": "Label", - "dataType": "OptionSet", - "properties": { - "options": [ - { - "label": "Fragile", - "value": "fragile" - } - ] - }, - "required": false, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "Public" - } - ] - }, - { - "id": "3426e3f7-c316-416e-b7a1-d2a1bce17a4", - "name": "Organization", - "displayName": "Organization", - "pluralDisplayName": "Organizations", - "pluralName": "Organizations", - "fields": [ - { - "id": "afcc24cf-e302-46f7-9457-843a0ec7a9d5", - "permanentId": "afcc24cf-e302-46f7-9457-843a0ec7a9d1", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "4c22d45e-997c-4c9a-8bb8-c7b69c273da1", - "permanentId": "4c22d45e-997c-4c9a-8bb8-c7b69c273da2", - "name": "createdAt", - "displayName": "Created At", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "3f34a87a-f392-47bf-bfab-2eb23cdbffd4", - "permanentId": "3f34a87a-f392-47bf-bfab-2eb23cdbffd1", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "22c4a27a-6490-4fb8-b951-7f42ded681bc", - "permanentId": "22c4a27a-6490-4fb8-b951-7f42ded681b1", - "name": "name", - "displayName": "Name", - "dataType": "SingleLineText", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "22c4a27a-6490-4fb8-b951-7f42ded6a766", - "permanentId": "3c5f6e76-a124-4f9a-a944-c75f55495859", - "name": "users", - "displayName": "Users", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "aed41776-99ca-4674-b26d-0458fd440875", - "relatedFieldId": "ae21f2fb-9174-49de-9576-632d859a5dd1", - "allowMultipleSelection": true - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "22c4a27a-6490-4fb8-b951-7f42ded68b99", - "permanentId": "8d84e22b-ced7-46d7-8ffb-78b74477553a", - "name": "customers", - "displayName": "Customers", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "b8d49afb-8c12-49fa-9d6e-eb64be0ddded", - "relatedFieldId": "e4ea7c84-e998-482e-8bd2-34657a3ff23c", - "allowMultipleSelection": true - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "22c4a27a-6490-4fb8-b951-7f42d77a7b99", - "permanentId": "e0c1e5c4-71ae-4584-9e8b-fd1ac8c3b577", - "name": "vipCustomers", - "displayName": "VIP Customers", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "b8d49afb-8c12-49fa-9d6e-eb64be0ddded", - "relatedFieldId": "3e64e7d1-b1d2-4c5a-a546-b4f493dc4f57", - "allowMultipleSelection": true - }, - "required": true, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - }, - { - "id": "b8d49afb-8c12-49fa-9d6e-eb64be0ddded", - "name": "Customer", - "displayName": "The Customer", - "pluralDisplayName": "The Customers", - "pluralName": "TheCustomer", - "fields": [ - { - "id": "492ba140-5dde-419a-a087-199ddb8b2dc0", - "permanentId": "492ba140-5dde-419a-a087-199ddb8b2dc1", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": { - "idType": "CUID" - }, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "d4d95cff-e8f4-4bd4-b102-fd10c93d5dea", - "permanentId": "d4d95cff-e8f4-4bd4-b102-fd10c93d5de1", - "name": "createdAt", - "displayName": "Created At", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "68435ba2-711c-4a86-aa8f-af3b693c4433", - "permanentId": "68435ba2-711c-4a86-aa8f-af3b693c4431", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "15ca8761-2b26-4893-9306-a6fd384efdce", - "permanentId": "15ca8761-2b26-4893-9306-a6fd384efdc1", - "name": "email", - "displayName": "Email", - "dataType": "Email", - "properties": {}, - "required": true, - "unique": true, - "searchable": true - }, - { - "id": "ad93150b-615a-4b95-837e-3b3ab4d378eb", - "permanentId": "ad93150b-615a-4b95-837e-3b3ab4d378e1", - "name": "firstName", - "displayName": "First Name", - "dataType": "SingleLineText", - "properties": {}, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "6a12fcaa-9e0f-4d4a-b2ce-67d7d896f438", - "permanentId": "6a12fcaa-9e0f-4d4a-b2ce-67d7d896f431", - "name": "lastName", - "displayName": "Last Name", - "dataType": "SingleLineText", - "properties": {}, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "9f1681d5-59ac-4d6a-9fe5-d90832cd32fe", - "permanentId": "9f1681d5-59ac-4d6a-9fe5-d90832cd32f1", - "name": "isVip", - "displayName": "VIP", - "dataType": "Boolean", - "properties": {}, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "02242b3d-7f0b-489b-ae83-b772975dea06", - "permanentId": "02242b3d-7f0b-489b-ae83-b772975dea01", - "name": "birthData", - "displayName": "Birth Data", - "dataType": "DateTime", - "properties": { - "timeZone": "localTime", - "dateOnly": true - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "fa359cdb-60b1-4a8c-a59b-d70a2370fbd6", - "permanentId": "fa359cdb-60b1-4a8c-a59b-d70a2370fbd1", - "name": "averageSale", - "displayName": "Average Sale (-1500.00 - 1500.00)", - "dataType": "DecimalNumber", - "properties": { - "minimumValue": 1500, - "maximumValue": -1500, - "precision": 2 - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "88931847-cfff-4345-8faf-82a762160340", - "permanentId": "88931847-cfff-4345-8faf-82a762160341", - "name": "favoriteNumber", - "displayName": "Favorite Number (1 - 20)", - "dataType": "WholeNumber", - "properties": { - "minimumValue": 1, - "maximumValue": 20 - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "75f4b8c8-a1e7-4b83-aef2-b3b0b0c5d0bc", - "permanentId": "75f4b8c8-a1e7-4b83-aef2-b3b0b0c5d0b1", - "name": "geoLocation", - "displayName": "Geographic Location", - "dataType": "GeographicLocation", - "properties": {}, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "ecd8dbca-3524-4e38-985e-cc72c28f0b99", - "permanentId": "ecd8dbca-3524-4e38-985e-cc72c28f0b91", - "name": "comments", - "displayName": "Comments (up to 500 characters)", - "dataType": "MultiLineText", - "properties": { - "maxLength": 500 - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a8", - "permanentId": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a1", - "name": "customerType", - "displayName": "Customer Type", - "dataType": "OptionSet", - "properties": { - "options": [ - { - "label": "Platinum", - "value": "platinum" - }, - { - "label": "Gold", - "value": "gold" - }, - { - "label": "Bronze", - "value": "bronze" - }, - { - "label": "Regular", - "value": "regular" - } - ] - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26111b7", - "permanentId": "e4ea7c84-e998-482e-8bd2-34657a3ff23c", - "name": "organization", - "displayName": "Organization", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "3426e3f7-c316-416e-b7a1-d2a1bce17a4", - "relatedFieldId": "8d84e22b-ced7-46d7-8ffb-78b74477553a", - "allowMultipleSelection": false - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26113a2", - "permanentId": "3e64e7d1-b1d2-4c5a-a546-b4f493dc4f57", - "name": "vipOrganization", - "displayName": "VIP Organization", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "3426e3f7-c316-416e-b7a1-d2a1bce17a4", - "relatedFieldId": "e0c1e5c4-71ae-4584-9e8b-fd1ac8c3b577", - "allowMultipleSelection": false - }, - "required": false, - "unique": false, - "searchable": true - }, - { - "id": "e0d70a60-6a1c-47be-8687-2d07f3e9399a", - "permanentId": "a766a160-506c-4212-9e5e-8ecd1d530eb4", - "name": "orders", - "displayName": "Orders", - "dataType": "Lookup", - "properties": { - "relatedEntityId": "dc63b5ef-e386-4a1c-b764-8926dd3066b8", - "relatedFieldId": "77c79b5e-b298-44b2-9648-d417c92a282b", - "allowMultipleSelection": true - }, - "required": false, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - }, - { - "id": "0c5ad4df-0467-444a-a249-94c2465ae90d", - "name": "Empty", - "displayName": "Empty", - "pluralDisplayName": "Empties", - "pluralName": "Empties", - "fields": [ - { - "id": "d5e8346e-5382-41cb-bcf7-563678709bea", - "permanentId": "d5e8346e-5382-41cb-bcf7-563678709be1", - "name": "id", - "displayName": "Id", - "dataType": "Id", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "26273293-4cd3-4765-b316-07d68ca99d44", - "permanentId": "26273293-4cd3-4765-b316-07d68ca99d41", - "name": "createdAt", - "displayName": "Created At", - "dataType": "CreatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - }, - { - "id": "97c4cded-8b11-4907-8079-861b2d83125f", - "permanentId": "97c4cded-8b11-4907-8079-861b2d831251", - "name": "updatedAt", - "displayName": "Updated At", - "dataType": "UpdatedAt", - "properties": {}, - "required": true, - "unique": false, - "searchable": true - } - ], - "permissions": [ - { - "action": "Create", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Delete", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Search", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "Update", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - }, - { - "action": "View", - "permissionFields": [], - "permissionRoles": [], - "type": "AllRoles" - } - ] - } - ], - "roles": [ - { - "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", - "displayName": "User", - "name": "user" - }, - { - "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", - "displayName": "Admin", - "name": "admin" - }, - { - "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", - "displayName": "Area Manager", - "name": "areaManager" - } - ], - "resourceInfo": { - "name": "Sample Application", - "description": "Sample application for testing", - "version": "0.1.3", - "id": "ckl0ow1xj00763cjnch10k6mc", - "url": "https://app.amplication.com/ckl0ow1xj00763cjnch10k6mc", - "settings": { - "resourceId": "ckl0ow1xj00763cjnch10k6mc", - "authProvider": "Http", - "serverSettings": { - "generateGraphQL": true, - "generateRestApi": true, - "serverPath": "" - }, - "adminUISettings": { - "generateAdminUI": true, - "adminUIPath": "" - }, - "authEntityName": "User" - }, - "codeGeneratorVersionOptions": { - "codeGeneratorVersion": null, - "codeGeneratorStrategy": "LatestMajor" - } - }, - "resourceType": "Service", - "pluginInstallations": [ - { - "id": "postgres-id", - "pluginId": "db-postgres", - "npm": "@amplication/plugin-db-postgres", - "enabled": true, - "version": "latest" - }, - { - "id": "auth-core-id", - "pluginId": "auth-core", - "npm": "@amplication/plugin-auth-core", - "enabled": true, - "version": "latest" - }, - { - "id": "auth-jwt-id", - "pluginId": "auth-auth0", - "npm": "@amplication/plugin-auth-auth0", - "enabled": true, - "version": "latest" - } - ], - "moduleActions": [ - { - "id": "clraten5x000rc9yh29927zwf", - "displayName": "Promote User", - "description": "Promote one User to admin", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "promoteUser", - "path": "/:id/promote", - "enabled": true, - "restVerb": "Post", - "actionType": "Custom", - "gqlOperation": "Mutation", - "outputType": { - "isArray": true, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - }, - "inputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserArgsDtoId" - }, - "restInputSource": "Split", - "restInputParamsPropertyName": "where", - "restInputBodyPropertyName": "data", - "restInputQueryPropertyName": "query" - }, - { - "id": "clraten5x000rc9yh29927zwf", - "displayName": "Send Password Reset Email", - "description": "Send password reset email to one User", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "sendPasswordResetEmail", - "path": "/:id/sendPasswordResetEmail", - "enabled": true, - "restVerb": "Patch", - "actionType": "Custom", - "gqlOperation": "Mutation", - "outputType": { - "isArray": false, - "type": "Boolean", - "dtoId": "" - }, - "inputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - } - }, - { - "id": "clraten5x000rc9yh29927zwf", - "displayName": "Resend Invite Email", - "description": "Resend invite email to one User", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "resendInviteEmail", - "path": "/:id/resendInviteEmail", - "enabled": true, - "restVerb": "Get", - "actionType": "Custom", - "gqlOperation": "Query", - "outputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - }, - "inputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - } - }, - { - "id": "clraten5x000rc9yh29927zwf", - "displayName": "Soft Delete User", - "description": "Soft delete one User", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "softDeleteUser", - "path": "/:id/softDeleteUser", - "enabled": true, - "restVerb": "Delete", - "actionType": "Custom", - "gqlOperation": "Mutation", - "outputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - }, - "inputType": { - "isArray": false, - "type": "Dto", - "dtoId": "promoteUserInputDtoId" - } - } - ], - "moduleContainers": [ - { - "id": "clraten4g000fc9yhr62nxheo", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": null, - "name": "User", - "enabled": true, - "entityId": "aed41776-99ca-4674-b26d-0458fd440875" - } - ], - "moduleDtos": [ - { - "id": "clraten970011c9yhe7fmtc2p", - "description": "Args type for User deletion", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "DeleteUserArgs", - "dtoType": "DeleteArgs", - "enabled": true, - "properties": [] - }, - { - "id": "clraten980019c9yhv4pjmzqp", - "description": "Args type for User creation", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "CreateUserArgs", - "dtoType": "CreateArgs", - "enabled": true, - "properties": [] - }, - { - "id": "UserWhereUniqueInput_ID", - "description": "", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "UserWhereUniqueInput", - "dtoType": "WhereUniqueInput", - "enabled": true, - "properties": [] - }, - { - "id": "promoteUserArgsDtoId", - "description": "", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "PromoteUserArgs", - "dtoType": "Custom", - "enabled": true, - "properties": [ - { - "name": "data", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Dto", - "dtoId": "promoteUserInputDtoId", - "isArray": false - } - ] - }, - { - "name": "where", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "Dto", - "dtoId": "UserWhereUniqueInput_ID", - "isArray": false - } - ] - }, - { - "name": "query", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "Dto", - "dtoId": "UserWhereUniqueInput_ID", - "isArray": false - } - ] - } - ] - }, - { - "id": "promoteUserInputDtoId", - "description": "", - "resourceId": "clraten1t0004c9yhz1t3o8bp", - "parentBlockId": "clraten4g000fc9yhr62nxheo", - "name": "PromoteUserInput", - "dtoType": "Custom", - "enabled": true, - "properties": [ - { - "name": "userId", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "String", - "dtoId": null, - "isArray": true - } - ] - }, - { - "name": "score", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "Integer", - "isArray": false - } - ] - }, - { - "name": "isAdmin", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "Boolean", - "isArray": false - } - ] - }, - { - "name": "lastLogin", - "isArray": false, - "isOptional": false, - "propertyTypes": [ - { - "type": "DateTime", - "isArray": false - } - ] - }, - { - "name": "weightedScore", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Float", - "isArray": false - } - ] - }, - { - "name": "extendedProfile", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Json", - "isArray": false - } - ] - }, - { - "name": "selfReference", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Dto", - "isArray": false, - "dtoId": "promoteUserInputDtoId" - } - ] - }, - { - "name": "selfReferenceArray", - "isArray": false, - "isOptional": true, - "propertyTypes": [ - { - "type": "Dto", - "isArray": true, - "dtoId": "promoteUserInputDtoId" - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/types.ts b/types.ts index a133990..fd5b4fe 100644 --- a/types.ts +++ b/types.ts @@ -9,12 +9,10 @@ export enum PluginCombinationName { POSTGRES_NO_AUTH = "postgres-no-auth", POSTGRES_BASIC = "postgres-basic", POSTGRES_JWT = "postgres-jwt", - POSTGRES_AUTH0 = "postgres-auth0", POSTGRES_SAML = "postgres-saml", MYSQL_NO_AUTH = "mysql-no-auth", MYSQL_BASIC = "mysql-basic", MYSQL_JWT = "mysql-jwt", - MYSQL_AUTH0 = "mysql-auth0", } export type TestConfig = { From f80b81389e891702a37ab86a93dabad59a568928 Mon Sep 17 00:00:00 2001 From: Amit Barletz Date: Wed, 3 Apr 2024 18:21:35 +0300 Subject: [PATCH 2/5] fix plugin ids --- test-data/plugins.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-data/plugins.ts b/test-data/plugins.ts index d473c6d..acd068f 100644 --- a/test-data/plugins.ts +++ b/test-data/plugins.ts @@ -49,7 +49,7 @@ export const authJWT: PluginInstallation = { }; export const auth0: PluginInstallation = { - id: "auth-jwt-id", + id: "auth-auth0-id", pluginId: "auth-auth0", npm: "@amplication/plugin-auth-auth0", enabled: true, @@ -57,7 +57,7 @@ export const auth0: PluginInstallation = { }; export const authSAML: PluginInstallation = { - id: "auth-jwt-id", + id: "auth-saml-id", pluginId: "auth-saml", npm: "@amplication/plugin-auth-saml", enabled: true, From c0527821ad08669f78383790e5778d8be2c32687 Mon Sep 17 00:00:00 2001 From: Amit Barletz Date: Wed, 3 Apr 2024 18:22:24 +0300 Subject: [PATCH 3/5] fix deep clone issues --- main.ts | 88 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 72 insertions(+), 16 deletions(-) diff --git a/main.ts b/main.ts index 21d898c..81d8b83 100644 --- a/main.ts +++ b/main.ts @@ -10,7 +10,6 @@ import { authBasic, postgres, authJWT, - auth0, authSAML, mysql, } from "./test-data/plugins"; @@ -26,20 +25,86 @@ import { EnumDataType, EnumResourceType, } from "@amplication/code-gen-types/src/models"; +import { cloneDeep } from "lodash"; const pluginCombinations: Record = { [PluginCombinationName.POSTGRES_NO_AUTH]: [postgres], [PluginCombinationName.POSTGRES_BASIC]: [postgres, authCore, authBasic], [PluginCombinationName.POSTGRES_JWT]: [postgres, authCore, authJWT], - [PluginCombinationName.POSTGRES_AUTH0]: [postgres, authCore, auth0], [PluginCombinationName.POSTGRES_SAML]: [postgres, authSAML], [PluginCombinationName.MYSQL_NO_AUTH]: [mysql], [PluginCombinationName.MYSQL_BASIC]: [mysql, authCore, authBasic], [PluginCombinationName.MYSQL_JWT]: [mysql, authCore, authJWT], - [PluginCombinationName.MYSQL_AUTH0]: [mysql, authCore, auth0], }; +const baseDsgResourceData: DSGResourceData = { + buildId: "1", + entities, + roles, + resourceInfo, + resourceType: EnumResourceType.Service, + pluginInstallations: + pluginCombinations[PluginCombinationName.POSTGRES_NO_AUTH], + moduleActions: customActions, + moduleContainers, + moduleDtos, +}; + +function handlePluginCases(plugins: PluginInstallation[]): DSGResourceData { + let mockedEntities = cloneDeep(entities); + let mockedResourceInfo = cloneDeep(resourceInfo); + // remove entity field types that are not supported by mysql + if (plugins.some((plugin) => plugin === mysql)) { + console.log( + plugins, + "remove entity field types that are not supported by mysql" + ); + mockedEntities = mockedEntities.map((entity) => { + entity.fields = entity.fields.filter( + (field) => field.dataType !== EnumDataType.MultiSelectOptionSet + ); + return entity; + }); + } + + // when SAML is installed, add sessionId field to auth entity + if (plugins.some((plugin) => plugin === authSAML)) { + const authEntityName = resourceInfo.settings.authEntityName; + const sessionIdField = { + id: "22c4a27a-6490-4fb8-b951-7f42ded681bc", + permanentId: "22c4a27a-6490-4fb8-b951-7f42ded681b1", + name: "sessionId", + displayName: "sessionId", + dataType: EnumDataType.SingleLineText, + properties: {}, + required: true, + unique: true, + searchable: false, + }; + + mockedEntities = mockedEntities.map((entity) => { + if (entity.name === authEntityName) { + entity.fields.push(sessionIdField); + } + return entity; + }); + } + + if ( + !plugins.some((plugin) => plugin === authCore) && + !plugins.some((plugin) => plugin === authSAML) + ) { + mockedResourceInfo.settings.authEntityName = ""; + } + + return { + ...baseDsgResourceData, + entities: mockedEntities, + resourceInfo: mockedResourceInfo, + }; +} + /** * Generates test config for each test case from the plugin combinations * Taking care of case such as when MySQL is installed, creating entities without multi-select option data type @@ -47,25 +112,16 @@ const pluginCombinations: Record = */ function createTestConfig(): TestConfig[] { const results = Object.entries(pluginCombinations).map(([name, plugins]) => { - let mockEntities = entities; - - // remove entity field types that are not supported by mysql - if (plugins.find((plugin) => plugin.npm.indexOf("plugin-db-mysql"))) { - mockEntities = entities.map((entity) => { - entity.fields = entity.fields.filter( - (field) => field.dataType !== EnumDataType.MultiSelectOptionSet - ); - return entity; - }); - } + const { entities: changedEntities, resourceInfo: changedResourceInfo } = + handlePluginCases(plugins); return { name: name as PluginCombinationName, data: { buildId: "1", - entities: mockEntities, + entities: changedEntities, roles, - resourceInfo, + resourceInfo: changedResourceInfo, resourceType: EnumResourceType.Service, pluginInstallations: plugins, moduleActions: customActions, From c306a55a68fb0c5c58a876213b88f7dac1500a88 Mon Sep 17 00:00:00 2001 From: Amit Barletz Date: Wed, 3 Apr 2024 18:22:49 +0300 Subject: [PATCH 4/5] update input json for each test case --- test-cases/mysql-basic/input.json | 12 ++-- test-cases/mysql-jwt/input.json | 12 ++-- test-cases/mysql-no-auth/input.json | 14 ++--- test-cases/postgres-basic/input.json | 64 +++++++++++++++++++-- test-cases/postgres-jwt/input.json | 64 +++++++++++++++++++-- test-cases/postgres-no-auth/input.json | 66 +++++++++++++++++++--- test-cases/postgres-saml/input.json | 77 +++++++++++++++++++++++--- 7 files changed, 264 insertions(+), 45 deletions(-) diff --git a/test-cases/mysql-basic/input.json b/test-cases/mysql-basic/input.json index 8992fd6..2ce7668 100644 --- a/test-cases/mysql-basic/input.json +++ b/test-cases/mysql-basic/input.json @@ -990,22 +990,22 @@ "roles": [ { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "User", "name": "user" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Admin", "name": "admin" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Area Manager", "name": "areaManager" } diff --git a/test-cases/mysql-jwt/input.json b/test-cases/mysql-jwt/input.json index a7c17de..3d1d5cb 100644 --- a/test-cases/mysql-jwt/input.json +++ b/test-cases/mysql-jwt/input.json @@ -990,22 +990,22 @@ "roles": [ { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "User", "name": "user" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Admin", "name": "admin" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Area Manager", "name": "areaManager" } diff --git a/test-cases/mysql-no-auth/input.json b/test-cases/mysql-no-auth/input.json index 5147810..0308d5f 100644 --- a/test-cases/mysql-no-auth/input.json +++ b/test-cases/mysql-no-auth/input.json @@ -990,22 +990,22 @@ "roles": [ { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "User", "name": "user" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Admin", "name": "admin" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Area Manager", "name": "areaManager" } @@ -1028,7 +1028,7 @@ "generateAdminUI": true, "adminUIPath": "" }, - "authEntityName": "User" + "authEntityName": "" }, "codeGeneratorVersionOptions": { "codeGeneratorVersion": null, diff --git a/test-cases/postgres-basic/input.json b/test-cases/postgres-basic/input.json index 0966e9c..d241671 100644 --- a/test-cases/postgres-basic/input.json +++ b/test-cases/postgres-basic/input.json @@ -159,6 +159,28 @@ "allowMultipleSelection": true } }, + { + "id": "1a34cc0e-91dd-4ef2-b8eb-df5a44154a21", + "permanentId": "1a34cc0e-91dd-4ef2-b8eb-df5a44154a22", + "name": "interests", + "displayName": "Interests", + "required": true, + "unique": false, + "searchable": true, + "dataType": "MultiSelectOptionSet", + "properties": { + "options": [ + { + "label": "Programming", + "value": "programming" + }, + { + "label": "Design", + "value": "design" + } + ] + } + }, { "id": "daa757a6-4e15-4afc-a6e3-d4366d64367a", "permanentId": "daa757a6-4e15-4afc-a6e3-d4366d643671", @@ -803,6 +825,36 @@ "unique": false, "searchable": true }, + { + "id": "e0d70a60-6a1c-47be-8687-2d07f3e93b0b", + "permanentId": "e0d70a60-6a1c-47be-8687-2d07f3e93b01", + "name": "favoriteColors", + "displayName": "Favorite Colors (multi-select)", + "dataType": "MultiSelectOptionSet", + "properties": { + "options": [ + { + "label": "Red", + "value": "red" + }, + { + "label": "Green", + "value": "green" + }, + { + "label": "Purple", + "value": "purple" + }, + { + "label": "yellow", + "value": "yellow" + } + ] + }, + "required": false, + "unique": false, + "searchable": true + }, { "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a8", "permanentId": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a1", @@ -990,22 +1042,22 @@ "roles": [ { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "User", "name": "user" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Admin", "name": "admin" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Area Manager", "name": "areaManager" } diff --git a/test-cases/postgres-jwt/input.json b/test-cases/postgres-jwt/input.json index 5523c50..0a303d7 100644 --- a/test-cases/postgres-jwt/input.json +++ b/test-cases/postgres-jwt/input.json @@ -159,6 +159,28 @@ "allowMultipleSelection": true } }, + { + "id": "1a34cc0e-91dd-4ef2-b8eb-df5a44154a21", + "permanentId": "1a34cc0e-91dd-4ef2-b8eb-df5a44154a22", + "name": "interests", + "displayName": "Interests", + "required": true, + "unique": false, + "searchable": true, + "dataType": "MultiSelectOptionSet", + "properties": { + "options": [ + { + "label": "Programming", + "value": "programming" + }, + { + "label": "Design", + "value": "design" + } + ] + } + }, { "id": "daa757a6-4e15-4afc-a6e3-d4366d64367a", "permanentId": "daa757a6-4e15-4afc-a6e3-d4366d643671", @@ -803,6 +825,36 @@ "unique": false, "searchable": true }, + { + "id": "e0d70a60-6a1c-47be-8687-2d07f3e93b0b", + "permanentId": "e0d70a60-6a1c-47be-8687-2d07f3e93b01", + "name": "favoriteColors", + "displayName": "Favorite Colors (multi-select)", + "dataType": "MultiSelectOptionSet", + "properties": { + "options": [ + { + "label": "Red", + "value": "red" + }, + { + "label": "Green", + "value": "green" + }, + { + "label": "Purple", + "value": "purple" + }, + { + "label": "yellow", + "value": "yellow" + } + ] + }, + "required": false, + "unique": false, + "searchable": true + }, { "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a8", "permanentId": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a1", @@ -990,22 +1042,22 @@ "roles": [ { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "User", "name": "user" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Admin", "name": "admin" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Area Manager", "name": "areaManager" } diff --git a/test-cases/postgres-no-auth/input.json b/test-cases/postgres-no-auth/input.json index c9340a9..bd6607a 100644 --- a/test-cases/postgres-no-auth/input.json +++ b/test-cases/postgres-no-auth/input.json @@ -159,6 +159,28 @@ "allowMultipleSelection": true } }, + { + "id": "1a34cc0e-91dd-4ef2-b8eb-df5a44154a21", + "permanentId": "1a34cc0e-91dd-4ef2-b8eb-df5a44154a22", + "name": "interests", + "displayName": "Interests", + "required": true, + "unique": false, + "searchable": true, + "dataType": "MultiSelectOptionSet", + "properties": { + "options": [ + { + "label": "Programming", + "value": "programming" + }, + { + "label": "Design", + "value": "design" + } + ] + } + }, { "id": "daa757a6-4e15-4afc-a6e3-d4366d64367a", "permanentId": "daa757a6-4e15-4afc-a6e3-d4366d643671", @@ -803,6 +825,36 @@ "unique": false, "searchable": true }, + { + "id": "e0d70a60-6a1c-47be-8687-2d07f3e93b0b", + "permanentId": "e0d70a60-6a1c-47be-8687-2d07f3e93b01", + "name": "favoriteColors", + "displayName": "Favorite Colors (multi-select)", + "dataType": "MultiSelectOptionSet", + "properties": { + "options": [ + { + "label": "Red", + "value": "red" + }, + { + "label": "Green", + "value": "green" + }, + { + "label": "Purple", + "value": "purple" + }, + { + "label": "yellow", + "value": "yellow" + } + ] + }, + "required": false, + "unique": false, + "searchable": true + }, { "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a8", "permanentId": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a1", @@ -990,22 +1042,22 @@ "roles": [ { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "User", "name": "user" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Admin", "name": "admin" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Area Manager", "name": "areaManager" } @@ -1028,7 +1080,7 @@ "generateAdminUI": true, "adminUIPath": "" }, - "authEntityName": "User" + "authEntityName": "" }, "codeGeneratorVersionOptions": { "codeGeneratorVersion": null, diff --git a/test-cases/postgres-saml/input.json b/test-cases/postgres-saml/input.json index 75592c8..6e79f42 100644 --- a/test-cases/postgres-saml/input.json +++ b/test-cases/postgres-saml/input.json @@ -159,6 +159,28 @@ "allowMultipleSelection": true } }, + { + "id": "1a34cc0e-91dd-4ef2-b8eb-df5a44154a21", + "permanentId": "1a34cc0e-91dd-4ef2-b8eb-df5a44154a22", + "name": "interests", + "displayName": "Interests", + "required": true, + "unique": false, + "searchable": true, + "dataType": "MultiSelectOptionSet", + "properties": { + "options": [ + { + "label": "Programming", + "value": "programming" + }, + { + "label": "Design", + "value": "design" + } + ] + } + }, { "id": "daa757a6-4e15-4afc-a6e3-d4366d64367a", "permanentId": "daa757a6-4e15-4afc-a6e3-d4366d643671", @@ -229,6 +251,17 @@ "required": false, "unique": false, "searchable": true + }, + { + "id": "22c4a27a-6490-4fb8-b951-7f42ded681bc", + "permanentId": "22c4a27a-6490-4fb8-b951-7f42ded681b1", + "name": "sessionId", + "displayName": "sessionId", + "dataType": "SingleLineText", + "properties": {}, + "required": true, + "unique": true, + "searchable": false } ], "permissions": [ @@ -803,6 +836,36 @@ "unique": false, "searchable": true }, + { + "id": "e0d70a60-6a1c-47be-8687-2d07f3e93b0b", + "permanentId": "e0d70a60-6a1c-47be-8687-2d07f3e93b01", + "name": "favoriteColors", + "displayName": "Favorite Colors (multi-select)", + "dataType": "MultiSelectOptionSet", + "properties": { + "options": [ + { + "label": "Red", + "value": "red" + }, + { + "label": "Green", + "value": "green" + }, + { + "label": "Purple", + "value": "purple" + }, + { + "label": "yellow", + "value": "yellow" + } + ] + }, + "required": false, + "unique": false, + "searchable": true + }, { "id": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a8", "permanentId": "b227bd7a-2fe5-47f8-8f3e-29a2c26104a1", @@ -990,22 +1053,22 @@ "roles": [ { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "User", "name": "user" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Admin", "name": "admin" }, { "id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42", - "createdAt": "2024-04-03T09:44:05.069Z", - "updatedAt": "2024-04-03T09:44:05.069Z", + "createdAt": "2024-04-03T15:19:38.667Z", + "updatedAt": "2024-04-03T15:19:38.667Z", "displayName": "Area Manager", "name": "areaManager" } @@ -1045,7 +1108,7 @@ "version": "latest" }, { - "id": "auth-jwt-id", + "id": "auth-saml-id", "pluginId": "auth-saml", "npm": "@amplication/plugin-auth-saml", "enabled": true, From 7074609634c8785da741736a5b7d49f2c6b38c01 Mon Sep 17 00:00:00 2001 From: Amit Barletz Date: Wed, 3 Apr 2024 19:30:50 +0300 Subject: [PATCH 5/5] run docker-compse up -d manually --- .github/workflows/dsg-e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dsg-e2e-tests.yml b/.github/workflows/dsg-e2e-tests.yml index 79e7d2c..eba88f9 100644 --- a/.github/workflows/dsg-e2e-tests.yml +++ b/.github/workflows/dsg-e2e-tests.yml @@ -79,7 +79,7 @@ jobs: - name: Run generated code run: | cd test-cases/${{ matrix.test-cases }}/generated/server - npm run compose:up + docker-compose up -d - name: Run e2e tests run: npm run e2e:test