diff --git a/apps/server/migrations/README.md b/apps/server/migrations/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/server/prisma/migrations/20240130221802_init_db/migration.sql b/apps/server/prisma/migrations/20240130221802_init_db/migration.sql deleted file mode 100644 index dbd2b50e..00000000 --- a/apps/server/prisma/migrations/20240130221802_init_db/migration.sql +++ /dev/null @@ -1,480 +0,0 @@ --- CreateExtension -CREATE EXTENSION IF NOT EXISTS "citext"; - --- CreateExtension -CREATE EXTENSION IF NOT EXISTS "hstore"; - --- CreateExtension -CREATE EXTENSION IF NOT EXISTS "pg_trgm"; - --- CreateExtension -CREATE EXTENSION IF NOT EXISTS "pgcrypto"; - --- CreateExtension -CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; - --- CreateEnum -CREATE TYPE "EmailVerificationStatus" AS ENUM ('VERIFIED', 'UNVERIFIED'); - --- CreateEnum -CREATE TYPE "PaymentProcessor" AS ENUM ('STRIPE', 'PAYPAL'); - --- CreateTable -CREATE TABLE "Account" ( - "id" TEXT NOT NULL, - "family_name" TEXT, - "given_name" TEXT, - "locale" TEXT DEFAULT 'en', - "picture" TEXT, - "name" TEXT, - "nickname" TEXT, - "phone_number" TEXT, - "phone_verified" BOOLEAN NOT NULL DEFAULT false, - "username" TEXT NOT NULL, - "email" TEXT NOT NULL, - "emailVerificationStatus" "EmailVerificationStatus" NOT NULL DEFAULT 'UNVERIFIED', - "password" TEXT NOT NULL, - "last_ip" TEXT, - "last_login" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "Account_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "AccountMetadata" ( - "id" TEXT NOT NULL, - "key" TEXT NOT NULL, - "value" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1 -); - --- CreateTable -CREATE TABLE "Group" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "Group_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Role" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "Role_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Session" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "Session_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "TokenAudit" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "tokenId" TEXT NOT NULL, - "issuedAt" TIMESTAMP(3) NOT NULL, - "expiresAt" TIMESTAMP(3) NOT NULL, - "isRevoked" BOOLEAN NOT NULL, - "lastUsedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "TokenAudit_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "VerificationRequest" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "email" TEXT NOT NULL, - "token" TEXT NOT NULL, - "issuedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "expiresAt" TIMESTAMP(3) NOT NULL, - "isSolved" BOOLEAN NOT NULL DEFAULT false, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "VerificationRequest_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "User" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "firstName" TEXT NOT NULL, - "lastName" TEXT NOT NULL, - "email" TEXT NOT NULL, - "phoneNumber" TEXT, - "avatar" TEXT, - "about" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "BillingAddress" ( - "id" TEXT NOT NULL, - "legalName" TEXT NOT NULL, - "taxIdentifier" TEXT NOT NULL, - "streetLine1" TEXT NOT NULL, - "streetLine2" TEXT, - "city" TEXT NOT NULL, - "state" TEXT, - "zipCode" TEXT NOT NULL, - "country" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "BillingAddress_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "ShippingAddress" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "fullName" TEXT NOT NULL, - "streetLine1" TEXT NOT NULL, - "streetLine2" TEXT, - "city" TEXT NOT NULL, - "state" TEXT, - "zipCode" TEXT NOT NULL, - "country" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "versioned_shipping_address_pk" PRIMARY KEY ("id","version") -); - --- CreateTable -CREATE TABLE "UserMetadata" ( - "id" TEXT NOT NULL, - "key" TEXT NOT NULL, - "value" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "UserMetadata_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Product" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL, - "price" INTEGER NOT NULL, - "currency" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "Product_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Order" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "productId" TEXT NOT NULL, - "quantity" INTEGER NOT NULL, - "shippingAddressId" TEXT NOT NULL, - "shippingAddressVersion" INTEGER NOT NULL, - "billingAddressId" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "Order_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Cart" ( - "id" TEXT NOT NULL, - "profileId" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "Cart_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "CartItem" ( - "id" TEXT NOT NULL, - "cartId" TEXT NOT NULL, - "productId" TEXT NOT NULL, - "price" INTEGER NOT NULL, - "quantity" INTEGER NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "CartItem_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Payment" ( - "id" TEXT NOT NULL, - "payerId" TEXT NOT NULL, - "currency" TEXT NOT NULL, - "amount" INTEGER NOT NULL, - "paymentMethodId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "Payment_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "PaymentMethod" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "processor" "PaymentProcessor" NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "PaymentMethod_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "StripePaymentMethod" ( - "id" TEXT NOT NULL, - "stripeCustomerId" TEXT NOT NULL, - "stripePaymentMethodId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "StripePaymentMethod_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Checkout" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "cartId" TEXT NOT NULL, - "paymentId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "Checkout_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "CheckoutItem" ( - "id" TEXT NOT NULL, - "checkoutId" TEXT NOT NULL, - "discount" INTEGER NOT NULL DEFAULT 0, - "subtotal" INTEGER NOT NULL, - "tax" INTEGER NOT NULL DEFAULT 0, - "total" INTEGER NOT NULL, - - CONSTRAINT "CheckoutItem_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Blob" ( - "id" TEXT NOT NULL, - "checksum" TEXT NOT NULL, - "type" TEXT NOT NULL, - "size" INTEGER NOT NULL, - "url" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "Blob_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Coupon" ( - "id" TEXT NOT NULL, - "amountOff" INTEGER, - "percentOff" INTEGER, - "duration" INTEGER, - "durationInMonths" INTEGER, - "maxRedemptions" INTEGER, - "minimumAmount" INTEGER, - "minimumAmountCurrency" TEXT, - "firstTimeTransactionOnly" BOOLEAN, - "timesRedeemed" BIGINT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "Coupon_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "CouponMetadata" ( - "id" TEXT NOT NULL, - "key" TEXT NOT NULL, - "value" TEXT NOT NULL, - - CONSTRAINT "CouponMetadata_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "PromotionCode" ( - "id" TEXT NOT NULL, - "code" TEXT NOT NULL, - "active" BOOLEAN NOT NULL, - - CONSTRAINT "PromotionCode_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "_AccountToGroup" ( - "A" TEXT NOT NULL, - "B" TEXT NOT NULL -); - --- CreateTable -CREATE TABLE "_AccountToRole" ( - "A" TEXT NOT NULL, - "B" TEXT NOT NULL -); - --- CreateIndex -CREATE UNIQUE INDEX "Account_username_key" ON "Account"("username"); - --- CreateIndex -CREATE UNIQUE INDEX "Account_email_key" ON "Account"("email"); - --- CreateIndex -CREATE UNIQUE INDEX "AccountMetadata_id_key_key" ON "AccountMetadata"("id", "key"); - --- CreateIndex -CREATE UNIQUE INDEX "Group_name_key" ON "Group"("name"); - --- CreateIndex -CREATE UNIQUE INDEX "Role_name_key" ON "Role"("name"); - --- CreateIndex -CREATE UNIQUE INDEX "User_accountId_key" ON "User"("accountId"); - --- CreateIndex -CREATE UNIQUE INDEX "ShippingAddress_id_key" ON "ShippingAddress"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "Cart_profileId_key" ON "Cart"("profileId"); - --- CreateIndex -CREATE UNIQUE INDEX "CartItem_cartId_productId_key" ON "CartItem"("cartId", "productId"); - --- CreateIndex -CREATE UNIQUE INDEX "Checkout_cartId_key" ON "Checkout"("cartId"); - --- CreateIndex -CREATE UNIQUE INDEX "Checkout_paymentId_key" ON "Checkout"("paymentId"); - --- CreateIndex -CREATE UNIQUE INDEX "_AccountToGroup_AB_unique" ON "_AccountToGroup"("A", "B"); - --- CreateIndex -CREATE INDEX "_AccountToGroup_B_index" ON "_AccountToGroup"("B"); - --- CreateIndex -CREATE UNIQUE INDEX "_AccountToRole_AB_unique" ON "_AccountToRole"("A", "B"); - --- CreateIndex -CREATE INDEX "_AccountToRole_B_index" ON "_AccountToRole"("B"); - --- AddForeignKey -ALTER TABLE "AccountMetadata" ADD CONSTRAINT "account_metadata_fk" FOREIGN KEY ("id") REFERENCES "Account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Session" ADD CONSTRAINT "account_session_fkey" FOREIGN KEY ("accountId") REFERENCES "Account"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "TokenAudit" ADD CONSTRAINT "account_token_audit_fkey" FOREIGN KEY ("accountId") REFERENCES "Account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "VerificationRequest" ADD CONSTRAINT "account_verification_request_fkey" FOREIGN KEY ("accountId") REFERENCES "Account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "User" ADD CONSTRAINT "User_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "BillingAddress" ADD CONSTRAINT "BillingAddress_id_fkey" FOREIGN KEY ("id") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "ShippingAddress" ADD CONSTRAINT "ShippingAddress_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "UserMetadata" ADD CONSTRAINT "user_metadata_fkey" FOREIGN KEY ("id") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Order" ADD CONSTRAINT "Order_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Order" ADD CONSTRAINT "Order_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Order" ADD CONSTRAINT "Order_shippingAddressId_shippingAddressVersion_fkey" FOREIGN KEY ("shippingAddressId", "shippingAddressVersion") REFERENCES "ShippingAddress"("id", "version") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Order" ADD CONSTRAINT "Order_billingAddressId_fkey" FOREIGN KEY ("billingAddressId") REFERENCES "BillingAddress"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Cart" ADD CONSTRAINT "Cart_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "CartItem" ADD CONSTRAINT "CartItem_cartId_fkey" FOREIGN KEY ("cartId") REFERENCES "Cart"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "CartItem" ADD CONSTRAINT "CartItem_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Payment" ADD CONSTRAINT "Payment_payerId_fkey" FOREIGN KEY ("payerId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Payment" ADD CONSTRAINT "Payment_paymentMethodId_fkey" FOREIGN KEY ("paymentMethodId") REFERENCES "PaymentMethod"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "PaymentMethod" ADD CONSTRAINT "PaymentMethod_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "StripePaymentMethod" ADD CONSTRAINT "StripePaymentMethod_id_fkey" FOREIGN KEY ("id") REFERENCES "PaymentMethod"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Checkout" ADD CONSTRAINT "Checkout_cartId_fkey" FOREIGN KEY ("cartId") REFERENCES "Cart"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Checkout" ADD CONSTRAINT "Checkout_paymentId_fkey" FOREIGN KEY ("paymentId") REFERENCES "Payment"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Checkout" ADD CONSTRAINT "Checkout_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "CheckoutItem" ADD CONSTRAINT "CheckoutItem_checkoutId_fkey" FOREIGN KEY ("checkoutId") REFERENCES "Checkout"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "CouponMetadata" ADD CONSTRAINT "CouponMetadata_id_fkey" FOREIGN KEY ("id") REFERENCES "Coupon"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_AccountToGroup" ADD CONSTRAINT "_AccountToGroup_A_fkey" FOREIGN KEY ("A") REFERENCES "Account"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_AccountToGroup" ADD CONSTRAINT "_AccountToGroup_B_fkey" FOREIGN KEY ("B") REFERENCES "Group"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_AccountToRole" ADD CONSTRAINT "_AccountToRole_A_fkey" FOREIGN KEY ("A") REFERENCES "Account"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_AccountToRole" ADD CONSTRAINT "_AccountToRole_B_fkey" FOREIGN KEY ("B") REFERENCES "Role"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/apps/server/prisma/migrations/20240220220232_expand_ecommerce_db/migration.sql b/apps/server/prisma/migrations/20240220220232_expand_ecommerce_db/migration.sql deleted file mode 100644 index 0077b276..00000000 --- a/apps/server/prisma/migrations/20240220220232_expand_ecommerce_db/migration.sql +++ /dev/null @@ -1,837 +0,0 @@ -/* - Warnings: - - - You are about to drop the `Account` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `AccountMetadata` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `BillingAddress` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Blob` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Cart` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `CartItem` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Checkout` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `CheckoutItem` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Coupon` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `CouponMetadata` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Group` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Order` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Payment` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `PaymentMethod` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Product` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `PromotionCode` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Role` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `Session` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `ShippingAddress` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `StripePaymentMethod` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `TokenAudit` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `UserMetadata` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `VerificationRequest` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `_AccountToGroup` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `_AccountToRole` table. If the table is not empty, all the data it contains will be lost. - -*/ --- CreateEnum -CREATE TYPE "AttributeType" AS ENUM ('STRING', 'NUMBER', 'BOOLEAN', 'DATE', 'ENUM'); - --- CreateEnum -CREATE TYPE "PaymentProcessor" AS ENUM ('STRIPE', 'PAYPAL', 'MANUAL'); - --- CreateEnum -CREATE TYPE "PaymentStatus" AS ENUM ('PENDING', 'FAILED', 'PAID', 'ACTION_REQUIRED'); - --- CreateEnum -CREATE TYPE "billing_interval" AS ENUM ('DAILY', 'EVERY_OTHER_DAY', 'EVERY_THIRD_DAY', 'EVERY_FOURTH_DAY', 'EVERY_WEEKDAY', 'WEEKLY', 'BIWEEKLY', 'MONTHLY', 'QUARTERLY', 'SEMIANNUALLY', 'ANNUALLY'); - --- CreateEnum -CREATE TYPE "subscription_status" AS ENUM ('ACTIVE', 'CANCELED', 'PAST_DUE', 'UNPAID', 'INCOMPLETE', 'INCOMPLETE_EXPIRED', 'TRIALING', 'PAST_TRIALING'); - --- DropForeignKey -ALTER TABLE "public"."AccountMetadata" DROP CONSTRAINT "account_metadata_fk"; - --- DropForeignKey -ALTER TABLE "public"."BillingAddress" DROP CONSTRAINT "BillingAddress_id_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Cart" DROP CONSTRAINT "Cart_profileId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."CartItem" DROP CONSTRAINT "CartItem_cartId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."CartItem" DROP CONSTRAINT "CartItem_productId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Checkout" DROP CONSTRAINT "Checkout_cartId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Checkout" DROP CONSTRAINT "Checkout_paymentId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Checkout" DROP CONSTRAINT "Checkout_userId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."CheckoutItem" DROP CONSTRAINT "CheckoutItem_checkoutId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."CouponMetadata" DROP CONSTRAINT "CouponMetadata_id_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Order" DROP CONSTRAINT "Order_billingAddressId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Order" DROP CONSTRAINT "Order_productId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Order" DROP CONSTRAINT "Order_shippingAddressId_shippingAddressVersion_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Order" DROP CONSTRAINT "Order_userId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Payment" DROP CONSTRAINT "Payment_payerId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Payment" DROP CONSTRAINT "Payment_paymentMethodId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."PaymentMethod" DROP CONSTRAINT "PaymentMethod_accountId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."Session" DROP CONSTRAINT "account_session_fkey"; - --- DropForeignKey -ALTER TABLE "public"."ShippingAddress" DROP CONSTRAINT "ShippingAddress_userId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."StripePaymentMethod" DROP CONSTRAINT "StripePaymentMethod_id_fkey"; - --- DropForeignKey -ALTER TABLE "public"."TokenAudit" DROP CONSTRAINT "account_token_audit_fkey"; - --- DropForeignKey -ALTER TABLE "public"."User" DROP CONSTRAINT "User_accountId_fkey"; - --- DropForeignKey -ALTER TABLE "public"."UserMetadata" DROP CONSTRAINT "user_metadata_fkey"; - --- DropForeignKey -ALTER TABLE "public"."VerificationRequest" DROP CONSTRAINT "account_verification_request_fkey"; - --- DropForeignKey -ALTER TABLE "public"."_AccountToGroup" DROP CONSTRAINT "_AccountToGroup_A_fkey"; - --- DropForeignKey -ALTER TABLE "public"."_AccountToGroup" DROP CONSTRAINT "_AccountToGroup_B_fkey"; - --- DropForeignKey -ALTER TABLE "public"."_AccountToRole" DROP CONSTRAINT "_AccountToRole_A_fkey"; - --- DropForeignKey -ALTER TABLE "public"."_AccountToRole" DROP CONSTRAINT "_AccountToRole_B_fkey"; - --- DropTable -DROP TABLE "public"."Account"; - --- DropTable -DROP TABLE "public"."AccountMetadata"; - --- DropTable -DROP TABLE "public"."BillingAddress"; - --- DropTable -DROP TABLE "public"."Blob"; - --- DropTable -DROP TABLE "public"."Cart"; - --- DropTable -DROP TABLE "public"."CartItem"; - --- DropTable -DROP TABLE "public"."Checkout"; - --- DropTable -DROP TABLE "public"."CheckoutItem"; - --- DropTable -DROP TABLE "public"."Coupon"; - --- DropTable -DROP TABLE "public"."CouponMetadata"; - --- DropTable -DROP TABLE "public"."Group"; - --- DropTable -DROP TABLE "public"."Order"; - --- DropTable -DROP TABLE "public"."Payment"; - --- DropTable -DROP TABLE "public"."PaymentMethod"; - --- DropTable -DROP TABLE "public"."Product"; - --- DropTable -DROP TABLE "public"."PromotionCode"; - --- DropTable -DROP TABLE "public"."Role"; - --- DropTable -DROP TABLE "public"."Session"; - --- DropTable -DROP TABLE "public"."ShippingAddress"; - --- DropTable -DROP TABLE "public"."StripePaymentMethod"; - --- DropTable -DROP TABLE "public"."TokenAudit"; - --- DropTable -DROP TABLE "public"."User"; - --- DropTable -DROP TABLE "public"."UserMetadata"; - --- DropTable -DROP TABLE "public"."VerificationRequest"; - --- DropTable -DROP TABLE "public"."_AccountToGroup"; - --- DropTable -DROP TABLE "public"."_AccountToRole"; - --- DropEnum -DROP TYPE "public"."EmailVerificationStatus"; - --- DropEnum -DROP TYPE "public"."PaymentProcessor"; - --- CreateTable -CREATE TABLE "iam_account" ( - "id" TEXT NOT NULL, - "family_name" TEXT, - "given_name" TEXT, - "locale" TEXT DEFAULT 'en', - "picture" TEXT, - "name" TEXT, - "nickname" TEXT, - "phone_number" TEXT, - "phone_verified" BOOLEAN NOT NULL DEFAULT false, - "username" TEXT NOT NULL, - "email" TEXT NOT NULL, - "email_verified" BOOLEAN NOT NULL DEFAULT false, - "password" TEXT NOT NULL, - "last_ip" TEXT, - "last_login" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "iam_account_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "iam_oauth_client" ( - "id" TEXT NOT NULL, - "IdP" TEXT NOT NULL, - "discoverEndpoints" BOOLEAN NOT NULL, - "authority" TEXT, - "authorizationEndpoint" TEXT, - "tokenEndpoint" TEXT, - "userinfoEndpoint" TEXT, - "issuer" TEXT, - "clientId" TEXT NOT NULL, - "clientSecret" TEXT NOT NULL, - "redirectUri" TEXT NOT NULL, - "scope" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "iam_oauth_client_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "iam_pgp_public_key" ( - "id" TEXT NOT NULL, - "key" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "iam_pgp_public_key_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "iam_federated_identity" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "IdP" TEXT NOT NULL, - "sub" TEXT NOT NULL, - "name" TEXT NOT NULL, - "picture" TEXT, - "expiresAt" TIMESTAMP(3) NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "iam_federated_identity_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "iam_account_md" ( - "id" TEXT NOT NULL, - "key" TEXT NOT NULL, - "value" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1 -); - --- CreateTable -CREATE TABLE "iam_group" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "iam_group_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "iam_role" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "iam_role_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "iam_session" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "iam_session_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "TokenAudit" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "tokenId" TEXT NOT NULL, - "issuedAt" TIMESTAMP(3) NOT NULL, - "expiresAt" TIMESTAMP(3) NOT NULL, - "isRevoked" BOOLEAN NOT NULL, - "lastUsedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "TokenAudit_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "VerificationRequest" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "email" TEXT NOT NULL, - "token" TEXT NOT NULL, - "issuedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "expiresAt" TIMESTAMP(3) NOT NULL, - "isSolved" BOOLEAN NOT NULL DEFAULT false, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "VerificationRequest_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "firstName" TEXT NOT NULL, - "lastName" TEXT NOT NULL, - "email" TEXT NOT NULL, - "phoneNumber" TEXT, - "avatar" TEXT, - "about" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "user_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "customer" ( - "id" TEXT NOT NULL, - - CONSTRAINT "customer_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user_md" ( - "id" TEXT NOT NULL, - "key" TEXT NOT NULL, - "value" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "user_md_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user_billing_address" ( - "id" TEXT NOT NULL, - "legalName" TEXT NOT NULL, - "taxIdentifier" TEXT NOT NULL, - "streetLine1" TEXT NOT NULL, - "streetLine2" TEXT, - "city" TEXT NOT NULL, - "state" TEXT, - "zipCode" TEXT NOT NULL, - "country" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "user_billing_address_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "user_shipping_address" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "fullName" TEXT NOT NULL, - "streetLine1" TEXT NOT NULL, - "streetLine2" TEXT, - "city" TEXT NOT NULL, - "state" TEXT, - "zipCode" TEXT NOT NULL, - "country" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "version" INTEGER NOT NULL DEFAULT 1, - - CONSTRAINT "versioned_shipping_address_pk" PRIMARY KEY ("id","version") -); - --- CreateTable -CREATE TABLE "product" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL, - "price" INTEGER NOT NULL, - "currency" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "product_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "product_attribute" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "product_attribute_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "product_option" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "product_option_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "product_variant" ( - "id" TEXT NOT NULL, - "productId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "product_variant_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "order" ( - "id" TEXT NOT NULL, - "customerId" TEXT NOT NULL, - "productId" TEXT NOT NULL, - "quantity" INTEGER NOT NULL, - "shippingAddressId" TEXT NOT NULL, - "shippingAddressVersion" INTEGER NOT NULL, - "billingAddressId" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "order_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "cart" ( - "id" TEXT NOT NULL, - "profileId" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "cart_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "cart_item" ( - "id" TEXT NOT NULL, - "cartId" TEXT NOT NULL, - "productId" TEXT NOT NULL, - "price" INTEGER NOT NULL, - "quantity" INTEGER NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "cart_item_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "payment" ( - "id" TEXT NOT NULL, - "payerId" TEXT NOT NULL, - "currency" TEXT NOT NULL, - "amount" INTEGER NOT NULL, - "paymentMethodId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "payment_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Invoice" ( - "id" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "Invoice_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "InvoiceLine" ( - "id" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "InvoiceLine_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "payment_method" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "processor" "PaymentProcessor" NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "payment_method_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "stripe_payment_method" ( - "id" TEXT NOT NULL, - "stripeCustomerId" TEXT NOT NULL, - "stripePaymentMethodId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "stripe_payment_method_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "checkout" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "cartId" TEXT NOT NULL, - "paymentId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "checkout_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "checkout_item" ( - "id" TEXT NOT NULL, - "checkoutId" TEXT NOT NULL, - "discount" INTEGER NOT NULL DEFAULT 0, - "subtotal" INTEGER NOT NULL, - "tax" INTEGER NOT NULL DEFAULT 0, - "total" INTEGER NOT NULL, - - CONSTRAINT "checkout_item_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "blob" ( - "id" TEXT NOT NULL, - "checksum" TEXT NOT NULL, - "type" TEXT NOT NULL, - "size" INTEGER NOT NULL, - "filename" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "blob_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "coupon" ( - "id" TEXT NOT NULL, - "amountOff" INTEGER, - "percentOff" INTEGER, - "duration" INTEGER, - "durationInMonths" INTEGER, - "maxRedemptions" INTEGER, - "minimumAmount" INTEGER, - "minimumAmountCurrency" TEXT, - "firstTimeTransactionOnly" BOOLEAN, - "timesRedeemed" BIGINT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "coupon_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "coupon_md" ( - "id" TEXT NOT NULL, - "key" TEXT NOT NULL, - "value" TEXT NOT NULL, - - CONSTRAINT "coupon_md_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "promotion_code" ( - "id" TEXT NOT NULL, - "code" TEXT NOT NULL, - "active" BOOLEAN NOT NULL, - - CONSTRAINT "promotion_code_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "region" ( - "id" TEXT NOT NULL, - "name" TEXT NOT NULL, - "country" TEXT NOT NULL, - - CONSTRAINT "region_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "subscription" ( - "id" TEXT NOT NULL, - "customerId" TEXT NOT NULL, - "billingInterval" "billing_interval" NOT NULL, - "billingFrequency" INTEGER NOT NULL, - "paymentMethodId" TEXT NOT NULL, - "nextBillingDate" TIMESTAMP(3) NOT NULL, - "status" "subscription_status" NOT NULL, - "billingAddressId" TEXT, - "shippingAddressId" TEXT, - "startedAt" TIMESTAMP(3) NOT NULL, - "endedAt" TIMESTAMP(3), - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "subscription_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "_AccountToGroup" ( - "A" TEXT NOT NULL, - "B" TEXT NOT NULL -); - --- CreateTable -CREATE TABLE "_AccountToRole" ( - "A" TEXT NOT NULL, - "B" TEXT NOT NULL -); - --- CreateIndex -CREATE UNIQUE INDEX "iam_account_username_key" ON "iam_account"("username"); - --- CreateIndex -CREATE UNIQUE INDEX "iam_account_email_key" ON "iam_account"("email"); - --- CreateIndex -CREATE UNIQUE INDEX "iam_oauth_client_IdP_key" ON "iam_oauth_client"("IdP"); - --- CreateIndex -CREATE UNIQUE INDEX "iam_account_md_id_key_key" ON "iam_account_md"("id", "key"); - --- CreateIndex -CREATE UNIQUE INDEX "iam_group_name_key" ON "iam_group"("name"); - --- CreateIndex -CREATE UNIQUE INDEX "iam_role_name_key" ON "iam_role"("name"); - --- CreateIndex -CREATE UNIQUE INDEX "user_accountId_key" ON "user"("accountId"); - --- CreateIndex -CREATE UNIQUE INDEX "user_shipping_address_id_key" ON "user_shipping_address"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "cart_profileId_key" ON "cart"("profileId"); - --- CreateIndex -CREATE UNIQUE INDEX "cart_item_cartId_productId_key" ON "cart_item"("cartId", "productId"); - --- CreateIndex -CREATE UNIQUE INDEX "checkout_cartId_key" ON "checkout"("cartId"); - --- CreateIndex -CREATE UNIQUE INDEX "checkout_paymentId_key" ON "checkout"("paymentId"); - --- CreateIndex -CREATE UNIQUE INDEX "blob_filename_key" ON "blob"("filename"); - --- CreateIndex -CREATE UNIQUE INDEX "_AccountToGroup_AB_unique" ON "_AccountToGroup"("A", "B"); - --- CreateIndex -CREATE INDEX "_AccountToGroup_B_index" ON "_AccountToGroup"("B"); - --- CreateIndex -CREATE UNIQUE INDEX "_AccountToRole_AB_unique" ON "_AccountToRole"("A", "B"); - --- CreateIndex -CREATE INDEX "_AccountToRole_B_index" ON "_AccountToRole"("B"); - --- AddForeignKey -ALTER TABLE "iam_pgp_public_key" ADD CONSTRAINT "account_openpgp_public_key_fkey" FOREIGN KEY ("id") REFERENCES "iam_account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "iam_federated_identity" ADD CONSTRAINT "iam_federated_identity_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "iam_account"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "iam_federated_identity" ADD CONSTRAINT "iam_federated_identity_IdP_fkey" FOREIGN KEY ("IdP") REFERENCES "iam_oauth_client"("IdP") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "iam_account_md" ADD CONSTRAINT "account_metadata_fk" FOREIGN KEY ("id") REFERENCES "iam_account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "iam_session" ADD CONSTRAINT "account_session_fkey" FOREIGN KEY ("accountId") REFERENCES "iam_account"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "TokenAudit" ADD CONSTRAINT "account_token_audit_fkey" FOREIGN KEY ("accountId") REFERENCES "iam_account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "VerificationRequest" ADD CONSTRAINT "account_verification_request_fkey" FOREIGN KEY ("accountId") REFERENCES "iam_account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user" ADD CONSTRAINT "user_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "iam_account"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "customer" ADD CONSTRAINT "customer_id_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_md" ADD CONSTRAINT "user_metadata_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_billing_address" ADD CONSTRAINT "user_billing_address_id_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "user_shipping_address" ADD CONSTRAINT "user_shipping_address_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "product_variant" ADD CONSTRAINT "product_variant_productId_fkey" FOREIGN KEY ("productId") REFERENCES "product"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "order" ADD CONSTRAINT "order_customerId_fkey" FOREIGN KEY ("customerId") REFERENCES "customer"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "order" ADD CONSTRAINT "order_productId_fkey" FOREIGN KEY ("productId") REFERENCES "product"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "order" ADD CONSTRAINT "order_shippingAddressId_shippingAddressVersion_fkey" FOREIGN KEY ("shippingAddressId", "shippingAddressVersion") REFERENCES "user_shipping_address"("id", "version") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "order" ADD CONSTRAINT "order_billingAddressId_fkey" FOREIGN KEY ("billingAddressId") REFERENCES "user_billing_address"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "cart" ADD CONSTRAINT "cart_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "cart_item" ADD CONSTRAINT "cart_item_cartId_fkey" FOREIGN KEY ("cartId") REFERENCES "cart"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "cart_item" ADD CONSTRAINT "cart_item_productId_fkey" FOREIGN KEY ("productId") REFERENCES "product"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "payment" ADD CONSTRAINT "payment_payerId_fkey" FOREIGN KEY ("payerId") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "payment" ADD CONSTRAINT "payment_paymentMethodId_fkey" FOREIGN KEY ("paymentMethodId") REFERENCES "payment_method"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "payment_method" ADD CONSTRAINT "payment_method_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "iam_account"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "stripe_payment_method" ADD CONSTRAINT "stripe_payment_method_id_fkey" FOREIGN KEY ("id") REFERENCES "payment_method"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "checkout" ADD CONSTRAINT "checkout_cartId_fkey" FOREIGN KEY ("cartId") REFERENCES "cart"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "checkout" ADD CONSTRAINT "checkout_paymentId_fkey" FOREIGN KEY ("paymentId") REFERENCES "payment"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "checkout" ADD CONSTRAINT "checkout_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "checkout_item" ADD CONSTRAINT "checkout_item_checkoutId_fkey" FOREIGN KEY ("checkoutId") REFERENCES "checkout"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "coupon_md" ADD CONSTRAINT "coupon_md_id_fkey" FOREIGN KEY ("id") REFERENCES "coupon"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "subscription" ADD CONSTRAINT "subscription_customerId_fkey" FOREIGN KEY ("customerId") REFERENCES "customer"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "subscription" ADD CONSTRAINT "subscription_paymentMethodId_fkey" FOREIGN KEY ("paymentMethodId") REFERENCES "payment_method"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "subscription" ADD CONSTRAINT "subscription_billingAddressId_fkey" FOREIGN KEY ("billingAddressId") REFERENCES "user_billing_address"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "subscription" ADD CONSTRAINT "subscription_shippingAddressId_fkey" FOREIGN KEY ("shippingAddressId") REFERENCES "user_shipping_address"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_AccountToGroup" ADD CONSTRAINT "_AccountToGroup_A_fkey" FOREIGN KEY ("A") REFERENCES "iam_account"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_AccountToGroup" ADD CONSTRAINT "_AccountToGroup_B_fkey" FOREIGN KEY ("B") REFERENCES "iam_group"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_AccountToRole" ADD CONSTRAINT "_AccountToRole_A_fkey" FOREIGN KEY ("A") REFERENCES "iam_account"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "_AccountToRole" ADD CONSTRAINT "_AccountToRole_B_fkey" FOREIGN KEY ("B") REFERENCES "iam_role"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/apps/server/prisma/migrations/migration_lock.toml b/apps/server/prisma/migrations/migration_lock.toml deleted file mode 100644 index fbffa92c..00000000 --- a/apps/server/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/apps/server/prisma/schema.prisma b/apps/server/prisma/schema.prisma deleted file mode 100644 index be96541e..00000000 --- a/apps/server/prisma/schema.prisma +++ /dev/null @@ -1,910 +0,0 @@ -generator client { - provider = "prisma-client-js" - output = "../vendor/prisma" - // previewFeatures = ["tracing", "metrics", "fullTextSearch", "fullTextIndex", "views", "driverAdapters", "multiSchema", "postgresqlExtensions", "nativeDistinct", "relationJoins"] - previewFeatures = ["tracing", "metrics", "fullTextSearch", "fullTextIndex", "views", "driverAdapters", "multiSchema", "postgresqlExtensions"] - engineType = "library" -} - -datasource db { - provider = "postgresql" - url = env("DATABASE_URI") - relationMode = "foreignKeys" - // TODO: Add postgis - extensions = [hstore, pg_trgm, uuidOssp(map: "uuid-ossp"), pgcrypto, citext] - // directUrl = env("DATABASE_URL") - // shadowDatabaseUrl = env("DATABASE_URL") -} - -generator dbml { - provider = "prisma-dbml-generator" - output = "../docs/dbml" - outputName = "plygrnd.dbml" - projectName = "plygrnd" - projectDatabaseType = "PostgreSQL" - projectNote = "plygrnd database" -} - -model Account { - id String @id @default(cuid()) - // -------------------------------------------------- - /// The user's family name. - family_name String? - /// The user's given name. - given_name String? - /// The user's locale. - locale String? @default("en") - /// URL pointing to the user's profile picture. - picture String? - /// The user's full name - name String? - /// The user's nickname. - nickname String? - /// The user's phone number. Only valid for users with SMS connections. - phone_number String? - /// Indicates whether the user has been verified their phone number. - phone_verified Boolean @default(false) - /// The user's username. Must be unique. - username String @unique - /// The user's email address. Must be unique. - email String @unique - /// Indicates whether the user has verified their email address. - email_verified Boolean @default(false) - // email_verified Boolean @default(false) - /// The user's password. Only valid for users with Database connections. - /// (It's argon2 hashed) - password String - /// IP address associated with the user's last login. - last_ip String? - /// Timestamp indicating when the user last logged in. - last_login DateTime? - // -------------------------------------------------- - createdAt DateTime @default(now()) - /// Timestamp indicating when the user's profile was last updated/modified. - /// Changes to last_login are considered updates, so most of the time, - /// updated_at will match last_login. - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Sessions Session[] - User User? - TokenAudit TokenAudit[] - Group Group[] - Role Role[] - PaymentMethod PaymentMethod[] - AccountMetadata AccountMetadata[] - VerificationRequest VerificationRequest[] - FederatedIdentity FederatedIdentity[] - PGPKey PGPKey? - - // @@index(fields: [id, email, username, phone_number], map: "account_idx", type: Hash) - @@map("iam_account") -} - -model OAuthClient { - id String @id @default(cuid()) - // -------------------------------------------------- - IdP String @unique - // Sadly things cannot be ideal as they could be, GitHub is a example where - // implementation of .well-known was too hard in this case authority needs - // to be optional and add resolving endpoints manually. - // https://fusionauth.io/docs/lifecycle/authenticate-users/identity-providers/social/github - discoverEndpoints Boolean - authority String? - authorizationEndpoint String? - tokenEndpoint String? - userinfoEndpoint String? - issuer String? - clientId String - clientSecret String - redirectUri String - scope String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - FederatedIdentity FederatedIdentity[] - - @@map("iam_oauth_client") -} - -model PGPKey { - id String @id @default(cuid()) - // -------------------------------------------------- - key String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Account Account @relation(fields: [id], references: [id], map: "account_openpgp_public_key_fkey") - - @@map("iam_pgp_public_key") -} - -model FederatedIdentity { - id String @id @default(cuid()) - // -------------------------------------------------- - accountId String - IdP String - /// The unique identifier for the user's identity within the external - /// identity provider. - /// This should be a string value that is provided by the IdP. - sub String - name String - picture String? - expiresAt DateTime - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Account Account @relation(fields: [accountId], references: [id], onDelete: Cascade) - OAuthClient OAuthClient @relation(fields: [IdP], references: [IdP], onDelete: Cascade) - - @@map("iam_federated_identity") -} - -/// Custom fields that store info about a user that does not impact what they can or cannot access, such as work address, home address, or user preferences. -model AccountMetadata { - id String @default(cuid()) - // -------------------------------------------------- - key String - value String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Account Account @relation(fields: [id], references: [id], map: "account_metadata_fk") - - @@unique([id, key]) - @@map("iam_account_md") -} - -model Group { - id String @id @default(cuid()) - // -------------------------------------------------- - name String @unique - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Members Account[] - - @@map("iam_group") -} - -model Role { - id String @id @default(cuid()) - // -------------------------------------------------- - name String @unique - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Accounts Account[] - - @@map("iam_role") -} - -model Session { - id String @id @default(cuid()) - // -------------------------------------------------- - accountId String - // -------------------------------------------------- - createdAt DateTime @default(now()) - // -------------------------------------------------- - Account Account @relation(fields: [accountId], references: [id], map: "account_session_fkey", onUpdate: Cascade, onDelete: Cascade) - - @@map("iam_session") -} - -// TODO: It is temporary entity that could be hold in logs -model TokenAudit { - id String @id @default(cuid()) - // -------------------------------------------------- - /// ID of the user to whom the token belongs - accountId String - /// The ID of the token (jti claim from JWT) - tokenId String - /// The issue time of the token (iat claim from JWT) - issuedAt DateTime - /// The expiration time of the token (exp claim from JWT) - expiresAt DateTime - /// Indicates if the token is revoked - isRevoked Boolean - /// The last time the token was used - lastUsedAt DateTime? - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Account Account @relation(fields: [accountId], references: [id], map: "account_token_audit_fkey") -} - -// TODO: Temporary entity that could be hold in cache -model VerificationRequest { - id String @id @default(cuid()) - // -------------------------------------------------- - accountId String - email String - token String - issuedAt DateTime @default(now()) - expiresAt DateTime - isSolved Boolean @default(false) - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Account Account @relation(fields: [accountId], references: [id], map: "account_verification_request_fkey") -} - -model User { - id String @id @default(cuid()) - // -------------------------------------------------- - accountId String @unique - firstName String - lastName String - email String - phoneNumber String? - avatar String? - about String? - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Account Account @relation(fields: [accountId], references: [id]) - Payments Payment[] - Checkout Checkout[] - Metadata UserMetadata[] - Customer Customer? - - @@map("user") -} - -model Customer { - id String @id @default(cuid()) - // -------------------------------------------------- - // -------------------------------------------------- - User User @relation(fields: [id], references: [id], onDelete: Cascade, onUpdate: Cascade) - Subscription Subscription[] - ShippingAddresses ShippingAddress[] - Order Order[] - Cart Cart? - BillingAddress BillingAddress[] - - @@map("customer") -} - -model UserMetadata { - id String @id @default(cuid()) - // -------------------------------------------------- - key String - value String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - User User @relation(fields: [id], references: [id], map: "user_metadata_fkey", onDelete: Cascade, onUpdate: Cascade) - - @@map("user_md") -} - -/// User can have only one billing address, but can have multiple shipping addresses. -model BillingAddress { - id String @id @default(cuid()) - // -------------------------------------------------- - legalName String - taxIdentifier String - streetLine1 String - streetLine2 String? - city String - state String? - zipCode String - country String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Order Order[] - Subscription Subscription[] - Customer Customer @relation(fields: [id], references: [id], onDelete: Cascade, onUpdate: Cascade) - - @@map("user_billing_address") -} - -model ShippingAddress { - id String @unique @default(cuid()) - // -------------------------------------------------- - userId String - fullName String - streetLine1 String - streetLine2 String? - city String - state String? - zipCode String - country String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - version Int @default(1) - // -------------------------------------------------- - Order Order[] - Subscription Subscription[] - Customer Customer? @relation(fields: [customerId], references: [id]) - customerId String? - - @@id(fields: [id, version], map: "versioned_shipping_address_pk", name: "vid") - @@unique([id, version]) - @@map("user_shipping_address") -} - -model Category { - id String @id @default(cuid()) - // -------------------------------------------------- - name String - parentId String? - description String? - // -------------------------------------------------- - children Category[] @relation(name: "CategoryParentCategoryChild") - parent Category? @relation(fields: [parentId], references: [id], name: "CategoryParentCategoryChild") - Product Product[] - - // -------------------------------------------------- - @@map("product_category") -} - -model Product { - id String @id @default(cuid()) - // -------------------------------------------------- - name String - categoryId String? - price Int - currency String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - ProductAttribute ProductAttribute[] - variants ProductVariant[] - CartItem CartItem[] - Category Category? @relation(fields: [categoryId], references: [id]) - OrderLine OrderLine[] - Swap Swap[] - - // -------------------------------------------------- - @@map("product") -} - -enum AttributeType { - STRING - NUMBER - INTEGER - UNIT - BOOLEAN - DATE -} - -// TODO: In future this can be extended to Attribute and AttributeValue which -// would allow to create custom attributes for products. ProductAttribute -// would be a connector between Attribute, AttributeValue and Product. This -// will allow running really comprehensive queries and filters. The one worst -// case to be resolved is different data types adn potentially implementation of -// MTI to keep everything type-safe. -model ProductAttribute { - id String @id @default(cuid()) - // -------------------------------------------------- - /// @example "gpu.vram" - uid String @unique - productId String - /// Example of ProductAttribute would be "CUDA Cores" or "Memory" - name String - description String? - type AttributeType - // Single-table inheritance (STI) - // https://www.prisma.io/docs/orm/prisma-schema/data-model/table-inheritance#data-model - // Sadly prisma do not support union types which eventually lead to hell - // like this without any proper way to enforce type safety (out of the box). - // Eventually, we need to use a single table inheritance (STI) pattern. - // STI would be more efficient. - valueInt Int? - valueBoolean Boolean? - valueString String? - valueIntUnit String? - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - Product Product @relation(fields: [productId], references: [id]) - - // -------------------------------------------------- - @@map("product_attribute") -} - -model ProductOption { - id String @id @default(cuid()) - // -------------------------------------------------- - productAttributeId String - value String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // -------------------------------------------------- - @@map("product_option") -} - -model ProductVariant { - id String @id @default(cuid()) - // -------------------------------------------------- - productId String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - Product Product @relation(fields: [productId], references: [id]) - - @@map("product_variant") -} - -enum OrderStatus { - PENDING - PROCESSING - SHIPPED - DELIVERED - CANCELED - REFUNDED - RETURNED -} - -model Order { - id String @id @default(cuid()) - // -------------------------------------------------- - customerId String - shippingAddressId String - shippingAddressVersion Int - billingAddressId String? - // Indicates if placed order should start subscription - billingInterval BillingInterval? - // If Order was placed as a part of subscription, this field will be populated - // with subscription ID, this is because we want to track all "sub-orders" - // that are part of subscription. No idea about other way. - subscriptionId String? - status OrderStatus - subtotal Int - tax Int - total Int - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - processedAt DateTime? - shippedAt DateTime? - deliveredAt DateTime? - canceledAt DateTime? - refundedAt DateTime? - returnedAt DateTime? - // -------------------------------------------------- - Customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade, onUpdate: Cascade) - ShippingAddress ShippingAddress @relation(fields: [shippingAddressId, shippingAddressVersion], references: [id, version]) - BillingAddress BillingAddress? @relation(fields: [billingAddressId], references: [id]) - OrderLine OrderLine[] - Subscription Subscription? @relation(fields: [subscriptionId], references: [id]) - Swap Swap[] - - @@map("order") -} - -model Swap { - id String @id @default(cuid()) - // -------------------------------------------------- - orderId String - productId String - quantity Int - price Int - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - Order Order @relation(fields: [orderId], references: [id]) - Product Product @relation(fields: [productId], references: [id]) - - @@map("swap") -} - -model OrderLine { - id String @id @default(cuid()) - // -------------------------------------------------- - orderId String - productId String - quantity Int - price Int - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - Order Order @relation(fields: [orderId], references: [id]) - Product Product @relation(fields: [productId], references: [id]) - - @@map("order_line") -} - -model Cart { - id String @id @default(cuid()) - // -------------------------------------------------- - /// Customer who owns the cart. His existence is optional. - customerId String? @unique - /// Fingerprints are used to identify a cart across multiple devices. If a - /// customer logs in on a different device, the cart will be restored using - /// the fingerprint. - fingerprint String? - /// Promotion code applied to the cart. - promotionCode String? - /// Currency used for the cart. If not set, defaults to the currency of the customer. - currency String @default("USD") - /// Total quantity of items in the cart. - quantity Int @default(0) - /// Total before any discounts or taxes are applied. - subtotal Int @default(0) - /// Total tax amount applied. If no tax was applied, defaults to 0. - tax Int @default(0) - /// Total discount amount applied. If no discounts were applied, defaults to 0. - discount Int @default(0) - /// Total after discounts and taxes. - total Int @default(0) - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - CartItem CartItem[] - User Customer? @relation(fields: [customerId], references: [id]) - - @@map("cart") -} - -model CartItem { - id String @id @default(cuid()) - // -------------------------------------------------- - /// The cart ID. - cartId String - /// The product ID. - productId String - /// Total before any discounts or taxes are applied. - price Int - /// Currency used for the cart item. If not set, defaults to the currency of the cart. - currency String - /// Total quantity of items in the cart. - quantity Int - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - Cart Cart @relation(fields: [cartId], references: [id]) - Product Product @relation(fields: [productId], references: [id]) - - // Disallow duplicate rows with same product as quantity exists - @@unique([cartId, productId]) - @@map("cart_item") -} - -enum PaymentProcessor { - STRIPE @map("stripe") - PAYPAL @map("paypal") - MANUAL @map("manual") -} - -enum PaymentStatus { - PENDING - FAILED - PAID - ACTION_REQUIRED -} - -model Payment { - id String @id @default(cuid()) - // -------------------------------------------------- - payerId String - currency String - amount Int - paymentMethodId String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - Payer User @relation(fields: [payerId], references: [id]) - PaymentMethod PaymentMethod @relation(fields: [paymentMethodId], references: [id]) - checkoutId String? - - // -------------------------------------------------- - @@map("payment") -} - -enum InvoiceStatus { - DRAFT - OPEN - PAID - VOID - REFUNDED -} - -model Invoice { - id String @id @default(cuid()) - // -------------------------------------------------- - customerId String - status InvoiceStatus - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - InvoiceLine InvoiceLine[] - Checkout Checkout[] - - // -------------------------------------------------- - @@map("invoice") -} - -model InvoiceLine { - id String @id @default(cuid()) - // -------------------------------------------------- - invoiceId String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - Invoice Invoice @relation(fields: [invoiceId], references: [id]) - - // -------------------------------------------------- - @@map("invoice_line") -} - -model PaymentMethod { - id String @id @default(cuid()) - // -------------------------------------------------- - accountId String - processor PaymentProcessor - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - Account Account @relation(fields: [accountId], references: [id], onDelete: Cascade, onUpdate: Cascade) - Stripe StripePaymentMethod? - Payment Payment[] - Subscription Subscription[] - - // -------------------------------------------------- - @@map("payment_method") -} - -model StripePaymentMethod { - id String @id @default(cuid()) - // -------------------------------------------------- - stripeCustomerId String - stripePaymentMethodId String - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - PaymentMethod PaymentMethod @relation(fields: [id], references: [id], onDelete: Cascade, onUpdate: Cascade) - - @@map("stripe_payment_method") -} - -model Checkout { - id String @id @default(cuid()) - // -------------------------------------------------- - userId String - paymentId String @unique - invoiceId String - subscriptionId String? - orderId String? - /// Currency used for the cart. If not set, defaults to the currency of the customer. - currency String @default("USD") - /// Total quantity of items in the cart. - quantity Int @default(0) - /// Total before any discounts or taxes are applied. - subtotal Int @default(0) - /// Total tax amount applied. If no tax was applied, defaults to 0. - tax Int @default(0) - /// Total discount amount applied. If no discounts were applied, defaults to 0. - discount Int @default(0) - /// Total after discounts and taxes. - total Int @default(0) - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - User User @relation(fields: [userId], references: [id]) - Invoice Invoice @relation(fields: [invoiceId], references: [id]) - CheckoutItem CheckoutItem[] - - // -------------------------------------------------- - @@map("checkout") -} - -model CheckoutItem { - id String @id @default(cuid()) - // -------------------------------------------------- - checkoutId String - /// Total discount amount applied. If no discounts were applied, defaults to 0. - discount Int @default(0) - /// Total before any discounts or taxes are applied. - subtotal Int - /// Total tax amount applied. If no tax was applied, defaults to 0. - tax Int @default(0) - /// Total after discounts and taxes. - total Int - // -------------------------------------------------- - Checkout Checkout @relation(fields: [checkoutId], references: [id], onDelete: Cascade, onUpdate: Cascade) - - // -------------------------------------------------- - @@map("checkout_item") -} - -model Blob { - id String @id @default(cuid()) - // -------------------------------------------------- - checksum String - type String - size Int - filename String @unique - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // -------------------------------------------------- - @@map("blob") -} - -/// Coupon contains information about a percent-off or amount-off discount -/// you might want to apply to a customer. Coupons may be applied to -/// subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not -/// work with conventional one-off charges or payment intents. -model Coupon { - id String @id @default(cuid()) - // -------------------------------------------------- - amountOff Int? - percentOff Int? - duration Int? - durationInMonths Int? - maxRedemptions Int? - minimumAmount Int? - minimumAmountCurrency String? - firstTimeTransactionOnly Boolean? - timesRedeemed BigInt - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - metadata CouponMetadata[] - - // -------------------------------------------------- - @@map("coupon") -} - -/// Set of key-value pairs that you can attach to an object. -/// This can be useful for storing additional information about the object in a -/// structured format. -model CouponMetadata { - id String @id @default(cuid()) - // -------------------------------------------------- - key String - value String - // -------------------------------------------------- - Coupon Coupon @relation(fields: [id], references: [id], onDelete: Cascade, onUpdate: Cascade) - - // -------------------------------------------------- - @@map("coupon_md") -} - -/// A Promotion Code represents a customer-redeemable code for a coupon. It -/// can be used to create multiple codes for a single coupon. - -model PromotionCode { - id String @id @default(cuid()) - // -------------------------------------------------- - code String - active Boolean - - // -------------------------------------------------- - @@map("promotion_code") -} - -model Region { - id String @id @default(cuid()) - // -------------------------------------------------- - name String - country String - - // -------------------------------------------------- - @@map("region") -} - -enum BillingInterval { - DAILY - EVERY_OTHER_DAY - EVERY_THIRD_DAY - EVERY_FOURTH_DAY - EVERY_WEEKDAY - WEEKLY - BIWEEKLY - MONTHLY - QUARTERLY - SEMIANNUALLY - ANNUALLY - - @@map("billing_interval") -} - -enum SubscriptionStatus { - ACTIVE - CANCELED - PAST_DUE - UNPAID - INCOMPLETE - INCOMPLETE_EXPIRED - TRIALING - PAST_TRIALING - - @@map("subscription_status") -} - -model SubscriptionSchedule { - id String @id @default(cuid()) - // -------------------------------------------------- - startDate DateTime - endDate DateTime - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - // -------------------------------------------------- - // -------------------------------------------------- - @@map("subscription_schedule") -} - -model Plan { - id String @id @default(cuid()) - // -------------------------------------------------- -} - -model PlanItem { - id String @id @default(cuid()) - // -------------------------------------------------- -} - -model Subscription { - id String @id @default(cuid()) - // -------------------------------------------------- - customerId String - billingInterval BillingInterval - billingFrequency Int - paymentMethodId String - nextBillingDate DateTime - status SubscriptionStatus - billingAddressId String? - shippingAddressId String? - startedAt DateTime - endedAt DateTime? - // -------------------------------------------------- - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - // -------------------------------------------------- - Customer Customer @relation(fields: [customerId], references: [id]) - PaymentMethod PaymentMethod @relation(fields: [paymentMethodId], references: [id]) - BillingAddress BillingAddress? @relation(fields: [billingAddressId], references: [id]) - ShippingAddress ShippingAddress? @relation(fields: [shippingAddressId], references: [id]) - Order Order[] - - // -------------------------------------------------- - @@map("subscription") -} - -model Discount { - id String @id @default(cuid()) - // -------------------------------------------------- -} diff --git a/apps/server/src/routes/v1/ingestion.ts b/apps/server/src/routes/v1/ingestion.ts new file mode 100644 index 00000000..80a4df72 --- /dev/null +++ b/apps/server/src/routes/v1/ingestion.ts @@ -0,0 +1 @@ +// Main controller for building ingestion routes. \ No newline at end of file diff --git a/apps/server/src/routes/v1/substance.ts b/apps/server/src/routes/v1/substance.ts new file mode 100644 index 00000000..7720dcb1 --- /dev/null +++ b/apps/server/src/routes/v1/substance.ts @@ -0,0 +1 @@ +// An main controller for quering substance information. \ No newline at end of file diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml new file mode 100644 index 00000000..186e91b7 --- /dev/null +++ b/deploy/docker-compose.yml @@ -0,0 +1,36 @@ +version : '3.7' +services : + server : + container_name : ${REPOSITORY_NAME}-server + image : ${REPOSITORY_NAME}:latest + build : + dockerfile : apps/server/Dockerfile + context : .. + ports : + - '${PORT}:3000' + environment : + - DATABASE_URL=postgres://${DATABASE_USER}:${DATABASE_PASSWORD}@cockroachdb:${DATABASE_PORT}/${DATABASE_NAME} + + cockroachdb : + container_name : ${REPOSITORY_NAME}-cockroachdb + image : cockroachdb/cockroach:latest + command : start-single-node --insecure --advertise-addr ${DATABASE_HOST} + ports : + - '${DATABASE_PORT}:26257' + - '8081:8080' + volumes : + - '${PWD}/.cache/cockroach:/cockroach/cockroach-data' + environment : + - COCKROACH_USER=${DATABASE_USER} + - COCKROACH_PASSWORD=${DATABASE_PASSWORD} + - COCKROACH_DATABASE=${DATABASE_NAME} + + meilisearch : + container_name : ${REPOSITORY_NAME}-meilisearch + image : getmeili/meilisearch:latest + ports : + - '${MEILISEARCH_PORT}:7700' + volumes : + - '${PWD}/.cache/meilisearch:/data.ms' + environment : + - MEILI_MASTER_KEY=${MEILISEARCH_MASTER_KEY} diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index a0937579..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: '3.7' -services: - server: - container_name: ${REPOSITORY_NAME}-server - image: ${REPOSITORY_NAME}:latest - build: - dockerfile: apps/server/Dockerfile - context: . - ports: - - '${PORT}:3000' - environment: - - DATABASE_URL=postgres://${DATABASE_USER}:${DATABASE_PASSWORD}@cockroachdb:${DATABASE_PORT}/${DATABASE_NAME} - - cockroachdb: - container_name: ${REPOSITORY_NAME}-cockroachdb - image: cockroachdb/cockroach:latest - command: start-single-node --insecure --advertise-addr ${DATABASE_HOST} - ports: - - '${DATABASE_PORT}:26257' - - '8081:8080' - volumes: - - '${PWD}/.cache/cockroach:/cockroach/cockroach-data' - environment: - - COCKROACH_USER=${DATABASE_USER} - - COCKROACH_PASSWORD=${DATABASE_PASSWORD} - - COCKROACH_DATABASE=${DATABASE_NAME} - - meilisearch: - container_name: ${REPOSITORY_NAME}-meilisearch - image: getmeili/meilisearch:latest - ports: - - '${MEILISEARCH_PORT}:7700' - volumes: - - '${PWD}/.cache/meilisearch:/data.ms' - environment: - - MEILI_MASTER_KEY=${MEILISEARCH_MASTER_KEY} diff --git a/packages/hephaistos/.c8rc.json b/packages/hephaistos/.c8rc.json deleted file mode 100644 index 82d2e599..00000000 --- a/packages/hephaistos/.c8rc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "reporter": [ - "text-summary", - "json", - "html", - "lcov" - ], - "reportsDir": "./coverage", - "src": [ - "src/**/*.ts" - ] -} diff --git a/packages/hephaistos/.eslintrc.json b/packages/hephaistos/.eslintrc.json deleted file mode 100644 index cdb7fe1a..00000000 --- a/packages/hephaistos/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["node"] -} diff --git a/packages/hephaistos/.gitignore b/packages/hephaistos/.gitignore deleted file mode 100644 index 0f08ccb2..00000000 --- a/packages/hephaistos/.gitignore +++ /dev/null @@ -1 +0,0 @@ -cache/*.json diff --git a/packages/hephaistos/README.md b/packages/hephaistos/README.md deleted file mode 100644 index e17fc4b4..00000000 --- a/packages/hephaistos/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `packages/hephaistos` - -Hephaistos is a command-line tool for building dataset of substaces, effects and experience reports from available sources. Nobody is supposed to build them on your own, if you're looking for these information you can use `lucifer` packages which aims to distructure data contained in application, also it's used to seed database. diff --git a/packages/hephaistos/ava.config.js b/packages/hephaistos/ava.config.js deleted file mode 100644 index c58d6d34..00000000 --- a/packages/hephaistos/ava.config.js +++ /dev/null @@ -1,13 +0,0 @@ -export default { - concurrency: 5, - failFast: false, - failWithoutAssertions: false, - environmentVariables: { - NODE_ENV: 'testing' - }, - verbose: false, - nodeArguments: ['--loader=ts-node/esm', '--experimental-specifier-resolution=node', '--no-warnings'], - extensions: { - ts: 'module' - } -} diff --git a/packages/hephaistos/cache/.gitkeep b/packages/hephaistos/cache/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/hephaistos/package.json b/packages/hephaistos/package.json deleted file mode 100644 index e472b42e..00000000 --- a/packages/hephaistos/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "hephaistos", - "version": "0.0.0", - "private": true, - "description": "", - "author": { - "name": "Jakub Olan", - "email": "keinsell@protonmail.com", - "url": "https://github.com/keinsell" - }, - "type": "module", - "main": "dist/index.js", - "module": "dist/index.cjs", - "types": "dist/index.d.ts", - "scripts": { - "db:generate": "prisma generate", - "db:migrate:deploy": "prisma migrate deploy", - "db:migrate:dev": "prisma migrate dev", - "db:push": "prisma db push --accept-data-loss", - "db:studio": "prisma studio", - "generate": "pnpm run generate:gql:pw", - "generate:gql:pw": "graphql-codegen-esm --config psychonautwiki.gql-codegen.yml", - "hephaistos": "tsx --watch ./src/bin.ts" - }, - "dependencies": { - "@prisma/client": "latest", - "chalk": "^5.2.0", - "effectindex-dataset": "*", - "erowid-dataset": "*", - "figlet": "^1.5.2", - "graphql": "^16.6.0", - "graphql-request": "^5.1.0", - "js-quantities": "^1.7.6", - "lowdb": "^5.0.5", - "ms": "^2.1.3", - "nanoid": "^4.0.1", - "ora": "^6.1.2", - "osiris": "*", - "pqm": "^1.0.0", - "psyxts-dataset": "*", - "signale": "^1.4.0", - "slugify": "^1.6.5", - "type-fest": "^3.5.3", - "unitmath": "^0.8.8" - }, - "devDependencies": { - "@ava/typescript": "^3.0.1", - "@graphql-codegen/cli": "2.16.4", - "@graphql-codegen/client-preset": "1.2.6", - "@graphql-codegen/introspection": "2.2.3", - "@swc/core": "^1.3.27", - "@swc/wasm": "^1.3.27", - "@types/figlet": "^1.5.5", - "@types/js-quantities": "^1.6.3", - "@types/ms": "^0.7.31", - "@types/node": "^18.11.18", - "@types/nodemon": "1.19.2", - "@types/signale": "^1.4.4", - "ava": "^5.1.1", - "c8": "^7.12.0", - "eslint-config-node": "*", - "nodemon": "2.0.20", - "prisma": "latest", - "ts-node": "^10.9.1", - "tsup": "^6.5.0", - "tsx": "3.12.2", - "typescript": "^4.9.4" - }, - "packageManager": "pnpm@8.6.0", - "volta": { - "node": "19.4.0" - } -} diff --git a/packages/hephaistos/prisma/schema.prisma b/packages/hephaistos/prisma/schema.prisma deleted file mode 100644 index db48323e..00000000 --- a/packages/hephaistos/prisma/schema.prisma +++ /dev/null @@ -1,115 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -datasource db { - provider = "cockroachdb" - url = env("DATABASE_URL") -} - -generator client { - provider = "prisma-client-js" - previewFeatures = ["fullTextSearch", "fullTextIndex", "metrics", "tracing", "filteredRelationCount", "fieldReference", "multiSchema", "extendedWhereUnique", "views", "clientExtensions"] -} - -model Account { - id String @id @default(cuid()) - username String @unique - publicKey String - Subject Subject[] - AuthenticationChallange AuthenticationChallange[] -} - -model AuthenticationChallange { - id String @id @default(cuid()) - account_id String? - account Account? @relation(fields: [account_id], references: [id]) - challenge String - valid_until DateTime - response String? - success Boolean? - privateKey String - date_created DateTime @default(now()) -} - -model Subject { - id String @id @default(cuid()) - firstName String? - lastName String? - dateOfBirth DateTime? - weight Int? - height Int? - account_id String? @unique - account Account? @relation(fields: [account_id], references: [id]) - Ingestion Ingestion[] -} - -model Substance { - id String @id @default(cuid()) - name String @unique - common_names String[] - brand_names String[] - substitutive_name String? - systematic_name String? - unii String? - cas_number String? - inchi_key String? - iupac String? - smiles String? - psychoactive_class String[] - chemical_class String? - routes_of_administration RouteOfAdministration[] - Ingestion Ingestion[] -} - -model RouteOfAdministration { - id String @id @default(cuid()) - substanceName String? - name String - bioavailability Float[] - dosage_kind String - dosage_unit String - dosage_per_kilogram Boolean @default(false) - thereshold_dosage Float - light_dosage Float[] - common_dosage Float[] - strong_dosage Float[] - heavy_dosage Float - onset_phase Int[] - comeup_phase Int[] - peak_phase Int[] - offset_phase Int[] - afterglow_phase Int[] - Substance Substance? @relation(fields: [substanceName], references: [name]) -} - -model Effect { - id String @id @default(cuid()) - name String @unique - slug String @unique - - category String? - type String? - tags String[] - - summary String? - description String[] - - parameters String[] - see_also String[] - - effectindex String? - psychonautwiki String? -} - -model Ingestion { - id String @id @default(cuid()) - substanceName String? - routeOfAdministration String? - dosage_unit String? - dosage_amount Int? - isEstimatedDosage Boolean? @default(false) - date DateTime? - subject_id String? - Subject Subject? @relation(fields: [subject_id], references: [id]) - Substance Substance? @relation(fields: [substanceName], references: [name]) -} diff --git a/packages/hephaistos/psychonautwiki.gql-codegen.yml b/packages/hephaistos/psychonautwiki.gql-codegen.yml deleted file mode 100644 index 704edf98..00000000 --- a/packages/hephaistos/psychonautwiki.gql-codegen.yml +++ /dev/null @@ -1,13 +0,0 @@ -overwrite: true -schema: 'https://api.psychonautwiki.org' -documents: ['./src/gql/**/*.graphql'] -emitLegacyCommonJSImports: false -generates: - './src/utils/gql/sdk/': - preset: 'client' - plugins: [] - schema: 'https://api.psychonautwiki.org' - documents: ['./utils/gql/**/*.graphql'] - './src/utils/gql/graphql.schema.json': - plugins: - - 'introspection' diff --git a/packages/hephaistos/src/bin.ts b/packages/hephaistos/src/bin.ts deleted file mode 100644 index ec1698d8..00000000 --- a/packages/hephaistos/src/bin.ts +++ /dev/null @@ -1,11 +0,0 @@ -import figlet from 'figlet' -import { effectindex } from './effectindex.js' -import { psychonautwiki } from './psychonautwiki.js' -import { drugbank } from './drugbank.js' - -console.log(figlet.textSync('Hephaistos')) -console.log('Hephaistos is initializing...') - -await effectindex() -await psychonautwiki() -await drugbank() diff --git a/packages/hephaistos/src/drugbank.ts b/packages/hephaistos/src/drugbank.ts deleted file mode 100644 index 088cb5c9..00000000 --- a/packages/hephaistos/src/drugbank.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { PrismaClient, Prisma } from 'database' -import dataset, { DrugElement, DrugbankD } from 'drugbank-dataset' -import slugify from 'slugify' -import { prisma } from './prisma-instance.js' -import ora from 'ora' - -function map(substance: DrugElement): Prisma.SubstanceCreateInput { - return { - name: substance.name - // cas_number: substance['cas-number'] || undefined - } -} - -async function doSubstanceExistsByName(name: string) { - const exists = await prisma.substance.count({ where: { name } }) - return exists > 0 -} - -export async function drugbank(): Promise { - const spinner = ora(`Loading drugbank.json...`).start() - - let index = 0 - - for (const item of dataset as unknown as any[]) { - const substance = map(item) - spinner.text = `Importing substance: ${substance.name} - (${index++}/${(dataset as unknown as any[]).length - 1})` - - if (!substance.name.startsWith('Vitamin')) { - // Skip - continue - } - - const substanceExists = await doSubstanceExistsByName(substance.name) - - if (substanceExists) { - // Update Substance - await prisma.substance.update({ where: { name: substance.name }, data: substance }) - // Skip creation - continue - } - - await prisma.substance.create({ data: substance }) - } - - spinner.succeed('Drugbank loaded to database...') -} diff --git a/packages/hephaistos/src/effectindex.ts b/packages/hephaistos/src/effectindex.ts deleted file mode 100644 index fc71b18d..00000000 --- a/packages/hephaistos/src/effectindex.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Prisma } from 'database' -import type { ParsedPage } from 'effectindex-dataset' -import dataset from 'effectindex-dataset' -import ora from 'ora' -import slugify from 'slugify' -import { prisma } from './prisma-instance.js' - -function map(effect: ParsedPage & { url: string }): Prisma.EffectCreateInput { - let title = effect.title - const summary = effect.description - const raw_description = effect.text.split('\n') - const url = effect.url - const description = [] - - for (const line of raw_description) { - if (line.startsWith('[')) continue - if (line === '') continue - - description.push(line) - } - - return { - name: title, - slug: slugify(title, { lower: true }), - summary, - description, - effectindex: url - } -} - -async function checkIfEffectExistsByName(name: string) { - const effect = prisma.effect.findFirst({ where: { name } }) - return effect -} - -export async function effectindex(): Promise { - const spinner = ora(`Loading effectindex.json...`).start() - - let index = 0 - for (const item of dataset) { - const effect = map(item as ParsedPage & { url: string }) - spinner.text = `Importing effect: ${effect.name} - (${index++}/${dataset.length - 1})` - - const effectExists = await checkIfEffectExistsByName(effect.name) - - if (effectExists) { - continue - } - - await prisma.effect.create({ data: effect }) - } - - spinner.succeed('Effectindex loaded to database...') -} diff --git a/packages/hephaistos/src/erowid.ts b/packages/hephaistos/src/erowid.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/hephaistos/src/gql/graphql.schema.json b/packages/hephaistos/src/gql/graphql.schema.json deleted file mode 100644 index 177417c0..00000000 --- a/packages/hephaistos/src/gql/graphql.schema.json +++ /dev/null @@ -1,2340 +0,0 @@ -{ - "__schema": { - "queryType": { - "name": "Query" - }, - "mutationType": null, - "subscriptionType": null, - "types": [ - { - "kind": "SCALAR", - "name": "Boolean", - "description": "The `Boolean` scalar type represents `true` or `false`.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Effect", - "description": null, - "fields": [ - { - "name": "experiences", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Experience", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "url", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Experience", - "description": null, - "fields": [ - { - "name": "effects", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Experience", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Float", - "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Int", - "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "fields": [ - { - "name": "effects_by_substance", - "description": null, - "args": [ - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "50", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "offset", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substance", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Effect", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "experiences", - "description": null, - "args": [ - { - "name": "effects_by_substance", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substance", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances_by_effect", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Experience", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances", - "description": null, - "args": [ - { - "name": "chemicalClass", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "effect", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "10", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "offset", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "psychoactiveClass", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "query", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances_by_effect", - "description": null, - "args": [ - { - "name": "effect", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "50", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "offset", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INTERFACE", - "name": "RoaRange", - "description": null, - "fields": [ - { - "name": "max", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "min", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - } - ] - }, - { - "kind": "SCALAR", - "name": "String", - "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Substance", - "description": null, - "fields": [ - { - "name": "addictionPotential", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "class", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceClass", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "commonNames", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "crossTolerances", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "dangerousInteractions", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "effects", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Effect", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "experiences", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Experience", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "featured", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "images", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "SubstanceImage", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "roa", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaTypes", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "roas", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "summary", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tolerance", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceTolerance", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "toxicity", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "uncertainInteractions", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "unsafeInteractions", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "url", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceClass", - "description": null, - "fields": [ - { - "name": "chemical", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "psychoactive", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceImage", - "description": null, - "fields": [ - { - "name": "image", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "thumb", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoa", - "description": null, - "fields": [ - { - "name": "bioavailability", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "dose", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDose", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "duration", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDuration", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaDose", - "description": null, - "fields": [ - { - "name": "common", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "heavy", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "light", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "strong", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "threshold", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "units", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaDuration", - "description": null, - "fields": [ - { - "name": "afterglow", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "comeup", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "duration", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "offset", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "onset", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "peak", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "total", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "description": null, - "fields": [ - { - "name": "max", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "min", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "units", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "RoaRange", - "ofType": null - } - ], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "description": null, - "fields": [ - { - "name": "max", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "min", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "RoaRange", - "ofType": null - } - ], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaTypes", - "description": null, - "fields": [ - { - "name": "buccal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "insufflated", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "intramuscular", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "intravenous", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "oral", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "rectal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "smoked", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subcutaneous", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sublingual", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "transdermal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceTolerance", - "description": null, - "fields": [ - { - "name": "full", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "half", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "zero", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Directive", - "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isRepeatable", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "locations", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__DirectiveLocation", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__DirectiveLocation", - "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "QUERY", - "description": "Location adjacent to a query operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "MUTATION", - "description": "Location adjacent to a mutation operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SUBSCRIPTION", - "description": "Location adjacent to a subscription operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD", - "description": "Location adjacent to a field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_DEFINITION", - "description": "Location adjacent to a fragment definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_SPREAD", - "description": "Location adjacent to a fragment spread.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INLINE_FRAGMENT", - "description": "Location adjacent to an inline fragment.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "VARIABLE_DEFINITION", - "description": "Location adjacent to a variable definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCHEMA", - "description": "Location adjacent to a schema definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCALAR", - "description": "Location adjacent to a scalar definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Location adjacent to an object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD_DEFINITION", - "description": "Location adjacent to a field definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ARGUMENT_DEFINITION", - "description": "Location adjacent to an argument definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Location adjacent to an interface definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Location adjacent to a union definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Location adjacent to an enum definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM_VALUE", - "description": "Location adjacent to an enum value definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Location adjacent to an input object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_FIELD_DEFINITION", - "description": "Location adjacent to an input object field definition.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__EnumValue", - "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Field", - "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__InputValue", - "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "defaultValue", - "description": "A GraphQL-formatted string representing the default value for this input value.", - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Schema", - "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", - "fields": [ - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "types", - "description": "A list of all types supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "queryType", - "description": "The type that query operations will be rooted at.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "mutationType", - "description": "If this server supports mutation, the type that mutation operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subscriptionType", - "description": "If this server support subscription, the type that subscription operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "directives", - "description": "A list of all directives supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Directive", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Type", - "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", - "fields": [ - { - "name": "kind", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__TypeKind", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "specifiedByURL", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "fields", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Field", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "interfaces", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "possibleTypes", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "enumValues", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__EnumValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "inputFields", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ofType", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__TypeKind", - "description": "An enum describing what kind of type a given `__Type` is.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "SCALAR", - "description": "Indicates this type is a scalar.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Indicates this type is a union. `possibleTypes` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Indicates this type is an enum. `enumValues` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Indicates this type is an input object. `inputFields` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "LIST", - "description": "Indicates this type is a list. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "NON_NULL", - "description": "Indicates this type is a non-null. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - } - ], - "directives": [ - { - "name": "deprecated", - "description": "Marks an element of a GraphQL schema as no longer supported.", - "isRepeatable": false, - "locations": [ - "ARGUMENT_DEFINITION", - "ENUM_VALUE", - "FIELD_DEFINITION", - "INPUT_FIELD_DEFINITION" - ], - "args": [ - { - "name": "reason", - "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": "\"No longer supported\"", - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "name": "include", - "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", - "isRepeatable": false, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Included when true.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "name": "skip", - "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", - "isRepeatable": false, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Skipped when true.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "name": "specifiedBy", - "description": "Exposes a URL that specifies the behavior of this scalar.", - "isRepeatable": false, - "locations": [ - "SCALAR" - ], - "args": [ - { - "name": "url", - "description": "The URL that specifies the behavior of this scalar.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - } - ] - } -} diff --git a/packages/hephaistos/src/gql/operation.graphql b/packages/hephaistos/src/gql/operation.graphql deleted file mode 100644 index 35bd29b3..00000000 --- a/packages/hephaistos/src/gql/operation.graphql +++ /dev/null @@ -1,202 +0,0 @@ -query getSubstances($name: String) { - substances(query: $name) { - name - summary - url - featured - - effects { - name - url - } - - class { - chemical - psychoactive - } - - tolerance { - full - half - zero - } - # routes of administration - roas { - name - dose { - units - threshold - heavy - common { - min - max - } - light { - min - max - } - strong { - min - max - } - } - duration { - afterglow { - min - max - units - } - comeup { - min - max - units - } - duration { - min - max - units - } - offset { - min - max - units - } - onset { - min - max - units - } - peak { - min - max - units - } - total { - min - max - units - } - } - bioavailability { - min - max - } - } - - images { - thumb - image - } - - addictionPotential - toxicity - crossTolerances - commonNames - uncertainInteractions { - class { - psychoactive - } - } - unsafeInteractions { - class { - psychoactive - } - } - - dangerousInteractions { - class { - psychoactive - } - } - } -} - -query AllSubstances { - substances(limit: 9999) { - name - commonNames - url - class { - chemical - psychoactive - } - tolerance { - full - half - zero - } - roas { - name - dose { - units - threshold - light { - min - max - } - common { - min - max - } - strong { - min - max - } - heavy - } - duration { - onset { - min - max - units - } - comeup { - min - max - units - } - peak { - min - max - units - } - offset { - min - max - units - } - total { - min - max - units - } - afterglow { - min - max - units - } - } - bioavailability { - min - max - } - } - addictionPotential - toxicity - crossTolerances - uncertainInteractions { - name - } - unsafeInteractions { - name - } - dangerousInteractions { - name - } - - effects { - name - url - } - } -} diff --git a/packages/hephaistos/src/gql/schema.graphql b/packages/hephaistos/src/gql/schema.graphql deleted file mode 100644 index f45cd303..00000000 --- a/packages/hephaistos/src/gql/schema.graphql +++ /dev/null @@ -1,117 +0,0 @@ -type SubstanceClass { - chemical: [String] - psychoactive: [String] -} - -type SubstanceTolerance { - full: String - half: String - zero: String -} - -interface RoaRange { - min: Float - max: Float -} - -type SubstanceRoaRange implements RoaRange { - min: Float - max: Float -} - -type SubstanceRoaDurationRange implements RoaRange { - min: Float - max: Float - units: String -} - -type SubstanceRoaDose { - units: String - threshold: Float - heavy: Float - common: SubstanceRoaRange - light: SubstanceRoaRange - strong: SubstanceRoaRange -} - -type SubstanceRoaDuration { - afterglow: SubstanceRoaDurationRange - comeup: SubstanceRoaDurationRange - duration: SubstanceRoaDurationRange - offset: SubstanceRoaDurationRange - onset: SubstanceRoaDurationRange - peak: SubstanceRoaDurationRange - total: SubstanceRoaDurationRange -} - -type SubstanceRoa { - name: String - dose: SubstanceRoaDose - duration: SubstanceRoaDuration - bioavailability: SubstanceRoaRange -} - -type SubstanceRoaTypes { - oral: SubstanceRoa - sublingual: SubstanceRoa - buccal: SubstanceRoa - insufflated: SubstanceRoa - rectal: SubstanceRoa - transdermal: SubstanceRoa - subcutaneous: SubstanceRoa - intramuscular: SubstanceRoa - intravenous: SubstanceRoa - smoked: SubstanceRoa -} - -type SubstanceImage { - thumb: String - image: String -} - -type Substance { - name: String - url: String - featured: Boolean - effects: [Effect] - experiences: [Experience] - class: SubstanceClass - tolerance: SubstanceTolerance - roa: SubstanceRoaTypes - roas: [SubstanceRoa] - summary: String - images: [SubstanceImage] - addictionPotential: String - toxicity: [String] - crossTolerances: [String] - commonNames: [String] - uncertainInteractions: [Substance] - unsafeInteractions: [Substance] - dangerousInteractions: [Substance] -} - -type Effect { - name: String - url: String - substances: [Substance] - experiences: [Experience] -} - -type Experience { - substances: [Substance] - effects: [Experience] -} - -type Query { - substances( - effect: String - query: String - chemicalClass: String - psychoactiveClass: String - limit: Int = 10 - offset: Int = 0 - ): [Substance] - substances_by_effect(effect: [String], limit: Int = 50, offset: Int = 0): [Substance] - effects_by_substance(substance: String, limit: Int = 50, offset: Int = 0): [Effect] - experiences(substances_by_effect: String, effects_by_substance: String, substance: String): [Experience] -} diff --git a/packages/hephaistos/src/prisma-instance.ts b/packages/hephaistos/src/prisma-instance.ts deleted file mode 100644 index d1279846..00000000 --- a/packages/hephaistos/src/prisma-instance.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { PrismaClient } from 'database' - -const prisma = new PrismaClient() - -export { prisma } diff --git a/packages/hephaistos/src/psychonautwiki.ts b/packages/hephaistos/src/psychonautwiki.ts deleted file mode 100644 index 53d891f6..00000000 --- a/packages/hephaistos/src/psychonautwiki.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { request } from 'graphql-request' -import { - AllSubstancesDocument, - AllSubstancesQuery, - Substance as PsychonautWikiSubstance -} from './utils/gql/sdk/graphql.js' -import { Prisma } from 'database' -import { prisma } from './prisma-instance.js' -import ora from 'ora' - -function map(input: PsychonautWikiSubstance): Prisma.SubstanceCreateInput { - const substance: Partial = {} - - substance.name = input.name - substance.common_names = input.commonNames || undefined - substance.chemical_class = input.class?.chemical?.[0] || undefined - substance.psychoactive_class = input.class?.psychoactive || undefined - - return substance as any -} - -function mapRoutesOfAdministration(input: PsychonautWikiSubstance): Prisma.RouteOfAdministrationCreateInput[] { - const mappedRoutesOfAdministration: Prisma.RouteOfAdministrationCreateInput[] = [] - - for (const route of input.roas) { - if (route.dose) { - if ( - !route.dose.threshold || - !route.dose.light || - !route.dose.common || - !route.dose.strong || - !route.dose.heavy || - !route.dose.units - ) { - continue - } - } else { - continue - } - - if (route) { - mappedRoutesOfAdministration.push({ - name: route.name, - thereshold_dosage: route.dose.threshold, - light_dosage: [route.dose.light.min, route.dose.light.max], - common_dosage: [route.dose.common.min, route.dose.common.max], - strong_dosage: [route.dose.strong.min, route.dose.strong.max], - heavy_dosage: route.dose.heavy, - dosage_unit: route.dose.units, - dosage_kind: '', - Substance: { - connect: { - name: input.name - } - } - }) - } - } - - return mappedRoutesOfAdministration -} - -async function doSubstanceExistsByName(name: string) { - const exists = await prisma.substance.count({ where: { name } }) - return exists > 0 -} - -export async function psychonautwiki() { - const response = await request('https://api.psychonautwiki.org', AllSubstancesDocument, {}) - - const spinner = ora('Loading PsychonautWiki').start() - - // Loop through response substances - for (const psx of response.substances) { - // Map to database API - const substance = map(psx) - const routesOfAdministration = mapRoutesOfAdministration(psx) - - spinner.text = `Loading ${substance.name}...` - - // Check if substance exists already, skip - if (await doSubstanceExistsByName(substance.name)) { - // Update substance - await prisma.substance.update({ - where: { name: substance.name }, - data: substance - }) - // Skip creation - continue - } - - // Write to database - await prisma.substance.create({ data: substance }) - - // Create missing routes of administration - for (const route of routesOfAdministration) { - // Check if route of administration exists already, skip - if ( - (await prisma.routeOfAdministration.count({ where: { name: route.name, substanceName: substance.name } })) > 0 - ) { - continue - } - // Create route of administration - await prisma.routeOfAdministration.create({ - data: { - ...route, - Substance: { - connect: { - name: substance.name - } - } - } - }) - } - } - - spinner.succeed('Psychonautwiki loaded to database...') -} diff --git a/packages/hephaistos/src/utils/gql/graphql.schema.json b/packages/hephaistos/src/utils/gql/graphql.schema.json deleted file mode 100644 index 177417c0..00000000 --- a/packages/hephaistos/src/utils/gql/graphql.schema.json +++ /dev/null @@ -1,2340 +0,0 @@ -{ - "__schema": { - "queryType": { - "name": "Query" - }, - "mutationType": null, - "subscriptionType": null, - "types": [ - { - "kind": "SCALAR", - "name": "Boolean", - "description": "The `Boolean` scalar type represents `true` or `false`.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Effect", - "description": null, - "fields": [ - { - "name": "experiences", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Experience", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "url", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Experience", - "description": null, - "fields": [ - { - "name": "effects", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Experience", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Float", - "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Int", - "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "fields": [ - { - "name": "effects_by_substance", - "description": null, - "args": [ - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "50", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "offset", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substance", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Effect", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "experiences", - "description": null, - "args": [ - { - "name": "effects_by_substance", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substance", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances_by_effect", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Experience", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances", - "description": null, - "args": [ - { - "name": "chemicalClass", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "effect", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "10", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "offset", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "psychoactiveClass", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "query", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "substances_by_effect", - "description": null, - "args": [ - { - "name": "effect", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "limit", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "50", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "offset", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INTERFACE", - "name": "RoaRange", - "description": null, - "fields": [ - { - "name": "max", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "min", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - } - ] - }, - { - "kind": "SCALAR", - "name": "String", - "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Substance", - "description": null, - "fields": [ - { - "name": "addictionPotential", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "class", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceClass", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "commonNames", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "crossTolerances", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "dangerousInteractions", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "effects", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Effect", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "experiences", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Experience", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "featured", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "images", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "SubstanceImage", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "roa", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaTypes", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "roas", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "summary", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tolerance", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceTolerance", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "toxicity", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "uncertainInteractions", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "unsafeInteractions", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Substance", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "url", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceClass", - "description": null, - "fields": [ - { - "name": "chemical", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "psychoactive", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceImage", - "description": null, - "fields": [ - { - "name": "image", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "thumb", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoa", - "description": null, - "fields": [ - { - "name": "bioavailability", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "dose", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDose", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "duration", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDuration", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaDose", - "description": null, - "fields": [ - { - "name": "common", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "heavy", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "light", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "strong", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "threshold", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "units", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaDuration", - "description": null, - "fields": [ - { - "name": "afterglow", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "comeup", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "duration", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "offset", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "onset", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "peak", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "total", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaDurationRange", - "description": null, - "fields": [ - { - "name": "max", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "min", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "units", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "RoaRange", - "ofType": null - } - ], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaRange", - "description": null, - "fields": [ - { - "name": "max", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "min", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "RoaRange", - "ofType": null - } - ], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceRoaTypes", - "description": null, - "fields": [ - { - "name": "buccal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "insufflated", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "intramuscular", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "intravenous", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "oral", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "rectal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "smoked", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subcutaneous", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sublingual", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "transdermal", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "SubstanceRoa", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SubstanceTolerance", - "description": null, - "fields": [ - { - "name": "full", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "half", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "zero", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Directive", - "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isRepeatable", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "locations", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__DirectiveLocation", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__DirectiveLocation", - "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "QUERY", - "description": "Location adjacent to a query operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "MUTATION", - "description": "Location adjacent to a mutation operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SUBSCRIPTION", - "description": "Location adjacent to a subscription operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD", - "description": "Location adjacent to a field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_DEFINITION", - "description": "Location adjacent to a fragment definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_SPREAD", - "description": "Location adjacent to a fragment spread.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INLINE_FRAGMENT", - "description": "Location adjacent to an inline fragment.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "VARIABLE_DEFINITION", - "description": "Location adjacent to a variable definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCHEMA", - "description": "Location adjacent to a schema definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCALAR", - "description": "Location adjacent to a scalar definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Location adjacent to an object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD_DEFINITION", - "description": "Location adjacent to a field definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ARGUMENT_DEFINITION", - "description": "Location adjacent to an argument definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Location adjacent to an interface definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Location adjacent to a union definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Location adjacent to an enum definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM_VALUE", - "description": "Location adjacent to an enum value definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Location adjacent to an input object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_FIELD_DEFINITION", - "description": "Location adjacent to an input object field definition.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__EnumValue", - "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Field", - "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__InputValue", - "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "defaultValue", - "description": "A GraphQL-formatted string representing the default value for this input value.", - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Schema", - "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", - "fields": [ - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "types", - "description": "A list of all types supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "queryType", - "description": "The type that query operations will be rooted at.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "mutationType", - "description": "If this server supports mutation, the type that mutation operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subscriptionType", - "description": "If this server support subscription, the type that subscription operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "directives", - "description": "A list of all directives supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Directive", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Type", - "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", - "fields": [ - { - "name": "kind", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__TypeKind", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "specifiedByURL", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "fields", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Field", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "interfaces", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "possibleTypes", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "enumValues", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__EnumValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "inputFields", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ofType", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__TypeKind", - "description": "An enum describing what kind of type a given `__Type` is.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "SCALAR", - "description": "Indicates this type is a scalar.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Indicates this type is a union. `possibleTypes` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Indicates this type is an enum. `enumValues` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Indicates this type is an input object. `inputFields` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "LIST", - "description": "Indicates this type is a list. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "NON_NULL", - "description": "Indicates this type is a non-null. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - } - ], - "directives": [ - { - "name": "deprecated", - "description": "Marks an element of a GraphQL schema as no longer supported.", - "isRepeatable": false, - "locations": [ - "ARGUMENT_DEFINITION", - "ENUM_VALUE", - "FIELD_DEFINITION", - "INPUT_FIELD_DEFINITION" - ], - "args": [ - { - "name": "reason", - "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": "\"No longer supported\"", - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "name": "include", - "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", - "isRepeatable": false, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Included when true.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "name": "skip", - "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", - "isRepeatable": false, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Skipped when true.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "name": "specifiedBy", - "description": "Exposes a URL that specifies the behavior of this scalar.", - "isRepeatable": false, - "locations": [ - "SCALAR" - ], - "args": [ - { - "name": "url", - "description": "The URL that specifies the behavior of this scalar.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - } - ] - } -} diff --git a/packages/hephaistos/src/utils/gql/sdk/fragment-masking.ts b/packages/hephaistos/src/utils/gql/sdk/fragment-masking.ts deleted file mode 100644 index b35c16dd..00000000 --- a/packages/hephaistos/src/utils/gql/sdk/fragment-masking.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { TypedDocumentNode as DocumentNode, ResultOf } from '@graphql-typed-document-node/core' - -export type FragmentType> = TDocumentType extends DocumentNode< - infer TType, - any -> - ? TType extends { ' $fragmentName'?: infer TKey } - ? TKey extends string - ? { ' $fragmentRefs'?: { [key in TKey]: TType } } - : never - : never - : never - -// return non-nullable if `fragmentType` is non-nullable -export function useFragment( - _documentNode: DocumentNode, - fragmentType: FragmentType> -): TType -// return nullable if `fragmentType` is nullable -export function useFragment( - _documentNode: DocumentNode, - fragmentType: FragmentType> | null | undefined -): TType | null | undefined -// return array of non-nullable if `fragmentType` is array of non-nullable -export function useFragment( - _documentNode: DocumentNode, - fragmentType: ReadonlyArray>> -): ReadonlyArray -// return array of nullable if `fragmentType` is array of nullable -export function useFragment( - _documentNode: DocumentNode, - fragmentType: ReadonlyArray>> | null | undefined -): ReadonlyArray | null | undefined -export function useFragment( - _documentNode: DocumentNode, - fragmentType: - | FragmentType> - | ReadonlyArray>> - | null - | undefined -): TType | ReadonlyArray | null | undefined { - return fragmentType as any -} - -export function makeFragmentData>( - data: FT, - _fragment: F -): FragmentType { - return data as FragmentType -} diff --git a/packages/hephaistos/src/utils/gql/sdk/gql.ts b/packages/hephaistos/src/utils/gql/sdk/gql.ts deleted file mode 100644 index a85a5109..00000000 --- a/packages/hephaistos/src/utils/gql/sdk/gql.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* eslint-disable */ -import * as types from './graphql.js' -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' - -/** - * Map of all GraphQL operations in the project. - * - * This map has several performance disadvantages: - * 1. It is not tree-shakeable, so it will include all operations in the project. - * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle. - * 3. It does not support dead code elimination, so it will add unused operations. - * - * Therefore it is highly recommended to use the babel-plugin for production. - */ -const documents = { - 'query getSubstances($name: String) {\n substances(query: $name) {\n name\n summary\n url\n featured\n effects {\n name\n url\n }\n class {\n chemical\n psychoactive\n }\n tolerance {\n full\n half\n zero\n }\n roas {\n name\n dose {\n units\n threshold\n heavy\n common {\n min\n max\n }\n light {\n min\n max\n }\n strong {\n min\n max\n }\n }\n duration {\n afterglow {\n min\n max\n units\n }\n comeup {\n min\n max\n units\n }\n duration {\n min\n max\n units\n }\n offset {\n min\n max\n units\n }\n onset {\n min\n max\n units\n }\n peak {\n min\n max\n units\n }\n total {\n min\n max\n units\n }\n }\n bioavailability {\n min\n max\n }\n }\n images {\n thumb\n image\n }\n addictionPotential\n toxicity\n crossTolerances\n commonNames\n uncertainInteractions {\n class {\n psychoactive\n }\n }\n unsafeInteractions {\n class {\n psychoactive\n }\n }\n dangerousInteractions {\n class {\n psychoactive\n }\n }\n }\n}\n\nquery AllSubstances {\n substances(limit: 9999) {\n name\n commonNames\n url\n class {\n chemical\n psychoactive\n }\n tolerance {\n full\n half\n zero\n }\n roas {\n name\n dose {\n units\n threshold\n light {\n min\n max\n }\n common {\n min\n max\n }\n strong {\n min\n max\n }\n heavy\n }\n duration {\n onset {\n min\n max\n units\n }\n comeup {\n min\n max\n units\n }\n peak {\n min\n max\n units\n }\n offset {\n min\n max\n units\n }\n total {\n min\n max\n units\n }\n afterglow {\n min\n max\n units\n }\n }\n bioavailability {\n min\n max\n }\n }\n addictionPotential\n toxicity\n crossTolerances\n uncertainInteractions {\n name\n }\n unsafeInteractions {\n name\n }\n dangerousInteractions {\n name\n }\n effects {\n name\n url\n }\n }\n}': - types.GetSubstancesDocument -} - -/** - * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - * - * - * @example - * ```ts - * const query = gql(`query GetUser($id: ID!) { user(id: $id) { name } }`); - * ``` - * - * The query argument is unknown! - * Please regenerate the types. - */ -export function graphql(source: string): unknown - -/** - * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function graphql( - source: 'query getSubstances($name: String) {\n substances(query: $name) {\n name\n summary\n url\n featured\n effects {\n name\n url\n }\n class {\n chemical\n psychoactive\n }\n tolerance {\n full\n half\n zero\n }\n roas {\n name\n dose {\n units\n threshold\n heavy\n common {\n min\n max\n }\n light {\n min\n max\n }\n strong {\n min\n max\n }\n }\n duration {\n afterglow {\n min\n max\n units\n }\n comeup {\n min\n max\n units\n }\n duration {\n min\n max\n units\n }\n offset {\n min\n max\n units\n }\n onset {\n min\n max\n units\n }\n peak {\n min\n max\n units\n }\n total {\n min\n max\n units\n }\n }\n bioavailability {\n min\n max\n }\n }\n images {\n thumb\n image\n }\n addictionPotential\n toxicity\n crossTolerances\n commonNames\n uncertainInteractions {\n class {\n psychoactive\n }\n }\n unsafeInteractions {\n class {\n psychoactive\n }\n }\n dangerousInteractions {\n class {\n psychoactive\n }\n }\n }\n}\n\nquery AllSubstances {\n substances(limit: 9999) {\n name\n commonNames\n url\n class {\n chemical\n psychoactive\n }\n tolerance {\n full\n half\n zero\n }\n roas {\n name\n dose {\n units\n threshold\n light {\n min\n max\n }\n common {\n min\n max\n }\n strong {\n min\n max\n }\n heavy\n }\n duration {\n onset {\n min\n max\n units\n }\n comeup {\n min\n max\n units\n }\n peak {\n min\n max\n units\n }\n offset {\n min\n max\n units\n }\n total {\n min\n max\n units\n }\n afterglow {\n min\n max\n units\n }\n }\n bioavailability {\n min\n max\n }\n }\n addictionPotential\n toxicity\n crossTolerances\n uncertainInteractions {\n name\n }\n unsafeInteractions {\n name\n }\n dangerousInteractions {\n name\n }\n effects {\n name\n url\n }\n }\n}' -): typeof documents['query getSubstances($name: String) {\n substances(query: $name) {\n name\n summary\n url\n featured\n effects {\n name\n url\n }\n class {\n chemical\n psychoactive\n }\n tolerance {\n full\n half\n zero\n }\n roas {\n name\n dose {\n units\n threshold\n heavy\n common {\n min\n max\n }\n light {\n min\n max\n }\n strong {\n min\n max\n }\n }\n duration {\n afterglow {\n min\n max\n units\n }\n comeup {\n min\n max\n units\n }\n duration {\n min\n max\n units\n }\n offset {\n min\n max\n units\n }\n onset {\n min\n max\n units\n }\n peak {\n min\n max\n units\n }\n total {\n min\n max\n units\n }\n }\n bioavailability {\n min\n max\n }\n }\n images {\n thumb\n image\n }\n addictionPotential\n toxicity\n crossTolerances\n commonNames\n uncertainInteractions {\n class {\n psychoactive\n }\n }\n unsafeInteractions {\n class {\n psychoactive\n }\n }\n dangerousInteractions {\n class {\n psychoactive\n }\n }\n }\n}\n\nquery AllSubstances {\n substances(limit: 9999) {\n name\n commonNames\n url\n class {\n chemical\n psychoactive\n }\n tolerance {\n full\n half\n zero\n }\n roas {\n name\n dose {\n units\n threshold\n light {\n min\n max\n }\n common {\n min\n max\n }\n strong {\n min\n max\n }\n heavy\n }\n duration {\n onset {\n min\n max\n units\n }\n comeup {\n min\n max\n units\n }\n peak {\n min\n max\n units\n }\n offset {\n min\n max\n units\n }\n total {\n min\n max\n units\n }\n afterglow {\n min\n max\n units\n }\n }\n bioavailability {\n min\n max\n }\n }\n addictionPotential\n toxicity\n crossTolerances\n uncertainInteractions {\n name\n }\n unsafeInteractions {\n name\n }\n dangerousInteractions {\n name\n }\n effects {\n name\n url\n }\n }\n}'] - -export function graphql(source: string) { - return (documents as any)[source] ?? {} -} - -export type DocumentType> = TDocumentNode extends DocumentNode< - infer TType, - any -> - ? TType - : never diff --git a/packages/hephaistos/src/utils/gql/sdk/graphql.ts b/packages/hephaistos/src/utils/gql/sdk/graphql.ts deleted file mode 100644 index c857b152..00000000 --- a/packages/hephaistos/src/utils/gql/sdk/graphql.ts +++ /dev/null @@ -1,892 +0,0 @@ -/* eslint-disable */ -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' -export type Maybe = T | null -export type InputMaybe = Maybe -export type Exact = { [K in keyof T]: T[K] } -export type MakeOptional = Omit & { [SubKey in K]?: Maybe } -export type MakeMaybe = Omit & { [SubKey in K]: Maybe } -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string - String: string - Boolean: boolean - Int: number - Float: number -} - -export type Effect = { - __typename?: 'Effect' - experiences?: Maybe>> - name?: Maybe - substances?: Maybe>> - url?: Maybe -} - -export type Experience = { - __typename?: 'Experience' - effects?: Maybe>> - substances?: Maybe>> -} - -export type Query = { - __typename?: 'Query' - effects_by_substance?: Maybe>> - experiences?: Maybe>> - substances?: Maybe>> - substances_by_effect?: Maybe>> -} - -export type QueryEffects_By_SubstanceArgs = { - limit?: InputMaybe - offset?: InputMaybe - substance?: InputMaybe -} - -export type QueryExperiencesArgs = { - effects_by_substance?: InputMaybe - substance?: InputMaybe - substances_by_effect?: InputMaybe -} - -export type QuerySubstancesArgs = { - chemicalClass?: InputMaybe - effect?: InputMaybe - limit?: InputMaybe - offset?: InputMaybe - psychoactiveClass?: InputMaybe - query?: InputMaybe -} - -export type QuerySubstances_By_EffectArgs = { - effect?: InputMaybe>> - limit?: InputMaybe - offset?: InputMaybe -} - -export type RoaRange = { - max?: Maybe - min?: Maybe -} - -export type Substance = { - __typename?: 'Substance' - addictionPotential?: Maybe - class?: Maybe - commonNames?: Maybe>> - crossTolerances?: Maybe>> - dangerousInteractions?: Maybe>> - effects?: Maybe>> - experiences?: Maybe>> - featured?: Maybe - images?: Maybe>> - name?: Maybe - roa?: Maybe - roas?: Maybe>> - summary?: Maybe - tolerance?: Maybe - toxicity?: Maybe>> - uncertainInteractions?: Maybe>> - unsafeInteractions?: Maybe>> - url?: Maybe -} - -export type SubstanceClass = { - __typename?: 'SubstanceClass' - chemical?: Maybe>> - psychoactive?: Maybe>> -} - -export type SubstanceImage = { - __typename?: 'SubstanceImage' - image?: Maybe - thumb?: Maybe -} - -export type SubstanceRoa = { - __typename?: 'SubstanceRoa' - bioavailability?: Maybe - dose?: Maybe - duration?: Maybe - name?: Maybe -} - -export type SubstanceRoaDose = { - __typename?: 'SubstanceRoaDose' - common?: Maybe - heavy?: Maybe - light?: Maybe - strong?: Maybe - threshold?: Maybe - units?: Maybe -} - -export type SubstanceRoaDuration = { - __typename?: 'SubstanceRoaDuration' - afterglow?: Maybe - comeup?: Maybe - duration?: Maybe - offset?: Maybe - onset?: Maybe - peak?: Maybe - total?: Maybe -} - -export type SubstanceRoaDurationRange = RoaRange & { - __typename?: 'SubstanceRoaDurationRange' - max?: Maybe - min?: Maybe - units?: Maybe -} - -export type SubstanceRoaRange = RoaRange & { - __typename?: 'SubstanceRoaRange' - max?: Maybe - min?: Maybe -} - -export type SubstanceRoaTypes = { - __typename?: 'SubstanceRoaTypes' - buccal?: Maybe - insufflated?: Maybe - intramuscular?: Maybe - intravenous?: Maybe - oral?: Maybe - rectal?: Maybe - smoked?: Maybe - subcutaneous?: Maybe - sublingual?: Maybe - transdermal?: Maybe -} - -export type SubstanceTolerance = { - __typename?: 'SubstanceTolerance' - full?: Maybe - half?: Maybe - zero?: Maybe -} - -export type GetSubstancesQueryVariables = Exact<{ - name?: InputMaybe -}> - -export type GetSubstancesQuery = { - __typename?: 'Query' - substances?: Array<{ - __typename?: 'Substance' - name?: string | null - summary?: string | null - url?: string | null - featured?: boolean | null - addictionPotential?: string | null - toxicity?: Array | null - crossTolerances?: Array | null - commonNames?: Array | null - effects?: Array<{ __typename?: 'Effect'; name?: string | null; url?: string | null } | null> | null - class?: { - __typename?: 'SubstanceClass' - chemical?: Array | null - psychoactive?: Array | null - } | null - tolerance?: { - __typename?: 'SubstanceTolerance' - full?: string | null - half?: string | null - zero?: string | null - } | null - roas?: Array<{ - __typename?: 'SubstanceRoa' - name?: string | null - dose?: { - __typename?: 'SubstanceRoaDose' - units?: string | null - threshold?: number | null - heavy?: number | null - common?: { __typename?: 'SubstanceRoaRange'; min?: number | null; max?: number | null } | null - light?: { __typename?: 'SubstanceRoaRange'; min?: number | null; max?: number | null } | null - strong?: { __typename?: 'SubstanceRoaRange'; min?: number | null; max?: number | null } | null - } | null - duration?: { - __typename?: 'SubstanceRoaDuration' - afterglow?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - comeup?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - duration?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - offset?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - onset?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - peak?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - total?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - } | null - bioavailability?: { __typename?: 'SubstanceRoaRange'; min?: number | null; max?: number | null } | null - } | null> | null - images?: Array<{ __typename?: 'SubstanceImage'; thumb?: string | null; image?: string | null } | null> | null - uncertainInteractions?: Array<{ - __typename?: 'Substance' - class?: { __typename?: 'SubstanceClass'; psychoactive?: Array | null } | null - } | null> | null - unsafeInteractions?: Array<{ - __typename?: 'Substance' - class?: { __typename?: 'SubstanceClass'; psychoactive?: Array | null } | null - } | null> | null - dangerousInteractions?: Array<{ - __typename?: 'Substance' - class?: { __typename?: 'SubstanceClass'; psychoactive?: Array | null } | null - } | null> | null - } | null> | null -} - -export type AllSubstancesQueryVariables = Exact<{ [key: string]: never }> - -export type AllSubstancesQuery = { - __typename?: 'Query' - substances?: Array<{ - __typename?: 'Substance' - name?: string | null - commonNames?: Array | null - url?: string | null - addictionPotential?: string | null - toxicity?: Array | null - crossTolerances?: Array | null - class?: { - __typename?: 'SubstanceClass' - chemical?: Array | null - psychoactive?: Array | null - } | null - tolerance?: { - __typename?: 'SubstanceTolerance' - full?: string | null - half?: string | null - zero?: string | null - } | null - roas?: Array<{ - __typename?: 'SubstanceRoa' - name?: string | null - dose?: { - __typename?: 'SubstanceRoaDose' - units?: string | null - threshold?: number | null - heavy?: number | null - light?: { __typename?: 'SubstanceRoaRange'; min?: number | null; max?: number | null } | null - common?: { __typename?: 'SubstanceRoaRange'; min?: number | null; max?: number | null } | null - strong?: { __typename?: 'SubstanceRoaRange'; min?: number | null; max?: number | null } | null - } | null - duration?: { - __typename?: 'SubstanceRoaDuration' - onset?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - comeup?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - peak?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - offset?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - total?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - afterglow?: { - __typename?: 'SubstanceRoaDurationRange' - min?: number | null - max?: number | null - units?: string | null - } | null - } | null - bioavailability?: { __typename?: 'SubstanceRoaRange'; min?: number | null; max?: number | null } | null - } | null> | null - uncertainInteractions?: Array<{ __typename?: 'Substance'; name?: string | null } | null> | null - unsafeInteractions?: Array<{ __typename?: 'Substance'; name?: string | null } | null> | null - dangerousInteractions?: Array<{ __typename?: 'Substance'; name?: string | null } | null> | null - effects?: Array<{ __typename?: 'Effect'; name?: string | null; url?: string | null } | null> | null - } | null> | null -} - -export const GetSubstancesDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'getSubstances' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'name' } }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'substances' }, - arguments: [ - { - kind: 'Argument', - name: { kind: 'Name', value: 'query' }, - value: { kind: 'Variable', name: { kind: 'Name', value: 'name' } } - } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'name' } }, - { kind: 'Field', name: { kind: 'Name', value: 'summary' } }, - { kind: 'Field', name: { kind: 'Name', value: 'url' } }, - { kind: 'Field', name: { kind: 'Name', value: 'featured' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'effects' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'name' } }, - { kind: 'Field', name: { kind: 'Name', value: 'url' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'class' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'chemical' } }, - { kind: 'Field', name: { kind: 'Name', value: 'psychoactive' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'tolerance' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'full' } }, - { kind: 'Field', name: { kind: 'Name', value: 'half' } }, - { kind: 'Field', name: { kind: 'Name', value: 'zero' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'roas' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'name' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'dose' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'units' } }, - { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, - { kind: 'Field', name: { kind: 'Name', value: 'heavy' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'common' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'light' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'strong' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'duration' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'afterglow' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'comeup' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'duration' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'offset' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'onset' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'peak' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'bioavailability' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'images' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'thumb' } }, - { kind: 'Field', name: { kind: 'Name', value: 'image' } } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'addictionPotential' } }, - { kind: 'Field', name: { kind: 'Name', value: 'toxicity' } }, - { kind: 'Field', name: { kind: 'Name', value: 'crossTolerances' } }, - { kind: 'Field', name: { kind: 'Name', value: 'commonNames' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'uncertainInteractions' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'class' }, - selectionSet: { - kind: 'SelectionSet', - selections: [{ kind: 'Field', name: { kind: 'Name', value: 'psychoactive' } }] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'unsafeInteractions' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'class' }, - selectionSet: { - kind: 'SelectionSet', - selections: [{ kind: 'Field', name: { kind: 'Name', value: 'psychoactive' } }] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'dangerousInteractions' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'class' }, - selectionSet: { - kind: 'SelectionSet', - selections: [{ kind: 'Field', name: { kind: 'Name', value: 'psychoactive' } }] - } - } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode -export const AllSubstancesDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'AllSubstances' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'substances' }, - arguments: [ - { kind: 'Argument', name: { kind: 'Name', value: 'limit' }, value: { kind: 'IntValue', value: '9999' } } - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'name' } }, - { kind: 'Field', name: { kind: 'Name', value: 'commonNames' } }, - { kind: 'Field', name: { kind: 'Name', value: 'url' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'class' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'chemical' } }, - { kind: 'Field', name: { kind: 'Name', value: 'psychoactive' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'tolerance' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'full' } }, - { kind: 'Field', name: { kind: 'Name', value: 'half' } }, - { kind: 'Field', name: { kind: 'Name', value: 'zero' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'roas' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'name' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'dose' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'units' } }, - { kind: 'Field', name: { kind: 'Name', value: 'threshold' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'light' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'common' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'strong' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'heavy' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'duration' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'onset' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'comeup' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'peak' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'offset' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'total' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'afterglow' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } }, - { kind: 'Field', name: { kind: 'Name', value: 'units' } } - ] - } - } - ] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'bioavailability' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'min' } }, - { kind: 'Field', name: { kind: 'Name', value: 'max' } } - ] - } - } - ] - } - }, - { kind: 'Field', name: { kind: 'Name', value: 'addictionPotential' } }, - { kind: 'Field', name: { kind: 'Name', value: 'toxicity' } }, - { kind: 'Field', name: { kind: 'Name', value: 'crossTolerances' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'uncertainInteractions' }, - selectionSet: { - kind: 'SelectionSet', - selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'unsafeInteractions' }, - selectionSet: { - kind: 'SelectionSet', - selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'dangerousInteractions' }, - selectionSet: { - kind: 'SelectionSet', - selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] - } - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'effects' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'name' } }, - { kind: 'Field', name: { kind: 'Name', value: 'url' } } - ] - } - } - ] - } - } - ] - } - } - ] -} as unknown as DocumentNode diff --git a/packages/hephaistos/src/utils/gql/sdk/index.ts b/packages/hephaistos/src/utils/gql/sdk/index.ts deleted file mode 100644 index 306913e4..00000000 --- a/packages/hephaistos/src/utils/gql/sdk/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './gql.js' -export * from './fragment-masking.js' diff --git a/packages/hephaistos/tsconfig.json b/packages/hephaistos/tsconfig.json deleted file mode 100644 index 3cf803cf..00000000 --- a/packages/hephaistos/tsconfig.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "compilerOptions": { - "allowUnreachableCode": true, - "allowUnusedLabels": true, - "exactOptionalPropertyTypes": false, - "noFallthroughCasesInSwitch": false, - "noImplicitAny": false, - "noImplicitOverride": false, - "noImplicitReturns": false, - "noImplicitThis": false, - "noPropertyAccessFromIndexSignature": false, - "noUncheckedIndexedAccess": false, - "noUnusedLocals": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "inlineSources": false, - "isolatedModules": true, - "allowJs": true, - "strictNullChecks": false, - "noUnusedParameters": false, - "preserveWatchOutput": true, - "skipLibCheck": true, - "strict": false, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "allowSyntheticDefaultImports": true, - "baseUrl": "./", - "outDir": "./dist", - "lib": [ - "ESNext" - ], - "module": "NodeNext", - "moduleResolution": "node", - "target": "ESNext" - }, - "ts-node": { - "swc": true - }, - "include": [ - "src/**/*" - ], - "exclude": [ - "node_modules", - "dist" - ] -} diff --git a/packages/hephaistos/tsup.config.js b/packages/hephaistos/tsup.config.js deleted file mode 100644 index 2c1d5704..00000000 --- a/packages/hephaistos/tsup.config.js +++ /dev/null @@ -1,17 +0,0 @@ -export default { - entry: ['src/index.ts'], - silent: false, - splitting: true, - target: 'node18', - sourcemap: true, - dts: true, - minify: true, - format: ['esm'], - clean: true, - treeshake: true, - metafile: true, - shims: true, - loader: { - '.md': 'file' - } -} diff --git a/poetry.lock b/poetry.lock deleted file mode 100644 index b1f820c3..00000000 --- a/poetry.lock +++ /dev/null @@ -1,695 +0,0 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. - -[[package]] -name = "annotated-types" -version = "0.6.0" -description = "Reusable constraint types to use with typing.Annotated" -optional = false -python-versions = ">=3.8" -files = [ - {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, - {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, -] - -[[package]] -name = "anyio" -version = "4.3.0" -description = "High level compatibility layer for multiple asynchronous event loop implementations" -optional = false -python-versions = ">=3.8" -files = [ - {file = "anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8"}, - {file = "anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6"}, -] - -[package.dependencies] -idna = ">=2.8" -sniffio = ">=1.1" - -[package.extras] -doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (>=0.23)"] - -[[package]] -name = "boto3" -version = "1.34.89" -description = "The AWS SDK for Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "boto3-1.34.89-py3-none-any.whl", hash = "sha256:f9166f485d64b012d46acd212fb29a45b195a85ff66a645b05b06d9f7572af36"}, - {file = "boto3-1.34.89.tar.gz", hash = "sha256:e0940e43810fe82f5b77442c751491fcc2768af7e7c3e8c15ea158e1ca9b586c"}, -] - -[package.dependencies] -botocore = ">=1.34.89,<1.35.0" -jmespath = ">=0.7.1,<2.0.0" -s3transfer = ">=0.10.0,<0.11.0" - -[package.extras] -crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] - -[[package]] -name = "botocore" -version = "1.34.89" -description = "Low-level, data-driven core of boto 3." -optional = false -python-versions = ">=3.8" -files = [ - {file = "botocore-1.34.89-py3-none-any.whl", hash = "sha256:35205ed7db13058a3f7114c28e93058a8ff1490dfc6a5b5dff9c581c738fbf59"}, - {file = "botocore-1.34.89.tar.gz", hash = "sha256:6624b69bcdf2c5d0568b7bc9cbac13e605f370e7ea06710c61e2e2dc76831141"}, -] - -[package.dependencies] -jmespath = ">=0.7.1,<2.0.0" -python-dateutil = ">=2.1,<3.0.0" -urllib3 = {version = ">=1.25.4,<2.2.0 || >2.2.0,<3", markers = "python_version >= \"3.10\""} - -[package.extras] -crt = ["awscrt (==0.20.9)"] - -[[package]] -name = "certifi" -version = "2024.2.2" -description = "Python package for providing Mozilla's CA Bundle." -optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, -] - -[[package]] -name = "charset-normalizer" -version = "3.3.2" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -optional = false -python-versions = ">=3.7.0" -files = [ - {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, - {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, - {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, - {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, - {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, - {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, - {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, - {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, -] - -[[package]] -name = "click" -version = "8.1.7" -description = "Composable command line interface toolkit" -optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "h11" -version = "0.14.0" -description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -optional = false -python-versions = ">=3.7" -files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, -] - -[[package]] -name = "httpcore" -version = "1.0.5" -description = "A minimal low-level HTTP client." -optional = false -python-versions = ">=3.8" -files = [ - {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, - {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, -] - -[package.dependencies] -certifi = "*" -h11 = ">=0.13,<0.15" - -[package.extras] -asyncio = ["anyio (>=4.0,<5.0)"] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (==1.*)"] -trio = ["trio (>=0.22.0,<0.26.0)"] - -[[package]] -name = "httpx" -version = "0.27.0" -description = "The next generation HTTP client." -optional = false -python-versions = ">=3.8" -files = [ - {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, - {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, -] - -[package.dependencies] -anyio = "*" -certifi = "*" -httpcore = "==1.*" -idna = "*" -sniffio = "*" - -[package.extras] -brotli = ["brotli", "brotlicffi"] -cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (==1.*)"] - -[[package]] -name = "idna" -version = "3.7" -description = "Internationalized Domain Names in Applications (IDNA)" -optional = false -python-versions = ">=3.5" -files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, -] - -[[package]] -name = "jinja2" -version = "3.1.3" -description = "A very fast and expressive template engine." -optional = false -python-versions = ">=3.7" -files = [ - {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, - {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, -] - -[package.dependencies] -MarkupSafe = ">=2.0" - -[package.extras] -i18n = ["Babel (>=2.7)"] - -[[package]] -name = "jmespath" -version = "1.0.1" -description = "JSON Matching Expressions" -optional = false -python-versions = ">=3.7" -files = [ - {file = "jmespath-1.0.1-py3-none-any.whl", hash = "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980"}, - {file = "jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe"}, -] - -[[package]] -name = "markupsafe" -version = "2.1.5" -description = "Safely add untrusted strings to HTML/XML markup." -optional = false -python-versions = ">=3.7" -files = [ - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"}, - {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"}, - {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"}, - {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"}, - {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"}, - {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"}, - {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"}, - {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, -] - -[[package]] -name = "metaflow" -version = "2.11.10" -description = "Metaflow: More Data Science, Less Engineering" -optional = false -python-versions = "*" -files = [ - {file = "metaflow-2.11.10-py2.py3-none-any.whl", hash = "sha256:37c946abeb237395a953c8abd2b7acccd494d6b1e0622921ab2ea3684485bea2"}, - {file = "metaflow-2.11.10.tar.gz", hash = "sha256:76c000e4a0b4b71e995bcb3d4b0031907661a1c79c150a18bcda03d4c9fde507"}, -] - -[package.dependencies] -boto3 = "*" -requests = "*" - -[package.extras] -stubs = ["metaflow-stubs (==2.11.10)"] - -[[package]] -name = "nodeenv" -version = "1.8.0" -description = "Node.js virtual environment builder" -optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" -files = [ - {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, - {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, -] - -[package.dependencies] -setuptools = "*" - -[[package]] -name = "prisma" -version = "0.13.1" -description = "Prisma Client Python is an auto-generated and fully type-safe database client" -optional = false -python-versions = ">=3.7.0" -files = [ - {file = "prisma-0.13.1-py3-none-any.whl", hash = "sha256:b79ad69bdf09b217431904c1250c36421233ea394a230f1665f5699fd842ea20"}, - {file = "prisma-0.13.1.tar.gz", hash = "sha256:f0f86a67c38e6f08b53cce9272dd9c736f69f4fcbb94dbdfa87bf44f983e925d"}, -] - -[package.dependencies] -click = ">=7.1.2" -httpx = ">=0.19.0" -jinja2 = ">=2.11.2" -nodeenv = "*" -pydantic = ">=1.10.0,<3" -python-dotenv = ">=0.12.0" -tomlkit = "*" -typing-extensions = ">=4.5.0" - -[package.extras] -all = ["nodejs-bin"] -node = ["nodejs-bin"] - -[[package]] -name = "prisma-py" -version = "1.0" -description = "" -optional = false -python-versions = "*" -files = [ - {file = "prisma.py-1.0-py3-none-any.whl", hash = "sha256:99d3dbdc94997e2a67c7d116e058f35ac6f43fb01b8e994d217cd2c2d9730b4c"}, - {file = "prisma.py-1.0.tar.gz", hash = "sha256:e52f1973ccee3a9ff6d212cf33f21c57137aea53098cc97de0992504ec570148"}, -] - -[[package]] -name = "pydantic" -version = "2.7.1" -description = "Data validation using Python type hints" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pydantic-2.7.1-py3-none-any.whl", hash = "sha256:e029badca45266732a9a79898a15ae2e8b14840b1eabbb25844be28f0b33f3d5"}, - {file = "pydantic-2.7.1.tar.gz", hash = "sha256:e9dbb5eada8abe4d9ae5f46b9939aead650cd2b68f249bb3a8139dbe125803cc"}, -] - -[package.dependencies] -annotated-types = ">=0.4.0" -pydantic-core = "2.18.2" -typing-extensions = ">=4.6.1" - -[package.extras] -email = ["email-validator (>=2.0.0)"] - -[[package]] -name = "pydantic-core" -version = "2.18.2" -description = "Core functionality for Pydantic validation and serialization" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pydantic_core-2.18.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:9e08e867b306f525802df7cd16c44ff5ebbe747ff0ca6cf3fde7f36c05a59a81"}, - {file = "pydantic_core-2.18.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f0a21cbaa69900cbe1a2e7cad2aa74ac3cf21b10c3efb0fa0b80305274c0e8a2"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0680b1f1f11fda801397de52c36ce38ef1c1dc841a0927a94f226dea29c3ae3d"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:95b9d5e72481d3780ba3442eac863eae92ae43a5f3adb5b4d0a1de89d42bb250"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fcf5cd9c4b655ad666ca332b9a081112cd7a58a8b5a6ca7a3104bc950f2038"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b5155ff768083cb1d62f3e143b49a8a3432e6789a3abee8acd005c3c7af1c74"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:553ef617b6836fc7e4df130bb851e32fe357ce36336d897fd6646d6058d980af"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b89ed9eb7d616ef5714e5590e6cf7f23b02d0d539767d33561e3675d6f9e3857"}, - {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:75f7e9488238e920ab6204399ded280dc4c307d034f3924cd7f90a38b1829563"}, - {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ef26c9e94a8c04a1b2924149a9cb081836913818e55681722d7f29af88fe7b38"}, - {file = "pydantic_core-2.18.2-cp310-none-win32.whl", hash = "sha256:182245ff6b0039e82b6bb585ed55a64d7c81c560715d1bad0cbad6dfa07b4027"}, - {file = "pydantic_core-2.18.2-cp310-none-win_amd64.whl", hash = "sha256:e23ec367a948b6d812301afc1b13f8094ab7b2c280af66ef450efc357d2ae543"}, - {file = "pydantic_core-2.18.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:219da3f096d50a157f33645a1cf31c0ad1fe829a92181dd1311022f986e5fbe3"}, - {file = "pydantic_core-2.18.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cc1cfd88a64e012b74e94cd00bbe0f9c6df57049c97f02bb07d39e9c852e19a4"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b7133a6e6aeb8df37d6f413f7705a37ab4031597f64ab56384c94d98fa0e90"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:224c421235f6102e8737032483f43c1a8cfb1d2f45740c44166219599358c2cd"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b14d82cdb934e99dda6d9d60dc84a24379820176cc4a0d123f88df319ae9c150"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2728b01246a3bba6de144f9e3115b532ee44bd6cf39795194fb75491824a1413"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:470b94480bb5ee929f5acba6995251ada5e059a5ef3e0dfc63cca287283ebfa6"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:997abc4df705d1295a42f95b4eec4950a37ad8ae46d913caeee117b6b198811c"}, - {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:75250dbc5290e3f1a0f4618db35e51a165186f9034eff158f3d490b3fed9f8a0"}, - {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4456f2dca97c425231d7315737d45239b2b51a50dc2b6f0c2bb181fce6207664"}, - {file = "pydantic_core-2.18.2-cp311-none-win32.whl", hash = "sha256:269322dcc3d8bdb69f054681edff86276b2ff972447863cf34c8b860f5188e2e"}, - {file = "pydantic_core-2.18.2-cp311-none-win_amd64.whl", hash = "sha256:800d60565aec896f25bc3cfa56d2277d52d5182af08162f7954f938c06dc4ee3"}, - {file = "pydantic_core-2.18.2-cp311-none-win_arm64.whl", hash = "sha256:1404c69d6a676245199767ba4f633cce5f4ad4181f9d0ccb0577e1f66cf4c46d"}, - {file = "pydantic_core-2.18.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:fb2bd7be70c0fe4dfd32c951bc813d9fe6ebcbfdd15a07527796c8204bd36242"}, - {file = "pydantic_core-2.18.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6132dd3bd52838acddca05a72aafb6eab6536aa145e923bb50f45e78b7251043"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d904828195733c183d20a54230c0df0eb46ec746ea1a666730787353e87182"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9bd70772c720142be1020eac55f8143a34ec9f82d75a8e7a07852023e46617f"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2b8ed04b3582771764538f7ee7001b02e1170223cf9b75dff0bc698fadb00cf3"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6dac87ddb34aaec85f873d737e9d06a3555a1cc1a8e0c44b7f8d5daeb89d86f"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca4ae5a27ad7a4ee5170aebce1574b375de390bc01284f87b18d43a3984df72"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:886eec03591b7cf058467a70a87733b35f44707bd86cf64a615584fd72488b7c"}, - {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca7b0c1f1c983e064caa85f3792dd2fe3526b3505378874afa84baf662e12241"}, - {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b4356d3538c3649337df4074e81b85f0616b79731fe22dd11b99499b2ebbdf3"}, - {file = "pydantic_core-2.18.2-cp312-none-win32.whl", hash = "sha256:8b172601454f2d7701121bbec3425dd71efcb787a027edf49724c9cefc14c038"}, - {file = "pydantic_core-2.18.2-cp312-none-win_amd64.whl", hash = "sha256:b1bd7e47b1558ea872bd16c8502c414f9e90dcf12f1395129d7bb42a09a95438"}, - {file = "pydantic_core-2.18.2-cp312-none-win_arm64.whl", hash = "sha256:98758d627ff397e752bc339272c14c98199c613f922d4a384ddc07526c86a2ec"}, - {file = "pydantic_core-2.18.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:9fdad8e35f278b2c3eb77cbdc5c0a49dada440657bf738d6905ce106dc1de439"}, - {file = "pydantic_core-2.18.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1d90c3265ae107f91a4f279f4d6f6f1d4907ac76c6868b27dc7fb33688cfb347"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:390193c770399861d8df9670fb0d1874f330c79caaca4642332df7c682bf6b91"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:82d5d4d78e4448683cb467897fe24e2b74bb7b973a541ea1dcfec1d3cbce39fb"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4774f3184d2ef3e14e8693194f661dea5a4d6ca4e3dc8e39786d33a94865cefd"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4d938ec0adf5167cb335acb25a4ee69a8107e4984f8fbd2e897021d9e4ca21b"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0e8b1be28239fc64a88a8189d1df7fad8be8c1ae47fcc33e43d4be15f99cc70"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:868649da93e5a3d5eacc2b5b3b9235c98ccdbfd443832f31e075f54419e1b96b"}, - {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:78363590ef93d5d226ba21a90a03ea89a20738ee5b7da83d771d283fd8a56761"}, - {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:852e966fbd035a6468fc0a3496589b45e2208ec7ca95c26470a54daed82a0788"}, - {file = "pydantic_core-2.18.2-cp38-none-win32.whl", hash = "sha256:6a46e22a707e7ad4484ac9ee9f290f9d501df45954184e23fc29408dfad61350"}, - {file = "pydantic_core-2.18.2-cp38-none-win_amd64.whl", hash = "sha256:d91cb5ea8b11607cc757675051f61b3d93f15eca3cefb3e6c704a5d6e8440f4e"}, - {file = "pydantic_core-2.18.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:ae0a8a797a5e56c053610fa7be147993fe50960fa43609ff2a9552b0e07013e8"}, - {file = "pydantic_core-2.18.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:042473b6280246b1dbf530559246f6842b56119c2926d1e52b631bdc46075f2a"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a388a77e629b9ec814c1b1e6b3b595fe521d2cdc625fcca26fbc2d44c816804"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25add29b8f3b233ae90ccef2d902d0ae0432eb0d45370fe315d1a5cf231004b"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f459a5ce8434614dfd39bbebf1041952ae01da6bed9855008cb33b875cb024c0"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eff2de745698eb46eeb51193a9f41d67d834d50e424aef27df2fcdee1b153845"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8309f67285bdfe65c372ea3722b7a5642680f3dba538566340a9d36e920b5f0"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f93a8a2e3938ff656a7c1bc57193b1319960ac015b6e87d76c76bf14fe0244b4"}, - {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:22057013c8c1e272eb8d0eebc796701167d8377441ec894a8fed1af64a0bf399"}, - {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cfeecd1ac6cc1fb2692c3d5110781c965aabd4ec5d32799773ca7b1456ac636b"}, - {file = "pydantic_core-2.18.2-cp39-none-win32.whl", hash = "sha256:0d69b4c2f6bb3e130dba60d34c0845ba31b69babdd3f78f7c0c8fae5021a253e"}, - {file = "pydantic_core-2.18.2-cp39-none-win_amd64.whl", hash = "sha256:d9319e499827271b09b4e411905b24a426b8fb69464dfa1696258f53a3334641"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a1874c6dd4113308bd0eb568418e6114b252afe44319ead2b4081e9b9521fe75"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:ccdd111c03bfd3666bd2472b674c6899550e09e9f298954cfc896ab92b5b0e6d"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e18609ceaa6eed63753037fc06ebb16041d17d28199ae5aba0052c51449650a9"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e5c584d357c4e2baf0ff7baf44f4994be121e16a2c88918a5817331fc7599d7"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43f0f463cf89ace478de71a318b1b4f05ebc456a9b9300d027b4b57c1a2064fb"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:e1b395e58b10b73b07b7cf740d728dd4ff9365ac46c18751bf8b3d8cca8f625a"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0098300eebb1c837271d3d1a2cd2911e7c11b396eac9661655ee524a7f10587b"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:36789b70d613fbac0a25bb07ab3d9dba4d2e38af609c020cf4d888d165ee0bf3"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3f9a801e7c8f1ef8718da265bba008fa121243dfe37c1cea17840b0944dfd72c"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:3a6515ebc6e69d85502b4951d89131ca4e036078ea35533bb76327f8424531ce"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20aca1e2298c56ececfd8ed159ae4dde2df0781988c97ef77d5c16ff4bd5b400"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:223ee893d77a310a0391dca6df00f70bbc2f36a71a895cecd9a0e762dc37b349"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2334ce8c673ee93a1d6a65bd90327588387ba073c17e61bf19b4fd97d688d63c"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:cbca948f2d14b09d20268cda7b0367723d79063f26c4ffc523af9042cad95592"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b3ef08e20ec49e02d5c6717a91bb5af9b20f1805583cb0adfe9ba2c6b505b5ae"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c6fdc8627910eed0c01aed6a390a252fe3ea6d472ee70fdde56273f198938374"}, - {file = "pydantic_core-2.18.2.tar.gz", hash = "sha256:2e29d20810dfc3043ee13ac7d9e25105799817683348823f305ab3f349b9386e"}, -] - -[package.dependencies] -typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" - -[[package]] -name = "python-dateutil" -version = "2.9.0.post0" -description = "Extensions to the standard Python datetime module" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, - {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, -] - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "python-dotenv" -version = "1.0.1" -description = "Read key-value pairs from a .env file and set them as environment variables" -optional = false -python-versions = ">=3.8" -files = [ - {file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"}, - {file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"}, -] - -[package.extras] -cli = ["click (>=5.0)"] - -[[package]] -name = "requests" -version = "2.31.0" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.7" -files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<3" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "s3transfer" -version = "0.10.1" -description = "An Amazon S3 Transfer Manager" -optional = false -python-versions = ">= 3.8" -files = [ - {file = "s3transfer-0.10.1-py3-none-any.whl", hash = "sha256:ceb252b11bcf87080fb7850a224fb6e05c8a776bab8f2b64b7f25b969464839d"}, - {file = "s3transfer-0.10.1.tar.gz", hash = "sha256:5683916b4c724f799e600f41dd9e10a9ff19871bf87623cc8f491cb4f5fa0a19"}, -] - -[package.dependencies] -botocore = ">=1.33.2,<2.0a.0" - -[package.extras] -crt = ["botocore[crt] (>=1.33.2,<2.0a.0)"] - -[[package]] -name = "setuptools" -version = "69.5.1" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, - {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - -[[package]] -name = "sniffio" -version = "1.3.1" -description = "Sniff out which async library your code is running under" -optional = false -python-versions = ">=3.7" -files = [ - {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, - {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, -] - -[[package]] -name = "tomlkit" -version = "0.12.4" -description = "Style preserving TOML library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tomlkit-0.12.4-py3-none-any.whl", hash = "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b"}, - {file = "tomlkit-0.12.4.tar.gz", hash = "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3"}, -] - -[[package]] -name = "typing-extensions" -version = "4.11.0" -description = "Backported and Experimental Type Hints for Python 3.8+" -optional = false -python-versions = ">=3.8" -files = [ - {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, - {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, -] - -[[package]] -name = "urllib3" -version = "2.2.1" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=3.8" -files = [ - {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, - {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, -] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -h2 = ["h2 (>=4,<5)"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] - -[metadata] -lock-version = "2.0" -python-versions = "^3.11" -content-hash = "56acc61217ff4ac8995e3f2f1b3705df1177b01800326528f2105c4bc8d24e80" diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 86e40684..00000000 --- a/pyproject.toml +++ /dev/null @@ -1,18 +0,0 @@ -[tool.poetry] -name = "neuronek" -version = "0.1.0" -description = "" -authors = ["Jakub Olan "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.11" -requests = "^2.31.0" -metaflow = "^2.11.10" -prisma-py = "^1.0" -prisma = "^0.13.1" - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/workflows/initialize-db-with-externals/prisma/dev.db b/workflows/initialize-db-with-externals/prisma/dev.db index 2fa9bc44..68ce6da1 100644 Binary files a/workflows/initialize-db-with-externals/prisma/dev.db and b/workflows/initialize-db-with-externals/prisma/dev.db differ