import {
  afterEach,
  describe,
  globalExpect,
  init_dist,
  it
} from "../../chunk-D6N3USMR.mjs";
import {
  BlindPay,
  init_client
} from "../../chunk-VWWGGMMT.mjs";
import "../../chunk-FG25JHDX.mjs";
import "../../chunk-KMU6V4LW.mjs";
import "../../chunk-QGNLMN6Z.mjs";
import "../../chunk-ISHZTBAN.mjs";
import "../../chunk-UDRMLZWT.mjs";
import "../../chunk-LEPGLH7Q.mjs";
import "../../chunk-UC57SCKQ.mjs";
import "../../chunk-E7M4CJKR.mjs";
import "../../chunk-F5Z45GCA.mjs";
import "../../chunk-TBTA7A2P.mjs";
import "../../chunk-YIZJM2GU.mjs";
import "../../chunk-Z6EYX4D3.mjs";
import "../../chunk-ALHMJWQN.mjs";
import "../../chunk-B5T7AQLH.mjs";
import "../../chunk-RC5NN5UF.mjs";
import "../../chunk-VGU72ZNI.mjs";
import "../../chunk-LRHWT4JU.mjs";
import "../../chunk-WE73MTQL.mjs";
import "../../chunk-UOAM7SX3.mjs";
import {
  __async,
  __commonJS
} from "../../chunk-OBKEW4AQ.mjs";

// src/resources/terms-of-service/terms-of-service.test.ts
var require_terms_of_service_test = __commonJS({
  "src/resources/terms-of-service/terms-of-service.test.ts"(exports) {
    init_dist();
    init_client();
    describe("Terms of Service", () => {
      afterEach(() => fetchMock.resetMocks());
      const blindpay = new BlindPay({ apiKey: "test-key", instanceId: "in_000000000000" });
      describe("Initiate Terms of Service", () => {
        it("should initiate terms of service and return a URL", () => __async(null, null, function* () {
          const mockedUrl = {
            url: "https://app.blindpay.com/e/terms-of-service?session_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
          };
          fetchMock.mockResponseOnce(JSON.stringify(mockedUrl), {
            headers: { "Content-Type": "application/json" }
          });
          const { data, error } = yield blindpay.instances.tos.initiate({
            idempotency_key: "123e4567-e89b-12d3-a456-426614174000",
            receiver_id: null,
            redirect_url: null
          });
          globalExpect(error).toBeNull();
          globalExpect(data).toEqual(mockedUrl);
        }));
      });
    });
  }
});
export default require_terms_of_service_test();
