Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.updateAuthDomains = exports.getAuthDomains = void 0;
  4. const apiv2_1 = require("../apiv2");
  5. const api_1 = require("../api");
  6. const apiClient = new apiv2_1.Client({ urlPrefix: api_1.identityOrigin, auth: true });
  7. async function getAuthDomains(project) {
  8. const res = await apiClient.get(`/admin/v2/projects/${project}/config`);
  9. return res.body.authorizedDomains;
  10. }
  11. exports.getAuthDomains = getAuthDomains;
  12. async function updateAuthDomains(project, authDomains) {
  13. const res = await apiClient.patch(`/admin/v2/projects/${project}/config`, { authorizedDomains: authDomains }, { queryParams: { update_mask: "authorizedDomains" } });
  14. return res.body.authorizedDomains;
  15. }
  16. exports.updateAuthDomains = updateAuthDomains;