blockConfigs.ts126 lines · main
| 1 | import { |
| 2 | Cable, |
| 3 | Code, |
| 4 | Globe, |
| 5 | HardDrive, |
| 6 | Lock, |
| 7 | MonitorDot, |
| 8 | PackageOpen, |
| 9 | ReceiptText, |
| 10 | Server, |
| 11 | ShieldCheck, |
| 12 | Zap, |
| 13 | } from 'lucide-react' |
| 14 | |
| 15 | import { BlockConfig } from '../components/shared/Block' |
| 16 | import { |
| 17 | apiKeyAdditionalFields, |
| 18 | apiKeyPrimaryField, |
| 19 | authorizationFields, |
| 20 | authPrimaryFields, |
| 21 | edgeFunctionDetailsFields, |
| 22 | edgeFunctionPrimaryFields, |
| 23 | locationAdditionalFields, |
| 24 | locationPrimaryField, |
| 25 | networkPrimaryFields, |
| 26 | postgresDetailsFields, |
| 27 | postgresPrimaryFields, |
| 28 | postgrestPrimaryFields, |
| 29 | postgrestResponseFields, |
| 30 | storageDetailsFields, |
| 31 | storagePrimaryFields, |
| 32 | techDetailsFields, |
| 33 | userAdditionalFields, |
| 34 | userPrimaryField, |
| 35 | } from './serviceFlowFields' |
| 36 | |
| 37 | export const authBlockConfig: BlockConfig = { |
| 38 | title: 'Authentication', |
| 39 | icon: Lock, |
| 40 | primaryFields: authPrimaryFields, |
| 41 | } |
| 42 | |
| 43 | export const postgrestBlockConfig: BlockConfig = { |
| 44 | title: 'Data API', |
| 45 | icon: Server, |
| 46 | primaryFields: postgrestPrimaryFields, |
| 47 | sections: [ |
| 48 | { |
| 49 | title: 'Response Details', |
| 50 | icon: ReceiptText, |
| 51 | fields: postgrestResponseFields, |
| 52 | }, |
| 53 | ], |
| 54 | } |
| 55 | |
| 56 | export const networkBlockConfig: BlockConfig = { |
| 57 | title: 'Network', |
| 58 | icon: Globe, |
| 59 | primaryFields: networkPrimaryFields, |
| 60 | sections: [ |
| 61 | { |
| 62 | type: 'fieldWithSeeMore', |
| 63 | primaryField: apiKeyPrimaryField, |
| 64 | additionalFields: apiKeyAdditionalFields, |
| 65 | showValueAsBadge: true, |
| 66 | }, |
| 67 | { |
| 68 | type: 'fieldWithSeeMore', |
| 69 | primaryField: userPrimaryField, |
| 70 | additionalFields: userAdditionalFields, |
| 71 | }, |
| 72 | { |
| 73 | type: 'fieldWithSeeMore', |
| 74 | primaryField: locationPrimaryField, |
| 75 | additionalFields: locationAdditionalFields, |
| 76 | }, |
| 77 | { |
| 78 | title: 'Authorization', |
| 79 | icon: ShieldCheck, |
| 80 | fields: authorizationFields, |
| 81 | }, |
| 82 | { |
| 83 | title: 'Tech Details', |
| 84 | icon: MonitorDot, |
| 85 | fields: techDetailsFields, |
| 86 | }, |
| 87 | ], |
| 88 | } |
| 89 | |
| 90 | export const edgeFunctionBlockConfig: BlockConfig = { |
| 91 | title: 'Edge Function', |
| 92 | icon: Zap, |
| 93 | primaryFields: edgeFunctionPrimaryFields, |
| 94 | sections: [ |
| 95 | { |
| 96 | title: 'Function Details', |
| 97 | icon: Code, |
| 98 | fields: edgeFunctionDetailsFields, |
| 99 | }, |
| 100 | ], |
| 101 | } |
| 102 | |
| 103 | export const storageBlockConfig: BlockConfig = { |
| 104 | title: 'Storage', |
| 105 | icon: HardDrive, |
| 106 | primaryFields: storagePrimaryFields, |
| 107 | sections: [ |
| 108 | { |
| 109 | title: 'Storage Details', |
| 110 | icon: PackageOpen, |
| 111 | fields: storageDetailsFields, |
| 112 | }, |
| 113 | ], |
| 114 | } |
| 115 | |
| 116 | export const postgresBlockConfig: BlockConfig = { |
| 117 | title: 'Postgres', |
| 118 | primaryFields: postgresPrimaryFields, |
| 119 | sections: [ |
| 120 | { |
| 121 | title: 'Connection & Session Details', |
| 122 | icon: Cable, |
| 123 | fields: postgresDetailsFields, |
| 124 | }, |
| 125 | ], |
| 126 | } |