import { SERVICE_CALLS } from './service-calls';
import { AbstractService } from '@iotize/tap';
export class ScramService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * First command to initiate scram login, for client to send login and nonce to IoTize, and IoTize to return user salt, user iteration counter (j) and combined nonce
     *
     * LWM2M path: /1024//40
     *
     * @tapVersion(">=")
     * @param params input
     * @return
     */
    login(
    /*
     *
     */
    params) {
        return this.serviceCallRunner.execute(this.loginCall(params));
    }
    /**
     *
     *
     * LWM2M path: /1024//40
     *
     * @tapVersion(">=")
     * @param params input
     * @return call options
     */
    loginCall(
    /*
     *
     */
    params) {
        const callOptions = Object.assign({}, this.resources.login);
        callOptions.body = params;
        return callOptions;
    }
    /**
     * Scram login proof
     *
     * LWM2M path: /1024//41
     *
     * @tapVersion(">=")
     * @param params input
     * @return
     */
    loginProof(
    /*
     *
     */
    params) {
        return this.serviceCallRunner.execute(this.loginProofCall(params));
    }
    /**
     *
     *
     * LWM2M path: /1024//41
     *
     * @tapVersion(">=")
     * @param params input
     * @return call options
     */
    loginProofCall(
    /*
     *
     */
    params) {
        const callOptions = Object.assign({}, this.resources.loginProof);
        callOptions.body = params;
        return callOptions;
    }
    /**
     * Get scram hash iteration counter
     *
     * LWM2M path: /1024//42
     *
     * @tapVersion(">=1.11")
     * @return
     */
    getHashIteration() {
        return this.serviceCallRunner.execute(this.getHashIterationCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//42
     *
     * @tapVersion(">=1.11")
     * @return call options
     */
    getHashIterationCall() {
        const callOptions = Object.assign({}, this.resources.getHashIteration);
        return callOptions;
    }
    /**
     * Set scram hash iteration counter
     *
     * LWM2M path: /1024//42
     *
     * @tapVersion(">=1.11")
     * @param data input
     * @return
     */
    putHashIteration(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.putHashIterationCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//42
     *
     * @tapVersion(">=1.11")
     * @param data input
     * @return call options
     */
    putHashIterationCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.putHashIteration);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * Start scram communication
     *
     * LWM2M path: /1024//47
     *
     * @tapVersion(">=1.11")
     * @return
     */
    initialize() {
        return this.serviceCallRunner.execute(this.initializeCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//47
     *
     * @tapVersion(">=1.11")
     * @return call options
     */
    initializeCall() {
        const callOptions = Object.assign({}, this.resources.initialize);
        return callOptions;
    }
    /**
     * Communication channel
     *
     * LWM2M path: /1024//48
     *
     * @tapVersion(">=1.11")
     * @param data input
     * @return
     */
    send(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.sendCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//48
     *
     * @tapVersion(">=1.11")
     * @param data input
     * @return call options
     */
    sendCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.send);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * Give encryption initialization vector to the Tap. The device returns its own initialization vector
     *
     * LWM2M path: /1024//45
     *
     * @tapVersion(">=1.85")
     * @param data input
     * @return
     */
    setInitializationVector(
    /*
     * 16 bytes initialization vector
     */
    data) {
        return this.serviceCallRunner.execute(this.setInitializationVectorCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//45
     *
     * @tapVersion(">=1.85")
     * @param data input
     * @return call options
     */
    setInitializationVectorCall(
    /*
     * 16 bytes initialization vector
     */
    data) {
        const callOptions = Object.assign({}, this.resources.setInitializationVector);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * Communication channel with encryption initialization vectory
     *
     * LWM2M path: /1024//44
     *
     * @tapVersion(">=1.85")
     * @param data input
     * @return
     */
    sendWithIV(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.sendWithIVCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//44
     *
     * @tapVersion(">=1.85")
     * @param data input
     * @return call options
     */
    sendWithIVCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.sendWithIV);
        callOptions.body = data;
        return callOptions;
    }
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NlcnZpY2UvaW1wbC9zY3JhbS9zcmMvbGliL2dlbmVyYXRlZC9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQU1oRCxPQUFPLEVBQUUsZUFBZSxFQUFtQixNQUFNLGFBQWEsQ0FBQztBQUUvRCxNQUFNLE9BQU8sWUFBYSxTQUFRLGVBQWU7SUFBakQ7O1FBQ1MsY0FBUyxHQUFHLGFBQWEsQ0FBQztJQXVTbkMsQ0FBQztJQXJTQzs7Ozs7Ozs7T0FRRztJQUNILEtBQUs7SUFDSDs7T0FFRztJQUNILE1BQXdCO1FBRXhCLE9BQU8sSUFBSSxDQUFDLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7SUFDaEUsQ0FBQztJQUVEOzs7Ozs7OztPQVFHO0lBQ0gsU0FBUztJQUNQOztPQUVHO0lBQ0gsTUFBd0I7UUFFeEIsTUFBTSxXQUFXLHFCQUFRLElBQUksQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFFLENBQUM7UUFFaEQsV0FBVyxDQUFDLElBQUksR0FBRyxNQUFNLENBQUM7UUFFMUIsT0FBTyxXQUFXLENBQUM7SUFDckIsQ0FBQztJQUVEOzs7Ozs7OztPQVFHO0lBQ0gsVUFBVTtJQUNSOztPQUVHO0lBQ0gsTUFBa0I7UUFFbEIsT0FBTyxJQUFJLENBQUMsaUJBQWlCLENBQUMsT0FBTyxD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