Skip to content

Commit

Permalink
Update DateSort export and UnionMessageReply (#623)
Browse files Browse the repository at this point in the history
* DateSort is an enum, cannot be exported as a type if enum values need to be used

* add an optional cursor to the UnionMessageReply for RecordsQueryReply
  • Loading branch information
LiranCohen committed Nov 22, 2023
1 parent 2dcabfd commit a44b126
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/core/message-reply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ export type UnionMessageReply = GenericMessageReply & {

/**
* Data corresponding to the message received if applicable (e.g. RecordsRead).
* Mutually exclusive with `entries`.
* Mutually exclusive with `entries` and `cursor`.
*/
data?: Readable;

/**
* A cursor for pagination if applicable (e.g. RecordsQuery).
* Mutually exclusive with `data`.
*/
cursor?: string;
};
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ export type { MessagesGetMessage, MessagesGetReply } from './types/messages-type
export type { PermissionConditions, PermissionScope, PermissionsGrantDescriptor } from './types/permissions-grant-descriptor.js';
export type { PermissionsGrantMessage, PermissionsRequestDescriptor, PermissionsRequestMessage, PermissionsRevokeDescriptor, PermissionsRevokeMessage } from './types/permissions-types.js';
export type { ProtocolsConfigureDescriptor, ProtocolDefinition, ProtocolTypes, ProtocolRuleSet, ProtocolsQueryFilter, ProtocolsConfigureMessage, ProtocolsQueryMessage, ProtocolsQueryReply } from './types/protocols-types.js';
export type { DateSort, EncryptionProperty, RecordsDeleteMessage, RecordsQueryMessage, RecordsQueryReply, RecordsQueryReplyEntry, RecordsReadReply, RecordsWriteDescriptor, RecordsWriteMessage } from './types/records-types.js';
export type { EncryptionProperty, RecordsDeleteMessage, RecordsQueryMessage, RecordsQueryReply, RecordsQueryReplyEntry, RecordsReadReply, RecordsWriteDescriptor, RecordsWriteMessage } from './types/records-types.js';
export { authenticate } from './core/auth.js';
export { AllowAllTenantGate, TenantGate } from './core/tenant-gate.js';
export { Cid } from './utils/cid.js';
export { RecordsQuery, RecordsQueryOptions } from './interfaces/records-query.js';
export { DataStore, PutResult, GetResult, AssociateResult } from './types/data-store.js';
export { DataStream } from './utils/data-stream.js';
export { DateSort } from './types/records-types.js';
export { DerivedPrivateJwk, HdKey, KeyDerivationScheme } from './utils/hd-key.js';
export { DidKeyResolver } from './did/did-key-resolver.js';
export { DidIonResolver } from './did/did-ion-resolver.js';
Expand Down

0 comments on commit a44b126

Please sign in to comment.