diff --git a/src/resources/bucket.ts b/src/resources/bucket.ts index 896c38c..db5f992 100644 --- a/src/resources/bucket.ts +++ b/src/resources/bucket.ts @@ -18,6 +18,7 @@ import { ResourceDeclareResponse, ResourceType, ResourceTypeMap, + BucketResource as NitricBucketResource, } from '@nitric/proto/resources/v1/resources_pb'; import resourceClient from './client'; import { storage, Bucket } from '../api/storage'; @@ -228,6 +229,7 @@ export class BucketResource extends SecureResource { resource.setType(ResourceType.BUCKET); req.setId(resource); + req.setBucket(new NitricBucketResource()); return new Promise((resolve, reject) => { resourceClient.declare(req, (error, _: ResourceDeclareResponse) => { diff --git a/src/resources/keyvalue.ts b/src/resources/keyvalue.ts index 2ee61d0..455f9f7 100644 --- a/src/resources/keyvalue.ts +++ b/src/resources/keyvalue.ts @@ -19,6 +19,7 @@ import { Action, ResourceTypeMap, ActionMap, + KeyValueStoreResource as NitricKeyValueStoreResource, } from '@nitric/proto/resources/v1/resources_pb'; import { keyvalue, ValueStructure } from '../api/keyvalue'; import resourceClient from './client'; @@ -48,6 +49,8 @@ export class KeyValueStoreResource< resource.setType(ResourceType.KEYVALUESTORE); req.setId(resource); + req.setKeyValueStore(new NitricKeyValueStoreResource()); + return new Promise((resolve, reject) => { resourceClient.declare( req, diff --git a/src/resources/queue.ts b/src/resources/queue.ts index 9fb91a4..d9b6443 100644 --- a/src/resources/queue.ts +++ b/src/resources/queue.ts @@ -18,6 +18,7 @@ import { ResourceDeclareResponse, ResourceType, Action, + QueueResource as NitricQueueResource, ResourceTypeMap, } from '@nitric/proto/resources/v1/resources_pb'; import resourceClient from './client'; @@ -43,6 +44,7 @@ export class QueueResource< resource.setName(this.name); resource.setType(ResourceType.QUEUE); req.setId(resource); + req.setQueue(new NitricQueueResource()) return new Promise((resolve, reject) => { resourceClient.declare(req, (error) => { diff --git a/src/resources/secret.ts b/src/resources/secret.ts index 0fdb522..e9e9451 100644 --- a/src/resources/secret.ts +++ b/src/resources/secret.ts @@ -18,6 +18,7 @@ import { ResourceDeclareRequest, ResourceDeclareResponse, ResourceTypeMap, + SecretResource as NitricSecretResource, } from '@nitric/proto/resources/v1/resources_pb'; import resourceClient from './client'; import { secrets, Secret } from '../api/secrets'; @@ -38,7 +39,9 @@ export class SecretResource extends SecureResource { resource.setName(this.name); resource.setType(ResourceType.SECRET); + req.setSecret(new NitricSecretResource()); req.setId(resource); + return new Promise((resolve, reject) => { resourceClient.declare( diff --git a/src/resources/topic.ts b/src/resources/topic.ts index 8854268..2dae103 100644 --- a/src/resources/topic.ts +++ b/src/resources/topic.ts @@ -20,6 +20,7 @@ import { ResourceType, Action, ResourceTypeMap, + TopicResource as NitricTopicResource, } from '@nitric/proto/resources/v1/resources_pb'; import { ActionsList, @@ -140,6 +141,7 @@ export class TopicResource< resource.setName(this.name); resource.setType(ResourceType.TOPIC); req.setId(resource); + req.setTopic(new NitricTopicResource()); return new Promise((resolve, reject) => { resourceClient.declare(