From ad9e2c7288bfa0ef18fe5e5bd6dbf5d83182cda9 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Wed, 1 May 2024 10:13:31 +0000 Subject: [PATCH 1/2] Add Lemon Squeezy function templates to Console --- src/lib/stores/marketplace.ts | 156 ++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) diff --git a/src/lib/stores/marketplace.ts b/src/lib/stores/marketplace.ts index cf6f9ecc5..380dcd2b2 100644 --- a/src/lib/stores/marketplace.ts +++ b/src/lib/stores/marketplace.ts @@ -1648,6 +1648,162 @@ export const marketplace: MarketplaceTemplate[] = [ type: 'text' } ] + }, + { + icon: 'icon-currency-dollar', + id: 'subscriptions-with-lemon-squeezy', + name: 'Subscriptions with Lemon Squeezy', + tagline: 'Receive recurring card payments and grant subscribers extra permissions.', + permissions: ['any'], + events: [], + cron: '', + timeout: 15, + usecases: ['Utilities'], + runtimes: [ + ...getRuntimes( + TemplateRuntimes.NODE, + 'npm install', + 'src/main.js', + 'node/subscriptions-with-lemon-squeezy' + ) + ], + instructions: `For documentation and instructions check out file.`, + vcsProvider: 'github', + providerRepositoryId: 'templates', + providerOwner: 'appwrite', + providerBranch: 'main', + variables: [ + { + name: 'APPWRITE_API_KEY', + description: `The API Key to authenticate against Appwrite's Server APIs. Learn more.`, + value: '', + placeholder: 'd1efb...aec35', + required: true, + type: 'password' + }, + { + name: 'APPWRITE_ENDPOINT', + description: `The URL endpoint of the Appwrite server. Learn more.`, + value: 'https://cloud.appwrite.io/v1', + placeholder: 'https://cloud.appwrite.io/v1', + required: false, + type: 'url' + }, + { + name: 'LEMON_SQUEEZY_API_KEY', + description: `API key for sending requests to the Lemon Squeezy API. Learn more.`, + placeholder: 'eyJ0eXAiOiJ...', + required: true, + type: 'password' + }, + { + name: 'LEMON_SQUEEZY_WEBHOOK_SECRET', + description: `Secret used to validate the Lemon Squuezy Webhook signature. Learn more.`, + placeholder: 'abcd...', + required: true, + type: 'password' + }, + { + name: 'LEMON_SQUEEZY_STORE_ID', + description: `Store ID required to create a checkout using the Lemon Squeezy API. Learn more.`, + placeholder: '123456', + required: true, + type: 'text' + }, + { + name: 'LEMON_SQUEEZY_VARIANT_ID', + description: `Variant ID of a product required to create a checkout using the Lemon Squeezy API. Learn more.`, + placeholder: 'abcd...', + required: true, + type: 'text' + } + ] + }, + { + icon: 'icon-currency-dollar', + id: 'payments-with-lemon-squeezy', + name: 'Payments with Lemon Squeezy', + tagline: 'Receive card payments and store paid orders.', + permissions: ['any'], + events: [], + cron: '', + timeout: 15, + usecases: ['Utilities'], + runtimes: [ + ...getRuntimes( + TemplateRuntimes.NODE, + 'npm install', + 'src/main.js', + 'node/payments-with-lemon-squeezy' + ) + ], + instructions: `For documentation and instructions check out file.`, + vcsProvider: 'github', + providerRepositoryId: 'templates', + providerOwner: 'appwrite', + providerBranch: 'main', + variables: [ + { + name: 'APPWRITE_API_KEY', + description: `The API Key to authenticate against Appwrite's Server APIs. Learn more.`, + value: '', + placeholder: 'd1efb...aec35', + required: true, + type: 'password' + }, + { + name: 'APPWRITE_ENDPOINT', + description: `The URL endpoint of the Appwrite server. Learn more.`, + value: 'https://cloud.appwrite.io/v1', + placeholder: 'https://cloud.appwrite.io/v1', + required: false, + type: 'url' + }, + { + name: 'APPWRITE_DATABASE_ID', + description: `The ID of the database to store paid orders. Learn more.`, + value: 'orders', + placeholder: 'orders', + required: false, + type: 'text' + }, + { + name: 'APPWRITE_COLLECTION_ID', + description: `The ID of the collection to store paid orders. Learn more.`, + value: 'orders', + placeholder: 'orders', + required: false, + type: 'text' + }, + { + name: 'LEMON_SQUEEZY_API_KEY', + description: `API key for sending requests to the Lemon Squeezy API. Learn more.`, + placeholder: 'eyJ0eXAiOiJ...', + required: true, + type: 'password' + }, + { + name: 'LEMON_SQUEEZY_WEBHOOK_SECRET', + description: `Secret used to validate the Lemon Squuezy Webhook signature. Learn more.`, + placeholder: 'abcd...', + required: true, + type: 'password' + }, + { + name: 'LEMON_SQUEEZY_STORE_ID', + description: `Store ID required to create a checkout using the Lemon Squeezy API. Learn more.`, + placeholder: '123456', + required: true, + type: 'text' + }, + { + name: 'LEMON_SQUEEZY_VARIANT_ID', + description: `Variant ID of a product required to create a checkout using the Lemon Squeezy API. Learn more.`, + placeholder: 'abcd...', + required: true, + type: 'text' + } + ] } ]; From 8f02fe06aca6d921b83ff82864c8e573fbd2607b Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Wed, 22 May 2024 11:57:00 +0000 Subject: [PATCH 2/2] Run prettier --- src/lib/stores/marketplace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/stores/marketplace.ts b/src/lib/stores/marketplace.ts index 72347c61d..86625c238 100644 --- a/src/lib/stores/marketplace.ts +++ b/src/lib/stores/marketplace.ts @@ -1892,7 +1892,7 @@ export const marketplace: MarketplaceTemplate[] = [ type: 'password' } ] - }, + }, { icon: 'icon-currency-dollar', id: 'subscriptions-with-lemon-squeezy',