Компания и доступ · Изменение
Доступ · Разрешение · Отзыв
access_grant_revoke
Попробуйте три запроса
Подготовить
- Вы указываетеОбъект
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Доступ / Разрешение / Отзыв». Для изменения нужны текущая версия, uid. Покажи объект и ожидаемый эффект до выполнения.
- expectedVersion
- Текущая версия
- uid
- Параметр
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Доступ / Разрешение / Отзыв» с параметром expectedVersion = 4. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- expectedVersion
- 4
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Доступ / Разрешение / Отзыв» по исходному ответу. Покажи companyId, uid. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.
Описание разработчика
Revoke an existing protected company grant with exact expectedVersion; advances the revocation epoch so previous sessions remain revoked.
Параметры запроса
- expectedVersion
- Exact current version; null only when creating a previously absent record. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
- uid
- Exact Firebase account UID; must have protected membership in the connected company. обязательно по схеме · string · до символов 128
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
- companyId
- Company resolved from the authenticated connection. обязательно по схеме · string · до символов 128
- uid
- Exact Firebase account UID; must have protected membership in the connected company. обязательно по схеме · string · до символов 128
- status
- Current protected assignment state. обязательно по схеме · string · варианты active, revoked, not_granted
- grant
- Protected grant, or null before enrollment. обязательно по схеме · object / null
- target
- Existing native identity metadata. необязательно · object
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expectedVersion": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Exact current version; null only when creating a previously absent record."
},
"uid": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Exact Firebase account UID; must have protected membership in the connected company."
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable operation ID. Reuse the exact arguments after an uncertain response."
}
},
"required": [
"expectedVersion",
"uid",
"requestId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"companyId": {
"$ref": "#/$defs/_mcp0"
},
"uid": {
"$ref": "#/$defs/_mcp1"
},
"status": {
"type": "string",
"enum": [
"active",
"revoked",
"not_granted"
],
"description": "Current protected assignment state."
},
"grant": {
"anyOf": [
{
"type": "object",
"properties": {
"positionId": {
"description": "positionId",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$"
},
{
"type": "null"
}
]
},
"uid": {
"$ref": "#/$defs/_mcp1"
},
"employeeId": {
"$ref": "#/$defs/_mcp2"
},
"active": {
"type": "boolean",
"description": "Whether the protected assignment is enabled."
},
"permissions": {
"maxItems": 512,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^[A-Za-z0-9_.:-]+$"
},
"description": "Complete replacement permission ceiling; may not exceed current administrator and OAuth scopes."
},
"locationIds": {
"maxItems": 200,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$"
},
"description": "Exact native locations within the current administrative ceiling."
},
"allLocations": {
"type": "boolean",
"description": "Whether all company locations are allowed; cannot exceed the caller ceiling."
},
"modules": {
"maxItems": 80,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$"
},
"description": "Complete replacement enabled modules within the caller ceiling."
},
"integrations": {
"maxItems": 80,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$"
},
"description": "Complete replacement enabled integrations within the caller ceiling."
},
"allowedClientIds": {
"default": null,
"description": "Registered OAuth client allowlist; null means unrestricted within the administrator ceiling.",
"anyOf": [
{
"maxItems": 200,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 2048,
"pattern": "^[^\\s\\x00-\\x1f\\x7f]+$"
}
},
{
"type": "null"
}
]
},
"companyId": {
"$ref": "#/$defs/_mcp0"
},
"version": {
"default": 0,
"description": "Current optimistic concurrency version.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"revocationVersion": {
"default": 0,
"description": "Monotonic revocation epoch; revoked tokens cannot revive.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"uid",
"employeeId",
"active",
"permissions",
"locationIds",
"allLocations",
"modules",
"integrations",
"allowedClientIds",
"companyId",
"version",
"revocationVersion"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Protected grant, or null before enrollment."
},
"target": {
"description": "Existing native identity metadata.",
"type": "object",
"properties": {
"uid": {
"$ref": "#/$defs/_mcp1"
},
"employeeId": {
"$ref": "#/$defs/_mcp2"
},
"roleId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$"
},
{
"type": "null"
}
],
"description": "Native role metadata; never authority."
},
"locationId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$"
},
{
"type": "null"
}
],
"description": "Native profile location metadata."
}
},
"required": [
"uid",
"employeeId",
"roleId",
"locationId"
],
"additionalProperties": false
}
},
"required": [
"companyId",
"uid",
"status",
"grant"
],
"additionalProperties": false,
"$defs": {
"_mcp0": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Company resolved from the authenticated connection."
},
"_mcp1": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Exact Firebase account UID; must have protected membership in the connected company."
},
"_mcp2": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Existing native employee UID or protected alias."
}
}
}