/* eslint-disable */
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthorizationServer = void 0;
var http_1 = require("@wix/ambassador/runtime/http");
var AuthorizationServer = function (baseUrl, httpClientConfig) {
    var httpClient = new http_1.AmbassadorHTTPClient(baseUrl, httpClientConfig);
    return {
        AbacAttributesService: function () {
            return function (headers) {
                var service = {
                    bulkUpdateResourceAttribute: function (bulkResourceAttributeUpdateRequest) {
                        return httpClient.invoke('PUT', '/v1/attributes/bulk', bulkResourceAttributeUpdateRequest, headers);
                    },
                    bulkUpdateResourcesWithAttribute: function (bulkUpdateResourcesWithAttributeRequest) {
                        return httpClient.invoke('PUT', '/v1/attributes/resources/bulk', bulkUpdateResourcesWithAttributeRequest, headers);
                    },
                    deleteAttributesByTenant: function (deleteAttributesByTenantRequest) {
                        return httpClient.invoke('DELETE', '/v1/attributes/{tenant}', deleteAttributesByTenantRequest, headers);
                    },
                    getAttributes: function (getAttributesRequest) { return httpClient.invoke('GET', '/v1/attributes', getAttributesRequest, headers); },
                    updateResourceAttribute: function (resourceAttributeUpdate) { return httpClient.invoke('PUT', '/v1/attributes', resourceAttributeUpdate, headers); },
                    updateResourcesWithAttribute: function (updateResourcesWithAttributeMessage) {
                        return httpClient.invoke('PUT', '/v1/attributes/resources', updateResourcesWithAttributeMessage, headers);
                    },
                };
                service.bulkUpdateResourceAttribute.__http_method = 'PUT';
                service.bulkUpdateResourceAttribute.__http_url = '/v1/attributes/bulk';
                service.bulkUpdateResourcesWithAttribute.__http_method = 'PUT';
                service.bulkUpdateResourcesWithAttribute.__http_url = '/v1/attributes/resources/bulk';
                service.deleteAttributesByTenant.__http_method = 'DELETE';
                service.deleteAttributesByTenant.__http_url = '/v1/attributes/{tenant}';
                service.getAttributes.__http_method = 'GET';
                service.getAttributes.__http_url = '/v1/attributes';
                service.updateResourceAttribute.__http_method = 'PUT';
                service.updateResourceAttribute.__http_url = '/v1/attributes';
                service.updateResourcesWithAttribute.__http_method = 'PUT';
                service.updateResourcesWithAttribute.__http_url = '/v1/attributes/resources';
                return service;
            };
        },
        AbacAuthorizationDevService: function () {
            return function (headers) {
                var service = {
                    getPoliciesMissingSubPoliciesPermissions: function (getPoliciesMissingSubPoliciesPermissionsRequest) {
                        return httpClient.invoke('GET', '/v1/dev/policies/missing_permissions', getPoliciesMissingSubPoliciesPermissionsRequest, headers);
                    },
                };
                service.getPoliciesMissingSubPoliciesPermissions.__http_method = 'GET';
                service.getPoliciesMissingSubPoliciesPermissions.__http_url = '/v1/dev/policies/missing_permissions';
                return service;
            };
        },
        AbacAuthorizationService: function () {
            return function (headers) {
                var service = {
                    bulkIsPermitted: function (bulkIsPermittedRequest) {
                        return httpClient.invoke('POST', '/v1/authorization/bulk/is_permitted', bulkIsPermittedRequest, headers);
                    },
                    getRestrictions: function (getRestrictionsRequest) {
                        return httpClient.invoke('GET', '/v1/authorization/has_restrictions', getRestrictionsRequest, headers);
                    },
                    implicitIsPermitted: function (implicitIsPermittedRequest) {
                        return httpClient.invoke('GET', '/v1/authorization/implicit_is_permitted', implicitIsPermittedRequest, headers);
                    },
                    isPermitted: function (isPermittedRequest) {
                        return httpClient.invoke('POST', '/v1/authorization/is_permitted', isPermittedRequest, headers);
                    },
                };
                service.bulkIsPermitted.__http_method = 'POST';
                service.bulkIsPermitted.__http_url = '/v1/authorization/bulk/is_permitted';
                service.getRestrictions.__http_method = 'GET';
                service.getRestrictions.__http_url = '/v1/authorization/has_restrictions';
                service.implicitIsPermitted.__http_method = 'GET';
                service.implicitIsPermitted.__http_url = '/v1/authorization/implicit_is_permitted';
                service.isPermitted.__http_method = 'POST';
                service.isPermitted.__http_url = '/v1/authorization/is_permitted';
                return service;
            };
        },
        AbacManagementService: function () {
            return function (headers) {
                var service = {
                    addStatementToPolicy: function (addStatementToPolicyRequest) {
                        return httpClient.invoke('PUT', '/v1/policies/predefined/{policy_id}/add-statement', addStatementToPolicyRequest, headers);
                    },
                    assignPolicy: function (managementAssignPolicyRequest) {
                        return httpClient.invoke('POST', '/v1/policies/{policy_id}/assignments', managementAssignPolicyRequest, headers);
                    },
                    createPolicy: function (createPolicyRequest) {
                        return httpClient.invoke('POST', '/v1/policies/predefined', createPolicyRequest, headers);
                    },
                    deleteAssignments: function (deleteAssignmentsRequest) {
                        return httpClient.invoke('DELETE', '/v1/policies/assignments', deleteAssignmentsRequest, headers);
                    },
                    deletePolicy: function (deletePolicyRequest) {
                        return httpClient.invoke('DELETE', '/v1/policies/predefined/{policy_id}', deletePolicyRequest, headers);
                    },
                    deletePolicyStatement: function (deletePolicyStatementRequest) {
                        return httpClient.invoke('DELETE', '/v1/statements/{statement_id}', deletePolicyStatementRequest, headers);
                    },
                    foldExperiment: function (foldExperimentRequest) {
                        return httpClient.invoke('POST', '/v1/policies/experiments/{policy_id}/fold', foldExperimentRequest, headers);
                    },
                    getPolicies: function (managementGetPoliciesRequest) {
                        return httpClient.invoke('GET', '/v1/management/policies', managementGetPoliciesRequest, headers);
                    },
                    getPolicy: function (managementGetPolicyRequest) {
                        return httpClient.invoke('GET', '/v1/policies/{policy_id}', managementGetPolicyRequest, headers);
                    },
                    unassignPolicyFromSubject: function (unassignPolicyFromSubjectRequest) {
                        return httpClient.invoke('DELETE', '/v1/policies/{policy_id}/assignments/subject/{subject.id}', unassignPolicyFromSubjectRequest, headers);
                    },
                    updateAssignment: function (updateAssignmentRequest) {
                        return httpClient.invoke('PUT', '/v1/policies/assignments', updateAssignmentRequest, headers);
                    },
                    updatePolicyAuthorizationData: function (updatePolicyAuthorizationDataRequest) {
                        return httpClient.invoke('PUT', '/v1/policies/predefined/{policy_id}/authorization-data', updatePolicyAuthorizationDataRequest, headers);
                    },
                    updatePolicyMetadata: function (updatePolicyMetadataRequest) {
                        return httpClient.invoke('PATCH', '/v1/policies/predefined/{policy_id}/metadata', updatePolicyMetadataRequest, headers);
                    },
                };
                service.addStatementToPolicy.__http_method = 'PUT';
                service.addStatementToPolicy.__http_url = '/v1/policies/predefined/{policy_id}/add-statement';
                service.assignPolicy.__http_method = 'POST';
                service.assignPolicy.__http_url = '/v1/policies/{policy_id}/assignments';
                service.createPolicy.__http_method = 'POST';
                service.createPolicy.__http_url = '/v1/policies/predefined';
                service.deleteAssignments.__http_method = 'DELETE';
                service.deleteAssignments.__http_url = '/v1/policies/assignments';
                service.deletePolicy.__http_method = 'DELETE';
                service.deletePolicy.__http_url = '/v1/policies/predefined/{policy_id}';
                service.deletePolicyStatement.__http_method = 'DELETE';
                service.deletePolicyStatement.__http_url = '/v1/statements/{statement_id}';
                service.foldExperiment.__http_method = 'POST';
                service.foldExperiment.__http_url = '/v1/policies/experiments/{policy_id}/fold';
                service.getPolicies.__http_method = 'GET';
                service.getPolicies.__http_url = '/v1/management/policies';
                service.getPolicy.__http_method = 'GET';
                service.getPolicy.__http_url = '/v1/policies/{policy_id}';
                service.unassignPolicyFromSubject.__http_method = 'DELETE';
                service.unassignPolicyFromSubject.__http_url = '/v1/policies/{policy_id}/assignments/subject/{subject.id}';
                service.updateAssignment.__http_method = 'PUT';
                service.updateAssignment.__http_url = '/v1/policies/assignments';
                service.updatePolicyAuthorizationData.__http_method = 'PUT';
                service.updatePolicyAuthorizationData.__http_url = '/v1/policies/predefined/{policy_id}/authorization-data';
                service.updatePolicyMetadata.__http_method = 'PATCH';
                service.updatePolicyMetadata.__http_url = '/v1/policies/predefined/{policy_id}/metadata';
                return service;
            };
        },
        AbacQueryService: function () {
            return function (headers) {
                var service = {
                    bulkIsPolicyAssigned: function (bulkIsPolicyAssignedRequest) {
                        return httpClient.invoke('GET', '/query/v1/policies/assigned', bulkIsPolicyAssignedRequest, headers);
                    },
                    filterPolicies: function (filterPoliciesRequest) {
                        return httpClient.invoke('GET', '/query/v1/policies/filter', filterPoliciesRequest, headers);
                    },
                    getAssignments: function (getAssignmentsRequest) {
                        return httpClient.invoke('GET', '/v1/assignments/{assignment_ids}', getAssignmentsRequest, headers);
                    },
                    getContainedPolicies: function (getContainedPoliciesRequest) {
                        return httpClient.invoke('GET', '/query/v1/policies/contained', getContainedPoliciesRequest, headers);
                    },
                    getCurrentSubjectPermissionsOnResource: function (getCurrentSubjectPermissionsOnResourceRequest) { return httpClient.invoke('GET', '/v1/contextAssignments', getCurrentSubjectPermissionsOnResourceRequest, headers); },
                    getCurrentSubjectPermissionsOnResources: function (getCurrentSubjectPermissionsOnResourcesRequest) {
                        return httpClient.invoke('GET', '/v1/contextsAssignments', getCurrentSubjectPermissionsOnResourcesRequest, headers);
                    },
                    getPolicies: function (queryGetPoliciesRequest) {
                        return httpClient.invoke('GET', '/v1/policies', queryGetPoliciesRequest, headers);
                    },
                    getPoliciesApplicableRestrictions: function (getPoliciesApplicableRestrictionsRequest) { return httpClient.invoke('GET', '/query/v1/policies/restrictions', getPoliciesApplicableRestrictionsRequest, headers); },
                    getPoliciesAssignedOnResource: function (getPoliciesAssignedOnResourceRequest) {
                        return httpClient.invoke('GET', '/v1/resourceAssignments', getPoliciesAssignedOnResourceRequest, headers);
                    },
                    getPoliciesPermissions: function (getPoliciesPermissionsRequest) {
                        return httpClient.invoke('GET', '/query/v1/policies/permissions', getPoliciesPermissionsRequest, headers);
                    },
                    getPolicy: function (queryGetPolicyRequest) {
                        return httpClient.invoke('GET', '/query/v1/policy/{policy_id}', queryGetPolicyRequest, headers);
                    },
                    getSubjectPoliciesOnCurrentAccount: function (getSubjectPoliciesOnCurrentAccountRequest) { return httpClient.invoke('GET', '/v1/subjectAssignments', getSubjectPoliciesOnCurrentAccountRequest, headers); },
                };
                service.bulkIsPolicyAssigned.__http_method = 'GET';
                service.bulkIsPolicyAssigned.__http_url = '/query/v1/policies/assigned';
                service.filterPolicies.__http_method = 'GET';
                service.filterPolicies.__http_url = '/query/v1/policies/filter';
                service.getAssignments.__http_method = 'GET';
                service.getAssignments.__http_url = '/v1/assignments/{assignment_ids}';
                service.getContainedPolicies.__http_method = 'GET';
                service.getContainedPolicies.__http_url = '/query/v1/policies/contained';
                service.getCurrentSubjectPermissionsOnResource.__http_method = 'GET';
                service.getCurrentSubjectPermissionsOnResource.__http_url = '/v1/contextAssignments';
                service.getCurrentSubjectPermissionsOnResources.__http_method = 'GET';
                service.getCurrentSubjectPermissionsOnResources.__http_url = '/v1/contextsAssignments';
                service.getPolicies.__http_method = 'GET';
                service.getPolicies.__http_url = '/v1/policies';
                service.getPoliciesApplicableRestrictions.__http_method = 'GET';
                service.getPoliciesApplicableRestrictions.__http_url = '/query/v1/policies/restrictions';
                service.getPoliciesAssignedOnResource.__http_method = 'GET';
                service.getPoliciesAssignedOnResource.__http_url = '/v1/resourceAssignments';
                service.getPoliciesPermissions.__http_method = 'GET';
                service.getPoliciesPermissions.__http_url = '/query/v1/policies/permissions';
                service.getPolicy.__http_method = 'GET';
                service.getPolicy.__http_url = '/query/v1/policy/{policy_id}';
                service.getSubjectPoliciesOnCurrentAccount.__http_method = 'GET';
                service.getSubjectPoliciesOnCurrentAccount.__http_url = '/v1/subjectAssignments';
                return service;
            };
        },
        AccountPoliciesManagement: function () {
            return function (headers) {
                var service = {
                    assignPoliciesToTeamMember: function (assignPoliciesToTeamMemberRequest) {
                        return httpClient.invoke('POST', '/v1/users/{user_id}/policies', assignPoliciesToTeamMemberRequest, headers);
                    },
                    bulkOverrideSubjectPolicies: function (bulkOverrideSubjectPoliciesRequest) {
                        return httpClient.invoke('POST', '/v1/bulk/subjects/policies/override', bulkOverrideSubjectPoliciesRequest, headers);
                    },
                    clearTeamMemberPolicies: function (clearTeamMemberPoliciesRequest) {
                        return httpClient.invoke('DELETE', '/v1/users/{user_id}/policies', clearTeamMemberPoliciesRequest, headers);
                    },
                    createPolicy: function (createPolicyRequest) { return httpClient.invoke('POST', '/v1/policies', createPolicyRequest, headers); },
                    deletePolicy: function (deletePolicyRequest) {
                        return httpClient.invoke('DELETE', '/v1/policies/{policy_id}', deletePolicyRequest, headers);
                    },
                    deleteTeamMemberAssignments: function (deleteTeamMemberAssignmentsRequest) {
                        return httpClient.invoke('DELETE', '/v1/users/assignments', deleteTeamMemberAssignmentsRequest, headers);
                    },
                    replaceAllTeamMemberPolicies: function (replaceAllTeamMemberPoliciesRequest) {
                        return httpClient.invoke('PUT', '/v1/users/{user_id}/policies', replaceAllTeamMemberPoliciesRequest, headers);
                    },
                    replaceTeamMemberPolicies: function (replaceTeamMemberPoliciesRequest) {
                        return httpClient.invoke('PUT', '/v1/users/{user_id}/replace/policies', replaceTeamMemberPoliciesRequest, headers);
                    },
                    updatePolicyAuthorizationData: function (updatePolicyAuthorizationDataRequest) {
                        return httpClient.invoke('PUT', '/v1/policies/{policy_id}/authorization-data', updatePolicyAuthorizationDataRequest, headers);
                    },
                    updatePolicyMetadata: function (updatePolicyMetadataRequest) {
                        return httpClient.invoke('PATCH', '/v1/policies/{policy_id}/metadata', updatePolicyMetadataRequest, headers);
                    },
                };
                service.assignPoliciesToTeamMember.__http_method = 'POST';
                service.assignPoliciesToTeamMember.__http_url = '/v1/users/{user_id}/policies';
                service.bulkOverrideSubjectPolicies.__http_method = 'POST';
                service.bulkOverrideSubjectPolicies.__http_url = '/v1/bulk/subjects/policies/override';
                service.clearTeamMemberPolicies.__http_method = 'DELETE';
                service.clearTeamMemberPolicies.__http_url = '/v1/users/{user_id}/policies';
                service.createPolicy.__http_method = 'POST';
                service.createPolicy.__http_url = '/v1/policies';
                service.deletePolicy.__http_method = 'DELETE';
                service.deletePolicy.__http_url = '/v1/policies/{policy_id}';
                service.deleteTeamMemberAssignments.__http_method = 'DELETE';
                service.deleteTeamMemberAssignments.__http_url = '/v1/users/assignments';
                service.replaceAllTeamMemberPolicies.__http_method = 'PUT';
                service.replaceAllTeamMemberPolicies.__http_url = '/v1/users/{user_id}/policies';
                service.replaceTeamMemberPolicies.__http_method = 'PUT';
                service.replaceTeamMemberPolicies.__http_url = '/v1/users/{user_id}/replace/policies';
                service.updatePolicyAuthorizationData.__http_method = 'PUT';
                service.updatePolicyAuthorizationData.__http_url = '/v1/policies/{policy_id}/authorization-data';
                service.updatePolicyMetadata.__http_method = 'PATCH';
                service.updatePolicyMetadata.__http_url = '/v1/policies/{policy_id}/metadata';
                return service;
            };
        },
        AppPoliciesManagementService: function () {
            return function (headers) {
                var service = {
                    clearAssignedAppPolicies: function (clearAssignedAppPoliciesRequest) {
                        return httpClient.invoke('DELETE', '/v1/app/{app_id}/account/{account_id}/assigned-policies', clearAssignedAppPoliciesRequest, headers);
                    },
                };
                service.clearAssignedAppPolicies.__http_method = 'DELETE';
                service.clearAssignedAppPolicies.__http_url = '/v1/app/{app_id}/account/{account_id}/assigned-policies';
                return service;
            };
        },
        BackOfficeAuthorizationService: function () {
            return function (headers) {
                var service = {
                    bulkIsPermitted: function (bulkBackOfficeIsPermittedRequest) {
                        return httpClient.invoke('GET', '/v1/authorization/bo/bulk_is_permitted', bulkBackOfficeIsPermittedRequest, headers);
                    },
                    isPermittedByAppInstance: function (isPermittedByAppInstanceRequest) {
                        return httpClient.invoke('GET', '/v1/authorization/bo/is_permitted_by_app_instance', isPermittedByAppInstanceRequest, headers);
                    },
                };
                service.bulkIsPermitted.__http_method = 'GET';
                service.bulkIsPermitted.__http_url = '/v1/authorization/bo/bulk_is_permitted';
                service.isPermittedByAppInstance.__http_method = 'GET';
                service.isPermittedByAppInstance.__http_url = '/v1/authorization/bo/is_permitted_by_app_instance';
                return service;
            };
        },
        SitePoliciesManagement: function () {
            return function (headers) {
                var service = {
                    assignPolicies: function (assignPoliciesRequest) {
                        return httpClient.invoke('PUT', '/v1/account/{account_id}/policies', assignPoliciesRequest, headers);
                    },
                    clearAssignedPolicies: function (clearAssignedPoliciesRequest) {
                        return httpClient.invoke('DELETE', '/v1/account/{account_id}/assigned-policies', clearAssignedPoliciesRequest, headers);
                    },
                    replaceAllAssignedPolicies: function (replaceAllAssignedPoliciesRequest) {
                        return httpClient.invoke('PUT', '/v1/account/{account_id}/assigned-policies', replaceAllAssignedPoliciesRequest, headers);
                    },
                    replaceAllAssignedPoliciesCondition: function (replaceAllAssignedPoliciesConditionRequest) {
                        return httpClient.invoke('PUT', '/v1/account/{account_id}/assigned-policies-condition', replaceAllAssignedPoliciesConditionRequest, headers);
                    },
                    updatePoliciesOnSiteTransfer: function (updatePoliciesOnSiteTransferRequest) {
                        return httpClient.invoke('PUT', '/v1/site-transfer', updatePoliciesOnSiteTransferRequest, headers);
                    },
                };
                service.assignPolicies.__http_method = 'PUT';
                service.assignPolicies.__http_url = '/v1/account/{account_id}/policies';
                service.clearAssignedPolicies.__http_method = 'DELETE';
                service.clearAssignedPolicies.__http_url = '/v1/account/{account_id}/assigned-policies';
                service.replaceAllAssignedPolicies.__http_method = 'PUT';
                service.replaceAllAssignedPolicies.__http_url = '/v1/account/{account_id}/assigned-policies';
                service.replaceAllAssignedPoliciesCondition.__http_method = 'PUT';
                service.replaceAllAssignedPoliciesCondition.__http_url = '/v1/account/{account_id}/assigned-policies-condition';
                service.updatePoliciesOnSiteTransfer.__http_method = 'PUT';
                service.updatePoliciesOnSiteTransfer.__http_url = '/v1/site-transfer';
                return service;
            };
        },
        SubjectsQueryService: function () {
            return function (headers) {
                var service = {
                    getCurrentSubjectContainedPolicies: function (getCurrentSubjectContainedPoliciesRequest) {
                        return httpClient.invoke('GET', '/v1/query/subject/contained/policies', getCurrentSubjectContainedPoliciesRequest, headers);
                    },
                    getSubjectAssignedPolicies: function (getSubjectAssignedPoliciesRequest) {
                        return httpClient.invoke('GET', '/v1/query/subject/{subject.id}/assignedPolicies', getSubjectAssignedPoliciesRequest, headers);
                    },
                    getSubjectPermittedResources: function (getSubjectPermittedResourcesRequest) {
                        return httpClient.invoke('GET', '/v1/query/subjects/permitted_resources/{action}', getSubjectPermittedResourcesRequest, headers);
                    },
                    getSubjectRoles: function (getSubjectRolesRequest) {
                        return httpClient.invoke('GET', '/v1/query/subject/roles', getSubjectRolesRequest, headers);
                    },
                };
                service.getCurrentSubjectContainedPolicies.__http_method = 'GET';
                service.getCurrentSubjectContainedPolicies.__http_url = '/v1/query/subject/contained/policies';
                service.getSubjectAssignedPolicies.__http_method = 'GET';
                service.getSubjectAssignedPolicies.__http_url = '/v1/query/subject/{subject.id}/assignedPolicies';
                service.getSubjectPermittedResources.__http_method = 'GET';
                service.getSubjectPermittedResources.__http_url = '/v1/query/subjects/permitted_resources/{action}';
                service.getSubjectRoles.__http_method = 'GET';
                service.getSubjectRoles.__http_url = '/v1/query/subject/roles';
                return service;
            };
        },
        UsersAuthorizationQueryService: function () {
            return function (headers) {
                var service = {
                    bulkGetPermittedSubjectsCount: function (bulkGetPermittedSubjectsCountRequest) {
                        return httpClient.invoke('POST', '/v2/query/permitted_subjects_count', bulkGetPermittedSubjectsCountRequest, headers);
                    },
                    getPermittedSubjectsRoles: function (getPermittedSubjectsRolesRequest) {
                        return httpClient.invoke('GET', '/v2/query/resourceAssignments', getPermittedSubjectsRolesRequest, headers);
                    },
                    getPermittedSubjectsStatements: function (getPermittedSubjectsStatementsRequest) {
                        return httpClient.invoke('POST', '/v1/assignments/users/query', getPermittedSubjectsStatementsRequest, headers);
                    },
                };
                service.bulkGetPermittedSubjectsCount.__http_method = 'POST';
                service.bulkGetPermittedSubjectsCount.__http_url = '/v2/query/permitted_subjects_count';
                service.getPermittedSubjectsRoles.__http_method = 'GET';
                service.getPermittedSubjectsRoles.__http_url = '/v2/query/resourceAssignments';
                service.getPermittedSubjectsStatements.__http_method = 'POST';
                service.getPermittedSubjectsStatements.__http_url = '/v1/assignments/users/query';
                return service;
            };
        },
    };
};
exports.AuthorizationServer = AuthorizationServer;
exports.AuthorizationServer.__transport = 'http';
__exportStar(require("./types"), exports);
//# sourceMappingURL=http.js.map