rads-db 0.1.47 → 0.1.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { CosmosClientOptions } from '@azure/cosmos';
2
1
  import { EntityMeta, RadsDb } from '_rads-db';
3
2
  export { RadsDb } from '_rads-db';
4
3
 
@@ -211,15 +210,6 @@ interface PutEffect {
211
210
  doc: any;
212
211
  }[], beforePutResult: any) => MaybePromise<any>;
213
212
  }
214
- interface RestDriverOptions {
215
- /** @default '/api' */
216
- baseUrl?: string;
217
- fetch?: (url: string, options?: {
218
- body?: any;
219
- headers?: any;
220
- method?: string;
221
- }) => any;
222
- }
223
213
  interface RestFileUploadDriverOptions {
224
214
  /** @default '/api' */
225
215
  baseUrl?: string;
@@ -229,25 +219,6 @@ interface RestFileUploadDriverOptions {
229
219
  method?: string;
230
220
  }) => any;
231
221
  }
232
- interface MemoryDriverOptions {
233
- }
234
- interface MemoryFileUploadDriverOptions {
235
- }
236
- interface AzureStorageBlobUploadDriverOptions {
237
- connectionString: string;
238
- defaultContainer?: string;
239
- fileNamePrefix?: string;
240
- }
241
- interface AzureCosmosDriverOptions {
242
- endpoint: string;
243
- accountKey?: string;
244
- databaseName?: string;
245
- containerName?: string;
246
- options?: Omit<CosmosClientOptions, 'key' | 'endpoint'>;
247
- }
248
- type DriverOptions = (RestDriverOptions | MemoryDriverOptions | AzureCosmosDriverOptions) & {
249
- log?: RadsRequestContext['log'];
250
- };
251
222
  type GenerateClientOptions = Partial<GenerateClientNormalizedOptions>;
252
223
  interface GenerateClientNormalizedOptions {
253
224
  entitiesDir: string;
@@ -266,4 +237,4 @@ declare function computed(meta?: ComputedDecoratorArgs): (a: any, b?: ClassField
266
237
  declare function createRads(args?: CreateRadsArgs): RadsDb;
267
238
  declare function getRestRoutes(db: RadsDb, prefix?: string): Record<string, Record<string, Function>>;
268
239
 
269
- export { AzureCosmosDriverOptions, AzureStorageBlobUploadDriverOptions, Change, ComputedContext, ComputedDecoratorArgs, CreateRadsArgs, DeepPartial, DeepPartialNullable, Driver, DriverConstructor, DriverOptions, EntityDecoratorArgs, EntityMethods, FieldDecoratorArgs, FieldDefinition, FileUploadArgs, FileUploadDriver, GenerateClientNormalizedOptions, GenerateClientOptions, GetAggArgs, GetAggArgsAgg, GetAggArgsAny, GetAggResponse, GetArgs, GetArgsAny, GetArgsInclude, GetManyArgs, GetManyArgsAny, GetManyResponse, GetResponse, GetResponseInclude, GetResponseIncludeSelect, GetResponseNoInclude, MemoryDriverOptions, MemoryFileUploadDriverOptions, MinimalDriver, PutArgs, PutEffect, RadsRequestContext, Relation, RestDriverOptions, RestFileUploadDriverOptions, Schema, SchemaValidators, TypeDefinition, UiDecoratorArgs, UiFieldDecoratorArgs, ValidateEntityDecoratorArgs, ValidateFieldDecoratorArgs, ValidateStringDecoratorArgs, computed, createRads, entity, field, getRestRoutes, precomputed, ui, validate };
240
+ export { Change, ComputedContext, ComputedDecoratorArgs, CreateRadsArgs, DeepPartial, DeepPartialNullable, Driver, DriverConstructor, EntityDecoratorArgs, EntityMethods, FieldDecoratorArgs, FieldDefinition, FileUploadArgs, FileUploadDriver, GenerateClientNormalizedOptions, GenerateClientOptions, GetAggArgs, GetAggArgsAgg, GetAggArgsAny, GetAggResponse, GetArgs, GetArgsAny, GetArgsInclude, GetManyArgs, GetManyArgsAny, GetManyResponse, GetResponse, GetResponseInclude, GetResponseIncludeSelect, GetResponseNoInclude, MinimalDriver, PutArgs, PutEffect, RadsRequestContext, Relation, RestFileUploadDriverOptions, Schema, SchemaValidators, TypeDefinition, UiDecoratorArgs, UiFieldDecoratorArgs, ValidateEntityDecoratorArgs, ValidateFieldDecoratorArgs, ValidateStringDecoratorArgs, computed, createRads, entity, field, getRestRoutes, precomputed, ui, validate };
@@ -1,2 +1,10 @@
1
+ import type { CosmosClientOptions } from '@azure/cosmos';
2
+ interface AzureCosmosDriverOptions {
3
+ endpoint: string;
4
+ accountKey?: string;
5
+ databaseName?: string;
6
+ containerName?: string;
7
+ options?: Omit<CosmosClientOptions, 'key' | 'endpoint'>;
8
+ }
1
9
  declare const _default: (options: AzureCosmosDriverOptions) => (schema: Schema, entity: string) => MinimalDriver;
2
10
  export default _default;
@@ -1,5 +1,7 @@
1
1
  import type { GetAggArgsAny, GetManyArgsAny } from '@/typesClientEngine';
2
- declare const _default: (options?: any) => (schema: Schema, entity: string) => MinimalDriver;
2
+ interface MemoryDriverOptions {
3
+ }
4
+ declare const _default: (options?: MemoryDriverOptions) => (schema: Schema, entity: string) => MinimalDriver;
3
5
  export default _default;
4
6
  export declare function getAggFromArray(array: any[], args: GetAggArgsAny): Record<string, any>;
5
7
  export declare function queryArray(array: any[], args: GetManyArgsAny): {
@@ -1,2 +1,11 @@
1
+ interface RestDriverOptions {
2
+ /** @default '/api' */
3
+ baseUrl?: string;
4
+ fetch?: (url: string, options?: {
5
+ body?: any;
6
+ headers?: any;
7
+ method?: string;
8
+ }) => any;
9
+ }
1
10
  declare const _default: (options: RestDriverOptions) => (schema: Schema, entity: string) => MinimalDriver;
2
11
  export default _default;
@@ -1,2 +1,7 @@
1
+ interface AzureStorageBlobUploadDriverOptions {
2
+ connectionString: string;
3
+ defaultContainer?: string;
4
+ fileNamePrefix?: string;
5
+ }
1
6
  declare const _default: (options: AzureStorageBlobUploadDriverOptions) => FileUploadDriver;
2
7
  export default _default;
@@ -1,2 +1,4 @@
1
- declare const _default: (options?: any) => never;
1
+ interface CloudinaryFileUploadDriverOptions {
2
+ }
3
+ declare const _default: (options?: CloudinaryFileUploadDriverOptions) => never;
2
4
  export default _default;
@@ -1,2 +1,4 @@
1
- declare const _default: (options?: any) => FileUploadDriver;
1
+ interface MemoryFileUploadDriverOptions {
2
+ }
3
+ declare const _default: (options?: MemoryFileUploadDriverOptions) => FileUploadDriver;
2
4
  export default _default;
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "require": "./integrations/*.cjs"
35
35
  }
36
36
  },
37
- "version": "0.1.47",
37
+ "version": "0.1.48",
38
38
  "description": "Say goodbye to boilerplate code and hello to efficient and elegant syntax.",
39
39
  "keywords": [],
40
40
  "author": "",