mongodb-stitch
Version:
[](https://gitter.im/mongodb/stitch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
52 lines (51 loc) • 1.88 kB
TypeScript
import { Decoder } from "mongodb-stitch-core-sdk";
import ChangeEvent from "../ChangeEvent";
import { OperationType } from "../OperationType";
import RemoteDeleteResult from "../RemoteDeleteResult";
import RemoteInsertManyResult from "../RemoteInsertManyResult";
import RemoteInsertOneResult from "../RemoteInsertOneResult";
import RemoteUpdateResult from "../RemoteUpdateResult";
import UpdateDescription from "../UpdateDescription";
declare class RemoteInsertManyResultDecoder implements Decoder<RemoteInsertManyResult> {
decode(from: any): RemoteInsertManyResult;
}
declare class RemoteInsertOneResultDecoder implements Decoder<RemoteInsertOneResult> {
decode(from: any): {
insertedId: any;
};
}
declare class RemoteUpdateResultDecoder implements Decoder<RemoteUpdateResult> {
decode(from: any): {
matchedCount: any;
modifiedCount: any;
upsertedId: any;
};
}
declare class RemoteDeleteResultDecoder implements Decoder<RemoteDeleteResult> {
decode(from: any): {
deletedCount: any;
};
}
declare class ChangeEventDecoder<T> implements Decoder<ChangeEvent<T>> {
private readonly decoder?;
constructor(decoder?: Decoder<T>);
decode(from: any): {
documentKey: any;
fullDocument: T | undefined;
id: any;
namespace: {
collection: any;
database: any;
};
operationType: OperationType;
updateDescription: UpdateDescription | undefined;
};
}
export default class ResultDecoders {
static remoteInsertManyResultDecoder: RemoteInsertManyResultDecoder;
static remoteInsertOneResultDecoder: RemoteInsertOneResultDecoder;
static remoteUpdateResultDecoder: RemoteUpdateResultDecoder;
static remoteDeleteResultDecoder: RemoteDeleteResultDecoder;
static ChangeEventDecoder: typeof ChangeEventDecoder;
}
export {};