@@ -90,7 +90,7 @@ export const createSpaceExample: CreateSpaceRequest = {
9090/**
9191 * Space creation response
9292 */
93- export const spaceCreatedResponse : SpaceResponse = {
93+ export const spaceCreatedResponse = {
9494 id : '550e8400-e29b-41d4-a716-446655440000' ,
9595 name : 'Sales Team Workspace' ,
9696 slug : 'sales-team' ,
@@ -223,6 +223,7 @@ export const publishPluginExample: PublishPluginRequest = {
223223 * Searching plugins in the marketplace
224224 */
225225export const searchPluginsExample : SearchPluginsResponse = {
226+ success : true ,
226227 data : [
227228 {
228229 ...publishPluginExample ,
@@ -310,28 +311,34 @@ export const issueLicenseExample: IssueLicenseRequest = {
310311 * License issued response
311312 */
312313export const licenseIssuedExample : LicenseResponse = {
313- spaceId : '550e8400-e29b-41d4-a716-446655440000' ,
314- planCode : 'enterprise_v1' ,
315- status : 'active' ,
316- issuedAt : '2024-01-01T00:00:00Z' ,
317- expiresAt : '2025-12-31T23:59:59Z' ,
318- customFeatures : [ 'advanced_analytics' , 'ai_insights' ] ,
319- customLimits : {
320- storage_gb : 500 ,
321- api_calls_monthly : 10000000 ,
322- } ,
323- plugins : [ 'com.acme.advanced-crm' ] ,
324- signature : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' ,
314+ success : true ,
315+ data : {
316+ spaceId : '550e8400-e29b-41d4-a716-446655440000' ,
317+ planCode : 'enterprise_v1' ,
318+ status : 'active' ,
319+ issuedAt : '2024-01-01T00:00:00Z' ,
320+ expiresAt : '2025-12-31T23:59:59Z' ,
321+ customFeatures : [ 'advanced_analytics' , 'ai_insights' ] ,
322+ customLimits : {
323+ storage_gb : 500 ,
324+ api_calls_monthly : 10000000 ,
325+ } ,
326+ plugins : [ 'com.acme.advanced-crm' ] ,
327+ signature : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' ,
328+ }
325329} ;
326330
327331/**
328332 * Validating a license
329333 */
330334export const validateLicenseExample : ValidateLicenseResponse = {
331- valid : true ,
332- license : licenseIssuedExample ,
333- errors : [ ] ,
334- warnings : [ ] ,
335+ success : true ,
336+ data : {
337+ valid : true ,
338+ license : ( licenseIssuedExample as any ) . data ,
339+ errors : [ ] ,
340+ warnings : [ ] ,
341+ }
335342} ;
336343
337344// ============================================================================
@@ -760,14 +767,16 @@ export const compileManifestExample: CompileManifestRequest = {
760767 */
761768export const compileManifestResultExample : CompileManifestResponse = {
762769 success : true ,
763- buildId : 'build_abc123' ,
764- timestamp : '2024-01-15T12:00:00Z' ,
765- duration : 5420 , // 5.4 seconds
766-
767- manifestUrl : 'https://cdn.objectstack.com/manifests/build_abc123.json' ,
768-
769- conflicts : [ ] ,
770- errors : [ ] ,
770+ data : {
771+ buildId : 'build_abc123' ,
772+ timestamp : '2024-01-15T12:00:00Z' ,
773+ duration : 5420 , // 5.4 seconds
774+
775+ manifestUrl : 'https://cdn.objectstack.com/manifests/build_abc123.json' ,
776+
777+ conflicts : [ ] ,
778+ errors : [ ] ,
779+ }
771780} ;
772781
773782// ============================================================================
@@ -778,56 +787,62 @@ export const compileManifestResultExample: CompileManifestResponse = {
778787 * Hub health check
779788 */
780789export const hubHealthExample : HubHealthResponse = {
781- status : 'healthy' ,
782- version : '1.0.0' ,
783- uptime : 2592000 , // 30 days
784- services : {
785- database : {
786- status : 'healthy' ,
787- latency : 3 ,
788- } ,
789- cache : {
790- status : 'healthy' ,
791- latency : 1 ,
792- } ,
793- composer : {
794- status : 'healthy' ,
795- latency : 12 ,
796- } ,
797- 'plugin-registry' : {
798- status : 'healthy' ,
799- latency : 8 ,
790+ success : true ,
791+ data : {
792+ status : 'healthy' ,
793+ version : '1.0.0' ,
794+ uptime : 2592000 , // 30 days
795+ services : {
796+ database : {
797+ status : 'healthy' ,
798+ latency : 3 ,
799+ } ,
800+ cache : {
801+ status : 'healthy' ,
802+ latency : 1 ,
803+ } ,
804+ composer : {
805+ status : 'healthy' ,
806+ latency : 12 ,
807+ } ,
808+ 'plugin-registry' : {
809+ status : 'healthy' ,
810+ latency : 8 ,
811+ } ,
800812 } ,
801- } ,
802- timestamp : '2024-01-15T12:00:00Z' ,
813+ timestamp : '2024-01-15T12:00:00Z' ,
814+ }
803815} ;
804816
805817/**
806818 * Hub metrics
807819 */
808820export const hubMetricsExample : HubMetricsResponse = {
809- metrics : {
810- spaces : {
811- total : 2450 ,
812- active : 1980 ,
813- created_last_30d : 125 ,
814- } ,
815- tenants : {
816- total : 580 ,
817- active : 485 ,
818- } ,
819- plugins : {
820- total : 342 ,
821- published_last_30d : 18 ,
822- total_downloads : 1245678 ,
823- } ,
824- api : {
825- requests_per_minute : 1250 ,
826- avg_response_time : 85 ,
827- error_rate : 0.0012 ,
821+ success : true ,
822+ data : {
823+ metrics : {
824+ spaces : {
825+ total : 2450 ,
826+ active : 1980 ,
827+ created_last_30d : 125 ,
828+ } ,
829+ tenants : {
830+ total : 580 ,
831+ active : 485 ,
832+ } ,
833+ plugins : {
834+ total : 342 ,
835+ published_last_30d : 18 ,
836+ total_downloads : 1245678 ,
837+ } ,
838+ api : {
839+ requests_per_minute : 1250 ,
840+ avg_response_time : 85 ,
841+ error_rate : 0.0012 ,
842+ } ,
828843 } ,
829- } ,
830- timestamp : '2024-01-15T12:00:00Z' ,
844+ timestamp : '2024-01-15T12:00:00Z' ,
845+ }
831846} ;
832847
833848// Uncomment to see the examples
0 commit comments