dyna-record 0.0.8 → 0.0.10

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/README.md CHANGED
@@ -1,6 +1,530 @@
1
- # dyna-record
1
+ # Dyna-Record
2
2
 
3
- Typescript Object Relational Mapper (ORM) for Dynamo
3
+ [API Documentation](https://dyna-record.com/)
4
4
 
5
- Domain moving soon. More documentation to come soon as well
6
- [Documentation Site](https://dyna-record.com/)
5
+ Dyna-Record is a strongly typed ORM (Object-Relational Mapping) tool designed for modeling and interacting with data stored in DynamoDB in a structured and type-safe manner. It simplifies the process of defining data models (entities), performing CRUD operations, and handling complex queries. To support relational data, dyna-record implements a flavor of [single-table design patterns](https://aws.amazon.com/blogs/compute/creating-a-single-table-design-with-amazon-dynamodb/). All operations are [ACID compliant transactions\*](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis.html)\.
6
+
7
+ Note: ACID compliant according to DynamoDB [limitations](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis.html)
8
+
9
+ ## Table of Contents
10
+
11
+ - [Getting Started](#getting-started)
12
+ - [Installation](#installation)
13
+ - [Configuration](#configuration)
14
+ - [Defining Entities](#defining-entities)
15
+ - [Attributes](#attributes)
16
+ - [Relationships](#relationships)
17
+ - [CRUD Operations](#crud-operations)
18
+ - [Create](#create)
19
+ - [FindById](#findbyid)
20
+ - [Query](#query)
21
+ - [Update](#update)
22
+ - [Delete](#delete)
23
+ - [Type Safety Features](#type-safety-features)
24
+ - [Best Practices](#best-practices)
25
+
26
+ ## Getting Started
27
+
28
+ ### Installation
29
+
30
+ To install Dyna-Record, use npm or yarn:
31
+
32
+ ```bash
33
+ npm install dyna-record
34
+ ```
35
+
36
+ or
37
+
38
+ ```bash
39
+ yarn add dyna-record
40
+ ```
41
+
42
+ ## Defining Entities
43
+
44
+ Entities in Dyna-Record represent your DynamoDB table structures and relationships. Each entity corresponds to a DynamoDB table.
45
+
46
+ ### Table
47
+
48
+ [Docs](https://dyna-record.com/functions/Table.html)
49
+
50
+ Create a table class that extends [DynaRecord base class](https://dyna-record.com/classes/default.html) and us decorated with the [Table decorator](https://dyna-record.com/functions/Table.html). At a minimum, the table class define the [PartitionKeyAttribute](https://dyna-record.com/functions/PartitionKeyAttribute.html) and [SortKeyAttribute](https://dyna-record.com/functions/SortKeyAttribute.html).
51
+
52
+ #### Basic usage
53
+
54
+ ```typescript
55
+ @Table({ name: "my-table", delimiter: "#" })
56
+ abstract class MyTable extends DynaRecord {
57
+ @PartitionKeyAttribute({ alias: "PK" })
58
+ public readonly pk: PartitionKey;
59
+
60
+ @SortKeyAttribute({ alias: "SK" })
61
+ public readonly sk: SortKey;
62
+ }
63
+ ```
64
+
65
+ #### Customizing the default field table aliases
66
+
67
+ ```typescript
68
+ @Table({
69
+ name: "mock-table",
70
+ delimiter: "#",
71
+ defaultFields: {
72
+ id: { alias: "Id" },
73
+ type: { alias: "Type" },
74
+ createdAt: { alias: "CreatedAt" },
75
+ updatedAt: { alias: "UpdatedAt" },
76
+ foreignKey: { alias: "ForeignKey" },
77
+ foreignEntityType: { alias: "ForeignEntityType" }
78
+ }
79
+ })
80
+ abstract class MyTable extends DynaRecord {
81
+ @PartitionKeyAttribute({ alias: "PK" })
82
+ public readonly pk: PartitionKey;
83
+
84
+ @SortKeyAttribute({ alias: "SK" })
85
+ public readonly sk: SortKey;
86
+ }
87
+ ```
88
+
89
+ ### Entity
90
+
91
+ [Docs](https://dyna-record.com/functions/Entity.html)
92
+
93
+ Each entity must extend the Table class. To support single table design patterns, they must extend the same tables class.
94
+
95
+ By default, each entity will have [default attributes](https://dyna-record.com/types/_internal_.DefaultFields.html)
96
+
97
+ - The partition key defined on the [table](#table) class
98
+ - The sort key defined on the [table](#table) class
99
+ - [id](https://dyna-record.com/classes/default.html#id) - The auto generated uuid for the model
100
+ - [type](https://dyna-record.com/classes/default.html#type) - The type of the entity. Value is the entity class name
101
+ - [createdAt](https://dyna-record.com/classes/default.html#updatedAt) - The timestamp of when the entity was created
102
+ - [updatedAt](https://dyna-record.com/classes/default.html#updatedAt) - Timestamp of when the entity was updated last
103
+
104
+ ```typescript
105
+ @Entity
106
+ class Student extends MyTable {
107
+ // ...
108
+ }
109
+
110
+ @Entity
111
+ class Course extends MyTable {
112
+ ...
113
+ }
114
+
115
+ ```
116
+
117
+ ### Attributes
118
+
119
+ For [natively supported data types](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes), define attributes using the [@Attribute](https://dyna-record.com/functions/Attribute.html) or [@NullableAttribute](https://dyna-record.com/functions/NullableAttribute.html) decorators. This decorator maps class properties to DynamoDB table attributes.
120
+
121
+ - The [alias](https://dyna-record.com/interfaces/AttributeOptions.html#alias) option allows you to specify the attribute name as it appears in the DynamoDB table, different from your class property name.
122
+ - Set nullable attributes as optional for optimal type safety
123
+ - Attempting to remove a non-nullable attribute will result in a [NullConstrainViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
124
+
125
+ ```typescript
126
+ @Entity
127
+ class Student extends MyTable {
128
+ @Attribute({ alias: "Username" }) // Sets alias if field in Dynamo is different then on the model
129
+ public username: string;
130
+
131
+ @Attribute() // Dynamo field and entity field are the same
132
+ public email: string;
133
+
134
+ @NullableAttribute()
135
+ public someAttribute?: number; // Mark as optional
136
+ }
137
+ ```
138
+
139
+ ### Date Attributes
140
+
141
+ Dates are not natively supported in Dynamo. To define a date attribute use [@DateAttribute](https://dyna-record.com/functions/DateAttribute.html) or [@NullableDateAttribute](https://dyna-record.com/functions/DateNullableAttribute.html) decorators. dyna-record will save the values as ISO strings in Dynamo, but serialize them as JS date objects on the entity instance
142
+
143
+ - The [alias](https://dyna-record.com/interfaces/AttributeOptions.html#alias) option allows you to specify the attribute name as it appears in the DynamoDB table, different from your class property name.
144
+ - Set nullable attributes as optional for optimal type safety
145
+ - Attempting to remove a non-nullable attribute will result in a [NullConstrainViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
146
+
147
+ ```typescript
148
+ @Entity
149
+ class Student extends MyTable {
150
+ @DateAttribute()
151
+ public readonly signUpDate: Date;
152
+
153
+ @NullableDateAttribute({ alias: "LastLogin" })
154
+ public readonly lastLogin?: Date; // Set as optional
155
+ }
156
+ ```
157
+
158
+ ### Foreign Keys
159
+
160
+ Define foreign keys in order to support [@BelongsTo](https://dyna-record.com/functions/BelongsTo.html) relationships. A foreign key us required for [@HasOne](https://dyna-record.com/functions/HasOne.html) and [@HasMany](https://dyna-record.com/functions/HasMany.html) relationships.
161
+
162
+ - The [alias](https://dyna-record.com/interfaces/AttributeOptions.html#alias) option allows you to specify the attribute name as it appears in the DynamoDB table, different from your class property name.
163
+ - Set nullable foreign key attributes as optional for optimal type safety
164
+ - Attempting to remove an entity from a non-nullable foreign key will result in a [NullConstrainViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
165
+
166
+ ```typescript
167
+ @Entity
168
+ class Assignment extends MyTable {
169
+ @ForeignKeyAttribute()
170
+ public readonly courseId: ForeignKey;
171
+
172
+ @BelongsTo(() => Course, { foreignKey: "courseId" })
173
+ public readonly course: Course;
174
+ }
175
+
176
+ @Entity
177
+ class Course extends MyTable {
178
+ @NullableForeignKeyAttribute()
179
+ public readonly teacherId?: NullableForeignKey; // Set as optional
180
+
181
+ @BelongsTo(() => Teacher, { foreignKey: "teacherId" })
182
+ public readonly teacher?: Teacher; // Set as optional because its linked through NullableForeignKey
183
+ }
184
+ ```
185
+
186
+ ### Relationships
187
+
188
+ Dyna-Record supports defining relationships between entities such as [@HasOne](https://dyna-record.com/functions/HasOne.html), [@HasMany](https://dyna-record.com/functions/HasMany.html), [@BelongsTo](https://dyna-record.com/functions/BelongsTo.html) and [@HasAndBelongsToMany](https://dyna-record.com/functions/HasAndBelongsToMany.html). It does this by de-normalizing [BelongsToLinks](https://dyna-record.com/classes/BelongsToLink.html) according the each pattern to support relational querying.
189
+
190
+ A relationship can be defined as nullable or non-nullable. Non-nullable relationships will be enforced via transactions and violations will result in [NullConstraintViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
191
+
192
+ - `@ForeignKeyAttribute` is used to define a foreign key that links to another entity and is nullable.
193
+ - `@NullableForeignKeyAttribute` is used to define a foreign key that links to another entity and is nullable.
194
+ - Relationship decorators (`@HasOne`, `@HasMany`, `@BelongsTo`, `@HasAndBelongsToMany`) define how entities relate to each other.
195
+
196
+ #### HasOne
197
+
198
+ ```typescript
199
+ @Entity
200
+ class Assignment extends MyTable {
201
+ // 'assignmentId' must be defined on associated model
202
+ @HasOne(() => Grade, { foreignKey: "assignmentId" })
203
+ public readonly grade: Grade;
204
+ }
205
+
206
+ @Entity
207
+ class Grade extends MyTable {
208
+ @ForeignKeyAttribute()
209
+ public readonly assignmentId: ForeignKey;
210
+
211
+ // 'assignmentId' Must be defined on self as ForeignKey
212
+ @BelongsTo(() => Assignment, { foreignKey: "assignmentId" })
213
+ public readonly assignment: Assignment;
214
+ }
215
+ ```
216
+
217
+ ### HasMany
218
+
219
+ ```typescript
220
+ @Entity
221
+ class Teacher extends MyTable {
222
+ // 'teacherId' Must be defined on self as ForeignKey
223
+ @HasMany(() => Course, { foreignKey: "teacherId" })
224
+ public readonly courses: Course[];
225
+ }
226
+
227
+ @Entity
228
+ class Course extends MyTable {
229
+ @NullableForeignKeyAttribute()
230
+ public readonly teacherId?: NullableForeignKey;
231
+
232
+ @BelongsTo(() => Teacher, { foreignKey: "teacherId" })
233
+ public readonly teacher?: Teacher;
234
+ }
235
+ ```
236
+
237
+ ### HasAndBelongsToMany
238
+
239
+ HasAndBelongsToMany relationships require a [JoinTable](https://dyna-record.com/classes/JoinTable.html) class. This represents a virtual table to support the relationship
240
+
241
+ ```typescript
242
+ class StudentCourse extends JoinTable<Student, Course> {
243
+ public readonly studentId: ForeignKey;
244
+ public readonly courseId: ForeignKey;
245
+ }
246
+
247
+ @Entity
248
+ class Course extends MyTable {
249
+ @HasAndBelongsToMany(() => Student, {
250
+ targetKey: "courses",
251
+ through: () => ({ joinTable: StudentCourse, foreignKey: "courseId" })
252
+ })
253
+ public readonly students: Student[];
254
+ }
255
+
256
+ @Entity
257
+ class Student extends OtherTable {
258
+ @HasAndBelongsToMany(() => Course, {
259
+ targetKey: "students",
260
+ through: () => ({ joinTable: StudentCourse, foreignKey: "studentId" })
261
+ })
262
+ public readonly courses: Course[];
263
+ }
264
+ ```
265
+
266
+ ## CRUD Operations
267
+
268
+ ### Create
269
+
270
+ [Docs](https://dyna-record.com/classes/default.html#create)
271
+
272
+ The create method is used to insert a new record into a DynamoDB table. This method automatically handles key generation (using UUIDs), timestamps for `createdAt` and `updatedAt` fields, and the management of relationships between entities. It leverages AWS SDK's `TransactWriteCommand` for transactional integrity, ensuring either complete success or rollback in case of any failure. The method handles conditional checks to ensure data integrity and consistency during creation. If a foreignKey is set on create, dyna-record will de-normalize the data required in order to support the relationship
273
+
274
+ To use the create method, call it on the model class you wish to create a new record for. Pass the properties of the new record as an object argument to the method.
275
+
276
+ #### Basic Usage
277
+
278
+ ```typescript
279
+ const order: Order = await Order.create({
280
+ customerId: "123",
281
+ paymentMethodId: "456",
282
+ orderDate: new Date("2024-01-01")
283
+ });
284
+ ```
285
+
286
+ #### Example: Creating an Entity with Relationships
287
+
288
+ ```typescript
289
+ const grade: Grade = await Grade.create({
290
+ gradeValue: "A+",
291
+ assignmentId: "123",
292
+ studentId: "456"
293
+ });
294
+ ```
295
+
296
+ #### Error handling
297
+
298
+ The method is designed to throw errors under various conditions, such as transaction cancellation due to failed conditional checks. For instance, if you attempt to create a Grade for an Assignment that already has one, the method throws a TransactionWriteFailedError.
299
+
300
+ #### Notes
301
+
302
+ - Automatic Timestamp Management: The createdAt and updatedAt fields are managed automatically and reflect the time of creation and the last update, respectively.
303
+ - Automatic ID Generation: Each entity created gets a unique ID generated by the uuidv4 method.
304
+ - Relationship Management: The ORM manages entity relationships through DynamoDB's single-table design patterns, creating and maintaining the necessary links between related entities.
305
+ - Conditional Checks: To ensure data integrity, the create method performs various conditional checks, such as verifying the existence of entities that new records relate to.
306
+ - Error Handling: Errors during the creation process are handled gracefully, with specific errors thrown for different failure scenarios, such as conditional check failures or transaction cancellations.
307
+
308
+ ### FindById
309
+
310
+ [Docs](https://dyna-record.com/classes/default.html#findById)
311
+
312
+ Retrieve a single record by its primary key.
313
+
314
+ findById performs a direct lookup for an entity based on its primary key. It utilizes the GetCommand from AWS SDK's lib-dynamodb to execute a consistent read by default, ensuring the most recent data is fetched. Moreover, it supports eagerly loading related entities through the include option, making it easier to work with complex data relationships. `findById` provides strong typing for both the fetched entity and any included associations, aiding in development-time checks and editor autocompletion.
315
+
316
+ To retrieve an entity, simply call findById on the model class with the ID of the record you wish to find.
317
+
318
+ If no record is found matching the provided ID, findById returns undefined. This behavior is consistent across all usages, whether or not related entities are included in the fetch.
319
+
320
+ ##### Find an entity by id
321
+
322
+ ```typescript
323
+ const course: Course = await Course.findById("123");
324
+
325
+ // user.id; - ok for any attribute
326
+ // user.teacher; - Error! teacher relationship was not included in query
327
+ // user.assignments; - Error! assignments relationship was not included in query
328
+ ```
329
+
330
+ #### Including related entities
331
+
332
+ ```typescript
333
+ const course: Course = await Course.findById("123", {
334
+ include: [{ association: "teacher" }, { association: "assignments" }]
335
+ });
336
+
337
+ // user.id; - ok for any attribute
338
+ // user.teacher - ok because teacher is in include
339
+ // user.assignments - ok because assignments is in include
340
+ ```
341
+
342
+ ### Query
343
+
344
+ [Docs](https://dyna-record.com/classes/default.html#query)
345
+
346
+ The query method is a versatile tool for querying data from DynamoDB tables using primary key conditions and various optional filters. This method enables fetching multiple items that match specific criteria, making it ideal for situations where more than one item needs to be retrieved based on attributes of the primary key (partition key and sort key).
347
+
348
+ There are two main patterns; query by id and query by primary key
349
+
350
+ #### Basic usage
351
+
352
+ To query items using the id, simply pass the partition key value as the first parameter. This fetches all items that share the same partition key value.
353
+
354
+ The result will be an array of the entity and [BelongsToLinks](https://dyna-record.com/classes/BelongsToLink.html)
355
+
356
+ ##### Query by id
357
+
358
+ Querying using the id will abstract away setting up the partition key conditions.
359
+
360
+ ```typescript
361
+ const customers = await Customer.query("123");
362
+ ```
363
+
364
+ Query by partition key and sort key
365
+
366
+ ```typescript
367
+ const result = await Customer.query("123", {
368
+ skCondition: "Order"
369
+ });
370
+ ```
371
+
372
+ ##### Query by id
373
+
374
+ To be more precise to the underlying data, you can specify the partition key and sort key directly. The keys here will be the partition and sort keys defined on the [table](#table) class.
375
+
376
+ ```
377
+ const orderLinks = await Customer.query({ pk: "Customer#123", sk: { $beginsWith: "Order" } });
378
+ ```
379
+
380
+ ### Advanced usage
381
+
382
+ The query method supports advanced filtering using the filter option. This allows for more complex queries, such as filtering items by attributes other than the primary key.
383
+
384
+ ```typescript
385
+ const result = await Course.query(
386
+ {
387
+ myPk: "Course|123"
388
+ },
389
+ {
390
+ filter: {
391
+ type: ["BelongsToLink", "Brewery"],
392
+ createdAt: { $beginsWith: "202" },
393
+ $or: [
394
+ {
395
+ foreignKey: "111",
396
+ updatedAt: { $beginsWith: "2023-02-15" }
397
+ },
398
+ {
399
+ foreignKey: ["222", "333"],
400
+ createdAt: { $beginsWith: "2021-09-15T" },
401
+ foreignEntityType: "Assignment"
402
+ },
403
+ {
404
+ id: "123"
405
+ }
406
+ ]
407
+ }
408
+ }
409
+ );
410
+ ```
411
+
412
+ ### Querying on an indexes
413
+
414
+ For querying based on secondary indexes, you can specify the index name in the options.
415
+
416
+ ```typescript
417
+ const result = await Customer.query(
418
+ {
419
+ pk: "Customer#123",
420
+ sk: { $beginsWith: "Order" }
421
+ },
422
+ { indexName: "myIndex" }
423
+ );
424
+ ```
425
+
426
+ ### Update
427
+
428
+ [Docs](https://dyna-record.com/classes/default.html#update)
429
+
430
+ The update method enables modifications to existing items in a DynamoDB table. It supports updating simple attributes, handling nullable fields, and managing relationships between entities, including updating and removing foreign keys.
431
+
432
+ #### Updating simple attributes
433
+
434
+ ```typescript
435
+ await Customer.update("123", {
436
+ name: "New Name",
437
+ address: "New Address"
438
+ });
439
+ ```
440
+
441
+ #### Removing attributes
442
+
443
+ Note: Attempting to remove a non nullable attribute will result in a [NullConstraintViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
444
+
445
+ ```typescript
446
+ await ContactInformation.update("123", {
447
+ email: "new@example.com",
448
+ phone: null
449
+ });
450
+ ```
451
+
452
+ #### Updating Foreign Key References
453
+
454
+ To update the foreign key reference of an entity to point to a different entity, simply pass the new foreign key value
455
+
456
+ ```typescript
457
+ await PaymentMethod.update("123", {
458
+ customerId: "456"
459
+ });
460
+ ```
461
+
462
+ #### Removing Foreign Key References
463
+
464
+ Nullable Foreign key references can be removed by setting them to null
465
+
466
+ Note: Attempting to remove a non nullable foreign key will result in a [NullConstraintViolationError](https://dyna-record.com/classes/NullConstraintViolationError.html)
467
+
468
+ ```typescript
469
+ await Pet.update("123", {
470
+ ownerId: null
471
+ });
472
+ ```
473
+
474
+ ### Delete
475
+
476
+ [Docs](https://dyna-record.com/classes/default.html#delete)
477
+
478
+ The delete method is used to remove an entity from a DynamoDB table, along with handling the deletion of associated items in relationships (like HasMany, HasOne, BelongsTo) to maintain the integrity of the database schema.
479
+
480
+ ```typescript
481
+ await User.delete("user-id");
482
+ ```
483
+
484
+ #### Handling HasMany and HasOne Relationships
485
+
486
+ When deleting entities involved in HasMany or HasOne relationships:
487
+
488
+ If a Pet belongs to an Owner (HasMany relationship), deleting the Pet will remove its BelongsToLink from the Owner's partition.
489
+ If a Home belongs to a Person (HasOne relationship), deleting the Home will remove its BelongsToLink from the Person's partition.
490
+
491
+ ```typescript
492
+ await Home.delete("123");
493
+ ```
494
+
495
+ This deletes the Home entity and its BelongsToLink with a Person.
496
+
497
+ #### Deleting Entities from HasAndBelongsToMany Relationships
498
+
499
+ For entities part of a HasAndBelongsToMany relationship, deleting one entity will remove the association links (join table entries) with the related entities.
500
+
501
+ If a Book has and belongs to many authors:
502
+
503
+ ```typescript
504
+ await Book.delete("123");
505
+ ```
506
+
507
+ This deletes a Book entity and its association links with Author entities.
508
+
509
+ #### Error Handling
510
+
511
+ If deleting an entity or its relationships fails due to database constraints or errors during transaction execution, a TransactionWriteFailedError is thrown, possibly with details such as ConditionalCheckFailedError or NullConstraintViolationError for more specific issues related to relationship constraints or nullability violations.
512
+
513
+ ## Type Safety Features
514
+
515
+ Dyna-Record integrates type safety into your DynamoDB interactions, reducing runtime errors and enhancing code quality.
516
+
517
+ - **Attribute Type Enforcement**: Ensures that the data types of attributes match their definitions in your entities.
518
+ - **Method Parameter Checking**: Validates method parameters against entity definitions, preventing invalid operations.
519
+ - **Relationship Integrity**: Automatically manages the consistency of relationships between entities, ensuring data integrity.
520
+
521
+ ## Best Practices
522
+
523
+ - **Define Clear Entity Relationships**: Clearly define how your entities relate to each other for easier data retrieval and manipulation.
524
+ - **Use Type Aliases for Foreign Keys**: Utilize TypeScript's type aliases for foreign keys to enhance code readability and maintainability.
525
+ - **Leverage Type Safety**: Take advantage of Dyna-Record's type safety features to catch errors early in development.
526
+ - **Define Access Patterns**: Dynamo is not as flexible as a relational database. Try to define all access patterns up front.
527
+
528
+ ## Debug logging
529
+
530
+ To enable debug logging set `process.env.DYNA_RECORD_LOGGING_ENABLED` to `"true"`. When enabled, dyna-record will log to console the dynamo operations it is performing.
@@ -1,4 +1,5 @@
1
1
  export * from "./types";
2
2
  export * from "./decorators";
3
3
  export * from "./errors";
4
+ export * from "./relationships";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
package/dist/src/index.js CHANGED
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./types"), exports);
18
18
  __exportStar(require("./decorators"), exports);
19
19
  __exportStar(require("./errors"), exports);
20
+ __exportStar(require("./relationships"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dyna-record",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Typescript Object Relational Mapper (ORM) for Dynamo",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",