@wayai/cli 0.3.262 → 0.3.264
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1110 -1085
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4888,6 +4888,218 @@ var init_fs_safety = __esm({
|
|
|
4888
4888
|
}
|
|
4889
4889
|
});
|
|
4890
4890
|
|
|
4891
|
+
// ../../packages/core/dist/chunk-HZ6CADSY.js
|
|
4892
|
+
function optionalTrimmedText(max) {
|
|
4893
|
+
return external_exports.string().trim().max(max).optional().transform((value) => value ? value : void 0);
|
|
4894
|
+
}
|
|
4895
|
+
function jsonLengthOrNull(value) {
|
|
4896
|
+
try {
|
|
4897
|
+
const json = JSON.stringify(value);
|
|
4898
|
+
return typeof json === "string" ? json.length : null;
|
|
4899
|
+
} catch {
|
|
4900
|
+
return null;
|
|
4901
|
+
}
|
|
4902
|
+
}
|
|
4903
|
+
function withinJsonLength(value, max) {
|
|
4904
|
+
const length = jsonLengthOrNull(value);
|
|
4905
|
+
return length !== null && length <= max;
|
|
4906
|
+
}
|
|
4907
|
+
function isAudioAttachmentFileName(fileName) {
|
|
4908
|
+
return /\.(mp3|ogg|oga|wav|m4a|webm)$/i.test(fileName);
|
|
4909
|
+
}
|
|
4910
|
+
var uuidSchema, USER_ID_REGEX, timestampSchema, idParamSchema, clientOptionalString, clientOptionalBoolean, clientOptionalNumber, messageAttachment, MAX_MESSAGE_BODY_BYTES, MAX_ATTACHMENTS_PER_MESSAGE, MESSAGE_ENVELOPE_HEADROOM_BYTES, MAX_AUDIO_FILE_BASE64_BYTES;
|
|
4911
|
+
var init_chunk_HZ6CADSY = __esm({
|
|
4912
|
+
"../../packages/core/dist/chunk-HZ6CADSY.js"() {
|
|
4913
|
+
"use strict";
|
|
4914
|
+
init_zod();
|
|
4915
|
+
uuidSchema = external_exports.string().uuid();
|
|
4916
|
+
USER_ID_REGEX = /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|user_[A-Za-z0-9]+)$/i;
|
|
4917
|
+
timestampSchema = external_exports.string().datetime();
|
|
4918
|
+
idParamSchema = external_exports.object({
|
|
4919
|
+
id: uuidSchema
|
|
4920
|
+
});
|
|
4921
|
+
clientOptionalString = external_exports.string().nullish().transform((v) => v ?? void 0);
|
|
4922
|
+
clientOptionalBoolean = external_exports.boolean().nullish().transform((v) => v ?? void 0);
|
|
4923
|
+
clientOptionalNumber = external_exports.number().nullish().transform((v) => v ?? void 0);
|
|
4924
|
+
messageAttachment = external_exports.object({
|
|
4925
|
+
/**
|
|
4926
|
+
* Capped at the same 255 the storage layer already truncates names to, so nothing
|
|
4927
|
+
* legitimate is lost — every filesystem caps there, and `sanitizeFileName` sliced
|
|
4928
|
+
* longer names anyway.
|
|
4929
|
+
*
|
|
4930
|
+
* The bound is load-bearing, not hygiene: the RAW name is written to R2
|
|
4931
|
+
* `customMetadata.originalFileName`, and R2 rejects oversized metadata. An unbounded
|
|
4932
|
+
* name let a client make the R2 write throw a generic storage error — indistinguishable
|
|
4933
|
+
* from a real outage — which pages us via `logger.error` and, on the app channel, is
|
|
4934
|
+
* read as "we lost the file" and escalates the user to a human. Client input must not
|
|
4935
|
+
* be able to impersonate an infrastructure failure (gh #3365).
|
|
4936
|
+
*/
|
|
4937
|
+
file_name: external_exports.string().max(255),
|
|
4938
|
+
/** Base64. Bounded by the route's bodyLimit, not by this schema. */
|
|
4939
|
+
file_binary: external_exports.string(),
|
|
4940
|
+
file_size: clientOptionalNumber,
|
|
4941
|
+
file_extension: clientOptionalString
|
|
4942
|
+
});
|
|
4943
|
+
MAX_MESSAGE_BODY_BYTES = 10 * 1024 * 1024;
|
|
4944
|
+
MAX_ATTACHMENTS_PER_MESSAGE = 20;
|
|
4945
|
+
MESSAGE_ENVELOPE_HEADROOM_BYTES = 64 * 1024;
|
|
4946
|
+
MAX_AUDIO_FILE_BASE64_BYTES = 8 * 1024 * 1024;
|
|
4947
|
+
}
|
|
4948
|
+
});
|
|
4949
|
+
|
|
4950
|
+
// ../../packages/core/dist/chunk-MIWZOSPI.js
|
|
4951
|
+
function toIso(epochMs) {
|
|
4952
|
+
return new Date(epochMs).toISOString();
|
|
4953
|
+
}
|
|
4954
|
+
function fromIso(iso) {
|
|
4955
|
+
return new Date(iso).getTime();
|
|
4956
|
+
}
|
|
4957
|
+
function isIsoTimestamp(value) {
|
|
4958
|
+
return typeof value === "string" && ISO_UTC_RE.test(value);
|
|
4959
|
+
}
|
|
4960
|
+
var ISO_UTC_RE;
|
|
4961
|
+
var init_chunk_MIWZOSPI = __esm({
|
|
4962
|
+
"../../packages/core/dist/chunk-MIWZOSPI.js"() {
|
|
4963
|
+
"use strict";
|
|
4964
|
+
ISO_UTC_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
4965
|
+
}
|
|
4966
|
+
});
|
|
4967
|
+
|
|
4968
|
+
// ../../packages/core/dist/chunk-MF2VVXBR.js
|
|
4969
|
+
var credentialExpiresAtSchema, LINKED_EXPIRY_REFUSAL;
|
|
4970
|
+
var init_chunk_MF2VVXBR = __esm({
|
|
4971
|
+
"../../packages/core/dist/chunk-MF2VVXBR.js"() {
|
|
4972
|
+
"use strict";
|
|
4973
|
+
init_chunk_HZ6CADSY();
|
|
4974
|
+
init_chunk_MIWZOSPI();
|
|
4975
|
+
credentialExpiresAtSchema = timestampSchema.refine(isIsoTimestamp, "Expected a canonical ISO timestamp").nullable();
|
|
4976
|
+
LINKED_EXPIRY_REFUSAL = "A linked organization credential's expiry is set on the credential";
|
|
4977
|
+
}
|
|
4978
|
+
});
|
|
4979
|
+
|
|
4980
|
+
// ../../packages/core/dist/chunk-YROEDMVZ.js
|
|
4981
|
+
function normalizeAuthType(raw) {
|
|
4982
|
+
if (VALID_AUTH_TYPES.has(raw)) return raw;
|
|
4983
|
+
return LEGACY_AUTH_TYPE_MAP[raw] ?? raw;
|
|
4984
|
+
}
|
|
4985
|
+
function isCustomerFacingAgentRole(role) {
|
|
4986
|
+
return typeof role === "string" && CUSTOMER_FACING_AGENT_ROLES.includes(role);
|
|
4987
|
+
}
|
|
4988
|
+
var AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, PILOT_TRACK_ROLES, COPILOT_TRACK_ROLES, CUSTOMER_FACING_AGENT_ROLES, AGENT_ROLE_DISPLAY, SAFE_USER_ID_REGEX, SUPPORTED_LOCALES, SKILL_INSTALL_COMMAND;
|
|
4989
|
+
var init_chunk_YROEDMVZ = __esm({
|
|
4990
|
+
"../../packages/core/dist/chunk-YROEDMVZ.js"() {
|
|
4991
|
+
"use strict";
|
|
4992
|
+
AUTH_TYPE = {
|
|
4993
|
+
OAUTH: "oauth",
|
|
4994
|
+
API_KEY: "api_key",
|
|
4995
|
+
BASIC_AUTH: "basic_auth",
|
|
4996
|
+
BEARER: "bearer",
|
|
4997
|
+
NONE: "none"
|
|
4998
|
+
};
|
|
4999
|
+
ORG_CREDENTIAL_AUTH_TYPES = [
|
|
5000
|
+
AUTH_TYPE.API_KEY,
|
|
5001
|
+
AUTH_TYPE.BEARER,
|
|
5002
|
+
AUTH_TYPE.BASIC_AUTH
|
|
5003
|
+
];
|
|
5004
|
+
AUTH_TYPE_DISPLAY = {
|
|
5005
|
+
[AUTH_TYPE.OAUTH]: "OAuth",
|
|
5006
|
+
[AUTH_TYPE.API_KEY]: "API Key",
|
|
5007
|
+
[AUTH_TYPE.BASIC_AUTH]: "Basic Auth",
|
|
5008
|
+
[AUTH_TYPE.BEARER]: "Bearer Token",
|
|
5009
|
+
[AUTH_TYPE.NONE]: "No Authentication"
|
|
5010
|
+
};
|
|
5011
|
+
LEGACY_AUTH_TYPE_MAP = {
|
|
5012
|
+
"OAuth": AUTH_TYPE.OAUTH,
|
|
5013
|
+
"API Key": AUTH_TYPE.API_KEY,
|
|
5014
|
+
"Basic Auth": AUTH_TYPE.BASIC_AUTH,
|
|
5015
|
+
"Bearer Token": AUTH_TYPE.BEARER,
|
|
5016
|
+
"No authentication": AUTH_TYPE.NONE,
|
|
5017
|
+
// Also handle the old DISPLAY_TO_CODE bug where 'basic' was used instead of 'basic_auth'
|
|
5018
|
+
"basic": AUTH_TYPE.BASIC_AUTH
|
|
5019
|
+
};
|
|
5020
|
+
VALID_AUTH_TYPES = new Set(Object.values(AUTH_TYPE));
|
|
5021
|
+
AGENT_ROLES = [
|
|
5022
|
+
"pilot",
|
|
5023
|
+
"copilot",
|
|
5024
|
+
"pilot_specialist",
|
|
5025
|
+
"copilot_specialist",
|
|
5026
|
+
"pilot_advisor",
|
|
5027
|
+
"copilot_advisor",
|
|
5028
|
+
"monitor",
|
|
5029
|
+
"conversation_evaluator",
|
|
5030
|
+
"message_evaluator",
|
|
5031
|
+
"summarizer",
|
|
5032
|
+
"consultant",
|
|
5033
|
+
"pilot_voice"
|
|
5034
|
+
];
|
|
5035
|
+
PILOT_TRACK_ROLES = ["pilot", "pilot_specialist"];
|
|
5036
|
+
COPILOT_TRACK_ROLES = ["copilot", "copilot_specialist"];
|
|
5037
|
+
CUSTOMER_FACING_AGENT_ROLES = [...PILOT_TRACK_ROLES, "pilot_advisor"];
|
|
5038
|
+
AGENT_ROLE_DISPLAY = {
|
|
5039
|
+
pilot: "Pilot",
|
|
5040
|
+
copilot: "Copilot",
|
|
5041
|
+
pilot_specialist: "Pilot Specialist",
|
|
5042
|
+
copilot_specialist: "Copilot Specialist",
|
|
5043
|
+
pilot_advisor: "Pilot Advisor",
|
|
5044
|
+
copilot_advisor: "Copilot Advisor",
|
|
5045
|
+
monitor: "Monitor",
|
|
5046
|
+
conversation_evaluator: "Conversation Evaluator",
|
|
5047
|
+
message_evaluator: "Message Evaluator",
|
|
5048
|
+
summarizer: "Summarizer",
|
|
5049
|
+
consultant: "Consultant",
|
|
5050
|
+
pilot_voice: "Pilot Voice"
|
|
5051
|
+
};
|
|
5052
|
+
SAFE_USER_ID_REGEX = /^[A-Za-z0-9_-]{1,64}$/;
|
|
5053
|
+
SUPPORTED_LOCALES = ["en", "pt", "es"];
|
|
5054
|
+
SKILL_INSTALL_COMMAND = "mkdir -p .claude && npx skills add wayai-pro/wayai-skill -y";
|
|
5055
|
+
}
|
|
5056
|
+
});
|
|
5057
|
+
|
|
5058
|
+
// ../../packages/core/dist/chunk-WL5QGKHN.js
|
|
5059
|
+
var orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody;
|
|
5060
|
+
var init_chunk_WL5QGKHN = __esm({
|
|
5061
|
+
"../../packages/core/dist/chunk-WL5QGKHN.js"() {
|
|
5062
|
+
"use strict";
|
|
5063
|
+
init_chunk_MF2VVXBR();
|
|
5064
|
+
init_chunk_YROEDMVZ();
|
|
5065
|
+
init_zod();
|
|
5066
|
+
orgCredentialIdParam = external_exports.object({
|
|
5067
|
+
id: external_exports.string().uuid()
|
|
5068
|
+
});
|
|
5069
|
+
listOrgCredentialsQuery = external_exports.object({
|
|
5070
|
+
organization_id: external_exports.string().uuid(),
|
|
5071
|
+
hub_id: external_exports.string().uuid().optional()
|
|
5072
|
+
});
|
|
5073
|
+
createOrgCredentialBody = external_exports.object({
|
|
5074
|
+
organization_id: external_exports.string().uuid(),
|
|
5075
|
+
credential_display_name: external_exports.string().min(1).max(255),
|
|
5076
|
+
credential_description: external_exports.string().max(1e3).nullish(),
|
|
5077
|
+
authentication_type: external_exports.enum(["api_key", "bearer", "basic_auth"]).or(
|
|
5078
|
+
external_exports.enum(["API Key", "Bearer Token", "Basic Auth"]).transform((v) => normalizeAuthType(v))
|
|
5079
|
+
),
|
|
5080
|
+
api_key: external_exports.string().optional(),
|
|
5081
|
+
access_token: external_exports.string().optional(),
|
|
5082
|
+
username: external_exports.string().optional(),
|
|
5083
|
+
password: external_exports.string().optional(),
|
|
5084
|
+
tags: external_exports.array(external_exports.string().uuid()).optional(),
|
|
5085
|
+
environment: external_exports.enum(["preview", "production", "all"]).optional(),
|
|
5086
|
+
expires_at: credentialExpiresAtSchema.optional()
|
|
5087
|
+
});
|
|
5088
|
+
updateOrgCredentialBody = external_exports.object({
|
|
5089
|
+
credential_display_name: external_exports.string().min(1).max(255).optional(),
|
|
5090
|
+
credential_description: external_exports.string().max(1e3).nullish(),
|
|
5091
|
+
api_key: external_exports.string().optional(),
|
|
5092
|
+
access_token: external_exports.string().optional(),
|
|
5093
|
+
username: external_exports.string().optional(),
|
|
5094
|
+
password: external_exports.string().optional(),
|
|
5095
|
+
tags: external_exports.array(external_exports.string().uuid()).optional(),
|
|
5096
|
+
environment: external_exports.enum(["preview", "production", "all"]).optional(),
|
|
5097
|
+
// Absent keeps the stored date, unless the request stores a new secret, which clears it.
|
|
5098
|
+
expires_at: credentialExpiresAtSchema.optional()
|
|
5099
|
+
});
|
|
5100
|
+
}
|
|
5101
|
+
});
|
|
5102
|
+
|
|
4891
5103
|
// ../../packages/core/dist/chunk-YVY2TZK2.js
|
|
4892
5104
|
var orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody;
|
|
4893
5105
|
var init_chunk_YVY2TZK2 = __esm({
|
|
@@ -5013,79 +5225,20 @@ var init_chunk_VXEAR36B = __esm({
|
|
|
5013
5225
|
}
|
|
5014
5226
|
});
|
|
5015
5227
|
|
|
5016
|
-
// ../../packages/core/dist/chunk-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
function jsonLengthOrNull(value) {
|
|
5021
|
-
try {
|
|
5022
|
-
const json = JSON.stringify(value);
|
|
5023
|
-
return typeof json === "string" ? json.length : null;
|
|
5024
|
-
} catch {
|
|
5025
|
-
return null;
|
|
5026
|
-
}
|
|
5027
|
-
}
|
|
5028
|
-
function withinJsonLength(value, max) {
|
|
5029
|
-
const length = jsonLengthOrNull(value);
|
|
5030
|
-
return length !== null && length <= max;
|
|
5031
|
-
}
|
|
5032
|
-
function isAudioAttachmentFileName(fileName) {
|
|
5033
|
-
return /\.(mp3|ogg|oga|wav|m4a|webm)$/i.test(fileName);
|
|
5034
|
-
}
|
|
5035
|
-
var uuidSchema, USER_ID_REGEX, timestampSchema, idParamSchema, clientOptionalString, clientOptionalBoolean, clientOptionalNumber, messageAttachment, MAX_MESSAGE_BODY_BYTES, MAX_ATTACHMENTS_PER_MESSAGE, MESSAGE_ENVELOPE_HEADROOM_BYTES, MAX_AUDIO_FILE_BASE64_BYTES;
|
|
5036
|
-
var init_chunk_HZ6CADSY = __esm({
|
|
5037
|
-
"../../packages/core/dist/chunk-HZ6CADSY.js"() {
|
|
5228
|
+
// ../../packages/core/dist/chunk-RACEDHG6.js
|
|
5229
|
+
var resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery;
|
|
5230
|
+
var init_chunk_RACEDHG6 = __esm({
|
|
5231
|
+
"../../packages/core/dist/chunk-RACEDHG6.js"() {
|
|
5038
5232
|
"use strict";
|
|
5233
|
+
init_chunk_HZ6CADSY();
|
|
5039
5234
|
init_zod();
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
clientOptionalBoolean = external_exports.boolean().nullish().transform((v) => v ?? void 0);
|
|
5048
|
-
clientOptionalNumber = external_exports.number().nullish().transform((v) => v ?? void 0);
|
|
5049
|
-
messageAttachment = external_exports.object({
|
|
5050
|
-
/**
|
|
5051
|
-
* Capped at the same 255 the storage layer already truncates names to, so nothing
|
|
5052
|
-
* legitimate is lost — every filesystem caps there, and `sanitizeFileName` sliced
|
|
5053
|
-
* longer names anyway.
|
|
5054
|
-
*
|
|
5055
|
-
* The bound is load-bearing, not hygiene: the RAW name is written to R2
|
|
5056
|
-
* `customMetadata.originalFileName`, and R2 rejects oversized metadata. An unbounded
|
|
5057
|
-
* name let a client make the R2 write throw a generic storage error — indistinguishable
|
|
5058
|
-
* from a real outage — which pages us via `logger.error` and, on the app channel, is
|
|
5059
|
-
* read as "we lost the file" and escalates the user to a human. Client input must not
|
|
5060
|
-
* be able to impersonate an infrastructure failure (gh #3365).
|
|
5061
|
-
*/
|
|
5062
|
-
file_name: external_exports.string().max(255),
|
|
5063
|
-
/** Base64. Bounded by the route's bodyLimit, not by this schema. */
|
|
5064
|
-
file_binary: external_exports.string(),
|
|
5065
|
-
file_size: clientOptionalNumber,
|
|
5066
|
-
file_extension: clientOptionalString
|
|
5067
|
-
});
|
|
5068
|
-
MAX_MESSAGE_BODY_BYTES = 10 * 1024 * 1024;
|
|
5069
|
-
MAX_ATTACHMENTS_PER_MESSAGE = 20;
|
|
5070
|
-
MESSAGE_ENVELOPE_HEADROOM_BYTES = 64 * 1024;
|
|
5071
|
-
MAX_AUDIO_FILE_BASE64_BYTES = 8 * 1024 * 1024;
|
|
5072
|
-
}
|
|
5073
|
-
});
|
|
5074
|
-
|
|
5075
|
-
// ../../packages/core/dist/chunk-RACEDHG6.js
|
|
5076
|
-
var resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery;
|
|
5077
|
-
var init_chunk_RACEDHG6 = __esm({
|
|
5078
|
-
"../../packages/core/dist/chunk-RACEDHG6.js"() {
|
|
5079
|
-
"use strict";
|
|
5080
|
-
init_chunk_HZ6CADSY();
|
|
5081
|
-
init_zod();
|
|
5082
|
-
resourceIdParam = external_exports.object({ id: uuidSchema });
|
|
5083
|
-
listResourcesQuery = external_exports.object({
|
|
5084
|
-
hub_id: uuidSchema,
|
|
5085
|
-
enabled: external_exports.enum(["true", "false"]).optional(),
|
|
5086
|
-
search: external_exports.string().optional(),
|
|
5087
|
-
limit: external_exports.string().regex(/^\d+$/).optional(),
|
|
5088
|
-
offset: external_exports.string().regex(/^\d+$/).optional()
|
|
5235
|
+
resourceIdParam = external_exports.object({ id: uuidSchema });
|
|
5236
|
+
listResourcesQuery = external_exports.object({
|
|
5237
|
+
hub_id: uuidSchema,
|
|
5238
|
+
enabled: external_exports.enum(["true", "false"]).optional(),
|
|
5239
|
+
search: external_exports.string().optional(),
|
|
5240
|
+
limit: external_exports.string().regex(/^\d+$/).optional(),
|
|
5241
|
+
offset: external_exports.string().regex(/^\d+$/).optional()
|
|
5089
5242
|
});
|
|
5090
5243
|
createResourceBody = external_exports.object({
|
|
5091
5244
|
hub_id: uuidSchema,
|
|
@@ -5263,36 +5416,6 @@ var init_chunk_Q7KIQHAZ = __esm({
|
|
|
5263
5416
|
}
|
|
5264
5417
|
});
|
|
5265
5418
|
|
|
5266
|
-
// ../../packages/core/dist/chunk-MIWZOSPI.js
|
|
5267
|
-
function toIso(epochMs) {
|
|
5268
|
-
return new Date(epochMs).toISOString();
|
|
5269
|
-
}
|
|
5270
|
-
function fromIso(iso) {
|
|
5271
|
-
return new Date(iso).getTime();
|
|
5272
|
-
}
|
|
5273
|
-
function isIsoTimestamp(value) {
|
|
5274
|
-
return typeof value === "string" && ISO_UTC_RE.test(value);
|
|
5275
|
-
}
|
|
5276
|
-
var ISO_UTC_RE;
|
|
5277
|
-
var init_chunk_MIWZOSPI = __esm({
|
|
5278
|
-
"../../packages/core/dist/chunk-MIWZOSPI.js"() {
|
|
5279
|
-
"use strict";
|
|
5280
|
-
ISO_UTC_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
5281
|
-
}
|
|
5282
|
-
});
|
|
5283
|
-
|
|
5284
|
-
// ../../packages/core/dist/chunk-MF2VVXBR.js
|
|
5285
|
-
var credentialExpiresAtSchema, LINKED_EXPIRY_REFUSAL;
|
|
5286
|
-
var init_chunk_MF2VVXBR = __esm({
|
|
5287
|
-
"../../packages/core/dist/chunk-MF2VVXBR.js"() {
|
|
5288
|
-
"use strict";
|
|
5289
|
-
init_chunk_HZ6CADSY();
|
|
5290
|
-
init_chunk_MIWZOSPI();
|
|
5291
|
-
credentialExpiresAtSchema = timestampSchema.refine(isIsoTimestamp, "Expected a canonical ISO timestamp").nullable();
|
|
5292
|
-
LINKED_EXPIRY_REFUSAL = "A linked organization credential's expiry is set on the credential";
|
|
5293
|
-
}
|
|
5294
|
-
});
|
|
5295
|
-
|
|
5296
5419
|
// ../../packages/core/dist/chunk-HA7CRZMX.js
|
|
5297
5420
|
var connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, BESIDE_LINK_FIELDS, setProductionCredentialBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery;
|
|
5298
5421
|
var init_chunk_HA7CRZMX = __esm({
|
|
@@ -5475,129 +5598,6 @@ var init_chunk_NKLVUTFO = __esm({
|
|
|
5475
5598
|
}
|
|
5476
5599
|
});
|
|
5477
5600
|
|
|
5478
|
-
// ../../packages/core/dist/chunk-YROEDMVZ.js
|
|
5479
|
-
function normalizeAuthType(raw) {
|
|
5480
|
-
if (VALID_AUTH_TYPES.has(raw)) return raw;
|
|
5481
|
-
return LEGACY_AUTH_TYPE_MAP[raw] ?? raw;
|
|
5482
|
-
}
|
|
5483
|
-
function isCustomerFacingAgentRole(role) {
|
|
5484
|
-
return typeof role === "string" && CUSTOMER_FACING_AGENT_ROLES.includes(role);
|
|
5485
|
-
}
|
|
5486
|
-
var AUTH_TYPE, ORG_CREDENTIAL_AUTH_TYPES, AUTH_TYPE_DISPLAY, LEGACY_AUTH_TYPE_MAP, VALID_AUTH_TYPES, AGENT_ROLES, PILOT_TRACK_ROLES, COPILOT_TRACK_ROLES, CUSTOMER_FACING_AGENT_ROLES, AGENT_ROLE_DISPLAY, SAFE_USER_ID_REGEX, SUPPORTED_LOCALES, SKILL_INSTALL_COMMAND;
|
|
5487
|
-
var init_chunk_YROEDMVZ = __esm({
|
|
5488
|
-
"../../packages/core/dist/chunk-YROEDMVZ.js"() {
|
|
5489
|
-
"use strict";
|
|
5490
|
-
AUTH_TYPE = {
|
|
5491
|
-
OAUTH: "oauth",
|
|
5492
|
-
API_KEY: "api_key",
|
|
5493
|
-
BASIC_AUTH: "basic_auth",
|
|
5494
|
-
BEARER: "bearer",
|
|
5495
|
-
NONE: "none"
|
|
5496
|
-
};
|
|
5497
|
-
ORG_CREDENTIAL_AUTH_TYPES = [
|
|
5498
|
-
AUTH_TYPE.API_KEY,
|
|
5499
|
-
AUTH_TYPE.BEARER,
|
|
5500
|
-
AUTH_TYPE.BASIC_AUTH
|
|
5501
|
-
];
|
|
5502
|
-
AUTH_TYPE_DISPLAY = {
|
|
5503
|
-
[AUTH_TYPE.OAUTH]: "OAuth",
|
|
5504
|
-
[AUTH_TYPE.API_KEY]: "API Key",
|
|
5505
|
-
[AUTH_TYPE.BASIC_AUTH]: "Basic Auth",
|
|
5506
|
-
[AUTH_TYPE.BEARER]: "Bearer Token",
|
|
5507
|
-
[AUTH_TYPE.NONE]: "No Authentication"
|
|
5508
|
-
};
|
|
5509
|
-
LEGACY_AUTH_TYPE_MAP = {
|
|
5510
|
-
"OAuth": AUTH_TYPE.OAUTH,
|
|
5511
|
-
"API Key": AUTH_TYPE.API_KEY,
|
|
5512
|
-
"Basic Auth": AUTH_TYPE.BASIC_AUTH,
|
|
5513
|
-
"Bearer Token": AUTH_TYPE.BEARER,
|
|
5514
|
-
"No authentication": AUTH_TYPE.NONE,
|
|
5515
|
-
// Also handle the old DISPLAY_TO_CODE bug where 'basic' was used instead of 'basic_auth'
|
|
5516
|
-
"basic": AUTH_TYPE.BASIC_AUTH
|
|
5517
|
-
};
|
|
5518
|
-
VALID_AUTH_TYPES = new Set(Object.values(AUTH_TYPE));
|
|
5519
|
-
AGENT_ROLES = [
|
|
5520
|
-
"pilot",
|
|
5521
|
-
"copilot",
|
|
5522
|
-
"pilot_specialist",
|
|
5523
|
-
"copilot_specialist",
|
|
5524
|
-
"pilot_advisor",
|
|
5525
|
-
"copilot_advisor",
|
|
5526
|
-
"monitor",
|
|
5527
|
-
"conversation_evaluator",
|
|
5528
|
-
"message_evaluator",
|
|
5529
|
-
"summarizer",
|
|
5530
|
-
"consultant",
|
|
5531
|
-
"pilot_voice"
|
|
5532
|
-
];
|
|
5533
|
-
PILOT_TRACK_ROLES = ["pilot", "pilot_specialist"];
|
|
5534
|
-
COPILOT_TRACK_ROLES = ["copilot", "copilot_specialist"];
|
|
5535
|
-
CUSTOMER_FACING_AGENT_ROLES = [...PILOT_TRACK_ROLES, "pilot_advisor"];
|
|
5536
|
-
AGENT_ROLE_DISPLAY = {
|
|
5537
|
-
pilot: "Pilot",
|
|
5538
|
-
copilot: "Copilot",
|
|
5539
|
-
pilot_specialist: "Pilot Specialist",
|
|
5540
|
-
copilot_specialist: "Copilot Specialist",
|
|
5541
|
-
pilot_advisor: "Pilot Advisor",
|
|
5542
|
-
copilot_advisor: "Copilot Advisor",
|
|
5543
|
-
monitor: "Monitor",
|
|
5544
|
-
conversation_evaluator: "Conversation Evaluator",
|
|
5545
|
-
message_evaluator: "Message Evaluator",
|
|
5546
|
-
summarizer: "Summarizer",
|
|
5547
|
-
consultant: "Consultant",
|
|
5548
|
-
pilot_voice: "Pilot Voice"
|
|
5549
|
-
};
|
|
5550
|
-
SAFE_USER_ID_REGEX = /^[A-Za-z0-9_-]{1,64}$/;
|
|
5551
|
-
SUPPORTED_LOCALES = ["en", "pt", "es"];
|
|
5552
|
-
SKILL_INSTALL_COMMAND = "mkdir -p .claude && npx skills add wayai-pro/wayai-skill -y";
|
|
5553
|
-
}
|
|
5554
|
-
});
|
|
5555
|
-
|
|
5556
|
-
// ../../packages/core/dist/chunk-WL5QGKHN.js
|
|
5557
|
-
var orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody;
|
|
5558
|
-
var init_chunk_WL5QGKHN = __esm({
|
|
5559
|
-
"../../packages/core/dist/chunk-WL5QGKHN.js"() {
|
|
5560
|
-
"use strict";
|
|
5561
|
-
init_chunk_MF2VVXBR();
|
|
5562
|
-
init_chunk_YROEDMVZ();
|
|
5563
|
-
init_zod();
|
|
5564
|
-
orgCredentialIdParam = external_exports.object({
|
|
5565
|
-
id: external_exports.string().uuid()
|
|
5566
|
-
});
|
|
5567
|
-
listOrgCredentialsQuery = external_exports.object({
|
|
5568
|
-
organization_id: external_exports.string().uuid(),
|
|
5569
|
-
hub_id: external_exports.string().uuid().optional()
|
|
5570
|
-
});
|
|
5571
|
-
createOrgCredentialBody = external_exports.object({
|
|
5572
|
-
organization_id: external_exports.string().uuid(),
|
|
5573
|
-
credential_display_name: external_exports.string().min(1).max(255),
|
|
5574
|
-
credential_description: external_exports.string().max(1e3).nullish(),
|
|
5575
|
-
authentication_type: external_exports.enum(["api_key", "bearer", "basic_auth"]).or(
|
|
5576
|
-
external_exports.enum(["API Key", "Bearer Token", "Basic Auth"]).transform((v) => normalizeAuthType(v))
|
|
5577
|
-
),
|
|
5578
|
-
api_key: external_exports.string().optional(),
|
|
5579
|
-
access_token: external_exports.string().optional(),
|
|
5580
|
-
username: external_exports.string().optional(),
|
|
5581
|
-
password: external_exports.string().optional(),
|
|
5582
|
-
tags: external_exports.array(external_exports.string().uuid()).optional(),
|
|
5583
|
-
environment: external_exports.enum(["preview", "production", "all"]).optional(),
|
|
5584
|
-
expires_at: credentialExpiresAtSchema.optional()
|
|
5585
|
-
});
|
|
5586
|
-
updateOrgCredentialBody = external_exports.object({
|
|
5587
|
-
credential_display_name: external_exports.string().min(1).max(255).optional(),
|
|
5588
|
-
credential_description: external_exports.string().max(1e3).nullish(),
|
|
5589
|
-
api_key: external_exports.string().optional(),
|
|
5590
|
-
access_token: external_exports.string().optional(),
|
|
5591
|
-
username: external_exports.string().optional(),
|
|
5592
|
-
password: external_exports.string().optional(),
|
|
5593
|
-
tags: external_exports.array(external_exports.string().uuid()).optional(),
|
|
5594
|
-
environment: external_exports.enum(["preview", "production", "all"]).optional(),
|
|
5595
|
-
// Absent keeps the stored date, unless the request stores a new secret, which clears it.
|
|
5596
|
-
expires_at: credentialExpiresAtSchema.optional()
|
|
5597
|
-
});
|
|
5598
|
-
}
|
|
5599
|
-
});
|
|
5600
|
-
|
|
5601
5601
|
// ../../packages/core/dist/chunk-ZC6YGHNX.js
|
|
5602
5602
|
var updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, recordAiDisclosureAcceptanceBody, activityQuery, deletionModeSchema, deletionRequestBody;
|
|
5603
5603
|
var init_chunk_ZC6YGHNX = __esm({
|
|
@@ -5700,10 +5700,10 @@ var init_chunk_ACKF2MVU = __esm({
|
|
|
5700
5700
|
}
|
|
5701
5701
|
});
|
|
5702
5702
|
|
|
5703
|
-
// ../../packages/core/dist/chunk-
|
|
5703
|
+
// ../../packages/core/dist/chunk-HIGKBEPF.js
|
|
5704
5704
|
var accessExplainQuery;
|
|
5705
|
-
var
|
|
5706
|
-
"../../packages/core/dist/chunk-
|
|
5705
|
+
var init_chunk_HIGKBEPF = __esm({
|
|
5706
|
+
"../../packages/core/dist/chunk-HIGKBEPF.js"() {
|
|
5707
5707
|
"use strict";
|
|
5708
5708
|
init_chunk_HZ6CADSY();
|
|
5709
5709
|
init_zod();
|
|
@@ -6532,928 +6532,950 @@ var init_chunk_VEERWOZ6 = __esm({
|
|
|
6532
6532
|
}
|
|
6533
6533
|
});
|
|
6534
6534
|
|
|
6535
|
-
// ../../packages/core/dist/chunk-
|
|
6536
|
-
var
|
|
6537
|
-
var
|
|
6538
|
-
"../../packages/core/dist/chunk-
|
|
6535
|
+
// ../../packages/core/dist/chunk-35OU33GJ.js
|
|
6536
|
+
var REKOR_ACTOR_TYPE_HEADER, REKOR_ACTOR_ID_HEADER, REKOR_ACTOR_LABEL_HEADER, REKOR_ACTOR_ORG_HEADER, REKOR_ACTOR_ADMIN_HEADER, REKOR_CLIENT_HEADER, REKOR_TOOL_ID_HEADER, REKOR_CLIENTS, rekorClientSchema, MAX_REKOR_TOOL_ID_LENGTH, rekorToolIdSchema, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, REKOR_BOUND_BASE_HEADER, REKOR_BOUND_TOOLSET_HEADER, REKOR_BOUND_TOKEN_HEADER, REKOR_BOUND_CUSTOMER_HEADER, REKOR_BOUND_ACCESS_HEADER, REKOR_BOUND_ACCESS_SCOPE_HEADER, REKOR_BOUND_PAGE_HEADER, REKOR_BOUND_PERSON_HEADER, REKOR_PERSON_AUDIENCE_STAFF, REKOR_PERSON_AUDIENCE_CUSTOMER, REKOR_PERSON_ALL, REKOR_ACCESS_SCOPE_CUSTOMER, DATA_BASE_GENERATION_HEADER, REKOR_MAX_ACTOR_ID_LENGTH, REKOR_MAX_ACTOR_LABEL_LENGTH, REKOR_MAX_ACCESS_DIMENSIONS, REKOR_MAX_ACCESS_VALUES, REKOR_MAX_ACCESS_ID_LENGTH, REKOR_MAX_ACCESS_HEADER_LENGTH, REKOR_MAX_PERSON_PARTIES, REKOR_MAX_PERSON_IDS, REKOR_MAX_PERSON_ID_LENGTH, REKOR_MAX_PERSON_HEADER_LENGTH;
|
|
6537
|
+
var init_chunk_35OU33GJ = __esm({
|
|
6538
|
+
"../../packages/core/dist/chunk-35OU33GJ.js"() {
|
|
6539
6539
|
"use strict";
|
|
6540
|
-
init_chunk_HZ6CADSY();
|
|
6541
6540
|
init_zod();
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6541
|
+
REKOR_ACTOR_TYPE_HEADER = "X-Rekor-Actor-Type";
|
|
6542
|
+
REKOR_ACTOR_ID_HEADER = "X-Rekor-Actor-Id";
|
|
6543
|
+
REKOR_ACTOR_LABEL_HEADER = "X-Rekor-Actor-Label";
|
|
6544
|
+
REKOR_ACTOR_ORG_HEADER = "X-Rekor-Actor-Org";
|
|
6545
|
+
REKOR_ACTOR_ADMIN_HEADER = "X-Rekor-Actor-Admin";
|
|
6546
|
+
REKOR_CLIENT_HEADER = "X-Rekor-Client";
|
|
6547
|
+
REKOR_TOOL_ID_HEADER = "X-Rekor-Tool-Id";
|
|
6548
|
+
REKOR_CLIENTS = ["api", "cli", "mcp"];
|
|
6549
|
+
rekorClientSchema = external_exports.enum(REKOR_CLIENTS);
|
|
6550
|
+
MAX_REKOR_TOOL_ID_LENGTH = 128;
|
|
6551
|
+
rekorToolIdSchema = external_exports.string().trim().min(1).max(MAX_REKOR_TOOL_ID_LENGTH);
|
|
6552
|
+
REKOR_V1_PREFIX = "/v1";
|
|
6553
|
+
DATA_PROXY_ORG_QUERY_PARAM = "org_id";
|
|
6554
|
+
MAX_PROVISIONING_BODY_BYTES = 256 * 1024;
|
|
6555
|
+
dataProxyQuery = external_exports.object({
|
|
6556
|
+
[DATA_PROXY_ORG_QUERY_PARAM]: external_exports.string().uuid().optional()
|
|
6555
6557
|
});
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6558
|
+
rekorAttestation = external_exports.object({
|
|
6559
|
+
[REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["user", "token"]),
|
|
6560
|
+
[REKOR_ACTOR_ID_HEADER]: external_exports.string().min(1),
|
|
6561
|
+
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string(),
|
|
6562
|
+
[REKOR_ACTOR_ORG_HEADER]: external_exports.string().uuid(),
|
|
6563
|
+
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.enum(["0", "1"]),
|
|
6564
|
+
[REKOR_CLIENT_HEADER]: rekorClientSchema,
|
|
6565
|
+
[REKOR_TOOL_ID_HEADER]: rekorToolIdSchema.optional()
|
|
6559
6566
|
});
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
var PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, PEOPLE_SUSPENDED_REASON, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody;
|
|
6585
|
-
var init_chunk_ZXK6N2HN = __esm({
|
|
6586
|
-
"../../packages/core/dist/chunk-ZXK6N2HN.js"() {
|
|
6587
|
-
"use strict";
|
|
6588
|
-
init_chunk_ZVXO3XL6();
|
|
6589
|
-
init_chunk_HZ6CADSY();
|
|
6590
|
-
init_zod();
|
|
6591
|
-
PEOPLE_MODERATION_NOTE_MAX_LENGTH = 500;
|
|
6592
|
-
ADMIN_PEOPLE_REPORTS_PAGE_MAX = 100;
|
|
6593
|
-
ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT = 50;
|
|
6594
|
-
PEOPLE_SUSPENDED_REASON = "suspended";
|
|
6595
|
-
peopleModerationActionSchema = external_exports.enum(["remove_message", "suspend", "unsuspend", "dismiss"]);
|
|
6596
|
-
moderationNoteSchema = optionalTrimmedText(PEOPLE_MODERATION_NOTE_MAX_LENGTH);
|
|
6597
|
-
adminPeopleReportListQuery = external_exports.object({
|
|
6598
|
-
pending: external_exports.enum(["true", "false"]).optional().transform((value) => value === "true"),
|
|
6599
|
-
/** Lower bound on `created_at`. */
|
|
6600
|
-
since: timestampSchema.optional(),
|
|
6601
|
-
limit: external_exports.coerce.number().int().min(1).max(ADMIN_PEOPLE_REPORTS_PAGE_MAX).default(ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT),
|
|
6602
|
-
offset: external_exports.coerce.number().int().min(0).default(0)
|
|
6603
|
-
});
|
|
6604
|
-
adminPeopleReportIdParam = external_exports.object({ reportId: uuidSchema });
|
|
6605
|
-
adminPeopleMessageRemovalBody = external_exports.object({ report_id: uuidSchema, message_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
|
|
6606
|
-
adminPeopleSuspendBody = external_exports.object({ report_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
|
|
6607
|
-
adminPeopleNoteBody = external_exports.object({ note: moderationNoteSchema }).strict();
|
|
6608
|
-
}
|
|
6609
|
-
});
|
|
6610
|
-
|
|
6611
|
-
// ../../packages/core/dist/chunk-Y7CFCYX4.js
|
|
6612
|
-
var PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody;
|
|
6613
|
-
var init_chunk_Y7CFCYX4 = __esm({
|
|
6614
|
-
"../../packages/core/dist/chunk-Y7CFCYX4.js"() {
|
|
6615
|
-
"use strict";
|
|
6616
|
-
init_chunk_ZVXO3XL6();
|
|
6617
|
-
init_chunk_HZ6CADSY();
|
|
6618
|
-
init_zod();
|
|
6619
|
-
PEOPLE_REPORT_DETAILS_MAX_LENGTH = 500;
|
|
6620
|
-
peopleReportReasonSchema = external_exports.enum(["spam", "harassment", "hate", "sexual", "violence", "other"]);
|
|
6621
|
-
reportDetailsSchema = optionalTrimmedText(PEOPLE_REPORT_DETAILS_MAX_LENGTH);
|
|
6622
|
-
reportFields = { reason: peopleReportReasonSchema, details: reportDetailsSchema };
|
|
6623
|
-
peopleReportBody = external_exports.discriminatedUnion("target", [
|
|
6624
|
-
external_exports.object({ target: external_exports.literal("message"), thread_id: uuidSchema, message_id: uuidSchema, ...reportFields }).strict(),
|
|
6625
|
-
external_exports.object({ target: external_exports.literal("thread"), thread_id: uuidSchema, ...reportFields }).strict(),
|
|
6626
|
-
external_exports.object({ target: external_exports.literal("user"), user_id: peopleUserIdSchema, thread_id: uuidSchema.optional(), ...reportFields }).strict(),
|
|
6627
|
-
external_exports.object({
|
|
6628
|
-
target: external_exports.literal("community_message"),
|
|
6629
|
-
community_id: uuidSchema,
|
|
6630
|
-
room_id: uuidSchema,
|
|
6631
|
-
message_id: uuidSchema,
|
|
6632
|
-
...reportFields
|
|
6633
|
-
}).strict(),
|
|
6634
|
-
external_exports.object({ target: external_exports.literal("community_member"), community_id: uuidSchema, user_id: peopleUserIdSchema, ...reportFields }).strict()
|
|
6635
|
-
]);
|
|
6567
|
+
REQUIRED_REKOR_ATTESTATION_HEADERS = Object.entries(rekorAttestation.shape).filter(([, field]) => !field.isOptional()).map(([header]) => header);
|
|
6568
|
+
REKOR_BOUND_BASE_HEADER = "X-Rekor-Bound-Base";
|
|
6569
|
+
REKOR_BOUND_TOOLSET_HEADER = "X-Rekor-Bound-Toolset";
|
|
6570
|
+
REKOR_BOUND_TOKEN_HEADER = "X-Rekor-Bound-Token";
|
|
6571
|
+
REKOR_BOUND_CUSTOMER_HEADER = "X-Rekor-Bound-Customer";
|
|
6572
|
+
REKOR_BOUND_ACCESS_HEADER = "X-Rekor-Bound-Access";
|
|
6573
|
+
REKOR_BOUND_ACCESS_SCOPE_HEADER = "X-Rekor-Bound-Access-Scope";
|
|
6574
|
+
REKOR_BOUND_PAGE_HEADER = "X-Rekor-Bound-Page";
|
|
6575
|
+
REKOR_BOUND_PERSON_HEADER = "X-Rekor-Bound-Person";
|
|
6576
|
+
REKOR_PERSON_AUDIENCE_STAFF = "staff";
|
|
6577
|
+
REKOR_PERSON_AUDIENCE_CUSTOMER = "customer";
|
|
6578
|
+
REKOR_PERSON_ALL = "*";
|
|
6579
|
+
REKOR_ACCESS_SCOPE_CUSTOMER = "customer";
|
|
6580
|
+
DATA_BASE_GENERATION_HEADER = "X-Data-Base-Generation";
|
|
6581
|
+
REKOR_MAX_ACTOR_ID_LENGTH = 256;
|
|
6582
|
+
REKOR_MAX_ACTOR_LABEL_LENGTH = 256;
|
|
6583
|
+
REKOR_MAX_ACCESS_DIMENSIONS = 8;
|
|
6584
|
+
REKOR_MAX_ACCESS_VALUES = 100;
|
|
6585
|
+
REKOR_MAX_ACCESS_ID_LENGTH = 32;
|
|
6586
|
+
REKOR_MAX_ACCESS_HEADER_LENGTH = 65536;
|
|
6587
|
+
REKOR_MAX_PERSON_PARTIES = 16;
|
|
6588
|
+
REKOR_MAX_PERSON_IDS = 16;
|
|
6589
|
+
REKOR_MAX_PERSON_ID_LENGTH = 64;
|
|
6590
|
+
REKOR_MAX_PERSON_HEADER_LENGTH = 32768;
|
|
6636
6591
|
}
|
|
6637
6592
|
});
|
|
6638
6593
|
|
|
6639
|
-
// ../../packages/core/dist/chunk-
|
|
6640
|
-
function
|
|
6641
|
-
|
|
6642
|
-
const withPlus = compact.startsWith("00") ? `+${compact.slice(2)}` : compact;
|
|
6643
|
-
return /^\+[1-9]\d{7,14}$/.test(withPlus) ? withPlus : null;
|
|
6594
|
+
// ../../packages/core/dist/chunk-ELIEEYPK.js
|
|
6595
|
+
function isPersonAccessAll(lists) {
|
|
6596
|
+
return lists !== void 0 && lists.read.length === 1 && lists.read[0] === ACCESS_UNRESTRICTED && lists.write.length === 1 && lists.write[0] === ACCESS_UNRESTRICTED;
|
|
6644
6597
|
}
|
|
6645
|
-
function
|
|
6646
|
-
return
|
|
6598
|
+
function holdsPersonAccess(assignment) {
|
|
6599
|
+
return assignment != null && Object.hasOwn(assignment, PERSON_ACCESS_KEY);
|
|
6647
6600
|
}
|
|
6648
|
-
function
|
|
6649
|
-
|
|
6601
|
+
function withoutPersonAccess(assignment) {
|
|
6602
|
+
if (!holdsPersonAccess(assignment)) return assignment;
|
|
6603
|
+
const dimensions = {};
|
|
6604
|
+
for (const [key, lists] of Object.entries(assignment)) if (key !== PERSON_ACCESS_KEY) dimensions[key] = lists;
|
|
6605
|
+
return dimensions;
|
|
6650
6606
|
}
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6607
|
+
function personAccessRefusal(holders) {
|
|
6608
|
+
return `${holders} never hold "${PERSON_ACCESS_KEY}"`;
|
|
6609
|
+
}
|
|
6610
|
+
function personlessAssignmentSchema(holders) {
|
|
6611
|
+
return heldAccessAssignmentSchema.refine((assignment) => !holdsPersonAccess(assignment), {
|
|
6612
|
+
message: personAccessRefusal(holders),
|
|
6613
|
+
path: [PERSON_ACCESS_KEY]
|
|
6614
|
+
});
|
|
6615
|
+
}
|
|
6616
|
+
function writeWithinRead(assignment) {
|
|
6617
|
+
return Object.values(assignment).every(({ read, write }) => read.includes(ACCESS_UNRESTRICTED) || !write.includes(ACCESS_UNRESTRICTED) && write.every((id) => read.includes(id)));
|
|
6618
|
+
}
|
|
6619
|
+
function isEncodedAccessSet(raw) {
|
|
6620
|
+
let parsed;
|
|
6621
|
+
try {
|
|
6622
|
+
parsed = JSON.parse(raw);
|
|
6623
|
+
} catch {
|
|
6624
|
+
return false;
|
|
6625
|
+
}
|
|
6626
|
+
return accessSetSchema.safeParse(parsed).success;
|
|
6627
|
+
}
|
|
6628
|
+
function assignmentHasUnrestricted(assignment) {
|
|
6629
|
+
return Object.values(assignment).some((lists) => lists.read.includes(ACCESS_UNRESTRICTED) || lists.write.includes(ACCESS_UNRESTRICTED));
|
|
6630
|
+
}
|
|
6631
|
+
var ACCESS_UNRESTRICTED, ACCESS_ID_REGEX, ACCESS_ID_MAX_LENGTH, MAX_ACCESS_DIMENSIONS_PER_ORG, MAX_ACCESS_VALUES_PER_DIMENSION, ACCESS_LABEL_MAX_LENGTH, accessIdSchema, accessLabelSchema, accessValueListSchema, accessListsSchema, accessAssignmentSchema, PERSON_ACCESS_KEY, heldAccessKeySchema, heldAccessAssignmentSchema, AGENT_PERSON_ACCESS_REFUSAL, accessSetSchema, accessDimensionParam, accessValueParam, orgMemberParam, orgHubParam, createAccessDimensionBody, updateAccessDimensionBody, createAccessValueBody, updateAccessValueBody, setMemberAccessValuesBody, HUB_PERSON_KINDS, ACCESS_PERSON_KINDS, setHubUserAccessValuesBody, setHubAccessValuesBody, setAgentAccessValuesBody;
|
|
6632
|
+
var init_chunk_ELIEEYPK = __esm({
|
|
6633
|
+
"../../packages/core/dist/chunk-ELIEEYPK.js"() {
|
|
6654
6634
|
"use strict";
|
|
6635
|
+
init_chunk_35OU33GJ();
|
|
6636
|
+
init_chunk_HZ6CADSY();
|
|
6637
|
+
init_chunk_YROEDMVZ();
|
|
6655
6638
|
init_zod();
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
CONTACT_IMPORT_BATCH_MAX = 500;
|
|
6667
|
-
CONTACT_SEARCH_MAX = 100;
|
|
6668
|
-
CONTACT_LIST_NAME_MAX = 64;
|
|
6669
|
-
CONTACT_LIST_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
6670
|
-
CONTACT_LIST_DESCRIPTION_MAX = 1e3;
|
|
6671
|
-
CONTACT_LIST_FILTER_MAX = 20;
|
|
6672
|
-
CONTACT_LIST_PINS_PER_REQUEST_MAX = 100;
|
|
6673
|
-
SUPPRESSION_SCOPES = ["all", "marketing"];
|
|
6674
|
-
SUPPRESSION_ID_REGEX = /^[0-9a-f]{64}$/;
|
|
6675
|
-
contactName = external_exports.string().trim().min(1).max(CONTACT_NAME_MAX);
|
|
6676
|
-
contactPhone = external_exports.string().max(CONTACT_PHONE_INPUT_MAX).transform((raw, ctx) => {
|
|
6677
|
-
const phone = normalizeContactPhone(raw);
|
|
6678
|
-
if (phone === null) {
|
|
6679
|
-
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Phone must be an international number, e.g. +5511999999999" });
|
|
6680
|
-
return external_exports.NEVER;
|
|
6681
|
-
}
|
|
6682
|
-
return phone;
|
|
6639
|
+
ACCESS_UNRESTRICTED = "*";
|
|
6640
|
+
ACCESS_ID_REGEX = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
6641
|
+
ACCESS_ID_MAX_LENGTH = REKOR_MAX_ACCESS_ID_LENGTH;
|
|
6642
|
+
MAX_ACCESS_DIMENSIONS_PER_ORG = REKOR_MAX_ACCESS_DIMENSIONS;
|
|
6643
|
+
MAX_ACCESS_VALUES_PER_DIMENSION = REKOR_MAX_ACCESS_VALUES;
|
|
6644
|
+
ACCESS_LABEL_MAX_LENGTH = 100;
|
|
6645
|
+
accessIdSchema = external_exports.string().min(1).max(ACCESS_ID_MAX_LENGTH).regex(ACCESS_ID_REGEX, { message: 'Must be ASCII letters, digits, "_" or "-", starting with a letter or digit (e.g. "class", "7A")' });
|
|
6646
|
+
accessLabelSchema = external_exports.string().trim().min(1).max(ACCESS_LABEL_MAX_LENGTH);
|
|
6647
|
+
accessValueListSchema = external_exports.array(external_exports.union([accessIdSchema, external_exports.literal(ACCESS_UNRESTRICTED)])).max(MAX_ACCESS_VALUES_PER_DIMENSION).refine((list2) => !list2.includes(ACCESS_UNRESTRICTED) || list2.length === 1, {
|
|
6648
|
+
message: `"${ACCESS_UNRESTRICTED}" reaches the dimension unrestricted, so it stands alone in its list`
|
|
6683
6649
|
});
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6650
|
+
accessListsSchema = external_exports.object({ read: accessValueListSchema, write: accessValueListSchema }).strict();
|
|
6651
|
+
accessAssignmentSchema = external_exports.record(accessIdSchema, accessListsSchema).refine((assignment) => Object.keys(assignment).length <= MAX_ACCESS_DIMENSIONS_PER_ORG, {
|
|
6652
|
+
message: `An assignment names at most ${MAX_ACCESS_DIMENSIONS_PER_ORG} dimensions`
|
|
6653
|
+
});
|
|
6654
|
+
PERSON_ACCESS_KEY = "$person";
|
|
6655
|
+
heldAccessKeySchema = external_exports.string().refine(
|
|
6656
|
+
(key) => key === PERSON_ACCESS_KEY || accessIdSchema.safeParse(key).success,
|
|
6657
|
+
{ message: `Must be "${PERSON_ACCESS_KEY}" or a dimension id: ASCII letters, digits, "_" or "-", starting with a letter or digit (e.g. "class", "7A")` }
|
|
6691
6658
|
);
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6659
|
+
heldAccessAssignmentSchema = external_exports.record(heldAccessKeySchema, accessListsSchema).superRefine((assignment, ctx) => {
|
|
6660
|
+
if (holdsPersonAccess(assignment) && !isPersonAccessAll(assignment[PERSON_ACCESS_KEY])) {
|
|
6661
|
+
ctx.addIssue({
|
|
6662
|
+
code: external_exports.ZodIssueCode.custom,
|
|
6663
|
+
path: [PERSON_ACCESS_KEY],
|
|
6664
|
+
message: `"${PERSON_ACCESS_KEY}" holds only { "read": ["${ACCESS_UNRESTRICTED}"], "write": ["${ACCESS_UNRESTRICTED}"] }: every person's records`
|
|
6665
|
+
});
|
|
6666
|
+
}
|
|
6667
|
+
if (Object.keys(withoutPersonAccess(assignment)).length > MAX_ACCESS_DIMENSIONS_PER_ORG) {
|
|
6668
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: `An assignment names at most ${MAX_ACCESS_DIMENSIONS_PER_ORG} dimensions` });
|
|
6669
|
+
}
|
|
6701
6670
|
});
|
|
6702
|
-
|
|
6703
|
-
|
|
6671
|
+
AGENT_PERSON_ACCESS_REFUSAL = `A customer-facing agent (${CUSTOMER_FACING_AGENT_ROLES.map((role) => AGENT_ROLE_DISPLAY[role]).join(", ")}) never holds "${PERSON_ACCESS_KEY}" in its access values: remove it, or give the agent another role`;
|
|
6672
|
+
accessSetSchema = accessAssignmentSchema.refine(writeWithinRead, {
|
|
6673
|
+
message: "An access set writes only what it reads"
|
|
6704
6674
|
});
|
|
6705
|
-
|
|
6706
|
-
|
|
6675
|
+
accessDimensionParam = external_exports.object({
|
|
6676
|
+
id: uuidSchema,
|
|
6677
|
+
dimensionId: accessIdSchema
|
|
6707
6678
|
});
|
|
6708
|
-
|
|
6709
|
-
|
|
6679
|
+
accessValueParam = accessDimensionParam.extend({
|
|
6680
|
+
valueId: accessIdSchema
|
|
6710
6681
|
});
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6682
|
+
orgMemberParam = external_exports.object({
|
|
6683
|
+
id: uuidSchema,
|
|
6684
|
+
userId: external_exports.string().min(1).max(256)
|
|
6714
6685
|
});
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
scope_tag_id: external_exports.string().uuid().optional()
|
|
6686
|
+
orgHubParam = external_exports.object({
|
|
6687
|
+
id: uuidSchema,
|
|
6688
|
+
hubId: uuidSchema
|
|
6719
6689
|
});
|
|
6720
|
-
|
|
6721
|
-
|
|
6690
|
+
createAccessDimensionBody = external_exports.object({
|
|
6691
|
+
dimension_id: accessIdSchema,
|
|
6692
|
+
label: accessLabelSchema
|
|
6722
6693
|
});
|
|
6723
|
-
|
|
6724
|
-
|
|
6694
|
+
updateAccessDimensionBody = external_exports.object({
|
|
6695
|
+
label: accessLabelSchema
|
|
6725
6696
|
});
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
phone: contactPhone.nullish(),
|
|
6730
|
-
email: contactEmail.nullish(),
|
|
6731
|
-
instagram_sid: contactInstagramSid.nullish(),
|
|
6732
|
-
labels: contactLabels.optional(),
|
|
6733
|
-
metadata: contactMetadata.optional()
|
|
6734
|
-
};
|
|
6735
|
-
createContactBookContactBody = external_exports.object({
|
|
6736
|
-
organization_id: external_exports.string().uuid(),
|
|
6737
|
-
...contactRowFields,
|
|
6738
|
-
visibility: contactVisibilitySchema,
|
|
6739
|
-
environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional()
|
|
6740
|
-
}).strict().refine(hasIdentity, IDENTITY_REQUIRED);
|
|
6741
|
-
updateContactBookContactBody = external_exports.object({
|
|
6742
|
-
name: contactName.optional(),
|
|
6743
|
-
phone: contactPhone.nullable().optional(),
|
|
6744
|
-
email: contactEmail.nullable().optional(),
|
|
6745
|
-
instagram_sid: contactInstagramSid.nullable().optional(),
|
|
6746
|
-
labels: contactLabels.optional(),
|
|
6747
|
-
metadata: contactMetadata.optional(),
|
|
6748
|
-
visibility: contactVisibilitySchema.optional(),
|
|
6749
|
-
environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional()
|
|
6750
|
-
}).strict();
|
|
6751
|
-
contactImportRowSchema = external_exports.object(contactRowFields).strict().refine(hasIdentity, IDENTITY_REQUIRED);
|
|
6752
|
-
importContactBookContactsBody = external_exports.object({
|
|
6753
|
-
organization_id: external_exports.string().uuid(),
|
|
6754
|
-
visibility: contactVisibilitySchema,
|
|
6755
|
-
environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional(),
|
|
6756
|
-
labels: contactLabels.optional(),
|
|
6757
|
-
rows: external_exports.array(contactImportRowSchema).min(1).max(CONTACT_IMPORT_BATCH_MAX)
|
|
6758
|
-
}).strict().superRefine((batch, ctx) => {
|
|
6759
|
-
batch.rows.forEach((row, index) => {
|
|
6760
|
-
if (importRowLabels(row, batch.labels).length > CONTACT_LABELS_MAX) {
|
|
6761
|
-
ctx.addIssue({
|
|
6762
|
-
code: external_exports.ZodIssueCode.custom,
|
|
6763
|
-
path: ["rows", index, "labels"],
|
|
6764
|
-
message: `A contact holds at most ${CONTACT_LABELS_MAX} labels, the batch's included`
|
|
6765
|
-
});
|
|
6766
|
-
}
|
|
6767
|
-
});
|
|
6768
|
-
});
|
|
6769
|
-
linkContactBookContactBody = external_exports.object({
|
|
6770
|
-
user_id: external_exports.string().min(1).max(128)
|
|
6771
|
-
}).strict();
|
|
6772
|
-
listName = external_exports.string().trim().min(1).max(CONTACT_LIST_NAME_MAX).regex(CONTACT_LIST_NAME_REGEX, {
|
|
6773
|
-
message: 'Must be lowercase alphanumeric with hyphens (e.g. "vip-customers")'
|
|
6697
|
+
createAccessValueBody = external_exports.object({
|
|
6698
|
+
value_id: accessIdSchema,
|
|
6699
|
+
label: accessLabelSchema
|
|
6774
6700
|
});
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
}).
|
|
6779
|
-
|
|
6780
|
-
organization_id: external_exports.string().uuid(),
|
|
6781
|
-
name: listName,
|
|
6782
|
-
description: external_exports.string().max(CONTACT_LIST_DESCRIPTION_MAX).nullish(),
|
|
6783
|
-
filter: contactListFilterSchema.optional()
|
|
6784
|
-
}).strict();
|
|
6785
|
-
updateContactBookListBody = external_exports.object({
|
|
6786
|
-
name: listName.optional(),
|
|
6787
|
-
description: external_exports.string().max(CONTACT_LIST_DESCRIPTION_MAX).nullable().optional(),
|
|
6788
|
-
filter: contactListFilterSchema.optional()
|
|
6789
|
-
}).strict();
|
|
6790
|
-
updateContactBookListPinsBody = external_exports.object({
|
|
6791
|
-
add: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_PINS_PER_REQUEST_MAX).default([]),
|
|
6792
|
-
remove: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_PINS_PER_REQUEST_MAX).default([])
|
|
6793
|
-
}).strict().refine((b) => b.add.length + b.remove.length > 0, "Add or remove at least one contact");
|
|
6794
|
-
suppressionIdentitySchema = external_exports.discriminatedUnion("kind", [
|
|
6795
|
-
external_exports.object({ kind: external_exports.literal("phone"), value: contactPhone }).strict(),
|
|
6796
|
-
external_exports.object({ kind: external_exports.literal("email"), value: contactEmail }).strict(),
|
|
6797
|
-
external_exports.object({ kind: external_exports.literal("instagram"), value: contactInstagramSid }).strict()
|
|
6798
|
-
]);
|
|
6799
|
-
createContactBookSuppressionBody = external_exports.object({
|
|
6800
|
-
organization_id: external_exports.string().uuid(),
|
|
6801
|
-
identity: suppressionIdentitySchema,
|
|
6802
|
-
scope: external_exports.enum(SUPPRESSION_SCOPES)
|
|
6803
|
-
}).strict();
|
|
6804
|
-
contactBookSuppressionParam = external_exports.object({
|
|
6805
|
-
suppressionId: external_exports.string().regex(SUPPRESSION_ID_REGEX)
|
|
6701
|
+
updateAccessValueBody = external_exports.object({
|
|
6702
|
+
label: accessLabelSchema.optional(),
|
|
6703
|
+
retired: external_exports.boolean().optional()
|
|
6704
|
+
}).refine((body) => body.label !== void 0 || body.retired !== void 0, {
|
|
6705
|
+
message: "Nothing to change: pass label, retired, or both"
|
|
6806
6706
|
});
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
contactBookEmailUnsubscribeQuery = external_exports.object({ token: contactBookEmailUnsubscribeTokenSchema });
|
|
6810
|
-
orgListReferenceSchema = listName;
|
|
6811
|
-
}
|
|
6812
|
-
});
|
|
6813
|
-
|
|
6814
|
-
// ../../packages/core/dist/chunk-F5Z4VOPU.js
|
|
6815
|
-
var PERSON_ID_PATTERN, CONTACT_PERSON_ID_PATTERN, PERSON_DENY_PAGE_MAX, PERSON_ID_FORM_MESSAGE, userPersonIdSchema, personIdSchema, personParam, personLinkParam, deniedPersonParam, listDeniedPersonsQuery;
|
|
6816
|
-
var init_chunk_F5Z4VOPU = __esm({
|
|
6817
|
-
"../../packages/core/dist/chunk-F5Z4VOPU.js"() {
|
|
6818
|
-
"use strict";
|
|
6819
|
-
init_chunk_S5SVBLGT();
|
|
6820
|
-
init_zod();
|
|
6821
|
-
PERSON_ID_PATTERN = /^prs_[a-z2-7]{52}$/;
|
|
6822
|
-
CONTACT_PERSON_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
6823
|
-
PERSON_DENY_PAGE_MAX = 100;
|
|
6824
|
-
PERSON_ID_FORM_MESSAGE = "Must be a person id (prs_\u2026) or a contact id (a lowercase UUID)";
|
|
6825
|
-
userPersonIdSchema = external_exports.string().regex(PERSON_ID_PATTERN, { message: "Must be a person id (prs_\u2026)" });
|
|
6826
|
-
personIdSchema = external_exports.string().refine(
|
|
6827
|
-
(value) => PERSON_ID_PATTERN.test(value) || CONTACT_PERSON_ID_PATTERN.test(value),
|
|
6828
|
-
{ message: PERSON_ID_FORM_MESSAGE }
|
|
6829
|
-
);
|
|
6830
|
-
personParam = external_exports.object({
|
|
6831
|
-
personId: userPersonIdSchema
|
|
6707
|
+
setMemberAccessValuesBody = external_exports.object({
|
|
6708
|
+
values: heldAccessAssignmentSchema
|
|
6832
6709
|
});
|
|
6833
|
-
|
|
6834
|
-
|
|
6710
|
+
HUB_PERSON_KINDS = ["hub_admin", "hub_team_member", "hub_user"];
|
|
6711
|
+
ACCESS_PERSON_KINDS = ["org_member", ...HUB_PERSON_KINDS, "public"];
|
|
6712
|
+
setHubUserAccessValuesBody = external_exports.object({
|
|
6713
|
+
values: personlessAssignmentSchema("A hub user's values").refine((assignment) => !assignmentHasUnrestricted(assignment), {
|
|
6714
|
+
message: `A hub user's values never hold "${ACCESS_UNRESTRICTED}"`
|
|
6715
|
+
})
|
|
6835
6716
|
});
|
|
6836
|
-
|
|
6837
|
-
|
|
6717
|
+
setHubAccessValuesBody = external_exports.object({
|
|
6718
|
+
values: personlessAssignmentSchema("A hub's values and its public values")
|
|
6838
6719
|
});
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
limit: external_exports.coerce.number().int().min(1).max(PERSON_DENY_PAGE_MAX).default(50)
|
|
6720
|
+
setAgentAccessValuesBody = external_exports.object({
|
|
6721
|
+
values: heldAccessAssignmentSchema.nullable()
|
|
6842
6722
|
});
|
|
6843
6723
|
}
|
|
6844
6724
|
});
|
|
6845
6725
|
|
|
6846
|
-
// ../../packages/core/dist/chunk-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6726
|
+
// ../../packages/core/dist/chunk-WBTBXPD2.js
|
|
6727
|
+
function boundCustomerPartyIsValid(audience, parties, customer) {
|
|
6728
|
+
return audience !== REKOR_PERSON_AUDIENCE_STAFF && customer < parties.length && Array.isArray(parties[customer]);
|
|
6729
|
+
}
|
|
6730
|
+
function isEncodedBoundPerson(raw) {
|
|
6731
|
+
let parsed;
|
|
6732
|
+
try {
|
|
6733
|
+
parsed = JSON.parse(raw);
|
|
6734
|
+
} catch {
|
|
6735
|
+
return false;
|
|
6736
|
+
}
|
|
6737
|
+
return rekorBoundPersonSchema.safeParse(parsed).success;
|
|
6738
|
+
}
|
|
6739
|
+
var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, rekorToolsetToolsSchema, rekorPersonIdSchema, rekorPersonAudienceSchema, rekorBoundPersonSchema, rekorBoundAttestation, rekorResolvedToolsetSchema, REKOR_TOOL_KINDS_PARAM, REKOR_TOOL_KINDS_RESOLVE_SEARCH, resolvedRecordTypeSchema, reviewWritersSchema, sharedScopeSchema, resolvedFileToolSchema, rekorToolsetFileSchema, rekorToolsetFileUrlAnswerSchema, rekorToolsetFileListSchema, rekorToolsetFileGetSchema, rekorToolsetFilePutSchema, TOOLSET_CUSTOMER_FACING_REFUSAL_MARK, TOOLSET_CUSTOMER_FACING_REFUSAL;
|
|
6740
|
+
var init_chunk_WBTBXPD2 = __esm({
|
|
6741
|
+
"../../packages/core/dist/chunk-WBTBXPD2.js"() {
|
|
6850
6742
|
"use strict";
|
|
6743
|
+
init_chunk_ELIEEYPK();
|
|
6744
|
+
init_chunk_35OU33GJ();
|
|
6851
6745
|
init_zod();
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6746
|
+
TOOLSET_SLUG_PATTERN = /^[A-Za-z0-9_-]{1,128}$/;
|
|
6747
|
+
REKOR_STRUCTURAL_ID_PATTERN = TOOLSET_SLUG_PATTERN;
|
|
6748
|
+
baseEnvironmentSchema = external_exports.enum(["preview", "production"]);
|
|
6749
|
+
toolsetFileToolSchema = external_exports.object({
|
|
6750
|
+
file_type: external_exports.string().min(1),
|
|
6751
|
+
path_prefix: external_exports.string(),
|
|
6752
|
+
/** The entry's authored description of its tools (`description_override`), when it has one. */
|
|
6753
|
+
description: external_exports.string().min(1).optional(),
|
|
6754
|
+
tools: external_exports.object({
|
|
6755
|
+
list: external_exports.string().min(1).optional(),
|
|
6756
|
+
get: external_exports.string().min(1).optional(),
|
|
6757
|
+
put: external_exports.string().min(1).optional(),
|
|
6758
|
+
delete: external_exports.string().min(1).optional(),
|
|
6759
|
+
get_url: external_exports.string().min(1).optional(),
|
|
6760
|
+
put_url: external_exports.string().min(1).optional()
|
|
6761
|
+
})
|
|
6762
|
+
});
|
|
6763
|
+
toolsetSurfaceSchema = external_exports.object({
|
|
6764
|
+
/** Any record, composite, relationship or SQL Action tool: the toolset reaches records. */
|
|
6765
|
+
records: external_exports.boolean(),
|
|
6766
|
+
sql_query: external_exports.boolean(),
|
|
6767
|
+
batch: external_exports.boolean(),
|
|
6855
6768
|
/**
|
|
6856
|
-
*
|
|
6857
|
-
*
|
|
6858
|
-
*
|
|
6859
|
-
*
|
|
6769
|
+
* The toolset serves one customer per call (#5083 RK2): its every call names the customer it serves. Only an eval
|
|
6770
|
+
* run names one; every other call, an agent's (#5473 2b1) or a page's (2b2), names none, so it is refused it. The
|
|
6771
|
+
* data product reports no toolset as customer-scoped since it removed customer scope (#5473 2c), so a surface
|
|
6772
|
+
* recorded since reads `false`; one recorded before keeps `true` until its next tool sync or token save. Absent on
|
|
6773
|
+
* a surface recorded before it was, which reads as not scoped: its calls name no customer.
|
|
6774
|
+
*/
|
|
6775
|
+
customer_scoped: external_exports.boolean().optional(),
|
|
6776
|
+
/**
|
|
6777
|
+
* A key of the resolve this side neither describes nor classifies exposes something: a kind of tool
|
|
6778
|
+
* the data product added later, counted in `records`. The customer-facing rule never admits it, to
|
|
6779
|
+
* any holder, until it is classified here. Absent on a surface recorded before it was,
|
|
6780
|
+
* which reads as present.
|
|
6781
|
+
*/
|
|
6782
|
+
unclassified_tools: external_exports.boolean().optional(),
|
|
6783
|
+
/**
|
|
6784
|
+
* Any of its file tools writes: an operation other than `list`, `get` and `get_url` (`put`, `delete`,
|
|
6785
|
+
* `put_url`, or one the data product adds later), or an entry this side cannot read. Absent on a surface recorded
|
|
6786
|
+
* before it was, which the customer-facing rule reads as writing until the connection's next tool
|
|
6787
|
+
* sync or token save records it.
|
|
6788
|
+
*/
|
|
6789
|
+
file_writes: external_exports.boolean().optional(),
|
|
6790
|
+
/**
|
|
6791
|
+
* A record type the resolve's `record_types` carries names the toolset among its writers
|
|
6792
|
+
* (`x-review.writers`, #5083 RK4): the toolset writes the type's drafts and reads its every record,
|
|
6793
|
+
* drafts included. Those are the types its actions and composite record steps reach, and every
|
|
6794
|
+
* reviewed type it reaches otherwise: at a relationship tool's or a composite relationship step's
|
|
6795
|
+
* end, in a `batch` entry, or, through `sql_query`, all of them (decision 198). Or such a type's
|
|
6796
|
+
* declaration this side cannot read, or a resolve reaching records that carries no record types.
|
|
6797
|
+
* Absent on a surface recorded before it was, which the customer-facing rule reads as writing, for a
|
|
6798
|
+
* toolset reaching records, until the connection's next tool sync or token save records it.
|
|
6799
|
+
*/
|
|
6800
|
+
review_writes: external_exports.boolean().optional(),
|
|
6801
|
+
/**
|
|
6802
|
+
* Every record type the toolset reaches, at least one, is reviewed (`x-review`), holds no customer data
|
|
6803
|
+
* (`shared`), and does not name it among its writers: each call reads only that type's approved
|
|
6804
|
+
* records (#5083 decision 182, Q9). Never with a SQL Action, whose query reads its types' every
|
|
6805
|
+
* record, drafts included. Absent on a surface recorded before it was, which reads as false.
|
|
6806
|
+
*/
|
|
6807
|
+
approved_reads_only: external_exports.boolean().optional(),
|
|
6808
|
+
/**
|
|
6809
|
+
* The toolset's file tools. Absent when it has none, and on a surface recorded before they were.
|
|
6810
|
+
* A list this side cannot read is dropped rather than failing the binding, which every call and
|
|
6811
|
+
* the customer-facing rule read: the next tool sync records it again.
|
|
6860
6812
|
*/
|
|
6813
|
+
files: external_exports.array(toolsetFileToolSchema).optional().catch(void 0)
|
|
6814
|
+
});
|
|
6815
|
+
toolsetConnectionBindingSchema = external_exports.object({
|
|
6861
6816
|
base_id: external_exports.string().min(1),
|
|
6817
|
+
/** The slug the token was resolved against — `settings.toolset` at that write. */
|
|
6818
|
+
toolset: external_exports.string().min(1),
|
|
6819
|
+
/** The base's incarnation when the token was written; a bound attested call states it. */
|
|
6820
|
+
base_generation: external_exports.number().int().min(1),
|
|
6821
|
+
environment: baseEnvironmentSchema,
|
|
6822
|
+
surface: toolsetSurfaceSchema,
|
|
6862
6823
|
/**
|
|
6863
|
-
*
|
|
6864
|
-
*
|
|
6824
|
+
* The id of the token the binding was resolved from, as its resolve reports it; a bound attested
|
|
6825
|
+
* call names it (`REKOR_BOUND_TOKEN_HEADER`), so the data product refuses the binding once the token
|
|
6826
|
+
* is revoked or expires (owner decision 41). Absent on a binding recorded before the report carried
|
|
6827
|
+
* it: its calls name none until a token save, or a tool sync while the token still stands, records it.
|
|
6828
|
+
* One that does not read is dropped rather than failing the binding.
|
|
6865
6829
|
*/
|
|
6866
|
-
|
|
6867
|
-
/** Which pane refetches. `base` covers create/delete/promote/config changes. */
|
|
6868
|
-
scope: external_exports.enum(["records", "record_types", "files", "base"])
|
|
6830
|
+
token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
|
|
6869
6831
|
});
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
init_zod();
|
|
6879
|
-
invitePreviewQuery = external_exports.object({
|
|
6880
|
-
token: external_exports.string().min(1).max(2048)
|
|
6832
|
+
rekorToolsetToolsSchema = external_exports.object({
|
|
6833
|
+
data: external_exports.object({
|
|
6834
|
+
tools: external_exports.array(external_exports.object({
|
|
6835
|
+
name: external_exports.string(),
|
|
6836
|
+
description: external_exports.string().optional(),
|
|
6837
|
+
inputSchema: external_exports.record(external_exports.unknown()).optional()
|
|
6838
|
+
}))
|
|
6839
|
+
})
|
|
6881
6840
|
});
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6841
|
+
rekorPersonIdSchema = external_exports.string().max(REKOR_MAX_PERSON_ID_LENGTH).regex(REKOR_STRUCTURAL_ID_PATTERN);
|
|
6842
|
+
rekorPersonAudienceSchema = external_exports.enum([REKOR_PERSON_AUDIENCE_STAFF, REKOR_PERSON_AUDIENCE_CUSTOMER]);
|
|
6843
|
+
rekorBoundPersonSchema = external_exports.object({
|
|
6844
|
+
audience: rekorPersonAudienceSchema,
|
|
6845
|
+
parties: external_exports.array(external_exports.union([external_exports.array(rekorPersonIdSchema).max(REKOR_MAX_PERSON_IDS), external_exports.literal(REKOR_PERSON_ALL)])).max(REKOR_MAX_PERSON_PARTIES),
|
|
6846
|
+
agent_all: external_exports.boolean(),
|
|
6847
|
+
customer: external_exports.number().int().nonnegative().optional()
|
|
6848
|
+
}).strict().refine((person) => !person.agent_all || person.audience === REKOR_PERSON_AUDIENCE_STAFF, {
|
|
6849
|
+
message: `The agent's "*" applies only to a staff call`,
|
|
6850
|
+
path: ["agent_all"]
|
|
6851
|
+
}).refine((person) => person.customer === void 0 || boundCustomerPartyIsValid(person.audience, person.parties, person.customer), {
|
|
6852
|
+
message: "The customer party is a listed party of person ids, on a call that is not staff's",
|
|
6853
|
+
path: ["customer"]
|
|
6889
6854
|
});
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6855
|
+
rekorBoundAttestation = rekorAttestation.extend({
|
|
6856
|
+
[REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["token", "user"]),
|
|
6857
|
+
/** Trimmed and checked as the far side trims and checks it. */
|
|
6858
|
+
[REKOR_ACTOR_ID_HEADER]: external_exports.string().trim().min(1).max(REKOR_MAX_ACTOR_ID_LENGTH),
|
|
6859
|
+
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string().max(REKOR_MAX_ACTOR_LABEL_LENGTH),
|
|
6860
|
+
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.literal("0"),
|
|
6861
|
+
[REKOR_BOUND_BASE_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
|
|
6862
|
+
[REKOR_BOUND_TOOLSET_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
|
|
6863
|
+
/**
|
|
6864
|
+
* Decimal digits only, as the far side parses it, and at most 15 of them: its `Number()` reads
|
|
6865
|
+
* every such value back exactly, where a longer one may round or overflow to `Infinity` (a 400).
|
|
6866
|
+
*/
|
|
6867
|
+
[DATA_BASE_GENERATION_HEADER]: external_exports.string().regex(/^[1-9]\d{0,14}$/),
|
|
6868
|
+
/** The token the binding was resolved from, when the connection records it (owner decision 41). */
|
|
6869
|
+
[REKOR_BOUND_TOKEN_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional(),
|
|
6870
|
+
/**
|
|
6871
|
+
* The customer the call serves (#5083 RK2): a contact id, which the contact book mints as a UUID.
|
|
6872
|
+
* Every UUID is an id the far side reads back as the customer's external id.
|
|
6873
|
+
*/
|
|
6874
|
+
[REKOR_BOUND_CUSTOMER_HEADER]: external_exports.string().uuid().optional(),
|
|
6875
|
+
/**
|
|
6876
|
+
* The access set the call carries (#5358): an access set's header text (`encodeAccessSet`), within
|
|
6877
|
+
* the far side's header cap. Tool calls carry one; the config reads (resolve, tool definitions) do not.
|
|
6878
|
+
*/
|
|
6879
|
+
[REKOR_BOUND_ACCESS_HEADER]: external_exports.string().max(REKOR_MAX_ACCESS_HEADER_LENGTH).refine(isEncodedAccessSet, {
|
|
6880
|
+
message: "Not an access set"
|
|
6881
|
+
}).optional(),
|
|
6882
|
+
/**
|
|
6883
|
+
* Where the access set applies (#5358), when only on the call's customer's own records: its one value.
|
|
6884
|
+
* Sent only beside the set, which the far side holds it to (the refinement below).
|
|
6885
|
+
*/
|
|
6886
|
+
[REKOR_BOUND_ACCESS_SCOPE_HEADER]: external_exports.literal(REKOR_ACCESS_SCOPE_CUSTOMER).optional(),
|
|
6887
|
+
/**
|
|
6888
|
+
* The hub whose page makes the call (#5333): sent on every call of the page bridge, and on no other.
|
|
6889
|
+
* A hub id, read by the far side under the same structural charset as the other bound ids.
|
|
6890
|
+
*/
|
|
6891
|
+
[REKOR_BOUND_PAGE_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional(),
|
|
6892
|
+
/**
|
|
6893
|
+
* The persons the call is for (#5473 §9): their header text (`encodeBoundPerson`), within the far side's
|
|
6894
|
+
* header cap. Every tool call carries it beside its access set (`apps/backend/src/rekor/access-set.ts`); the
|
|
6895
|
+
* config reads do not. The far side holds a call's reads and writes of a person-ruled record type to its parties,
|
|
6896
|
+
* whatever its audience, and a customer-facing call to its audience gate (#5473 2a).
|
|
6897
|
+
*/
|
|
6898
|
+
[REKOR_BOUND_PERSON_HEADER]: external_exports.string().max(REKOR_MAX_PERSON_HEADER_LENGTH).refine(isEncodedBoundPerson, {
|
|
6899
|
+
message: "Not the persons a bound call is for"
|
|
6900
|
+
}).optional()
|
|
6901
|
+
}).superRefine((bag, ctx) => {
|
|
6902
|
+
if (bag[REKOR_BOUND_ACCESS_SCOPE_HEADER] !== void 0 && bag[REKOR_BOUND_ACCESS_HEADER] === void 0) {
|
|
6903
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [REKOR_BOUND_ACCESS_SCOPE_HEADER], message: "Accepted only beside an access set" });
|
|
6904
|
+
}
|
|
6905
|
+
if (bag[REKOR_ACTOR_TYPE_HEADER] === "user" && (bag[REKOR_BOUND_PAGE_HEADER] === void 0 || bag[REKOR_BOUND_CUSTOMER_HEADER] !== void 0)) {
|
|
6906
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [REKOR_ACTOR_TYPE_HEADER], message: "A person is attested only on a team page's call" });
|
|
6907
|
+
}
|
|
6896
6908
|
});
|
|
6897
|
-
|
|
6898
|
-
|
|
6909
|
+
rekorResolvedToolsetSchema = external_exports.object({
|
|
6910
|
+
data: external_exports.object({
|
|
6911
|
+
base_id: external_exports.string().min(1),
|
|
6912
|
+
environment: baseEnvironmentSchema,
|
|
6913
|
+
base_generation: external_exports.number().int().min(1),
|
|
6914
|
+
/**
|
|
6915
|
+
* The calling token's binding, or null for a token bound to none. A bound token can call only
|
|
6916
|
+
* its toolset's tools, which is what a toolset connection stores (#5083 decision 14). Its org
|
|
6917
|
+
* is the token's own: base ids are unique only per org, so the base id alone does not say
|
|
6918
|
+
* which base the token reaches.
|
|
6919
|
+
*/
|
|
6920
|
+
toolset_binding: external_exports.object({
|
|
6921
|
+
org_id: external_exports.string().optional(),
|
|
6922
|
+
base_id: external_exports.string(),
|
|
6923
|
+
toolset_id: external_exports.string(),
|
|
6924
|
+
/**
|
|
6925
|
+
* The token's own id, which a bound call names (`REKOR_BOUND_TOKEN_HEADER`); absent when the
|
|
6926
|
+
* caller has none (owner decision 41), and dropped when it is not an id the far side reads back.
|
|
6927
|
+
*/
|
|
6928
|
+
token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
|
|
6929
|
+
}).nullable().optional(),
|
|
6930
|
+
actions: external_exports.array(external_exports.unknown()).optional(),
|
|
6931
|
+
composites: external_exports.array(external_exports.unknown()).optional(),
|
|
6932
|
+
relationships: external_exports.array(external_exports.unknown()).optional(),
|
|
6933
|
+
/**
|
|
6934
|
+
* The toolset's SQL Actions (#5311): each a fixed, read-only query over the record types it
|
|
6935
|
+
* declares, which the resolve also carries in `record_types` and `record_type_scopes`.
|
|
6936
|
+
*/
|
|
6937
|
+
sql_actions: external_exports.array(external_exports.unknown()).optional(),
|
|
6938
|
+
files: external_exports.array(external_exports.unknown()).optional(),
|
|
6939
|
+
batch: external_exports.object({ enabled: external_exports.boolean().optional() }).passthrough().nullable().optional(),
|
|
6940
|
+
sql_query: external_exports.boolean().optional(),
|
|
6941
|
+
/**
|
|
6942
|
+
* The toolset serves one customer per call (#5083 RK2). Absent reads as not scoped. Always `false` since the data
|
|
6943
|
+
* product removed customer scope (#5473 2c).
|
|
6944
|
+
*/
|
|
6945
|
+
customer_scope: external_exports.boolean().optional(),
|
|
6946
|
+
/**
|
|
6947
|
+
* Record types the toolset reaches, by id, as the data product stores them (`json_schema`
|
|
6948
|
+
* included): each one its actions, composite record steps and SQL Actions reach, and each reviewed one it
|
|
6949
|
+
* reaches otherwise (relationship ends, `batch` entries, every one through `sql_query`; #5083
|
|
6950
|
+
* decision 198). An unreviewed type it reaches only otherwise is not here. A reviewed type's
|
|
6951
|
+
* `x-review` names its writers (RK4).
|
|
6952
|
+
*/
|
|
6953
|
+
record_types: external_exports.record(external_exports.unknown()).optional(),
|
|
6954
|
+
/**
|
|
6955
|
+
* What each record type the toolset's actions, composite steps, SQL Actions and relationship tools reach is to a
|
|
6956
|
+
* customer scope (`{ role }`, or null), by id (#5083 RK2). A reviewed type `record_types` carries
|
|
6957
|
+
* because only a `batch` entry or `sql_query` reaches it has none. Since the data product removed customer
|
|
6958
|
+
* scope (#5473 2c), `{ role: 'shared' }` is a type whose `x-access` declares `{ shared: true }`.
|
|
6959
|
+
*/
|
|
6960
|
+
record_type_scopes: external_exports.record(external_exports.unknown()).optional(),
|
|
6961
|
+
/**
|
|
6962
|
+
* The kind of each tool the toolset publishes, by the name it is published under (wayai#5333 decision
|
|
6963
|
+
* 6), sent only to a caller that asks (`REKOR_TOOL_KINDS_RESOLVE_SEARCH`). Read by `rekorToolKindLookup`;
|
|
6964
|
+
* a map this side cannot read is dropped, so every tool reads as a write.
|
|
6965
|
+
*/
|
|
6966
|
+
tool_kinds: external_exports.record(external_exports.string()).optional().catch(void 0)
|
|
6967
|
+
}).passthrough()
|
|
6968
|
+
});
|
|
6969
|
+
REKOR_TOOL_KINDS_PARAM = "tool_kinds";
|
|
6970
|
+
REKOR_TOOL_KINDS_RESOLVE_SEARCH = new URLSearchParams({ [REKOR_TOOL_KINDS_PARAM]: "true" }).toString();
|
|
6971
|
+
resolvedRecordTypeSchema = external_exports.object({ json_schema: external_exports.record(external_exports.unknown()) });
|
|
6972
|
+
reviewWritersSchema = external_exports.object({ writers: external_exports.array(external_exports.string()).optional() });
|
|
6973
|
+
sharedScopeSchema = external_exports.object({ role: external_exports.literal("shared") });
|
|
6974
|
+
resolvedFileToolSchema = external_exports.object({
|
|
6975
|
+
file_type: external_exports.string().min(1),
|
|
6976
|
+
path_prefix: external_exports.string().nullish(),
|
|
6977
|
+
operations: external_exports.array(external_exports.unknown()),
|
|
6978
|
+
name: external_exports.unknown().optional(),
|
|
6979
|
+
names: external_exports.unknown().optional(),
|
|
6980
|
+
description_override: external_exports.unknown().optional()
|
|
6981
|
+
});
|
|
6982
|
+
rekorToolsetFileSchema = external_exports.object({
|
|
6983
|
+
path: external_exports.string().min(1),
|
|
6984
|
+
version: external_exports.number().int().min(1),
|
|
6985
|
+
content_type: external_exports.string().optional()
|
|
6986
|
+
}).passthrough();
|
|
6987
|
+
rekorToolsetFileUrlAnswerSchema = external_exports.object({
|
|
6988
|
+
data: external_exports.object({
|
|
6989
|
+
url: external_exports.string(),
|
|
6990
|
+
expires_at: external_exports.string(),
|
|
6991
|
+
path: external_exports.string(),
|
|
6992
|
+
content_sha256: external_exports.string()
|
|
6993
|
+
}).passthrough()
|
|
6994
|
+
});
|
|
6995
|
+
rekorToolsetFileListSchema = external_exports.object({ data: external_exports.array(rekorToolsetFileSchema) });
|
|
6996
|
+
rekorToolsetFileGetSchema = external_exports.object({
|
|
6997
|
+
data: rekorToolsetFileSchema.extend({
|
|
6998
|
+
content: external_exports.string(),
|
|
6999
|
+
encoding: external_exports.enum(["utf-8", "base64"])
|
|
7000
|
+
})
|
|
7001
|
+
});
|
|
7002
|
+
rekorToolsetFilePutSchema = external_exports.object({ data: rekorToolsetFileSchema });
|
|
7003
|
+
TOOLSET_CUSTOMER_FACING_REFUSAL_MARK = "A customer-facing agent (a pilot, pilot specialist or pilot advisor) can use a toolset only when it exposes files alone: no record, composite or relationship tools, and neither sql_query nor batch";
|
|
7004
|
+
TOOLSET_CUSTOMER_FACING_REFUSAL = `${TOOLSET_CUSTOMER_FACING_REFUSAL_MARK}, nor a file put, delete or put_url, nor a write of a reviewed record type, nor a kind of tool WayAI does not classify. Its record, composite, relationship and SQL Action tools are admitted to a customer-facing agent and a customer page, since the data product holds each of their calls to the record types that declare person rules or shared access`;
|
|
6899
7005
|
}
|
|
6900
7006
|
});
|
|
6901
7007
|
|
|
6902
|
-
// ../../packages/core/dist/chunk-
|
|
6903
|
-
var
|
|
6904
|
-
var
|
|
6905
|
-
"../../packages/core/dist/chunk-
|
|
7008
|
+
// ../../packages/core/dist/chunk-A7TMHX3E.js
|
|
7009
|
+
var TOOLSET_ANSWER_PERSON_PARTIES, toolsetAnswerPersonSchema, toolsetAnswerPersonsSchema;
|
|
7010
|
+
var init_chunk_A7TMHX3E = __esm({
|
|
7011
|
+
"../../packages/core/dist/chunk-A7TMHX3E.js"() {
|
|
6906
7012
|
"use strict";
|
|
7013
|
+
init_chunk_WBTBXPD2();
|
|
7014
|
+
init_chunk_35OU33GJ();
|
|
6907
7015
|
init_zod();
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
7016
|
+
TOOLSET_ANSWER_PERSON_PARTIES = ["requester", "originator", "initiator", "delegator"];
|
|
7017
|
+
toolsetAnswerPersonSchema = external_exports.object({
|
|
7018
|
+
party: external_exports.enum(TOOLSET_ANSWER_PERSON_PARTIES),
|
|
7019
|
+
person_id: rekorPersonIdSchema
|
|
7020
|
+
}).strict();
|
|
7021
|
+
toolsetAnswerPersonsSchema = external_exports.array(toolsetAnswerPersonSchema).min(1).max(REKOR_MAX_PERSON_PARTIES);
|
|
6913
7022
|
}
|
|
6914
7023
|
});
|
|
6915
7024
|
|
|
6916
|
-
// ../../packages/core/dist/chunk-
|
|
6917
|
-
var
|
|
6918
|
-
var
|
|
6919
|
-
"../../packages/core/dist/chunk-
|
|
7025
|
+
// ../../packages/core/dist/chunk-ZVXO3XL6.js
|
|
7026
|
+
var PEOPLE_CONTACT_PAGE_MAX, PEOPLE_CONTACT_PAGE_DEFAULT, PEOPLE_CONTACT_EMAIL_MAX_LENGTH, peopleUserIdSchema, peopleInviteEmailSchema, peopleContactInviteBody, peopleContactInviteIdParam, peopleContactUserIdParam, peopleContactBlockBody, peopleContactPageQuery, peopleOutgoingInviteSchema, peopleContactPersonSchema, peopleContactSchema, peopleIncomingInviteSchema, peopleBlockedUserSchema;
|
|
7027
|
+
var init_chunk_ZVXO3XL6 = __esm({
|
|
7028
|
+
"../../packages/core/dist/chunk-ZVXO3XL6.js"() {
|
|
6920
7029
|
"use strict";
|
|
7030
|
+
init_chunk_HZ6CADSY();
|
|
6921
7031
|
init_zod();
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
7032
|
+
PEOPLE_CONTACT_PAGE_MAX = 100;
|
|
7033
|
+
PEOPLE_CONTACT_PAGE_DEFAULT = 50;
|
|
7034
|
+
PEOPLE_CONTACT_EMAIL_MAX_LENGTH = 254;
|
|
7035
|
+
peopleUserIdSchema = external_exports.string().max(64).regex(USER_ID_REGEX, "must be a user id");
|
|
7036
|
+
peopleInviteEmailSchema = external_exports.string().trim().max(PEOPLE_CONTACT_EMAIL_MAX_LENGTH).email();
|
|
7037
|
+
peopleContactInviteBody = external_exports.object({
|
|
7038
|
+
email: peopleInviteEmailSchema
|
|
7039
|
+
}).strict();
|
|
7040
|
+
peopleContactInviteIdParam = external_exports.object({ inviteId: uuidSchema });
|
|
7041
|
+
peopleContactUserIdParam = external_exports.object({ userId: peopleUserIdSchema });
|
|
7042
|
+
peopleContactBlockBody = external_exports.object({ user_id: peopleUserIdSchema, thread_id: uuidSchema.optional(), community_id: uuidSchema.optional() }).strict().refine((body) => body.thread_id === void 0 || body.community_id === void 0, {
|
|
7043
|
+
message: "Name a thread or a community, not both",
|
|
7044
|
+
path: ["community_id"]
|
|
6932
7045
|
});
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
7046
|
+
peopleContactPageQuery = external_exports.object({
|
|
7047
|
+
cursor: external_exports.string().min(1).max(256).optional(),
|
|
7048
|
+
limit: external_exports.coerce.number().int().min(1).max(PEOPLE_CONTACT_PAGE_MAX).default(PEOPLE_CONTACT_PAGE_DEFAULT)
|
|
6936
7049
|
});
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
}).
|
|
7050
|
+
peopleOutgoingInviteSchema = external_exports.object({
|
|
7051
|
+
invite_id: uuidSchema,
|
|
7052
|
+
email: external_exports.string(),
|
|
7053
|
+
status: external_exports.literal("sent"),
|
|
7054
|
+
created_at: timestampSchema,
|
|
7055
|
+
expires_at: timestampSchema
|
|
7056
|
+
}).strict();
|
|
7057
|
+
peopleContactPersonSchema = external_exports.object({
|
|
7058
|
+
user_id: peopleUserIdSchema,
|
|
7059
|
+
display_name: external_exports.string().nullable(),
|
|
7060
|
+
email: external_exports.string().nullable()
|
|
7061
|
+
}).strict();
|
|
7062
|
+
peopleContactSchema = peopleContactPersonSchema.extend({ contact_since: timestampSchema, thread_id: uuidSchema }).strict();
|
|
7063
|
+
peopleIncomingInviteSchema = external_exports.object({
|
|
7064
|
+
invite_id: uuidSchema,
|
|
7065
|
+
inviter: peopleContactPersonSchema,
|
|
7066
|
+
created_at: timestampSchema,
|
|
7067
|
+
expires_at: timestampSchema
|
|
7068
|
+
}).strict();
|
|
7069
|
+
peopleBlockedUserSchema = peopleContactPersonSchema.extend({ blocked_at: timestampSchema, deleted_user: external_exports.boolean() }).strict();
|
|
6950
7070
|
}
|
|
6951
7071
|
});
|
|
6952
7072
|
|
|
6953
|
-
// ../../packages/core/dist/chunk-
|
|
6954
|
-
var
|
|
6955
|
-
var
|
|
6956
|
-
"../../packages/core/dist/chunk-
|
|
7073
|
+
// ../../packages/core/dist/chunk-ZXK6N2HN.js
|
|
7074
|
+
var PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, PEOPLE_SUSPENDED_REASON, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody;
|
|
7075
|
+
var init_chunk_ZXK6N2HN = __esm({
|
|
7076
|
+
"../../packages/core/dist/chunk-ZXK6N2HN.js"() {
|
|
6957
7077
|
"use strict";
|
|
7078
|
+
init_chunk_ZVXO3XL6();
|
|
7079
|
+
init_chunk_HZ6CADSY();
|
|
6958
7080
|
init_zod();
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
ends_at: external_exports.string().datetime().optional()
|
|
6972
|
-
});
|
|
6973
|
-
updateNoticeBody = external_exports.object({
|
|
6974
|
-
severity: noticeSeveritySchema.optional(),
|
|
6975
|
-
scope: noticeScopeSchema.optional(),
|
|
6976
|
-
title: external_exports.string().trim().min(1).max(200).optional(),
|
|
6977
|
-
body: external_exports.string().max(2e3).nullable().optional(),
|
|
6978
|
-
link: noticeLinkSchema.nullable().optional(),
|
|
6979
|
-
starts_at: external_exports.string().datetime().optional(),
|
|
6980
|
-
ends_at: external_exports.string().datetime().nullable().optional()
|
|
6981
|
-
}).refine((b) => Object.keys(b).length > 0, { message: "at least one field must be provided" });
|
|
6982
|
-
listNoticesQuery = external_exports.object({
|
|
6983
|
-
status: noticeStatusSchema.optional(),
|
|
6984
|
-
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
6985
|
-
offset: external_exports.coerce.number().int().min(0).optional()
|
|
7081
|
+
PEOPLE_MODERATION_NOTE_MAX_LENGTH = 500;
|
|
7082
|
+
ADMIN_PEOPLE_REPORTS_PAGE_MAX = 100;
|
|
7083
|
+
ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT = 50;
|
|
7084
|
+
PEOPLE_SUSPENDED_REASON = "suspended";
|
|
7085
|
+
peopleModerationActionSchema = external_exports.enum(["remove_message", "suspend", "unsuspend", "dismiss"]);
|
|
7086
|
+
moderationNoteSchema = optionalTrimmedText(PEOPLE_MODERATION_NOTE_MAX_LENGTH);
|
|
7087
|
+
adminPeopleReportListQuery = external_exports.object({
|
|
7088
|
+
pending: external_exports.enum(["true", "false"]).optional().transform((value) => value === "true"),
|
|
7089
|
+
/** Lower bound on `created_at`. */
|
|
7090
|
+
since: timestampSchema.optional(),
|
|
7091
|
+
limit: external_exports.coerce.number().int().min(1).max(ADMIN_PEOPLE_REPORTS_PAGE_MAX).default(ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT),
|
|
7092
|
+
offset: external_exports.coerce.number().int().min(0).default(0)
|
|
6986
7093
|
});
|
|
6987
|
-
|
|
7094
|
+
adminPeopleReportIdParam = external_exports.object({ reportId: uuidSchema });
|
|
7095
|
+
adminPeopleMessageRemovalBody = external_exports.object({ report_id: uuidSchema, message_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
|
|
7096
|
+
adminPeopleSuspendBody = external_exports.object({ report_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
|
|
7097
|
+
adminPeopleNoteBody = external_exports.object({ note: moderationNoteSchema }).strict();
|
|
6988
7098
|
}
|
|
6989
7099
|
});
|
|
6990
7100
|
|
|
6991
|
-
// ../../packages/core/dist/chunk-
|
|
6992
|
-
var
|
|
6993
|
-
var
|
|
6994
|
-
"../../packages/core/dist/chunk-
|
|
7101
|
+
// ../../packages/core/dist/chunk-Y7CFCYX4.js
|
|
7102
|
+
var PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody;
|
|
7103
|
+
var init_chunk_Y7CFCYX4 = __esm({
|
|
7104
|
+
"../../packages/core/dist/chunk-Y7CFCYX4.js"() {
|
|
6995
7105
|
"use strict";
|
|
7106
|
+
init_chunk_ZVXO3XL6();
|
|
7107
|
+
init_chunk_HZ6CADSY();
|
|
6996
7108
|
init_zod();
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
rekorAttestation = external_exports.object({
|
|
7015
|
-
[REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["user", "token"]),
|
|
7016
|
-
[REKOR_ACTOR_ID_HEADER]: external_exports.string().min(1),
|
|
7017
|
-
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string(),
|
|
7018
|
-
[REKOR_ACTOR_ORG_HEADER]: external_exports.string().uuid(),
|
|
7019
|
-
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.enum(["0", "1"]),
|
|
7020
|
-
[REKOR_CLIENT_HEADER]: rekorClientSchema,
|
|
7021
|
-
[REKOR_TOOL_ID_HEADER]: rekorToolIdSchema.optional()
|
|
7022
|
-
});
|
|
7023
|
-
REQUIRED_REKOR_ATTESTATION_HEADERS = Object.entries(rekorAttestation.shape).filter(([, field]) => !field.isOptional()).map(([header]) => header);
|
|
7024
|
-
REKOR_BOUND_BASE_HEADER = "X-Rekor-Bound-Base";
|
|
7025
|
-
REKOR_BOUND_TOOLSET_HEADER = "X-Rekor-Bound-Toolset";
|
|
7026
|
-
REKOR_BOUND_TOKEN_HEADER = "X-Rekor-Bound-Token";
|
|
7027
|
-
REKOR_BOUND_CUSTOMER_HEADER = "X-Rekor-Bound-Customer";
|
|
7028
|
-
REKOR_BOUND_ACCESS_HEADER = "X-Rekor-Bound-Access";
|
|
7029
|
-
REKOR_BOUND_ACCESS_SCOPE_HEADER = "X-Rekor-Bound-Access-Scope";
|
|
7030
|
-
REKOR_BOUND_PAGE_HEADER = "X-Rekor-Bound-Page";
|
|
7031
|
-
REKOR_BOUND_PERSON_HEADER = "X-Rekor-Bound-Person";
|
|
7032
|
-
REKOR_PERSON_AUDIENCE_STAFF = "staff";
|
|
7033
|
-
REKOR_PERSON_AUDIENCE_CUSTOMER = "customer";
|
|
7034
|
-
REKOR_PERSON_ALL = "*";
|
|
7035
|
-
REKOR_ACCESS_SCOPE_CUSTOMER = "customer";
|
|
7036
|
-
DATA_BASE_GENERATION_HEADER = "X-Data-Base-Generation";
|
|
7037
|
-
REKOR_MAX_ACTOR_ID_LENGTH = 256;
|
|
7038
|
-
REKOR_MAX_ACTOR_LABEL_LENGTH = 256;
|
|
7039
|
-
REKOR_MAX_ACCESS_DIMENSIONS = 8;
|
|
7040
|
-
REKOR_MAX_ACCESS_VALUES = 100;
|
|
7041
|
-
REKOR_MAX_ACCESS_ID_LENGTH = 32;
|
|
7042
|
-
REKOR_MAX_ACCESS_HEADER_LENGTH = 65536;
|
|
7043
|
-
REKOR_MAX_PERSON_PARTIES = 16;
|
|
7044
|
-
REKOR_MAX_PERSON_IDS = 16;
|
|
7045
|
-
REKOR_MAX_PERSON_ID_LENGTH = 64;
|
|
7046
|
-
REKOR_MAX_PERSON_HEADER_LENGTH = 32768;
|
|
7109
|
+
PEOPLE_REPORT_DETAILS_MAX_LENGTH = 500;
|
|
7110
|
+
peopleReportReasonSchema = external_exports.enum(["spam", "harassment", "hate", "sexual", "violence", "other"]);
|
|
7111
|
+
reportDetailsSchema = optionalTrimmedText(PEOPLE_REPORT_DETAILS_MAX_LENGTH);
|
|
7112
|
+
reportFields = { reason: peopleReportReasonSchema, details: reportDetailsSchema };
|
|
7113
|
+
peopleReportBody = external_exports.discriminatedUnion("target", [
|
|
7114
|
+
external_exports.object({ target: external_exports.literal("message"), thread_id: uuidSchema, message_id: uuidSchema, ...reportFields }).strict(),
|
|
7115
|
+
external_exports.object({ target: external_exports.literal("thread"), thread_id: uuidSchema, ...reportFields }).strict(),
|
|
7116
|
+
external_exports.object({ target: external_exports.literal("user"), user_id: peopleUserIdSchema, thread_id: uuidSchema.optional(), ...reportFields }).strict(),
|
|
7117
|
+
external_exports.object({
|
|
7118
|
+
target: external_exports.literal("community_message"),
|
|
7119
|
+
community_id: uuidSchema,
|
|
7120
|
+
room_id: uuidSchema,
|
|
7121
|
+
message_id: uuidSchema,
|
|
7122
|
+
...reportFields
|
|
7123
|
+
}).strict(),
|
|
7124
|
+
external_exports.object({ target: external_exports.literal("community_member"), community_id: uuidSchema, user_id: peopleUserIdSchema, ...reportFields }).strict()
|
|
7125
|
+
]);
|
|
7047
7126
|
}
|
|
7048
7127
|
});
|
|
7049
7128
|
|
|
7050
|
-
// ../../packages/core/dist/chunk-
|
|
7051
|
-
function
|
|
7052
|
-
|
|
7053
|
-
}
|
|
7054
|
-
|
|
7055
|
-
return assignment != null && Object.hasOwn(assignment, PERSON_ACCESS_KEY);
|
|
7056
|
-
}
|
|
7057
|
-
function withoutPersonAccess(assignment) {
|
|
7058
|
-
if (!holdsPersonAccess(assignment)) return assignment;
|
|
7059
|
-
const dimensions = {};
|
|
7060
|
-
for (const [key, lists] of Object.entries(assignment)) if (key !== PERSON_ACCESS_KEY) dimensions[key] = lists;
|
|
7061
|
-
return dimensions;
|
|
7062
|
-
}
|
|
7063
|
-
function personAccessRefusal(holders) {
|
|
7064
|
-
return `${holders} never hold "${PERSON_ACCESS_KEY}"`;
|
|
7065
|
-
}
|
|
7066
|
-
function personlessAssignmentSchema(holders) {
|
|
7067
|
-
return heldAccessAssignmentSchema.refine((assignment) => !holdsPersonAccess(assignment), {
|
|
7068
|
-
message: personAccessRefusal(holders),
|
|
7069
|
-
path: [PERSON_ACCESS_KEY]
|
|
7070
|
-
});
|
|
7071
|
-
}
|
|
7072
|
-
function writeWithinRead(assignment) {
|
|
7073
|
-
return Object.values(assignment).every(({ read, write }) => read.includes(ACCESS_UNRESTRICTED) || !write.includes(ACCESS_UNRESTRICTED) && write.every((id) => read.includes(id)));
|
|
7129
|
+
// ../../packages/core/dist/chunk-S5SVBLGT.js
|
|
7130
|
+
function normalizeContactPhone(raw) {
|
|
7131
|
+
const compact = raw.trim().replace(/[\s\-.()]/g, "");
|
|
7132
|
+
const withPlus = compact.startsWith("00") ? `+${compact.slice(2)}` : compact;
|
|
7133
|
+
return /^\+[1-9]\d{7,14}$/.test(withPlus) ? withPlus : null;
|
|
7074
7134
|
}
|
|
7075
|
-
function
|
|
7076
|
-
|
|
7077
|
-
try {
|
|
7078
|
-
parsed = JSON.parse(raw);
|
|
7079
|
-
} catch {
|
|
7080
|
-
return false;
|
|
7081
|
-
}
|
|
7082
|
-
return accessSetSchema.safeParse(parsed).success;
|
|
7135
|
+
function normalizeContactLabel(raw) {
|
|
7136
|
+
return raw.trim().replace(/\s+/g, " ").toLowerCase();
|
|
7083
7137
|
}
|
|
7084
|
-
function
|
|
7085
|
-
return
|
|
7138
|
+
function importRowLabels(row, batchLabels) {
|
|
7139
|
+
return [.../* @__PURE__ */ new Set([...row.labels ?? [], ...batchLabels ?? []])];
|
|
7086
7140
|
}
|
|
7087
|
-
var
|
|
7088
|
-
var
|
|
7089
|
-
"../../packages/core/dist/chunk-
|
|
7141
|
+
var CONTACT_ENVIRONMENTS, CONTACT_NAME_MAX, CONTACT_EMAIL_MAX, CONTACT_PHONE_INPUT_MAX, CONTACT_INSTAGRAM_SID_MAX, CONTACT_METADATA_MAX_BYTES, CONTACT_LABEL_MAX, CONTACT_LABELS_MAX, CONTACT_SCOPE_TAGS_MAX, CONTACT_PAGE_MAX, CONTACT_IMPORT_BATCH_MAX, CONTACT_SEARCH_MAX, CONTACT_LIST_NAME_MAX, CONTACT_LIST_NAME_REGEX, CONTACT_LIST_DESCRIPTION_MAX, CONTACT_LIST_FILTER_MAX, CONTACT_LIST_PINS_PER_REQUEST_MAX, SUPPRESSION_SCOPES, SUPPRESSION_ID_REGEX, contactName, contactPhone, contactEmail, contactInstagramSid, contactLabel, contactLabels, contactMetadata, scopeTagIds, contactVisibilitySchema, hasIdentity, IDENTITY_REQUIRED, contactBookOrgQuery, contactBookContactParam, contactBookListParam, contactBookHubParam, contactBookPageQuery, listContactBookContactsQuery, listHubContactBookContactsQuery, contactBookLinkCandidatesQuery, listContactBookListMembersQuery, contactRowFields, createContactBookContactBody, updateContactBookContactBody, contactImportRowSchema, importContactBookContactsBody, linkContactBookContactBody, listName, contactListFilterSchema, createContactBookListBody, updateContactBookListBody, updateContactBookListPinsBody, suppressionIdentitySchema, createContactBookSuppressionBody, contactBookSuppressionParam, listContactBookSuppressionsQuery, contactBookEmailUnsubscribeTokenSchema, contactBookEmailUnsubscribeQuery, orgListReferenceSchema;
|
|
7142
|
+
var init_chunk_S5SVBLGT = __esm({
|
|
7143
|
+
"../../packages/core/dist/chunk-S5SVBLGT.js"() {
|
|
7090
7144
|
"use strict";
|
|
7091
|
-
init_chunk_L55XSECQ();
|
|
7092
|
-
init_chunk_HZ6CADSY();
|
|
7093
|
-
init_chunk_YROEDMVZ();
|
|
7094
7145
|
init_zod();
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7146
|
+
CONTACT_ENVIRONMENTS = ["production", "preview", "all"];
|
|
7147
|
+
CONTACT_NAME_MAX = 200;
|
|
7148
|
+
CONTACT_EMAIL_MAX = 320;
|
|
7149
|
+
CONTACT_PHONE_INPUT_MAX = 40;
|
|
7150
|
+
CONTACT_INSTAGRAM_SID_MAX = 64;
|
|
7151
|
+
CONTACT_METADATA_MAX_BYTES = 4096;
|
|
7152
|
+
CONTACT_LABEL_MAX = 64;
|
|
7153
|
+
CONTACT_LABELS_MAX = 20;
|
|
7154
|
+
CONTACT_SCOPE_TAGS_MAX = 20;
|
|
7155
|
+
CONTACT_PAGE_MAX = 100;
|
|
7156
|
+
CONTACT_IMPORT_BATCH_MAX = 500;
|
|
7157
|
+
CONTACT_SEARCH_MAX = 100;
|
|
7158
|
+
CONTACT_LIST_NAME_MAX = 64;
|
|
7159
|
+
CONTACT_LIST_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
7160
|
+
CONTACT_LIST_DESCRIPTION_MAX = 1e3;
|
|
7161
|
+
CONTACT_LIST_FILTER_MAX = 20;
|
|
7162
|
+
CONTACT_LIST_PINS_PER_REQUEST_MAX = 100;
|
|
7163
|
+
SUPPRESSION_SCOPES = ["all", "marketing"];
|
|
7164
|
+
SUPPRESSION_ID_REGEX = /^[0-9a-f]{64}$/;
|
|
7165
|
+
contactName = external_exports.string().trim().min(1).max(CONTACT_NAME_MAX);
|
|
7166
|
+
contactPhone = external_exports.string().max(CONTACT_PHONE_INPUT_MAX).transform((raw, ctx) => {
|
|
7167
|
+
const phone = normalizeContactPhone(raw);
|
|
7168
|
+
if (phone === null) {
|
|
7169
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Phone must be an international number, e.g. +5511999999999" });
|
|
7170
|
+
return external_exports.NEVER;
|
|
7171
|
+
}
|
|
7172
|
+
return phone;
|
|
7109
7173
|
});
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7174
|
+
contactEmail = external_exports.string().trim().toLowerCase().max(CONTACT_EMAIL_MAX).email();
|
|
7175
|
+
contactInstagramSid = external_exports.string().trim().min(1).max(CONTACT_INSTAGRAM_SID_MAX);
|
|
7176
|
+
contactLabel = external_exports.string().max(CONTACT_LABEL_MAX).transform(normalizeContactLabel).refine((label2) => label2.length > 0, "A label cannot be empty").refine((label2) => !label2.includes(","), "A label cannot contain a comma");
|
|
7177
|
+
contactLabels = external_exports.array(contactLabel).max(CONTACT_LABELS_MAX).transform((labels) => [...new Set(labels)]);
|
|
7178
|
+
contactMetadata = external_exports.record(external_exports.unknown()).refine(
|
|
7179
|
+
(metadata) => new TextEncoder().encode(JSON.stringify(metadata)).length <= CONTACT_METADATA_MAX_BYTES,
|
|
7180
|
+
`Metadata must serialize to at most ${CONTACT_METADATA_MAX_BYTES} bytes`
|
|
7114
7181
|
);
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: `An assignment names at most ${MAX_ACCESS_DIMENSIONS_PER_ORG} dimensions` });
|
|
7125
|
-
}
|
|
7182
|
+
scopeTagIds = external_exports.array(external_exports.string().uuid()).min(1).max(CONTACT_SCOPE_TAGS_MAX).transform((ids) => [...new Set(ids)]);
|
|
7183
|
+
contactVisibilitySchema = external_exports.discriminatedUnion("scope", [
|
|
7184
|
+
external_exports.object({ scope: external_exports.literal("all_hubs") }).strict(),
|
|
7185
|
+
external_exports.object({ scope: external_exports.literal("tags"), tag_ids: scopeTagIds }).strict()
|
|
7186
|
+
]);
|
|
7187
|
+
hasIdentity = (row) => Boolean(row.phone || row.email || row.instagram_sid);
|
|
7188
|
+
IDENTITY_REQUIRED = "A contact needs a phone, an email or an Instagram id";
|
|
7189
|
+
contactBookOrgQuery = external_exports.object({
|
|
7190
|
+
organization_id: external_exports.string().uuid()
|
|
7126
7191
|
});
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
message: "An access set writes only what it reads"
|
|
7192
|
+
contactBookContactParam = external_exports.object({
|
|
7193
|
+
contactId: external_exports.string().uuid()
|
|
7130
7194
|
});
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
dimensionId: accessIdSchema
|
|
7195
|
+
contactBookListParam = external_exports.object({
|
|
7196
|
+
listId: external_exports.string().uuid()
|
|
7134
7197
|
});
|
|
7135
|
-
|
|
7136
|
-
|
|
7198
|
+
contactBookHubParam = external_exports.object({
|
|
7199
|
+
hubId: external_exports.string().uuid()
|
|
7137
7200
|
});
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7201
|
+
contactBookPageQuery = external_exports.object({
|
|
7202
|
+
cursor: external_exports.string().max(2048).optional(),
|
|
7203
|
+
limit: external_exports.coerce.number().int().min(1).max(CONTACT_PAGE_MAX).default(50)
|
|
7141
7204
|
});
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7205
|
+
listContactBookContactsQuery = contactBookOrgQuery.merge(contactBookPageQuery).extend({
|
|
7206
|
+
q: external_exports.string().trim().max(CONTACT_SEARCH_MAX).optional(),
|
|
7207
|
+
label: external_exports.string().max(CONTACT_LABEL_MAX).transform(normalizeContactLabel).optional(),
|
|
7208
|
+
scope_tag_id: external_exports.string().uuid().optional()
|
|
7145
7209
|
});
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
label: accessLabelSchema
|
|
7210
|
+
listHubContactBookContactsQuery = contactBookPageQuery.extend({
|
|
7211
|
+
q: external_exports.string().trim().max(CONTACT_SEARCH_MAX).optional()
|
|
7149
7212
|
});
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
});
|
|
7153
|
-
createAccessValueBody = external_exports.object({
|
|
7154
|
-
value_id: accessIdSchema,
|
|
7155
|
-
label: accessLabelSchema
|
|
7156
|
-
});
|
|
7157
|
-
updateAccessValueBody = external_exports.object({
|
|
7158
|
-
label: accessLabelSchema.optional(),
|
|
7159
|
-
retired: external_exports.boolean().optional()
|
|
7160
|
-
}).refine((body) => body.label !== void 0 || body.retired !== void 0, {
|
|
7161
|
-
message: "Nothing to change: pass label, retired, or both"
|
|
7162
|
-
});
|
|
7163
|
-
setMemberAccessValuesBody = external_exports.object({
|
|
7164
|
-
values: heldAccessAssignmentSchema
|
|
7213
|
+
contactBookLinkCandidatesQuery = contactBookOrgQuery.extend({
|
|
7214
|
+
email: contactEmail
|
|
7165
7215
|
});
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7216
|
+
listContactBookListMembersQuery = contactBookOrgQuery.merge(contactBookPageQuery);
|
|
7217
|
+
contactRowFields = {
|
|
7218
|
+
name: contactName,
|
|
7219
|
+
phone: contactPhone.nullish(),
|
|
7220
|
+
email: contactEmail.nullish(),
|
|
7221
|
+
instagram_sid: contactInstagramSid.nullish(),
|
|
7222
|
+
labels: contactLabels.optional(),
|
|
7223
|
+
metadata: contactMetadata.optional()
|
|
7224
|
+
};
|
|
7225
|
+
createContactBookContactBody = external_exports.object({
|
|
7226
|
+
organization_id: external_exports.string().uuid(),
|
|
7227
|
+
...contactRowFields,
|
|
7228
|
+
visibility: contactVisibilitySchema,
|
|
7229
|
+
environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional()
|
|
7230
|
+
}).strict().refine(hasIdentity, IDENTITY_REQUIRED);
|
|
7231
|
+
updateContactBookContactBody = external_exports.object({
|
|
7232
|
+
name: contactName.optional(),
|
|
7233
|
+
phone: contactPhone.nullable().optional(),
|
|
7234
|
+
email: contactEmail.nullable().optional(),
|
|
7235
|
+
instagram_sid: contactInstagramSid.nullable().optional(),
|
|
7236
|
+
labels: contactLabels.optional(),
|
|
7237
|
+
metadata: contactMetadata.optional(),
|
|
7238
|
+
visibility: contactVisibilitySchema.optional(),
|
|
7239
|
+
environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional()
|
|
7240
|
+
}).strict();
|
|
7241
|
+
contactImportRowSchema = external_exports.object(contactRowFields).strict().refine(hasIdentity, IDENTITY_REQUIRED);
|
|
7242
|
+
importContactBookContactsBody = external_exports.object({
|
|
7243
|
+
organization_id: external_exports.string().uuid(),
|
|
7244
|
+
visibility: contactVisibilitySchema,
|
|
7245
|
+
environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional(),
|
|
7246
|
+
labels: contactLabels.optional(),
|
|
7247
|
+
rows: external_exports.array(contactImportRowSchema).min(1).max(CONTACT_IMPORT_BATCH_MAX)
|
|
7248
|
+
}).strict().superRefine((batch, ctx) => {
|
|
7249
|
+
batch.rows.forEach((row, index) => {
|
|
7250
|
+
if (importRowLabels(row, batch.labels).length > CONTACT_LABELS_MAX) {
|
|
7251
|
+
ctx.addIssue({
|
|
7252
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7253
|
+
path: ["rows", index, "labels"],
|
|
7254
|
+
message: `A contact holds at most ${CONTACT_LABELS_MAX} labels, the batch's included`
|
|
7255
|
+
});
|
|
7256
|
+
}
|
|
7257
|
+
});
|
|
7172
7258
|
});
|
|
7173
|
-
|
|
7174
|
-
|
|
7259
|
+
linkContactBookContactBody = external_exports.object({
|
|
7260
|
+
user_id: external_exports.string().min(1).max(128)
|
|
7261
|
+
}).strict();
|
|
7262
|
+
listName = external_exports.string().trim().min(1).max(CONTACT_LIST_NAME_MAX).regex(CONTACT_LIST_NAME_REGEX, {
|
|
7263
|
+
message: 'Must be lowercase alphanumeric with hyphens (e.g. "vip-customers")'
|
|
7175
7264
|
});
|
|
7176
|
-
|
|
7177
|
-
|
|
7265
|
+
contactListFilterSchema = external_exports.object({
|
|
7266
|
+
labels: external_exports.array(contactLabel).max(CONTACT_LIST_FILTER_MAX).transform((l) => [...new Set(l)]).default([]),
|
|
7267
|
+
scope_tag_ids: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_FILTER_MAX).transform((t) => [...new Set(t)]).default([])
|
|
7268
|
+
}).strict();
|
|
7269
|
+
createContactBookListBody = external_exports.object({
|
|
7270
|
+
organization_id: external_exports.string().uuid(),
|
|
7271
|
+
name: listName,
|
|
7272
|
+
description: external_exports.string().max(CONTACT_LIST_DESCRIPTION_MAX).nullish(),
|
|
7273
|
+
filter: contactListFilterSchema.optional()
|
|
7274
|
+
}).strict();
|
|
7275
|
+
updateContactBookListBody = external_exports.object({
|
|
7276
|
+
name: listName.optional(),
|
|
7277
|
+
description: external_exports.string().max(CONTACT_LIST_DESCRIPTION_MAX).nullable().optional(),
|
|
7278
|
+
filter: contactListFilterSchema.optional()
|
|
7279
|
+
}).strict();
|
|
7280
|
+
updateContactBookListPinsBody = external_exports.object({
|
|
7281
|
+
add: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_PINS_PER_REQUEST_MAX).default([]),
|
|
7282
|
+
remove: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_PINS_PER_REQUEST_MAX).default([])
|
|
7283
|
+
}).strict().refine((b) => b.add.length + b.remove.length > 0, "Add or remove at least one contact");
|
|
7284
|
+
suppressionIdentitySchema = external_exports.discriminatedUnion("kind", [
|
|
7285
|
+
external_exports.object({ kind: external_exports.literal("phone"), value: contactPhone }).strict(),
|
|
7286
|
+
external_exports.object({ kind: external_exports.literal("email"), value: contactEmail }).strict(),
|
|
7287
|
+
external_exports.object({ kind: external_exports.literal("instagram"), value: contactInstagramSid }).strict()
|
|
7288
|
+
]);
|
|
7289
|
+
createContactBookSuppressionBody = external_exports.object({
|
|
7290
|
+
organization_id: external_exports.string().uuid(),
|
|
7291
|
+
identity: suppressionIdentitySchema,
|
|
7292
|
+
scope: external_exports.enum(SUPPRESSION_SCOPES)
|
|
7293
|
+
}).strict();
|
|
7294
|
+
contactBookSuppressionParam = external_exports.object({
|
|
7295
|
+
suppressionId: external_exports.string().regex(SUPPRESSION_ID_REGEX)
|
|
7178
7296
|
});
|
|
7297
|
+
listContactBookSuppressionsQuery = contactBookOrgQuery.merge(contactBookPageQuery);
|
|
7298
|
+
contactBookEmailUnsubscribeTokenSchema = external_exports.string().max(200).regex(/^[0-9a-f-]{36}\.[0-9a-f]{64}\.[0-9a-f]{64}$/i);
|
|
7299
|
+
contactBookEmailUnsubscribeQuery = external_exports.object({ token: contactBookEmailUnsubscribeTokenSchema });
|
|
7300
|
+
orgListReferenceSchema = listName;
|
|
7179
7301
|
}
|
|
7180
7302
|
});
|
|
7181
7303
|
|
|
7182
|
-
// ../../packages/core/dist/chunk-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
function isEncodedBoundPerson(raw) {
|
|
7187
|
-
let parsed;
|
|
7188
|
-
try {
|
|
7189
|
-
parsed = JSON.parse(raw);
|
|
7190
|
-
} catch {
|
|
7191
|
-
return false;
|
|
7192
|
-
}
|
|
7193
|
-
return rekorBoundPersonSchema.safeParse(parsed).success;
|
|
7194
|
-
}
|
|
7195
|
-
var TOOLSET_SLUG_PATTERN, REKOR_STRUCTURAL_ID_PATTERN, baseEnvironmentSchema, toolsetFileToolSchema, toolsetSurfaceSchema, toolsetConnectionBindingSchema, rekorToolsetToolsSchema, rekorPersonIdSchema, rekorPersonAudienceSchema, rekorBoundPersonSchema, rekorBoundAttestation, rekorResolvedToolsetSchema, REKOR_TOOL_KINDS_PARAM, REKOR_TOOL_KINDS_RESOLVE_SEARCH, resolvedRecordTypeSchema, reviewWritersSchema, sharedScopeSchema, resolvedFileToolSchema, rekorToolsetFileSchema, rekorToolsetFileUrlAnswerSchema, rekorToolsetFileListSchema, rekorToolsetFileGetSchema, rekorToolsetFilePutSchema, TOOLSET_CUSTOMER_FACING_REFUSAL_MARK, TOOLSET_CUSTOMER_FACING_REFUSAL;
|
|
7196
|
-
var init_chunk_BUYOPDSJ = __esm({
|
|
7197
|
-
"../../packages/core/dist/chunk-BUYOPDSJ.js"() {
|
|
7304
|
+
// ../../packages/core/dist/chunk-3GUHAF3O.js
|
|
7305
|
+
var PERSON_ID_PATTERN, CONTACT_PERSON_ID_PATTERN, PERSON_LINKS_MAX, PERSON_DENY_PAGE_MAX, PERSON_ID_FORM_MESSAGE, userPersonIdSchema, personIdSchema, personParam, personLinkParam, deniedPersonParam, listDeniedPersonsQuery;
|
|
7306
|
+
var init_chunk_3GUHAF3O = __esm({
|
|
7307
|
+
"../../packages/core/dist/chunk-3GUHAF3O.js"() {
|
|
7198
7308
|
"use strict";
|
|
7199
|
-
|
|
7200
|
-
init_chunk_L55XSECQ();
|
|
7309
|
+
init_chunk_S5SVBLGT();
|
|
7201
7310
|
init_zod();
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
*/
|
|
7238
|
-
unclassified_tools: external_exports.boolean().optional(),
|
|
7239
|
-
/**
|
|
7240
|
-
* Any of its file tools writes: an operation other than `list`, `get` and `get_url` (`put`, `delete`,
|
|
7241
|
-
* `put_url`, or one the data product adds later), or an entry this side cannot read. Absent on a surface recorded
|
|
7242
|
-
* before it was, which the customer-facing rule reads as writing until the connection's next tool
|
|
7243
|
-
* sync or token save records it.
|
|
7244
|
-
*/
|
|
7245
|
-
file_writes: external_exports.boolean().optional(),
|
|
7246
|
-
/**
|
|
7247
|
-
* A record type the resolve's `record_types` carries names the toolset among its writers
|
|
7248
|
-
* (`x-review.writers`, #5083 RK4): the toolset writes the type's drafts and reads its every record,
|
|
7249
|
-
* drafts included. Those are the types its actions and composite record steps reach, and every
|
|
7250
|
-
* reviewed type it reaches otherwise: at a relationship tool's or a composite relationship step's
|
|
7251
|
-
* end, in a `batch` entry, or, through `sql_query`, all of them (decision 198). Or such a type's
|
|
7252
|
-
* declaration this side cannot read, or a resolve reaching records that carries no record types.
|
|
7253
|
-
* Absent on a surface recorded before it was, which the customer-facing rule reads as writing, for a
|
|
7254
|
-
* toolset reaching records, until the connection's next tool sync or token save records it.
|
|
7255
|
-
*/
|
|
7256
|
-
review_writes: external_exports.boolean().optional(),
|
|
7257
|
-
/**
|
|
7258
|
-
* Every record type the toolset reaches, at least one, is reviewed (`x-review`), holds no customer data
|
|
7259
|
-
* (`shared`), and does not name it among its writers: each call reads only that type's approved
|
|
7260
|
-
* records (#5083 decision 182, Q9). Never with a SQL Action, whose query reads its types' every
|
|
7261
|
-
* record, drafts included. Absent on a surface recorded before it was, which reads as false.
|
|
7262
|
-
*/
|
|
7263
|
-
approved_reads_only: external_exports.boolean().optional(),
|
|
7264
|
-
/**
|
|
7265
|
-
* The toolset's file tools. Absent when it has none, and on a surface recorded before they were.
|
|
7266
|
-
* A list this side cannot read is dropped rather than failing the binding, which every call and
|
|
7267
|
-
* the customer-facing rule read: the next tool sync records it again.
|
|
7268
|
-
*/
|
|
7269
|
-
files: external_exports.array(toolsetFileToolSchema).optional().catch(void 0)
|
|
7270
|
-
});
|
|
7271
|
-
toolsetConnectionBindingSchema = external_exports.object({
|
|
7272
|
-
base_id: external_exports.string().min(1),
|
|
7273
|
-
/** The slug the token was resolved against — `settings.toolset` at that write. */
|
|
7274
|
-
toolset: external_exports.string().min(1),
|
|
7275
|
-
/** The base's incarnation when the token was written; a bound attested call states it. */
|
|
7276
|
-
base_generation: external_exports.number().int().min(1),
|
|
7277
|
-
environment: baseEnvironmentSchema,
|
|
7278
|
-
surface: toolsetSurfaceSchema,
|
|
7279
|
-
/**
|
|
7280
|
-
* The id of the token the binding was resolved from, as its resolve reports it; a bound attested
|
|
7281
|
-
* call names it (`REKOR_BOUND_TOKEN_HEADER`), so the data product refuses the binding once the token
|
|
7282
|
-
* is revoked or expires (owner decision 41). Absent on a binding recorded before the report carried
|
|
7283
|
-
* it: its calls name none until a token save, or a tool sync while the token still stands, records it.
|
|
7284
|
-
* One that does not read is dropped rather than failing the binding.
|
|
7285
|
-
*/
|
|
7286
|
-
token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
|
|
7287
|
-
});
|
|
7288
|
-
rekorToolsetToolsSchema = external_exports.object({
|
|
7289
|
-
data: external_exports.object({
|
|
7290
|
-
tools: external_exports.array(external_exports.object({
|
|
7291
|
-
name: external_exports.string(),
|
|
7292
|
-
description: external_exports.string().optional(),
|
|
7293
|
-
inputSchema: external_exports.record(external_exports.unknown()).optional()
|
|
7294
|
-
}))
|
|
7295
|
-
})
|
|
7296
|
-
});
|
|
7297
|
-
rekorPersonIdSchema = external_exports.string().max(REKOR_MAX_PERSON_ID_LENGTH).regex(REKOR_STRUCTURAL_ID_PATTERN);
|
|
7298
|
-
rekorPersonAudienceSchema = external_exports.enum([REKOR_PERSON_AUDIENCE_STAFF, REKOR_PERSON_AUDIENCE_CUSTOMER]);
|
|
7299
|
-
rekorBoundPersonSchema = external_exports.object({
|
|
7300
|
-
audience: rekorPersonAudienceSchema,
|
|
7301
|
-
parties: external_exports.array(external_exports.union([external_exports.array(rekorPersonIdSchema).max(REKOR_MAX_PERSON_IDS), external_exports.literal(REKOR_PERSON_ALL)])).max(REKOR_MAX_PERSON_PARTIES),
|
|
7302
|
-
agent_all: external_exports.boolean(),
|
|
7303
|
-
customer: external_exports.number().int().nonnegative().optional()
|
|
7304
|
-
}).strict().refine((person) => !person.agent_all || person.audience === REKOR_PERSON_AUDIENCE_STAFF, {
|
|
7305
|
-
message: `The agent's "*" applies only to a staff call`,
|
|
7306
|
-
path: ["agent_all"]
|
|
7307
|
-
}).refine((person) => person.customer === void 0 || boundCustomerPartyIsValid(person.audience, person.parties, person.customer), {
|
|
7308
|
-
message: "The customer party is a listed party of person ids, on a call that is not staff's",
|
|
7309
|
-
path: ["customer"]
|
|
7310
|
-
});
|
|
7311
|
-
rekorBoundAttestation = rekorAttestation.extend({
|
|
7312
|
-
[REKOR_ACTOR_TYPE_HEADER]: external_exports.enum(["token", "user"]),
|
|
7313
|
-
/** Trimmed and checked as the far side trims and checks it. */
|
|
7314
|
-
[REKOR_ACTOR_ID_HEADER]: external_exports.string().trim().min(1).max(REKOR_MAX_ACTOR_ID_LENGTH),
|
|
7315
|
-
[REKOR_ACTOR_LABEL_HEADER]: external_exports.string().max(REKOR_MAX_ACTOR_LABEL_LENGTH),
|
|
7316
|
-
[REKOR_ACTOR_ADMIN_HEADER]: external_exports.literal("0"),
|
|
7317
|
-
[REKOR_BOUND_BASE_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
|
|
7318
|
-
[REKOR_BOUND_TOOLSET_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN),
|
|
7319
|
-
/**
|
|
7320
|
-
* Decimal digits only, as the far side parses it, and at most 15 of them: its `Number()` reads
|
|
7321
|
-
* every such value back exactly, where a longer one may round or overflow to `Infinity` (a 400).
|
|
7322
|
-
*/
|
|
7323
|
-
[DATA_BASE_GENERATION_HEADER]: external_exports.string().regex(/^[1-9]\d{0,14}$/),
|
|
7324
|
-
/** The token the binding was resolved from, when the connection records it (owner decision 41). */
|
|
7325
|
-
[REKOR_BOUND_TOKEN_HEADER]: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional(),
|
|
7326
|
-
/**
|
|
7327
|
-
* The customer the call serves (#5083 RK2): a contact id, which the contact book mints as a UUID.
|
|
7328
|
-
* Every UUID is an id the far side reads back as the customer's external id.
|
|
7329
|
-
*/
|
|
7330
|
-
[REKOR_BOUND_CUSTOMER_HEADER]: external_exports.string().uuid().optional(),
|
|
7331
|
-
/**
|
|
7332
|
-
* The access set the call carries (#5358): an access set's header text (`encodeAccessSet`), within
|
|
7333
|
-
* the far side's header cap. Tool calls carry one; the config reads (resolve, tool definitions) do not.
|
|
7334
|
-
*/
|
|
7335
|
-
[REKOR_BOUND_ACCESS_HEADER]: external_exports.string().max(REKOR_MAX_ACCESS_HEADER_LENGTH).refine(isEncodedAccessSet, {
|
|
7336
|
-
message: "Not an access set"
|
|
7337
|
-
}).optional(),
|
|
7338
|
-
/**
|
|
7339
|
-
* Where the access set applies (#5358), when only on the call's customer's own records: its one value.
|
|
7340
|
-
* Sent only beside the set, which the far side holds it to (the refinement below).
|
|
7341
|
-
*/
|
|
7342
|
-
[REKOR_BOUND_ACCESS_SCOPE_HEADER]: external_exports.literal(REKOR_ACCESS_SCOPE_CUSTOMER).optional(),
|
|
7311
|
+
PERSON_ID_PATTERN = /^prs_[a-z2-7]{52}$/;
|
|
7312
|
+
CONTACT_PERSON_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
7313
|
+
PERSON_LINKS_MAX = 15;
|
|
7314
|
+
PERSON_DENY_PAGE_MAX = 100;
|
|
7315
|
+
PERSON_ID_FORM_MESSAGE = "Must be a person id (prs_\u2026) or a contact id (a lowercase UUID)";
|
|
7316
|
+
userPersonIdSchema = external_exports.string().regex(PERSON_ID_PATTERN, { message: "Must be a person id (prs_\u2026)" });
|
|
7317
|
+
personIdSchema = external_exports.string().refine(
|
|
7318
|
+
(value) => PERSON_ID_PATTERN.test(value) || CONTACT_PERSON_ID_PATTERN.test(value),
|
|
7319
|
+
{ message: PERSON_ID_FORM_MESSAGE }
|
|
7320
|
+
);
|
|
7321
|
+
personParam = external_exports.object({
|
|
7322
|
+
personId: userPersonIdSchema
|
|
7323
|
+
});
|
|
7324
|
+
personLinkParam = personParam.extend({
|
|
7325
|
+
targetId: personIdSchema
|
|
7326
|
+
});
|
|
7327
|
+
deniedPersonParam = external_exports.object({
|
|
7328
|
+
personId: personIdSchema
|
|
7329
|
+
});
|
|
7330
|
+
listDeniedPersonsQuery = contactBookOrgQuery.extend({
|
|
7331
|
+
cursor: personIdSchema.optional(),
|
|
7332
|
+
limit: external_exports.coerce.number().int().min(1).max(PERSON_DENY_PAGE_MAX).default(50)
|
|
7333
|
+
});
|
|
7334
|
+
}
|
|
7335
|
+
});
|
|
7336
|
+
|
|
7337
|
+
// ../../packages/core/dist/chunk-5DGHIY7L.js
|
|
7338
|
+
var rekorBaseChangeMessageSchema;
|
|
7339
|
+
var init_chunk_5DGHIY7L = __esm({
|
|
7340
|
+
"../../packages/core/dist/chunk-5DGHIY7L.js"() {
|
|
7341
|
+
"use strict";
|
|
7342
|
+
init_zod();
|
|
7343
|
+
rekorBaseChangeMessageSchema = external_exports.object({
|
|
7344
|
+
/** The WayAI org UUID — one id namespace. */
|
|
7345
|
+
org_id: external_exports.string().uuid(),
|
|
7343
7346
|
/**
|
|
7344
|
-
*
|
|
7345
|
-
*
|
|
7347
|
+
* Not a UUID: a preview base id is `{prod_base_id}--{slug}`. Immutable per base — a
|
|
7348
|
+
* preview clone is its OWN base_id — so `(base_id, scope)` keys never collide across
|
|
7349
|
+
* environments. Empty is never a real base id, so it is non-conforming rather than a
|
|
7350
|
+
* frame keyed on nothing.
|
|
7346
7351
|
*/
|
|
7347
|
-
|
|
7352
|
+
base_id: external_exports.string().min(1),
|
|
7348
7353
|
/**
|
|
7349
|
-
*
|
|
7350
|
-
*
|
|
7351
|
-
* config reads do not. The far side holds a call's reads and writes of a person-ruled record type to its parties,
|
|
7352
|
-
* whatever its audience, and a customer-facing call to its audience gate (#5473 2a).
|
|
7354
|
+
* Rides along so the client scopes its refetch without a lookup; the inspector scopes
|
|
7355
|
+
* by side.
|
|
7353
7356
|
*/
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
}).superRefine((bag, ctx) => {
|
|
7358
|
-
if (bag[REKOR_BOUND_ACCESS_SCOPE_HEADER] !== void 0 && bag[REKOR_BOUND_ACCESS_HEADER] === void 0) {
|
|
7359
|
-
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [REKOR_BOUND_ACCESS_SCOPE_HEADER], message: "Accepted only beside an access set" });
|
|
7360
|
-
}
|
|
7361
|
-
if (bag[REKOR_ACTOR_TYPE_HEADER] === "user" && (bag[REKOR_BOUND_PAGE_HEADER] === void 0 || bag[REKOR_BOUND_CUSTOMER_HEADER] !== void 0)) {
|
|
7362
|
-
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: [REKOR_ACTOR_TYPE_HEADER], message: "A person is attested only on a team page's call" });
|
|
7363
|
-
}
|
|
7357
|
+
environment: external_exports.enum(["production", "preview"]),
|
|
7358
|
+
/** Which pane refetches. `base` covers create/delete/promote/config changes. */
|
|
7359
|
+
scope: external_exports.enum(["records", "record_types", "files", "base"])
|
|
7364
7360
|
});
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
toolset_binding: external_exports.object({
|
|
7377
|
-
org_id: external_exports.string().optional(),
|
|
7378
|
-
base_id: external_exports.string(),
|
|
7379
|
-
toolset_id: external_exports.string(),
|
|
7380
|
-
/**
|
|
7381
|
-
* The token's own id, which a bound call names (`REKOR_BOUND_TOKEN_HEADER`); absent when the
|
|
7382
|
-
* caller has none (owner decision 41), and dropped when it is not an id the far side reads back.
|
|
7383
|
-
*/
|
|
7384
|
-
token_id: external_exports.string().regex(REKOR_STRUCTURAL_ID_PATTERN).optional().catch(void 0)
|
|
7385
|
-
}).nullable().optional(),
|
|
7386
|
-
actions: external_exports.array(external_exports.unknown()).optional(),
|
|
7387
|
-
composites: external_exports.array(external_exports.unknown()).optional(),
|
|
7388
|
-
relationships: external_exports.array(external_exports.unknown()).optional(),
|
|
7389
|
-
/**
|
|
7390
|
-
* The toolset's SQL Actions (#5311): each a fixed, read-only query over the record types it
|
|
7391
|
-
* declares, which the resolve also carries in `record_types` and `record_type_scopes`.
|
|
7392
|
-
*/
|
|
7393
|
-
sql_actions: external_exports.array(external_exports.unknown()).optional(),
|
|
7394
|
-
files: external_exports.array(external_exports.unknown()).optional(),
|
|
7395
|
-
batch: external_exports.object({ enabled: external_exports.boolean().optional() }).passthrough().nullable().optional(),
|
|
7396
|
-
sql_query: external_exports.boolean().optional(),
|
|
7397
|
-
/** The toolset serves one customer per call (#5083 RK2). Absent reads as not scoped. */
|
|
7398
|
-
customer_scope: external_exports.boolean().optional(),
|
|
7399
|
-
/**
|
|
7400
|
-
* Record types the toolset reaches, by id, as the data product stores them (`json_schema`
|
|
7401
|
-
* included): each one its actions, composite record steps and SQL Actions reach, and each reviewed one it
|
|
7402
|
-
* reaches otherwise (relationship ends, `batch` entries, every one through `sql_query`; #5083
|
|
7403
|
-
* decision 198). An unreviewed type it reaches only otherwise is not here. A reviewed type's
|
|
7404
|
-
* `x-review` names its writers (RK4).
|
|
7405
|
-
*/
|
|
7406
|
-
record_types: external_exports.record(external_exports.unknown()).optional(),
|
|
7407
|
-
/**
|
|
7408
|
-
* What each record type the toolset's actions, composite steps, SQL Actions and relationship tools reach is to a
|
|
7409
|
-
* customer scope (`{ role }`, or null), by id (#5083 RK2). A reviewed type `record_types` carries
|
|
7410
|
-
* because only a `batch` entry or `sql_query` reaches it has none.
|
|
7411
|
-
*/
|
|
7412
|
-
record_type_scopes: external_exports.record(external_exports.unknown()).optional(),
|
|
7413
|
-
/**
|
|
7414
|
-
* The kind of each tool the toolset publishes, by the name it is published under (wayai#5333 decision
|
|
7415
|
-
* 6), sent only to a caller that asks (`REKOR_TOOL_KINDS_RESOLVE_SEARCH`). Read by `rekorToolKindLookup`;
|
|
7416
|
-
* a map this side cannot read is dropped, so every tool reads as a write.
|
|
7417
|
-
*/
|
|
7418
|
-
tool_kinds: external_exports.record(external_exports.string()).optional().catch(void 0)
|
|
7419
|
-
}).passthrough()
|
|
7361
|
+
}
|
|
7362
|
+
});
|
|
7363
|
+
|
|
7364
|
+
// ../../packages/core/dist/chunk-YUZFHVB2.js
|
|
7365
|
+
var invitePreviewQuery, inviteRolePreviewResponse, inviteContactPreviewResponse, invitePreviewResponse, inviteUnsubscribeBody;
|
|
7366
|
+
var init_chunk_YUZFHVB2 = __esm({
|
|
7367
|
+
"../../packages/core/dist/chunk-YUZFHVB2.js"() {
|
|
7368
|
+
"use strict";
|
|
7369
|
+
init_zod();
|
|
7370
|
+
invitePreviewQuery = external_exports.object({
|
|
7371
|
+
token: external_exports.string().min(1).max(2048)
|
|
7420
7372
|
});
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
path_prefix: external_exports.string().nullish(),
|
|
7429
|
-
operations: external_exports.array(external_exports.unknown()),
|
|
7430
|
-
name: external_exports.unknown().optional(),
|
|
7431
|
-
names: external_exports.unknown().optional(),
|
|
7432
|
-
description_override: external_exports.unknown().optional()
|
|
7373
|
+
inviteRolePreviewResponse = external_exports.object({
|
|
7374
|
+
inviter_name: external_exports.string(),
|
|
7375
|
+
entity_id: external_exports.string().uuid(),
|
|
7376
|
+
entity_name: external_exports.string(),
|
|
7377
|
+
entity_type: external_exports.enum(["org", "hub"]),
|
|
7378
|
+
role: external_exports.enum(["org_admin", "admin", "team_user", "user"]),
|
|
7379
|
+
expires_at: external_exports.string().datetime()
|
|
7433
7380
|
});
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7381
|
+
inviteContactPreviewResponse = external_exports.object({
|
|
7382
|
+
inviter_name: external_exports.string().nullable(),
|
|
7383
|
+
entity_id: external_exports.string().uuid(),
|
|
7384
|
+
entity_type: external_exports.literal("contact"),
|
|
7385
|
+
role: external_exports.literal("contact"),
|
|
7386
|
+
expires_at: external_exports.string().datetime()
|
|
7387
|
+
});
|
|
7388
|
+
invitePreviewResponse = external_exports.union([inviteRolePreviewResponse, inviteContactPreviewResponse]);
|
|
7389
|
+
inviteUnsubscribeBody = external_exports.object({ token: external_exports.string().min(1).max(256) }).strict();
|
|
7390
|
+
}
|
|
7391
|
+
});
|
|
7392
|
+
|
|
7393
|
+
// ../../packages/core/dist/chunk-I3O2RACG.js
|
|
7394
|
+
var managedAgentsWebhookParams, MANAGED_AGENTS_WEBHOOK_BODY_MAX_BYTES;
|
|
7395
|
+
var init_chunk_I3O2RACG = __esm({
|
|
7396
|
+
"../../packages/core/dist/chunk-I3O2RACG.js"() {
|
|
7397
|
+
"use strict";
|
|
7398
|
+
init_zod();
|
|
7399
|
+
managedAgentsWebhookParams = external_exports.object({
|
|
7400
|
+
hub_id: external_exports.string().uuid(),
|
|
7401
|
+
connection_id: external_exports.string().uuid()
|
|
7402
|
+
});
|
|
7403
|
+
MANAGED_AGENTS_WEBHOOK_BODY_MAX_BYTES = 16 * 1024;
|
|
7404
|
+
}
|
|
7405
|
+
});
|
|
7406
|
+
|
|
7407
|
+
// ../../packages/core/dist/chunk-34LE6P7E.js
|
|
7408
|
+
var templateIdParam, listTemplatesQuery, deleteTemplateQuery, templateStatusQuery, createTemplateBody, updateTemplateBody, submitTemplateBody, testTemplateBody;
|
|
7409
|
+
var init_chunk_34LE6P7E = __esm({
|
|
7410
|
+
"../../packages/core/dist/chunk-34LE6P7E.js"() {
|
|
7411
|
+
"use strict";
|
|
7412
|
+
init_zod();
|
|
7413
|
+
templateIdParam = external_exports.object({
|
|
7414
|
+
id: external_exports.string().uuid()
|
|
7415
|
+
});
|
|
7416
|
+
listTemplatesQuery = external_exports.object({
|
|
7417
|
+
hub_id: external_exports.string().uuid(),
|
|
7418
|
+
connection_id: external_exports.string().uuid()
|
|
7419
|
+
});
|
|
7420
|
+
deleteTemplateQuery = external_exports.object({
|
|
7421
|
+
hub_id: external_exports.string().uuid(),
|
|
7422
|
+
connection_id: external_exports.string().uuid()
|
|
7423
|
+
});
|
|
7424
|
+
templateStatusQuery = external_exports.object({
|
|
7425
|
+
hub_id: external_exports.string().uuid(),
|
|
7426
|
+
connection_id: external_exports.string().uuid()
|
|
7427
|
+
});
|
|
7428
|
+
createTemplateBody = external_exports.object({
|
|
7429
|
+
hub_id: external_exports.string().uuid(),
|
|
7430
|
+
connection_id: external_exports.string().uuid()
|
|
7438
7431
|
}).passthrough();
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7432
|
+
updateTemplateBody = external_exports.object({}).passthrough();
|
|
7433
|
+
submitTemplateBody = external_exports.object({
|
|
7434
|
+
hub_id: external_exports.string().uuid(),
|
|
7435
|
+
connection_id: external_exports.string().uuid()
|
|
7436
|
+
}).passthrough();
|
|
7437
|
+
testTemplateBody = external_exports.object({
|
|
7438
|
+
hub_id: external_exports.string().uuid(),
|
|
7439
|
+
connection_id: external_exports.string().uuid()
|
|
7440
|
+
}).passthrough();
|
|
7441
|
+
}
|
|
7442
|
+
});
|
|
7443
|
+
|
|
7444
|
+
// ../../packages/core/dist/chunk-FPSDNS2E.js
|
|
7445
|
+
var noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema;
|
|
7446
|
+
var init_chunk_FPSDNS2E = __esm({
|
|
7447
|
+
"../../packages/core/dist/chunk-FPSDNS2E.js"() {
|
|
7448
|
+
"use strict";
|
|
7449
|
+
init_zod();
|
|
7450
|
+
noticeSeveritySchema = external_exports.enum(["critical", "warn", "info"]);
|
|
7451
|
+
noticeStatusSchema = external_exports.enum(["active", "resolved"]);
|
|
7452
|
+
NOTICE_SCOPE_REGEX = /^(global|provider:[a-z0-9_-]{1,40}|service:[a-z0-9_-]{1,40})$/;
|
|
7453
|
+
noticeScopeSchema = external_exports.string().regex(NOTICE_SCOPE_REGEX, "scope must be 'global', 'provider:<x>', or 'service:<x>'");
|
|
7454
|
+
noticeLinkSchema = external_exports.string().url().refine((u) => /^https?:\/\//i.test(u), { message: "link must be an http(s) URL" });
|
|
7455
|
+
createNoticeBody = external_exports.object({
|
|
7456
|
+
severity: noticeSeveritySchema.default("info"),
|
|
7457
|
+
scope: noticeScopeSchema.default("global"),
|
|
7458
|
+
title: external_exports.string().trim().min(1).max(200),
|
|
7459
|
+
body: external_exports.string().max(2e3).optional(),
|
|
7460
|
+
link: noticeLinkSchema.optional(),
|
|
7461
|
+
starts_at: external_exports.string().datetime().optional(),
|
|
7462
|
+
ends_at: external_exports.string().datetime().optional()
|
|
7446
7463
|
});
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7464
|
+
updateNoticeBody = external_exports.object({
|
|
7465
|
+
severity: noticeSeveritySchema.optional(),
|
|
7466
|
+
scope: noticeScopeSchema.optional(),
|
|
7467
|
+
title: external_exports.string().trim().min(1).max(200).optional(),
|
|
7468
|
+
body: external_exports.string().max(2e3).nullable().optional(),
|
|
7469
|
+
link: noticeLinkSchema.nullable().optional(),
|
|
7470
|
+
starts_at: external_exports.string().datetime().optional(),
|
|
7471
|
+
ends_at: external_exports.string().datetime().nullable().optional()
|
|
7472
|
+
}).refine((b) => Object.keys(b).length > 0, { message: "at least one field must be provided" });
|
|
7473
|
+
listNoticesQuery = external_exports.object({
|
|
7474
|
+
status: noticeStatusSchema.optional(),
|
|
7475
|
+
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
7476
|
+
offset: external_exports.coerce.number().int().min(0).optional()
|
|
7453
7477
|
});
|
|
7454
|
-
|
|
7455
|
-
TOOLSET_CUSTOMER_FACING_REFUSAL_MARK = "A customer-facing agent (a pilot, pilot specialist or pilot advisor) can use a toolset only when it exposes files alone: no record, composite or relationship tools, and neither sql_query nor batch";
|
|
7456
|
-
TOOLSET_CUSTOMER_FACING_REFUSAL = `${TOOLSET_CUSTOMER_FACING_REFUSAL_MARK}, nor a file put, delete or put_url, nor a write of a reviewed record type, nor a kind of tool WayAI does not classify. Its record, composite, relationship and SQL Action tools are admitted to a customer-facing agent and a customer page, since the data product holds each of their calls to the record types that declare person rules or shared access`;
|
|
7478
|
+
noticeIdParamSchema = external_exports.object({ id: external_exports.string().min(1) });
|
|
7457
7479
|
}
|
|
7458
7480
|
});
|
|
7459
7481
|
|
|
@@ -7842,12 +7864,12 @@ var init_chunk_FBV7NLKO = __esm({
|
|
|
7842
7864
|
}
|
|
7843
7865
|
});
|
|
7844
7866
|
|
|
7845
|
-
// ../../packages/core/dist/chunk-
|
|
7867
|
+
// ../../packages/core/dist/chunk-WLFAY7KL.js
|
|
7846
7868
|
var hubPageWatchParam, pageWatchedBaseSchema, hubPageWatchResponseSchema;
|
|
7847
|
-
var
|
|
7848
|
-
"../../packages/core/dist/chunk-
|
|
7869
|
+
var init_chunk_WLFAY7KL = __esm({
|
|
7870
|
+
"../../packages/core/dist/chunk-WLFAY7KL.js"() {
|
|
7849
7871
|
"use strict";
|
|
7850
|
-
|
|
7872
|
+
init_chunk_WBTBXPD2();
|
|
7851
7873
|
init_chunk_FBV7NLKO();
|
|
7852
7874
|
init_chunk_HZ6CADSY();
|
|
7853
7875
|
init_zod();
|
|
@@ -12024,10 +12046,10 @@ var init_chunk_6J742GLA = __esm({
|
|
|
12024
12046
|
}
|
|
12025
12047
|
});
|
|
12026
12048
|
|
|
12027
|
-
// ../../packages/core/dist/chunk-
|
|
12049
|
+
// ../../packages/core/dist/chunk-LCBRIVIN.js
|
|
12028
12050
|
var COMMUNITIES_PER_ORG_MAX, COMMUNITY_NAME_MAX_LENGTH, COMMUNITY_REGISTRY_CLOSED_REASON, COMMUNITY_MEMBERS_MAX, COMMUNITY_ADMISSIONS, COMMUNITY_ACCESS_MAX, COMMUNITY_ACCESS_ADD_MAX, COMMUNITY_ACCESS_FULL_REASON, COMMUNITY_JOIN_SOURCE_MAX_LENGTH, COMMUNITY_JOIN_FLOW_TOKEN_MAX_LENGTH, COMMUNITY_ROOMS_MAX, COMMUNITY_ROOM_NAME_MAX_LENGTH, COMMUNITY_MESSAGE_MAX_LENGTH, COMMUNITY_MESSAGES_PAGE_SIZE, COMMUNITY_ATTACHMENT_URLS_MAX, COMMUNITY_POST_TITLE_MAX_LENGTH, COMMUNITY_POST_SEARCH_MAX_LENGTH, COMMUNITY_MEMBER_STATUSES, COMMUNITY_RULES_MAX_LENGTH, COMMUNITY_SLOW_MODE_MAX_SECONDS, COMMUNITY_COURSES_LABEL_MAX_LENGTH, COMMUNITY_LIVE_TICKET_PREFIX, COMMUNITY_STATS_DAYS, communityNameSchema, adminCreateCommunityBody, communityIdParam, communityJoinTokenSchema, communityJoinSourceSchema, communityJoinPreviewQuery, communityJoinBody, communityRoomKindSchema, communityRoomNameSchema, communityRoomIdParam, communityMessageIdParam, communityRoomCreateBody, communityRoomUpdateBody, communityMessagesQuery, communityMessageBodySchema, communityPostTitleSchema, communityAttachmentUploadSchema, communitySendBody, communityEditBody, communityPostIdParam, communityPostsQuery, communityAnswerBody, communityReadBody, communityAttachmentUrlsBody, communityPersonParam, communityOrgParam, communityPeopleQuery, communityCoursesLabelSchema, communityAdmissionSchema, communitySettingsBody, communityAccessEmailSchema, communityAccessAddBody, communityAccessQuery, communityAccessIdParam, communityBanBody, communityLockBody, communityPinBody, communityModLogQuery, communityReportsQuery, communityReportIdParam, communityLiveTicketSchema, communityLiveQuery, communityMuteBody, communityEmailUnsubscribeTokenSchema, communityEmailUnsubscribeQuery;
|
|
12029
|
-
var
|
|
12030
|
-
"../../packages/core/dist/chunk-
|
|
12051
|
+
var init_chunk_LCBRIVIN = __esm({
|
|
12052
|
+
"../../packages/core/dist/chunk-LCBRIVIN.js"() {
|
|
12031
12053
|
"use strict";
|
|
12032
12054
|
init_chunk_S5SVBLGT();
|
|
12033
12055
|
init_chunk_6J742GLA();
|
|
@@ -12133,7 +12155,7 @@ var init_chunk_6YIKY5UC = __esm({
|
|
|
12133
12155
|
}
|
|
12134
12156
|
});
|
|
12135
12157
|
|
|
12136
|
-
// ../../packages/core/dist/chunk-
|
|
12158
|
+
// ../../packages/core/dist/chunk-MT4ITTI4.js
|
|
12137
12159
|
function parseCommunityLessonVideoUrl(url) {
|
|
12138
12160
|
const parts = /^https?:\/\/([^/?#]+)([^?#]*)(?:\?([^#]*))?(?:#.*)?$/i.exec(url.trim());
|
|
12139
12161
|
if (!parts) return null;
|
|
@@ -12159,10 +12181,10 @@ function communityLessonVideoWatchUrl(video) {
|
|
|
12159
12181
|
}
|
|
12160
12182
|
}
|
|
12161
12183
|
var COMMUNITY_COURSES_MAX, COMMUNITY_COURSE_MODULES_MAX, COMMUNITY_COURSE_LESSONS_MAX, COMMUNITY_LESSONS_MAX, COMMUNITY_COURSE_TITLE_MAX_LENGTH, COMMUNITY_COURSE_DESCRIPTION_MAX_LENGTH, COMMUNITY_LESSON_BODY_MAX_LENGTH, COMMUNITY_LESSON_LINKS_MAX, COMMUNITY_LESSON_URL_MAX_LENGTH, YOUTUBE_ID, YOUTUBE_HOSTS, YOUTU_BE, YOUTUBE_ID_PATH, communityCourseIdParam, communityCourseModuleIdParam, communityLessonIdParam, communityCourseTitleSchema, communityCourseDescriptionSchema, communityCoursePositionSchema, communityLessonVideoUrlSchema, communityLessonLinkSchema, communityLessonLinksSchema, communityLessonBodySchema, communityCourseCreateBody, communityCourseUpdateBody, communityModuleCreateBody, communityModuleUpdateBody, communityLessonCreateBody, communityLessonUpdateBody;
|
|
12162
|
-
var
|
|
12163
|
-
"../../packages/core/dist/chunk-
|
|
12184
|
+
var init_chunk_MT4ITTI4 = __esm({
|
|
12185
|
+
"../../packages/core/dist/chunk-MT4ITTI4.js"() {
|
|
12164
12186
|
"use strict";
|
|
12165
|
-
|
|
12187
|
+
init_chunk_LCBRIVIN();
|
|
12166
12188
|
init_chunk_HZ6CADSY();
|
|
12167
12189
|
init_zod();
|
|
12168
12190
|
COMMUNITY_COURSES_MAX = 20;
|
|
@@ -12747,7 +12769,7 @@ var init_chunk_2ISUBJG7 = __esm({
|
|
|
12747
12769
|
}
|
|
12748
12770
|
});
|
|
12749
12771
|
|
|
12750
|
-
// ../../packages/core/dist/chunk-
|
|
12772
|
+
// ../../packages/core/dist/chunk-B7I5PFCN.js
|
|
12751
12773
|
function describeRole(role) {
|
|
12752
12774
|
if (typeof role === "string") {
|
|
12753
12775
|
return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
|
|
@@ -12921,8 +12943,8 @@ function terminalRunCount(counts) {
|
|
|
12921
12943
|
return counts.successful_runs + counts.failed_runs;
|
|
12922
12944
|
}
|
|
12923
12945
|
var evalIdParam, sessionIdParam, scenarioSetIdParam, hubIdQuery, EVAL_FIXTURE_NAME_MAX_LENGTH, evalFixtureOverrideSchema, runSessionQuery, runJourneyQuery, EVAL_INPUT_ROLES, EVAL_INPUT_ROLE_LIST, ROLE_ECHO_MAX, EVAL_INITIAL_STATE_SCOPES, MAX_INITIAL_STATE_ENTRIES, evalInitialStateEntry, evalCustomerContactIdSchema, evalBody, EVAL_LIST_MAX_LIMIT, evalListLimit, getEvalsQuery, toggleEvalBody, bulkToggleEvalsBody, pacingConfigSchema, EVAL_MAX_SELECTED_SCENARIOS, evalScenarioSelectionEntrySchema, evalScenarioSelectionSchema, sessionConfigSchema, createSessionBody, getSessionsQuery, getSessionResultsQuery, getSessionRunsQuery, evalAnalyticsQuery, getSessionCostQuery, compareSessionsQuery, evalsSqlBody, evalsSqlSchemaQuery, exportResultsQuery, validateEvalBody, hubAgentsQuery, createScenarioSetBody, updateScenarioSetBody, scenarioSetsHubQuery, createScenarioFromConversationBody, createJourneyFromConversationBody, evalAttachmentRef, turnMayCarryAttachments, ATTACHMENTS_USER_ONLY_MESSAGE, journeyIdParam, journeyToolCallSchema, journeyTurnSchema, journeyStepOverrideSchema, fixtureField, createJourneyBody, updateJourneyBody, evalSessionConfigResponseSchema, evalSessionResponseSchema, evalSessionListConfigSchema, evalSessionListItemSchema, seedReleaseStatusSchema, EVAL_SESSION_NOT_QUIESCENT;
|
|
12924
|
-
var
|
|
12925
|
-
"../../packages/core/dist/chunk-
|
|
12946
|
+
var init_chunk_B7I5PFCN = __esm({
|
|
12947
|
+
"../../packages/core/dist/chunk-B7I5PFCN.js"() {
|
|
12926
12948
|
"use strict";
|
|
12927
12949
|
init_chunk_4LXDRTO4();
|
|
12928
12950
|
init_chunk_WTOA3ANF();
|
|
@@ -13990,7 +14012,7 @@ var init_chunk_TU4Y4MEX = __esm({
|
|
|
13990
14012
|
}
|
|
13991
14013
|
});
|
|
13992
14014
|
|
|
13993
|
-
// ../../packages/core/dist/chunk-
|
|
14015
|
+
// ../../packages/core/dist/chunk-EHFD6TXQ.js
|
|
13994
14016
|
function refineHubAsCodeCustomTools(config, ctx) {
|
|
13995
14017
|
const agents = config.agents;
|
|
13996
14018
|
if (!Array.isArray(agents)) return;
|
|
@@ -14600,12 +14622,12 @@ function skillSectionsAsResources(scope) {
|
|
|
14600
14622
|
};
|
|
14601
14623
|
}
|
|
14602
14624
|
var MAX_10MB_BASE64_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_ENCODED_BYTES, MAX_EVAL_ATTACHMENT_CARRIERS, MAX_EVAL_ATTACHMENT_AGGREGATE_ENCODED_BYTES, MAX_RESOURCE_ENCODED_BYTES, MAX_HUB_AS_CODE_RESOURCES, MAX_HUB_AS_CODE_RESOURCE_FILES, MAX_RESOURCE_AGGREGATE_ENCODED_BYTES, MAX_CI_CONFIG_BODY_BYTES, MAX_HUB_AS_CODE_PAGE_MANIFEST_CHARS, hubAsCodePagesSchema, MAX_CALL_OPENING_CARRIERS, MAX_CALL_OPENING_AGGREGATE_ENCODED_BYTES, hubAsCodeStateSchema, hubAsCodeResourceFileSchema, hubAsCodeResourceSchema, uuidPattern, ciUuidSchema, boundedHubAsCodeResourcesSchema, isPlainObject, MIN_SKILLS_LAYOUT_CLI, hubAsCodeConfigSchema, ciPullHubIdParam, ciBranchParam, ciPullQuery, ciHubsQuery, ciLookupQuery, ciBranchesQuery, ciSyncBody, ciPushBody, ciDiffBody, ciPublishBody, ciPublishPreviewBody, ciSyncMcpBody, ciOrgResourcesParam, orgResourcesConfigSchema, ciOrgResourcesPushBody, ciOrgResourcesDiffBody, CI_APPLY_ENTITY_KINDS, CI_APPLY_OPERATIONS, ciApplyErrorBaseSchema, ciApplyErrorSchema, ciSyncCountSchema, ciSyncChangesSchema, ciSyncWarningSchema, ciSyncResponseSchema;
|
|
14603
|
-
var
|
|
14604
|
-
"../../packages/core/dist/chunk-
|
|
14625
|
+
var init_chunk_EHFD6TXQ = __esm({
|
|
14626
|
+
"../../packages/core/dist/chunk-EHFD6TXQ.js"() {
|
|
14605
14627
|
"use strict";
|
|
14606
14628
|
init_chunk_SARVKRZB();
|
|
14607
|
-
|
|
14608
|
-
|
|
14629
|
+
init_chunk_ELIEEYPK();
|
|
14630
|
+
init_chunk_B7I5PFCN();
|
|
14609
14631
|
init_chunk_LBDH7LCG();
|
|
14610
14632
|
init_chunk_4LXDRTO4();
|
|
14611
14633
|
init_chunk_TU4Y4MEX();
|
|
@@ -16140,32 +16162,33 @@ var init_chunk_EV3MAOEX = __esm({
|
|
|
16140
16162
|
var init_contracts = __esm({
|
|
16141
16163
|
"../../packages/core/dist/contracts/index.js"() {
|
|
16142
16164
|
"use strict";
|
|
16165
|
+
init_chunk_WL5QGKHN();
|
|
16143
16166
|
init_chunk_YVY2TZK2();
|
|
16144
16167
|
init_chunk_VXEAR36B();
|
|
16145
16168
|
init_chunk_RACEDHG6();
|
|
16146
16169
|
init_chunk_Q7KIQHAZ();
|
|
16147
16170
|
init_chunk_HA7CRZMX();
|
|
16171
|
+
init_chunk_MF2VVXBR();
|
|
16148
16172
|
init_chunk_IPXBFWUU();
|
|
16149
16173
|
init_chunk_NKLVUTFO();
|
|
16150
|
-
init_chunk_WL5QGKHN();
|
|
16151
|
-
init_chunk_MF2VVXBR();
|
|
16152
16174
|
init_chunk_ZC6YGHNX();
|
|
16153
16175
|
init_chunk_ACKF2MVU();
|
|
16154
|
-
|
|
16176
|
+
init_chunk_HIGKBEPF();
|
|
16155
16177
|
init_chunk_7QJBCQR3();
|
|
16156
16178
|
init_chunk_IPDOHAZ5();
|
|
16157
16179
|
init_chunk_GPM7PE44();
|
|
16158
16180
|
init_chunk_VEERWOZ6();
|
|
16181
|
+
init_chunk_A7TMHX3E();
|
|
16159
16182
|
init_chunk_ZXK6N2HN();
|
|
16160
16183
|
init_chunk_Y7CFCYX4();
|
|
16161
|
-
|
|
16184
|
+
init_chunk_3GUHAF3O();
|
|
16162
16185
|
init_chunk_5DGHIY7L();
|
|
16163
16186
|
init_chunk_YUZFHVB2();
|
|
16164
16187
|
init_chunk_I3O2RACG();
|
|
16165
16188
|
init_chunk_34LE6P7E();
|
|
16166
16189
|
init_chunk_FPSDNS2E();
|
|
16167
|
-
|
|
16168
|
-
|
|
16190
|
+
init_chunk_WLFAY7KL();
|
|
16191
|
+
init_chunk_WBTBXPD2();
|
|
16169
16192
|
init_chunk_OPETF4GS();
|
|
16170
16193
|
init_chunk_SY6PLCPK();
|
|
16171
16194
|
init_chunk_KMAC3O3L();
|
|
@@ -16175,8 +16198,8 @@ var init_contracts = __esm({
|
|
|
16175
16198
|
init_chunk_UI6YFSZL();
|
|
16176
16199
|
init_chunk_C4HEZ7ZI();
|
|
16177
16200
|
init_chunk_IR2NOSI3();
|
|
16178
|
-
|
|
16179
|
-
|
|
16201
|
+
init_chunk_MT4ITTI4();
|
|
16202
|
+
init_chunk_LCBRIVIN();
|
|
16180
16203
|
init_chunk_YULHXJ5M();
|
|
16181
16204
|
init_chunk_V4FRPRH5();
|
|
16182
16205
|
init_chunk_LWMLR2WI();
|
|
@@ -16187,11 +16210,11 @@ var init_contracts = __esm({
|
|
|
16187
16210
|
init_chunk_E4DIIOOE();
|
|
16188
16211
|
init_chunk_7CYHPF35();
|
|
16189
16212
|
init_chunk_BPCNB5RT();
|
|
16190
|
-
|
|
16213
|
+
init_chunk_EHFD6TXQ();
|
|
16191
16214
|
init_chunk_SARVKRZB();
|
|
16192
|
-
|
|
16193
|
-
|
|
16194
|
-
|
|
16215
|
+
init_chunk_ELIEEYPK();
|
|
16216
|
+
init_chunk_35OU33GJ();
|
|
16217
|
+
init_chunk_B7I5PFCN();
|
|
16195
16218
|
init_chunk_LBDH7LCG();
|
|
16196
16219
|
init_chunk_4LXDRTO4();
|
|
16197
16220
|
init_chunk_JDJ4EUOL();
|
|
@@ -23695,7 +23718,7 @@ var init_config_writer = __esm({
|
|
|
23695
23718
|
"skip_cascade_writes",
|
|
23696
23719
|
"enabled"
|
|
23697
23720
|
],
|
|
23698
|
-
toolsets: ["id", "name", "description", "actions", "relationships", "files", "batch", "sql_query"
|
|
23721
|
+
toolsets: ["id", "name", "description", "actions", "relationships", "files", "batch", "sql_query"],
|
|
23699
23722
|
actions: [
|
|
23700
23723
|
"id",
|
|
23701
23724
|
"record_type",
|
|
@@ -35719,13 +35742,16 @@ lookup-person Whom a person id (prs_\u2026) names: a hub of the organization
|
|
|
35719
35742
|
person-links The person ids and contacts a person is linked to, oldest first.
|
|
35720
35743
|
link-person Link a person to another person id (their earlier identity, say an old
|
|
35721
35744
|
number) or to a contact of the organization: the person is also that one.
|
|
35722
|
-
The target's own links are copied too. A person holds at most
|
|
35745
|
+
The target's own links are copied too. A person holds at most ${PERSON_LINKS_MAX} links.
|
|
35723
35746
|
unlink-person Remove one link. The links it copied stay.
|
|
35724
35747
|
denied-persons The organization's deny list: person ids and contacts no person set holds.
|
|
35725
35748
|
deny-person Deny a person id or a contact for the organization.
|
|
35726
35749
|
undeny-person Lift a denial.
|
|
35727
35750
|
|
|
35728
|
-
|
|
35751
|
+
Every toolset call reads the person links and the deny list of the people it is for: a person
|
|
35752
|
+
reaches the records naming an id they are linked to (a contact only where the hub sees it), and
|
|
35753
|
+
no one is matched by a denied id; a person whose own id is denied reaches none. An eval run's
|
|
35754
|
+
declared contact (on a preview hub) is used as declared, its links and the deny list unread.
|
|
35729
35755
|
|
|
35730
35756
|
The organization is --org, else this repo's (wayai-ws/wayai.yaml). Linking and unlinking
|
|
35731
35757
|
a person needs org:write over the organization; everything else here an organization
|
|
@@ -35971,7 +35997,7 @@ function formatExplanation(data) {
|
|
|
35971
35997
|
if (data.values_hub_id === null) lines.push("This preview hub was never published: it has no hub values, so it reaches nothing.");
|
|
35972
35998
|
else if (data.values_hub_id !== data.hub_id) lines.push(`Hub values are those of its production hub ${text3(data.values_hub_id)}.`);
|
|
35973
35999
|
if (data.customer_only) {
|
|
35974
|
-
lines.push("Customer-only: on an agent's call, held only on record types open to customer-facing calls (person rules or shared access)
|
|
36000
|
+
lines.push("Customer-only: on an agent's call, held only on record types open to customer-facing calls (person rules or shared access). Every other type that enforces a dimension reaches nothing.");
|
|
35975
36001
|
}
|
|
35976
36002
|
if (data.conversations_reach_nothing) {
|
|
35977
36003
|
lines.push("This person's own set reaches nothing, whatever the agent: every turn in their conversations, a team member's send or consult there included, reaches nothing either.");
|
|
@@ -36056,8 +36082,7 @@ removed it. Every layer only narrows:
|
|
|
36056
36082
|
- with a scoped API token and no --user: the hub's \u2229 the agent's, what a hub
|
|
36057
36083
|
automation's turn of the agent gets.
|
|
36058
36084
|
Everyone else takes the hub's public values, customer-only: on an agent's call, held only on
|
|
36059
|
-
record types open to customer-facing calls (person entries in enforce, or shared access)
|
|
36060
|
-
call naming its customer, only on record types customer scope narrows to that customer. A turn in another
|
|
36085
|
+
record types open to customer-facing calls (person entries in enforce, or shared access). A turn in another
|
|
36061
36086
|
person's conversation is also cut to that person's set, a delegated task's to its
|
|
36062
36087
|
delegation's, and a background agent's side-call's to its host turn's agent's values: those
|
|
36063
36088
|
are not shown here. Explaining someone else matches no unredeemed team invite by their
|