diff --git a/.env b/.env new file mode 100644 index 0000000..909f873 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +TYPEDSQL_URL="postgresql://postgres:password@localhost:55432/postgres?schema=typedsql" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 164a83e..72453d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,21 @@ jobs: name: Build and test code runs-on: ubuntu-latest + services: + # Label used to access the service container + postgres: + # Docker Hub image + image: postgres:16-alpine + # Provide the password for postgres + env: + POSTGRES_PASSWORD: password + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: - name: Checkout uses: actions/checkout@v4 diff --git a/dmmf.json b/dmmf.json new file mode 100644 index 0000000..d66a052 --- /dev/null +++ b/dmmf.json @@ -0,0 +1,4220 @@ +{ + "datamodel": { + "enums": [], + "models": [ + { + "name": "Model", + "dbName": null, + "schema": null, + "fields": [ + { + "name": "id", + "kind": "scalar", + "isList": false, + "isRequired": true, + "isUnique": false, + "isId": true, + "isReadOnly": false, + "hasDefaultValue": false, + "type": "Int", + "nativeType": null, + "isGenerated": false, + "isUpdatedAt": false + }, + { + "name": "field", + "kind": "scalar", + "isList": false, + "isRequired": true, + "isUnique": false, + "isId": false, + "isReadOnly": false, + "hasDefaultValue": false, + "type": "Json", + "nativeType": null, + "isGenerated": false, + "isUpdatedAt": false, + "documentation": "![number]" + } + ], + "primaryKey": null, + "uniqueFields": [], + "uniqueIndexes": [], + "isGenerated": false + } + ], + "types": [], + "indexes": [ + { + "model": "Model", + "type": "id", + "isDefinedOnField": true, + "fields": [ + { + "name": "id" + } + ] + } + ] + }, + "schema": { + "inputObjectTypes": { + "prisma": [ + { + "name": "ModelWhereInput", + "meta": { + "source": "Model" + }, + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "AND", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "OR", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "NOT", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "IntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelOrderByWithRelationInput", + "constraints": { + "maxNumFields": 1, + "minNumFields": 0 + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelWhereUniqueInput", + "meta": { + "source": "Model" + }, + "constraints": { + "maxNumFields": null, + "minNumFields": 1, + "fields": [ + "id" + ] + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "AND", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "OR", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "NOT", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelOrderByWithAggregationInput", + "constraints": { + "maxNumFields": 1, + "minNumFields": 0 + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + }, + { + "name": "_count", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelCountOrderByAggregateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_avg", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelAvgOrderByAggregateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_max", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelMaxOrderByAggregateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_min", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelMinOrderByAggregateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_sum", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelSumOrderByAggregateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelScalarWhereWithAggregatesInput", + "meta": { + "source": "Model" + }, + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "AND", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelScalarWhereWithAggregatesInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelScalarWhereWithAggregatesInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "OR", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelScalarWhereWithAggregatesInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "NOT", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelScalarWhereWithAggregatesInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelScalarWhereWithAggregatesInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "IntWithAggregatesFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonWithAggregatesFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelCreateInput", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "id", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonNullValueInput", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "Json", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelUncheckedCreateInput", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "id", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonNullValueInput", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "Json", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelUpdateInput", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldUpdateOperationsInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonNullValueInput", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "Json", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelUncheckedUpdateInput", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldUpdateOperationsInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonNullValueInput", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "Json", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelCreateManyInput", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "id", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonNullValueInput", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "Json", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelUpdateManyMutationInput", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldUpdateOperationsInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonNullValueInput", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "Json", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelUncheckedUpdateManyInput", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldUpdateOperationsInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "JsonNullValueInput", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "Json", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "IntFilter", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "equals", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "in", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": true + }, + { + "type": "ListIntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "notIn", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": true + }, + { + "type": "ListIntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "not", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "JsonFilter", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "equals", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "JsonNullValueFilter", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + }, + { + "name": "path", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": true + } + ] + }, + { + "name": "string_contains", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + }, + { + "type": "StringFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "string_starts_with", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + }, + { + "type": "StringFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "string_ends_with", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + }, + { + "type": "StringFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "array_contains", + "isRequired": false, + "isNullable": true, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "Null", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "array_starts_with", + "isRequired": false, + "isNullable": true, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "Null", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "array_ends_with", + "isRequired": false, + "isNullable": true, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "Null", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "lt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "not", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "JsonNullValueFilter", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelCountOrderByAggregateInput", + "constraints": { + "maxNumFields": 1, + "minNumFields": 1 + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + }, + { + "name": "field", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelAvgOrderByAggregateInput", + "constraints": { + "maxNumFields": 1, + "minNumFields": 1 + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelMaxOrderByAggregateInput", + "constraints": { + "maxNumFields": 1, + "minNumFields": 1 + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelMinOrderByAggregateInput", + "constraints": { + "maxNumFields": 1, + "minNumFields": 1 + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "ModelSumOrderByAggregateInput", + "constraints": { + "maxNumFields": 1, + "minNumFields": 1 + }, + "fields": [ + { + "name": "id", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "SortOrder", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "IntWithAggregatesFilter", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "equals", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "in", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": true + }, + { + "type": "ListIntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "notIn", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": true + }, + { + "type": "ListIntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "not", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "NestedIntWithAggregatesFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_count", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_avg", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedFloatFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_sum", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_min", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_max", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "JsonWithAggregatesFilter", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "equals", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "JsonNullValueFilter", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + }, + { + "name": "path", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": true + } + ] + }, + { + "name": "string_contains", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + }, + { + "type": "StringFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "string_starts_with", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + }, + { + "type": "StringFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "string_ends_with", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + }, + { + "type": "StringFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "array_contains", + "isRequired": false, + "isNullable": true, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "Null", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "array_starts_with", + "isRequired": false, + "isNullable": true, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "Null", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "array_ends_with", + "isRequired": false, + "isNullable": true, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "Null", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "lt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "not", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "JsonNullValueFilter", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + }, + { + "name": "_count", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_min", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedJsonFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_max", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedJsonFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "IntFieldUpdateOperationsInput", + "constraints": { + "maxNumFields": 1, + "minNumFields": 1 + }, + "fields": [ + { + "name": "set", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "increment", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "decrement", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "multiply", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "divide", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "NestedIntFilter", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "equals", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "in", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": true + }, + { + "type": "ListIntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "notIn", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": true + }, + { + "type": "ListIntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "not", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "NestedIntWithAggregatesFilter", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "equals", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "in", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": true + }, + { + "type": "ListIntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "notIn", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": true + }, + { + "type": "ListIntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "IntFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "not", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + }, + { + "type": "NestedIntWithAggregatesFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_count", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_avg", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedFloatFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_sum", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_min", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "_max", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "NestedIntFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "NestedFloatFilter", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "equals", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": false + }, + { + "type": "FloatFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "in", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": true + }, + { + "type": "ListFloatFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "notIn", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": true + }, + { + "type": "ListFloatFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": false + }, + { + "type": "FloatFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": false + }, + { + "type": "FloatFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": false + }, + { + "type": "FloatFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": false + }, + { + "type": "FloatFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "not", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": false + }, + { + "type": "NestedFloatFilter", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ] + }, + { + "name": "NestedJsonFilter", + "constraints": { + "maxNumFields": null, + "minNumFields": null + }, + "fields": [ + { + "name": "equals", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "JsonNullValueFilter", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + }, + { + "name": "path", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": true + } + ] + }, + { + "name": "string_contains", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + }, + { + "type": "StringFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "string_starts_with", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + }, + { + "type": "StringFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "string_ends_with", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + }, + { + "type": "StringFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "array_contains", + "isRequired": false, + "isNullable": true, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "Null", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "array_starts_with", + "isRequired": false, + "isNullable": true, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "Null", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "array_ends_with", + "isRequired": false, + "isNullable": true, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "Null", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "lt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "lte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gt", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "gte", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + } + ] + }, + { + "name": "not", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + }, + { + "type": "JsonFieldRefInput", + "namespace": "prisma", + "location": "fieldRefTypes", + "isList": false + }, + { + "type": "JsonNullValueFilter", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + } + ] + } + ] + }, + "outputObjectTypes": { + "prisma": [ + { + "name": "Query", + "fields": [ + { + "name": "findFirstModel", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "orderBy", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelOrderByWithRelationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + }, + { + "type": "ModelOrderByWithRelationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "cursor", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "take", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "skip", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "distinct", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelScalarFieldEnum", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "ModelScalarFieldEnum", + "namespace": "prisma", + "location": "enumTypes", + "isList": true + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "Model", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "findFirstModelOrThrow", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "orderBy", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelOrderByWithRelationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + }, + { + "type": "ModelOrderByWithRelationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "cursor", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "take", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "skip", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "distinct", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelScalarFieldEnum", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "ModelScalarFieldEnum", + "namespace": "prisma", + "location": "enumTypes", + "isList": true + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "Model", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "findManyModel", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "orderBy", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelOrderByWithRelationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + }, + { + "type": "ModelOrderByWithRelationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "cursor", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "take", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "skip", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "distinct", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelScalarFieldEnum", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + }, + { + "type": "ModelScalarFieldEnum", + "namespace": "prisma", + "location": "enumTypes", + "isList": true + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "Model", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, + { + "name": "aggregateModel", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "orderBy", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelOrderByWithRelationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + }, + { + "type": "ModelOrderByWithRelationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "cursor", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "take", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "skip", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AggregateModel", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "groupByModel", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "orderBy", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelOrderByWithAggregationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + }, + { + "type": "ModelOrderByWithAggregationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "by", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelScalarFieldEnum", + "namespace": "prisma", + "location": "enumTypes", + "isList": true + }, + { + "type": "ModelScalarFieldEnum", + "namespace": "prisma", + "location": "enumTypes", + "isList": false + } + ] + }, + { + "name": "having", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelScalarWhereWithAggregatesInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "take", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "skip", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "ModelGroupByOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": true + } + }, + { + "name": "findUniqueModel", + "args": [ + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "Model", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "findUniqueModelOrThrow", + "args": [ + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "Model", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + } + ] + }, + { + "name": "Mutation", + "fields": [ + { + "name": "createOneModel", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelUncheckedCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "Model", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "upsertOneModel", + "args": [ + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "create", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelUncheckedCreateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "update", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelUncheckedUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "Model", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "createManyModel", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AffectedRowsOutput", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "createManyModelAndReturn", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelCreateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": true + } + ] + }, + { + "name": "skipDuplicates", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Boolean", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "CreateManyModelAndReturnOutputType", + "namespace": "model", + "location": "outputObjectTypes", + "isList": true + } + }, + { + "name": "deleteOneModel", + "args": [ + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "Model", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "updateOneModel", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelUncheckedUpdateInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "where", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereUniqueInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": true, + "outputType": { + "type": "Model", + "namespace": "model", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "updateManyModel", + "args": [ + { + "name": "data", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelUpdateManyMutationInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + }, + { + "type": "ModelUncheckedUpdateManyInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + }, + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AffectedRowsOutput", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "deleteManyModel", + "args": [ + { + "name": "where", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "ModelWhereInput", + "namespace": "prisma", + "location": "inputObjectTypes", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "AffectedRowsOutput", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "executeRaw", + "args": [ + { + "name": "query", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "parameters", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "Json", + "location": "scalar", + "isList": false + } + }, + { + "name": "queryRaw", + "args": [ + { + "name": "query", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "parameters", + "isRequired": false, + "isNullable": false, + "inputTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + } + ] + } + ], + "isNullable": false, + "outputType": { + "type": "Json", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "AggregateModel", + "fields": [ + { + "name": "_count", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelCountAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "_avg", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelAvgAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "_sum", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelSumAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "_min", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelMinAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "_max", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelMaxAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + } + ] + }, + { + "name": "ModelGroupByOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "field", + "args": [], + "isNullable": false, + "outputType": { + "type": "Json", + "location": "scalar", + "isList": false + } + }, + { + "name": "_count", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelCountAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "_avg", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelAvgAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "_sum", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelSumAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "_min", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelMinAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + }, + { + "name": "_max", + "args": [], + "isNullable": true, + "outputType": { + "type": "ModelMaxAggregateOutputType", + "namespace": "prisma", + "location": "outputObjectTypes", + "isList": false + } + } + ] + }, + { + "name": "AffectedRowsOutput", + "fields": [ + { + "name": "count", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "ModelCountAggregateOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "field", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "_all", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "ModelAvgAggregateOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": true, + "outputType": { + "type": "Float", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "ModelSumAggregateOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": true, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "ModelMinAggregateOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": true, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "ModelMaxAggregateOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": true, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + } + ] + } + ], + "model": [ + { + "name": "Model", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "field", + "args": [], + "isNullable": false, + "outputType": { + "type": "Json", + "location": "scalar", + "isList": false + } + } + ] + }, + { + "name": "CreateManyModelAndReturnOutputType", + "fields": [ + { + "name": "id", + "args": [], + "isNullable": false, + "outputType": { + "type": "Int", + "location": "scalar", + "isList": false + } + }, + { + "name": "field", + "args": [], + "isNullable": false, + "outputType": { + "type": "Json", + "location": "scalar", + "isList": false + } + } + ] + } + ] + }, + "enumTypes": { + "prisma": [ + { + "name": "TransactionIsolationLevel", + "values": [ + "ReadUncommitted", + "ReadCommitted", + "RepeatableRead", + "Serializable" + ] + }, + { + "name": "ModelScalarFieldEnum", + "values": [ + "id", + "field" + ] + }, + { + "name": "SortOrder", + "values": [ + "asc", + "desc" + ] + }, + { + "name": "JsonNullValueInput", + "values": [ + "JsonNull" + ] + }, + { + "name": "JsonNullValueFilter", + "values": [ + "DbNull", + "JsonNull", + "AnyNull" + ] + } + ] + }, + "fieldRefTypes": { + "prisma": [ + { + "name": "IntFieldRefInput", + "allowTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": false + } + ], + "fields": [ + { + "name": "_ref", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "_container", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "ListIntFieldRefInput", + "allowTypes": [ + { + "type": "Int", + "location": "scalar", + "isList": true + } + ], + "fields": [ + { + "name": "_ref", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "_container", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "JsonFieldRefInput", + "allowTypes": [ + { + "type": "Json", + "location": "scalar", + "isList": false + } + ], + "fields": [ + { + "name": "_ref", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "_container", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "StringFieldRefInput", + "allowTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ], + "fields": [ + { + "name": "_ref", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "_container", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "FloatFieldRefInput", + "allowTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": false + } + ], + "fields": [ + { + "name": "_ref", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "_container", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + } + ] + }, + { + "name": "ListFloatFieldRefInput", + "allowTypes": [ + { + "type": "Float", + "location": "scalar", + "isList": true + } + ], + "fields": [ + { + "name": "_ref", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + }, + { + "name": "_container", + "isRequired": true, + "isNullable": false, + "inputTypes": [ + { + "type": "String", + "location": "scalar", + "isList": false + } + ] + } + ] + } + ] + } + }, + "mappings": { + "modelOperations": [ + { + "model": "Model", + "aggregate": "aggregateModel", + "createMany": "createManyModel", + "createManyAndReturn": "createManyModelAndReturn", + "createOne": "createOneModel", + "deleteMany": "deleteManyModel", + "deleteOne": "deleteOneModel", + "findFirst": "findFirstModel", + "findFirstOrThrow": "findFirstModelOrThrow", + "findMany": "findManyModel", + "findUnique": "findUniqueModel", + "findUniqueOrThrow": "findUniqueModelOrThrow", + "groupBy": "groupByModel", + "updateMany": "updateManyModel", + "updateOne": "updateOneModel", + "upsertOne": "upsertOneModel" + } + ], + "otherOperations": { + "read": [], + "write": [ + "executeRaw", + "queryRaw" + ] + } + } +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2f58c88 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + postgres: + image: postgres:alpine + ports: + - 55432:5432 + environment: + POSTGRES_PASSWORD: password + \ No newline at end of file diff --git a/package.json b/package.json index 7611560..d1a89d2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,12 @@ "name": "prisma-json-types-generator", "version": "3.2.2", "description": "Changes JsonValues to your custom typescript type", - "keywords": ["prisma", "prisma2", "generator", "json"], + "keywords": [ + "prisma", + "prisma2", + "generator", + "json" + ], "homepage": "https://arthur.run/prisma-json-types-generator", "bugs": "https://github.com/arthurfiorette/prisma-json-types-generator/issues", "repository": { @@ -28,13 +33,13 @@ "test": "sh ./scripts/test.sh" }, "dependencies": { - "@prisma/generator-helper": "6.0.1", + "@prisma/generator-helper": "6.1.0", "tslib": "2.8.1" }, "devDependencies": { "@arthurfiorette/biomejs-config": "^1.0.6", "@biomejs/biome": "1.9.4", - "@prisma/client": "6.0.1", + "@prisma/client": "6.1.0", "@types/node": "22.10.2", "prettier": "3.4.2", "source-map-support": "0.5.21", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c40c10a..a91fbdb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: dependencies: '@prisma/generator-helper': - specifier: 6.0.1 - version: 6.0.1 + specifier: 6.1.0 + version: 6.1.0 prisma: specifier: ^5 || ^6 - version: 5.22.0 + version: 6.1.0 tslib: specifier: 2.8.1 version: 2.8.1 @@ -25,8 +25,8 @@ importers: specifier: 1.9.4 version: 1.9.4 '@prisma/client': - specifier: 6.0.1 - version: 6.0.1(prisma@5.22.0) + specifier: 6.1.0 + version: 6.1.0(prisma@6.1.0) '@types/node': specifier: 22.10.2 version: 22.10.2 @@ -129,8 +129,8 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@prisma/client@6.0.1': - resolution: {integrity: sha512-60w7kL6bUxz7M6Gs/V+OWMhwy94FshpngVmOY05TmGD0Lhk+Ac0ZgtjlL6Wll9TD4G03t4Sq1wZekNVy+Xdlbg==} + '@prisma/client@6.1.0': + resolution: {integrity: sha512-AbQYc5+EJKm1Ydfq3KxwcGiy7wIbm4/QbjCKWWoNROtvy7d6a3gmAGkKjK0iUCzh+rHV8xDhD5Cge8ke/kiy5Q==} engines: {node: '>=18.18'} peerDependencies: prisma: '*' @@ -138,26 +138,23 @@ packages: prisma: optional: true - '@prisma/debug@5.22.0': - resolution: {integrity: sha512-AUt44v3YJeggO2ZU5BkXI7M4hu9BF2zzH2iF2V5pyXT/lRTyWiElZ7It+bRH1EshoMRxHgpYg4VB6rCM+mG5jQ==} + '@prisma/debug@6.1.0': + resolution: {integrity: sha512-0himsvcM4DGBTtvXkd2Tggv6sl2JyUYLzEGXXleFY+7Kp6rZeSS3hiTW9mwtUlXrwYbJP6pwlVNB7jYElrjWUg==} - '@prisma/debug@6.0.1': - resolution: {integrity: sha512-jQylgSOf7ibTVxqBacnAlVGvek6fQxJIYCQOeX2KexsfypNzXjJQSS2o5s+Mjj2Np93iSOQUaw6TvPj8syhG4w==} + '@prisma/engines-version@6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959': + resolution: {integrity: sha512-PdJqmYM2Fd8K0weOOtQThWylwjsDlTig+8Pcg47/jszMuLL9iLIaygC3cjWJLda69siRW4STlCTMSgOjZzvKPQ==} - '@prisma/engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2': - resolution: {integrity: sha512-2PTmxFR2yHW/eB3uqWtcgRcgAbG1rwG9ZriSvQw+nnb7c4uCr3RAcGMb6/zfE88SKlC1Nj2ziUvc96Z379mHgQ==} + '@prisma/engines@6.1.0': + resolution: {integrity: sha512-GnYJbCiep3Vyr1P/415ReYrgJUjP79fBNc1wCo7NP6Eia0CzL2Ot9vK7Infczv3oK7JLrCcawOSAxFxNFsAERQ==} - '@prisma/engines@5.22.0': - resolution: {integrity: sha512-UNjfslWhAt06kVL3CjkuYpHAWSO6L4kDCVPegV6itt7nD1kSJavd3vhgAEhjglLJJKEdJ7oIqDJ+yHk6qO8gPA==} + '@prisma/fetch-engine@6.1.0': + resolution: {integrity: sha512-asdFi7TvPlEZ8CzSZ/+Du5wZ27q6OJbRSXh+S8ISZguu+S9KtS/gP7NeXceZyb1Jv1SM1S5YfiCv+STDsG6rrg==} - '@prisma/fetch-engine@5.22.0': - resolution: {integrity: sha512-bkrD/Mc2fSvkQBV5EpoFcZ87AvOgDxbG99488a5cexp5Ccny+UM6MAe/UFkUC0wLYD9+9befNOqGiIJhhq+HbA==} + '@prisma/generator-helper@6.1.0': + resolution: {integrity: sha512-drHaTKRmRsz6esHk2dpn7aPoxfttoqkYWSaI7zXsL5YQz73jww1YgJpGbPgOUiblriJAtdT4o7mibMqnf8TOsA==} - '@prisma/generator-helper@6.0.1': - resolution: {integrity: sha512-Qhli2Rtr0fyRcI490oLgSVlUSXp3cdbnL/yqrnChYyziourszWqqw7U5IEoOsvyWJ9iaOupduf9Sde7knUEA/Q==} - - '@prisma/get-platform@5.22.0': - resolution: {integrity: sha512-pHhpQdr1UPFpt+zFfnPazhulaZYCUqeIcPpJViYoq9R+D/yw4fjE+CtnsnKzPYm0ddUbeXUzjGVGIRVgPDCk4Q==} + '@prisma/get-platform@6.1.0': + resolution: {integrity: sha512-ia8bNjboBoHkmKGGaWtqtlgQOhCi7+f85aOkPJKgNwWvYrT6l78KgojLekE8zMhVk0R9lWcifV0Pf8l3/15V0Q==} '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -489,9 +486,9 @@ packages: resolution: {integrity: sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - prisma@5.22.0: - resolution: {integrity: sha512-vtpjW3XuYCSnMsNVBjLMNkTj6OZbudcPPTPYHqX0CJfpcdWciI1dM8uHETwmDxxiqEwCIE6WvXucWUetJgfu/A==} - engines: {node: '>=16.13'} + prisma@6.1.0: + resolution: {integrity: sha512-aFI3Yi+ApUxkwCJJwyQSwpyzUX7YX3ihzuHNHOyv4GJg3X5tQsmRaJEnZ+ZyfHpMtnyahhmXVfbTZ+lS8ZtfKw==} + engines: {node: '>=18.18'} hasBin: true queue-microtask@1.2.3: @@ -705,36 +702,34 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - '@prisma/client@6.0.1(prisma@5.22.0)': + '@prisma/client@6.1.0(prisma@6.1.0)': optionalDependencies: - prisma: 5.22.0 - - '@prisma/debug@5.22.0': {} + prisma: 6.1.0 - '@prisma/debug@6.0.1': {} + '@prisma/debug@6.1.0': {} - '@prisma/engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2': {} + '@prisma/engines-version@6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959': {} - '@prisma/engines@5.22.0': + '@prisma/engines@6.1.0': dependencies: - '@prisma/debug': 5.22.0 - '@prisma/engines-version': 5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2 - '@prisma/fetch-engine': 5.22.0 - '@prisma/get-platform': 5.22.0 + '@prisma/debug': 6.1.0 + '@prisma/engines-version': 6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959 + '@prisma/fetch-engine': 6.1.0 + '@prisma/get-platform': 6.1.0 - '@prisma/fetch-engine@5.22.0': + '@prisma/fetch-engine@6.1.0': dependencies: - '@prisma/debug': 5.22.0 - '@prisma/engines-version': 5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2 - '@prisma/get-platform': 5.22.0 + '@prisma/debug': 6.1.0 + '@prisma/engines-version': 6.1.0-21.11f085a2012c0f4778414c8db2651556ee0ef959 + '@prisma/get-platform': 6.1.0 - '@prisma/generator-helper@6.0.1': + '@prisma/generator-helper@6.1.0': dependencies: - '@prisma/debug': 6.0.1 + '@prisma/debug': 6.1.0 - '@prisma/get-platform@5.22.0': + '@prisma/get-platform@6.1.0': dependencies: - '@prisma/debug': 5.22.0 + '@prisma/debug': 6.1.0 '@sinclair/typebox@0.27.8': {} @@ -1044,9 +1039,9 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.2.0 - prisma@5.22.0: + prisma@6.1.0: dependencies: - '@prisma/engines': 5.22.0 + '@prisma/engines': 6.1.0 optionalDependencies: fsevents: 2.3.3 diff --git a/scripts/test.sh b/scripts/test.sh index 055d9fe..25aa465 100644 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -9,10 +9,14 @@ fi # Generates each prisma schema for file in $FILES; do + if [ "$file" = "typedsql" ]; then + pnpm prisma migrate dev --schema test/schemas/$file.prisma --name init --skip-generate --skip-seed + fi + if [ "$#" -eq 0 ]; then - pnpm prisma generate --schema test/schemas/$file.prisma > /dev/null & + pnpm prisma generate --schema test/schemas/$file.prisma --sql > /dev/null & else - pnpm prisma generate --schema test/schemas/$file.prisma + pnpm prisma generate --schema test/schemas/$file.prisma --sql fi done diff --git a/src/on-generate.ts b/src/on-generate.ts index cfe3861..d65f7df 100644 --- a/src/on-generate.ts +++ b/src/on-generate.ts @@ -6,6 +6,7 @@ import { parseConfig } from './util/config'; import { DeclarationWriter } from './util/declaration-writer'; import { findPrismaClientGenerator } from './util/prisma-generator'; import { buildTypesFilePath } from './util/source-path'; +import { writeFileSync } from 'node:fs'; /** Runs the generator with the given options. */ export async function onGenerate(options: GeneratorOptions) { @@ -33,6 +34,10 @@ export async function onGenerate(options: GeneratorOptions) { ts.ScriptKind.TS ); + writeFileSync('dmmf.json', JSON.stringify(options.dmmf, null, 2), 'utf8'); + + // console.dir(options.dmmf, { depth: 10 }); + const prismaModels = extractPrismaModels(options.dmmf); // Handles the prisma namespace. diff --git a/test/schemas/migrations/20241217233828_init/migration.sql b/test/schemas/migrations/20241217233828_init/migration.sql new file mode 100644 index 0000000..2dd2b43 --- /dev/null +++ b/test/schemas/migrations/20241217233828_init/migration.sql @@ -0,0 +1,7 @@ +-- CreateTable +CREATE TABLE "Model" ( + "id" INTEGER NOT NULL, + "field" JSONB NOT NULL, + + CONSTRAINT "Model_pkey" PRIMARY KEY ("id") +); diff --git a/test/schemas/migrations/migration_lock.toml b/test/schemas/migrations/migration_lock.toml new file mode 100644 index 0000000..648c57f --- /dev/null +++ b/test/schemas/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (e.g., Git) +provider = "postgresql" \ No newline at end of file diff --git a/test/schemas/sql/asdd.sql b/test/schemas/sql/asdd.sql new file mode 100644 index 0000000..dda661e --- /dev/null +++ b/test/schemas/sql/asdd.sql @@ -0,0 +1 @@ +SELECT * FROM "Model"; \ No newline at end of file diff --git a/test/schemas/typedsql.prisma b/test/schemas/typedsql.prisma new file mode 100644 index 0000000..7096ccf --- /dev/null +++ b/test/schemas/typedsql.prisma @@ -0,0 +1,22 @@ +generator client { + provider = "prisma-client-js" + output = "../target/typedSql" + previewFeatures = ["typedSql"] +} + +generator json { + provider = "node ./index.js" + namespace = "PTypedSqlJson" +} + +datasource db { + provider = "postgresql" + url = env("TYPEDSQL_URL") +} + +model Model { + id Int @id + + /// ![number] + field Json +}