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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bpb3RpemUvdGFwL3NlcnZpY2UvaW1wbC9zY3JhbS8iLCJzb3VyY2VzIjpbImxpYi9nZW5lcmF0ZWQvc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFNaEQsT0FBTyxFQUFFLGVBQWUsRUFBbUIsTUFBTSxhQUFhLENBQUM7QUFFL0QsTUFBTSxPQUFPLFlBQWEsU0FBUSxlQUFlO0lBQWpEOztRQUNTLGNBQVMsR0FBRyxhQUFhLENBQUM7SUF1U25DLENBQUM7SUFyU0M7Ozs7Ozs7O09BUUc7SUFDSCxLQUFLO0lBQ0g7O09BRUc7SUFDSCxNQUF3QjtRQUV4QixPQUFPLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO0lBQ2hFLENBQUM7SUFFRDs7Ozs7Ozs7T0FRRztJQUNILFNBQVM7SUFDUDs7T0FFRztJQUNILE1BQXdCO1FBRXhCLE1BQU0sV0FBVyxxQkFBUSxJQUFJLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBRSxDQUFDO1FBRWhELFdBQVcsQ0FBQyxJQUFJLEdBQUcsTUFBTSxDQUFDO1FBRTFCLE9BQU8sV0FBVyxDQUFDO0lBQ3JCLENBQUM7SUFFRDs7Ozs7Ozs7T0FRRztJQUNILFVBQVU7SUFDUjs7T0FFRztJQUNILE1BQWtCO1FBRWxCLE9BQU8sSUFBSSxDQUFDLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsY0FB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