The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat: orb fdw (#35061)
Alaister Younga7b4a3bc6b38
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.tsindex d93f0aae3be..bb5b8ee664e 100644--- a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts+++ b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts@@ -22,6 +22,7 @@ export const WRAPPER_HANDLERS = {SLACK: 'wasm_fdw_handler',CLOUDFLARE_D1: 'wasm_fdw_handler',HUBSPOT: 'wasm_fdw_handler',+ ORB: 'wasm_fdw_handler',}export const WRAPPERS: WrapperMeta[] = [@@ -3681,6 +3682,44 @@ export const WRAPPERS: WrapperMeta[] = [},],},+ {+ label: 'Goals',+ description: 'User-specific quotas for sales and services teams',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'updated_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ defaultValue: 'objects/goal_targets',+ editable: false,+ required: true,+ type: 'text',+ },+ ],+ },+ {+ label: 'Partner Clients',+ description: 'Customers that Solutions Partners have a sold or managed relationship with',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'updated_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ defaultValue: 'objects/partner_clients',+ editable: false,+ required: true,+ type: 'text',+ },+ ],+ },{label: 'Custom Object',description: 'Custom objects managed by your company in HubSpot',@@ -3702,42 +3741,531 @@ export const WRAPPERS: WrapperMeta[] = [},],},+ ],+ },+ {+ name: 'orb_wrapper',+ handlerName: WRAPPER_HANDLERS.ORB,+ validatorName: 'wasm_fdw_validator',+ icon: `${BASE_PATH}/img/icons/orb-icon.svg`,+ description: 'Usage-based billing and metering platform',+ extensionName: 'OrbFdw',+ minimumExtensionVersion: '0.4.0',+ label: 'Orb',+ docsUrl: 'https://fdw.dev/catalog/orb/',+ server: {+ options: [+ {+ name: 'fdw_package_url',+ label: 'FDW Package URL',+ required: true,+ encrypted: false,+ secureEntry: false,+ defaultValue:+ 'https://github.com/supabase/wrappers/releases/download/wasm_orb_fdw_v0.1.0/orb_fdw.wasm',+ hidden: true,+ },+ {+ name: 'fdw_package_name',+ label: 'FDW Package Name',+ required: true,+ encrypted: false,+ secureEntry: false,+ defaultValue: 'supabase:orb-fdw',+ hidden: true,+ },+ {+ name: 'fdw_package_version',+ label: 'FDW Package Version',+ required: true,+ encrypted: false,+ secureEntry: false,+ defaultValue: '0.1.0',+ hidden: true,+ },+ {+ name: 'fdw_package_checksum',+ label: 'FDW Package Checksum',+ required: true,+ encrypted: false,+ secureEntry: false,+ defaultValue: '89153a0a570257c231b78561cc909766731c828324585a5b6e2aa553902cb73a',+ hidden: true,+ },+ {+ name: 'api_url',+ label: 'Orb API URL',+ required: false,+ encrypted: false,+ secureEntry: false,+ defaultValue: 'https://api.withorb.com/v1',+ },+ {+ name: 'api_key_id',+ label: 'Orb API Key ID',+ required: true,+ encrypted: true,+ secureEntry: true,+ },+ ],+ },+ tables: [{- label: 'Goals',- description: 'User-specific quotas for sales and services teams',+ label: 'Alerts',+ description: 'Alerts in Orb',availableColumns: [{ name: 'id', type: 'text' },+ { name: 'type', type: 'text' },+ { name: 'enabled', type: 'boolean' },+ { name: 'customer_id', type: 'text' },+ { name: 'external_customer_id', type: 'text' },+ { name: 'subscription_id', type: 'text' },{ name: 'created_at', type: 'timestamp' },- { name: 'updated_at', type: 'timestamp' },{ name: 'attrs', type: 'jsonb' },],options: [{name: 'object',- defaultValue: 'objects/goal_targets',+ label: 'Object',+ defaultValue: 'alerts',editable: false,required: true,type: 'text',},+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },],},{- label: 'Partner Clients',- description: 'Customers that Solutions Partners have a sold or managed relationship with',+ label: 'Coupons',+ description: 'Coupons in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'redemption_code', type: 'text' },+ { name: 'times_redeemed', type: 'bigint' },+ { name: 'duration_in_months', type: 'bigint' },+ { name: 'archived_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'coupons',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Credit Notes',+ description: 'Credit notes in Orb',availableColumns: [{ name: 'id', type: 'text' },+ { name: 'type', type: 'text' },+ { name: 'total', type: 'numeric(18,2)' },{ name: 'created_at', type: 'timestamp' },- { name: 'updated_at', type: 'timestamp' },{ name: 'attrs', type: 'jsonb' },],options: [{name: 'object',- defaultValue: 'objects/partner_clients',+ label: 'Object',+ defaultValue: 'credit_notes',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Customers',+ description: 'Customers in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'name', type: 'text' },+ { name: 'email', type: 'text' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'auto_collection', type: 'boolean' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'customers',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Credits',+ description: 'Credits in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'customer_id', type: 'text' },+ { name: 'external_customer_id', type: 'text' },+ { name: 'balance', type: 'numeric(18,2)' },+ { name: 'status', type: 'text' },+ { name: 'effective_date', type: 'timestamp' },+ { name: 'expiry_date', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'credits',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Credits Ledger',+ description: 'Credits ledger in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'customer_id', type: 'text' },+ { name: 'external_customer_id', type: 'text' },+ { name: 'amount', type: 'numeric(18,2)' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'credits_ledger',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Dimensional Price Groups',+ description: 'Dimensional price groups in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'name', type: 'text' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'dimensional_price_groups',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Events Backfills',+ description: 'Events backfills in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'status', type: 'text' },+ { name: 'events_ingested', type: 'bigint' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'events_backfills',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Events Volume',+ description: 'Events volume in Orb',+ availableColumns: [+ { name: 'count', type: 'bigint' },+ { name: 'timeframe_start', type: 'timestamp' },+ { name: 'timeframe_end', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'events_volume',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Invoices',+ description: 'Invoices in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'invoice_number', type: 'text' },+ { name: 'customer_id', type: 'text' },+ { name: 'external_customer_id', type: 'text' },+ { name: 'subscription_id', type: 'text' },+ { name: 'status', type: 'text' },+ { name: 'amount_due', type: 'numeric(18,2)' },+ { name: 'currency', type: 'text' },+ { name: 'due_date', type: 'timestamp' },+ { name: 'issued_at', type: 'timestamp' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'invoices',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Items',+ description: 'Items in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'name', type: 'text' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'items',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Metrics',+ description: 'Metrics in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'name', type: 'text' },+ { name: 'description', type: 'text' },+ { name: 'status', type: 'text' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'metrics',editable: false,required: true,type: 'text',},+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Plans',+ description: 'Plans in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'name', type: 'text' },+ { name: 'description', type: 'text' },+ { name: 'status', type: 'text' },+ { name: 'maximum_amount', type: 'numeric(18,2)' },+ { name: 'minimum_amount', type: 'numeric(18,2)' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'plans',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Prices',+ description: 'Prices in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'name', type: 'text' },+ { name: 'external_price_id', type: 'text' },+ { name: 'price_type', type: 'text' },+ { name: 'maximum_amount', type: 'numeric(18,2)' },+ { name: 'minimum_amount', type: 'numeric(18,2)' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'prices',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },+ ],+ },+ {+ label: 'Subscriptions',+ description: 'Subscriptions in Orb',+ availableColumns: [+ { name: 'id', type: 'text' },+ { name: 'customer_id', type: 'text' },+ { name: 'external_customer_id', type: 'text' },+ { name: 'billing_cycle_day', type: 'bigint' },+ { name: 'status', type: 'text' },+ { name: 'start_date', type: 'timestamp' },+ { name: 'end_date', type: 'timestamp' },+ { name: 'created_at', type: 'timestamp' },+ { name: 'attrs', type: 'jsonb' },+ ],+ options: [+ {+ name: 'object',+ label: 'Object',+ defaultValue: 'subscriptions',+ editable: false,+ required: true,+ type: 'text',+ },+ {+ name: 'rowid_column',+ label: 'Row ID Column',+ placeholder: 'id',+ editable: true,+ required: false,+ type: 'text',+ },],},],diff --git a/apps/studio/public/img/icons/orb-icon.svg b/apps/studio/public/img/icons/orb-icon.svgnew file mode 100644index 00000000000..3a015a67d69--- /dev/null+++ b/apps/studio/public/img/icons/orb-icon.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="47" height="47" fill="none"><g fill="#1D1C1C"><path d="M5.738 37.678c-.284-.193-.627.148-.409.414 3.938 4.799 9.738 8.011 16.297 8.53l.102.008c.136.01.274.018.412.025a18.769 18.769 0 0 0 .662.028 22.032 22.032 0 0 0 1.41 0c.095-.002.19-.007.285-.01.126-.004.252-.012.376-.018.138-.007.274-.016.412-.025l.102-.008c6.56-.519 12.36-3.73 16.297-8.53.218-.267-.124-.607-.408-.414-4.845 3.298-11.03 5.277-17.768 5.277-6.737 0-12.925-1.979-17.77-5.276ZM6.392 13.314C9.762 7.479 14.566 3.112 19.846.564c.31-.149.185-.615-.154-.56C13.566 1.016 7.885 4.433 4.155 9.854l-.058.084c-.078.113-.153.227-.227.342-.07.105-.137.212-.204.318l-.153.24c-.122.2-.244.4-.362.606-.118.203-.23.41-.343.615-.045.084-.09.167-.133.253-.058.11-.115.223-.172.335-.062.123-.124.246-.183.37l-.043.091c-2.83 5.94-2.949 12.57-.762 18.38.121.321.587.195.562-.148-.433-5.845.946-12.19 4.315-18.025ZM44.733 13.107l-.043-.091a42.153 42.153 0 0 0-.355-.705 19.835 19.835 0 0 0-.476-.868c-.118-.204-.24-.406-.362-.605a39.205 39.205 0 0 0-.584-.901l-.058-.084c-3.73-5.421-9.412-8.838-15.537-9.848-.34-.056-.463.41-.154.56 5.28 2.547 10.085 6.914 13.453 12.749 3.369 5.836 4.748 12.18 4.315 18.025-.026.343.44.47.561.147 2.188-5.81 2.07-12.439-.76-18.379Z"/></g></svg>\ No newline at end of filediff --git a/apps/studio/static-data/integrations/orb_wrapper/overview.md b/apps/studio/static-data/integrations/orb_wrapper/overview.mdnew file mode 100644index 00000000000..05a20be5030--- /dev/null+++ b/apps/studio/static-data/integrations/orb_wrapper/overview.md@@ -0,0 +1,3 @@+Orb is a metering and pricing platform built to support usage-based billing models.++The Orb Wrapper is a WebAssembly(Wasm) foreign data wrapper which allows you to read data from Orb for use within your Postgres database.