"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const globals_1 = require("@jest/globals");
const models_1 = require("./models");
const import_bundle_builder_1 = require("./import-bundle-builder");
describe('ImportBundleBuilder', () => {
    it('should build the import bundle correctly', () => {
        const dsnpUserId = '1000';
        const schemaId = 123;
        const keyPairs = [
            {
                keyType: models_1.GraphKeyType.X25519,
                publicKey: new Uint8Array([1, 2, 3]),
                secretKey: new Uint8Array([4, 5, 6]),
            },
        ];
        const dsnpKeys = {
            dsnpUserId: '1000',
            keysHash: 456,
            keys: [{ index: 0, content: new Uint8Array([7, 8, 9]) }],
        };
        const pages = [
            {
                pageId: 1,
                content: new Uint8Array([10, 11, 12]),
                contentHash: 789,
            },
        ];
        const importBundleBuilder = new import_bundle_builder_1.ImportBundleBuilder()
            .withDsnpUserId(dsnpUserId)
            .withSchemaId(schemaId)
            .withGraphKeyPair(models_1.GraphKeyType.X25519, new Uint8Array([1, 2, 3]), new Uint8Array([4, 5, 6]))
            .withDsnpKeys(dsnpKeys)
            .withPageData(1, new Uint8Array([10, 11, 12]), 789);
        const importBundle = importBundleBuilder.build();
        (0, globals_1.expect)(importBundle).toEqual({
            dsnpUserId,
            schemaId,
            keyPairs,
            dsnpKeys,
            pages,
        });
    });
});
//# sourceMappingURL=import-bundle-builder.spec.js.map