@wayai/cli 0.3.262 → 0.3.263
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 +1092 -1070
- 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({
|
|
@@ -6532,928 +6532,946 @@ 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-L55XSECQ.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_L55XSECQ = __esm({
|
|
6538
|
+
"../../packages/core/dist/chunk-L55XSECQ.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-XAYDRN6A.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_XAYDRN6A = __esm({
|
|
6633
|
+
"../../packages/core/dist/chunk-XAYDRN6A.js"() {
|
|
6654
6634
|
"use strict";
|
|
6635
|
+
init_chunk_L55XSECQ();
|
|
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-BUYOPDSJ.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_BUYOPDSJ = __esm({
|
|
6741
|
+
"../../packages/core/dist/chunk-BUYOPDSJ.js"() {
|
|
6850
6742
|
"use strict";
|
|
6743
|
+
init_chunk_XAYDRN6A();
|
|
6744
|
+
init_chunk_L55XSECQ();
|
|
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,
|
|
6770
|
+
* and reaches only that customer's records and shared ones. Only an eval run names one; every other call,
|
|
6771
|
+
* an agent's (#5473 2b1) or a page's (2b2), names none, so it is refused it. Absent on a surface recorded
|
|
6772
|
+
* before it was, which reads as not scoped until the connection's next tool sync or token save records
|
|
6773
|
+
* it: 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
|
+
/** The toolset serves one customer per call (#5083 RK2). Absent reads as not scoped. */
|
|
6942
|
+
customer_scope: external_exports.boolean().optional(),
|
|
6943
|
+
/**
|
|
6944
|
+
* Record types the toolset reaches, by id, as the data product stores them (`json_schema`
|
|
6945
|
+
* included): each one its actions, composite record steps and SQL Actions reach, and each reviewed one it
|
|
6946
|
+
* reaches otherwise (relationship ends, `batch` entries, every one through `sql_query`; #5083
|
|
6947
|
+
* decision 198). An unreviewed type it reaches only otherwise is not here. A reviewed type's
|
|
6948
|
+
* `x-review` names its writers (RK4).
|
|
6949
|
+
*/
|
|
6950
|
+
record_types: external_exports.record(external_exports.unknown()).optional(),
|
|
6951
|
+
/**
|
|
6952
|
+
* What each record type the toolset's actions, composite steps, SQL Actions and relationship tools reach is to a
|
|
6953
|
+
* customer scope (`{ role }`, or null), by id (#5083 RK2). A reviewed type `record_types` carries
|
|
6954
|
+
* because only a `batch` entry or `sql_query` reaches it has none.
|
|
6955
|
+
*/
|
|
6956
|
+
record_type_scopes: external_exports.record(external_exports.unknown()).optional(),
|
|
6957
|
+
/**
|
|
6958
|
+
* The kind of each tool the toolset publishes, by the name it is published under (wayai#5333 decision
|
|
6959
|
+
* 6), sent only to a caller that asks (`REKOR_TOOL_KINDS_RESOLVE_SEARCH`). Read by `rekorToolKindLookup`;
|
|
6960
|
+
* a map this side cannot read is dropped, so every tool reads as a write.
|
|
6961
|
+
*/
|
|
6962
|
+
tool_kinds: external_exports.record(external_exports.string()).optional().catch(void 0)
|
|
6963
|
+
}).passthrough()
|
|
6964
|
+
});
|
|
6965
|
+
REKOR_TOOL_KINDS_PARAM = "tool_kinds";
|
|
6966
|
+
REKOR_TOOL_KINDS_RESOLVE_SEARCH = new URLSearchParams({ [REKOR_TOOL_KINDS_PARAM]: "true" }).toString();
|
|
6967
|
+
resolvedRecordTypeSchema = external_exports.object({ json_schema: external_exports.record(external_exports.unknown()) });
|
|
6968
|
+
reviewWritersSchema = external_exports.object({ writers: external_exports.array(external_exports.string()).optional() });
|
|
6969
|
+
sharedScopeSchema = external_exports.object({ role: external_exports.literal("shared") });
|
|
6970
|
+
resolvedFileToolSchema = external_exports.object({
|
|
6971
|
+
file_type: external_exports.string().min(1),
|
|
6972
|
+
path_prefix: external_exports.string().nullish(),
|
|
6973
|
+
operations: external_exports.array(external_exports.unknown()),
|
|
6974
|
+
name: external_exports.unknown().optional(),
|
|
6975
|
+
names: external_exports.unknown().optional(),
|
|
6976
|
+
description_override: external_exports.unknown().optional()
|
|
6977
|
+
});
|
|
6978
|
+
rekorToolsetFileSchema = external_exports.object({
|
|
6979
|
+
path: external_exports.string().min(1),
|
|
6980
|
+
version: external_exports.number().int().min(1),
|
|
6981
|
+
content_type: external_exports.string().optional()
|
|
6982
|
+
}).passthrough();
|
|
6983
|
+
rekorToolsetFileUrlAnswerSchema = external_exports.object({
|
|
6984
|
+
data: external_exports.object({
|
|
6985
|
+
url: external_exports.string(),
|
|
6986
|
+
expires_at: external_exports.string(),
|
|
6987
|
+
path: external_exports.string(),
|
|
6988
|
+
content_sha256: external_exports.string()
|
|
6989
|
+
}).passthrough()
|
|
6990
|
+
});
|
|
6991
|
+
rekorToolsetFileListSchema = external_exports.object({ data: external_exports.array(rekorToolsetFileSchema) });
|
|
6992
|
+
rekorToolsetFileGetSchema = external_exports.object({
|
|
6993
|
+
data: rekorToolsetFileSchema.extend({
|
|
6994
|
+
content: external_exports.string(),
|
|
6995
|
+
encoding: external_exports.enum(["utf-8", "base64"])
|
|
6996
|
+
})
|
|
6997
|
+
});
|
|
6998
|
+
rekorToolsetFilePutSchema = external_exports.object({ data: rekorToolsetFileSchema });
|
|
6999
|
+
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";
|
|
7000
|
+
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
7001
|
}
|
|
6900
7002
|
});
|
|
6901
7003
|
|
|
6902
|
-
// ../../packages/core/dist/chunk-
|
|
6903
|
-
var
|
|
6904
|
-
var
|
|
6905
|
-
"../../packages/core/dist/chunk-
|
|
7004
|
+
// ../../packages/core/dist/chunk-OS6EZSUS.js
|
|
7005
|
+
var TOOLSET_ANSWER_PERSON_PARTIES, toolsetAnswerPersonSchema, toolsetAnswerPersonsSchema;
|
|
7006
|
+
var init_chunk_OS6EZSUS = __esm({
|
|
7007
|
+
"../../packages/core/dist/chunk-OS6EZSUS.js"() {
|
|
6906
7008
|
"use strict";
|
|
7009
|
+
init_chunk_BUYOPDSJ();
|
|
7010
|
+
init_chunk_L55XSECQ();
|
|
6907
7011
|
init_zod();
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
7012
|
+
TOOLSET_ANSWER_PERSON_PARTIES = ["requester", "originator", "initiator", "delegator"];
|
|
7013
|
+
toolsetAnswerPersonSchema = external_exports.object({
|
|
7014
|
+
party: external_exports.enum(TOOLSET_ANSWER_PERSON_PARTIES),
|
|
7015
|
+
person_id: rekorPersonIdSchema
|
|
7016
|
+
}).strict();
|
|
7017
|
+
toolsetAnswerPersonsSchema = external_exports.array(toolsetAnswerPersonSchema).min(1).max(REKOR_MAX_PERSON_PARTIES);
|
|
6913
7018
|
}
|
|
6914
7019
|
});
|
|
6915
7020
|
|
|
6916
|
-
// ../../packages/core/dist/chunk-
|
|
6917
|
-
var
|
|
6918
|
-
var
|
|
6919
|
-
"../../packages/core/dist/chunk-
|
|
7021
|
+
// ../../packages/core/dist/chunk-ZVXO3XL6.js
|
|
7022
|
+
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;
|
|
7023
|
+
var init_chunk_ZVXO3XL6 = __esm({
|
|
7024
|
+
"../../packages/core/dist/chunk-ZVXO3XL6.js"() {
|
|
6920
7025
|
"use strict";
|
|
7026
|
+
init_chunk_HZ6CADSY();
|
|
6921
7027
|
init_zod();
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
7028
|
+
PEOPLE_CONTACT_PAGE_MAX = 100;
|
|
7029
|
+
PEOPLE_CONTACT_PAGE_DEFAULT = 50;
|
|
7030
|
+
PEOPLE_CONTACT_EMAIL_MAX_LENGTH = 254;
|
|
7031
|
+
peopleUserIdSchema = external_exports.string().max(64).regex(USER_ID_REGEX, "must be a user id");
|
|
7032
|
+
peopleInviteEmailSchema = external_exports.string().trim().max(PEOPLE_CONTACT_EMAIL_MAX_LENGTH).email();
|
|
7033
|
+
peopleContactInviteBody = external_exports.object({
|
|
7034
|
+
email: peopleInviteEmailSchema
|
|
7035
|
+
}).strict();
|
|
7036
|
+
peopleContactInviteIdParam = external_exports.object({ inviteId: uuidSchema });
|
|
7037
|
+
peopleContactUserIdParam = external_exports.object({ userId: peopleUserIdSchema });
|
|
7038
|
+
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, {
|
|
7039
|
+
message: "Name a thread or a community, not both",
|
|
7040
|
+
path: ["community_id"]
|
|
6932
7041
|
});
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
7042
|
+
peopleContactPageQuery = external_exports.object({
|
|
7043
|
+
cursor: external_exports.string().min(1).max(256).optional(),
|
|
7044
|
+
limit: external_exports.coerce.number().int().min(1).max(PEOPLE_CONTACT_PAGE_MAX).default(PEOPLE_CONTACT_PAGE_DEFAULT)
|
|
6936
7045
|
});
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
}).
|
|
7046
|
+
peopleOutgoingInviteSchema = external_exports.object({
|
|
7047
|
+
invite_id: uuidSchema,
|
|
7048
|
+
email: external_exports.string(),
|
|
7049
|
+
status: external_exports.literal("sent"),
|
|
7050
|
+
created_at: timestampSchema,
|
|
7051
|
+
expires_at: timestampSchema
|
|
7052
|
+
}).strict();
|
|
7053
|
+
peopleContactPersonSchema = external_exports.object({
|
|
7054
|
+
user_id: peopleUserIdSchema,
|
|
7055
|
+
display_name: external_exports.string().nullable(),
|
|
7056
|
+
email: external_exports.string().nullable()
|
|
7057
|
+
}).strict();
|
|
7058
|
+
peopleContactSchema = peopleContactPersonSchema.extend({ contact_since: timestampSchema, thread_id: uuidSchema }).strict();
|
|
7059
|
+
peopleIncomingInviteSchema = external_exports.object({
|
|
7060
|
+
invite_id: uuidSchema,
|
|
7061
|
+
inviter: peopleContactPersonSchema,
|
|
7062
|
+
created_at: timestampSchema,
|
|
7063
|
+
expires_at: timestampSchema
|
|
7064
|
+
}).strict();
|
|
7065
|
+
peopleBlockedUserSchema = peopleContactPersonSchema.extend({ blocked_at: timestampSchema, deleted_user: external_exports.boolean() }).strict();
|
|
6950
7066
|
}
|
|
6951
7067
|
});
|
|
6952
7068
|
|
|
6953
|
-
// ../../packages/core/dist/chunk-
|
|
6954
|
-
var
|
|
6955
|
-
var
|
|
6956
|
-
"../../packages/core/dist/chunk-
|
|
6957
|
-
"use strict";
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
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()
|
|
7069
|
+
// ../../packages/core/dist/chunk-ZXK6N2HN.js
|
|
7070
|
+
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;
|
|
7071
|
+
var init_chunk_ZXK6N2HN = __esm({
|
|
7072
|
+
"../../packages/core/dist/chunk-ZXK6N2HN.js"() {
|
|
7073
|
+
"use strict";
|
|
7074
|
+
init_chunk_ZVXO3XL6();
|
|
7075
|
+
init_chunk_HZ6CADSY();
|
|
7076
|
+
init_zod();
|
|
7077
|
+
PEOPLE_MODERATION_NOTE_MAX_LENGTH = 500;
|
|
7078
|
+
ADMIN_PEOPLE_REPORTS_PAGE_MAX = 100;
|
|
7079
|
+
ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT = 50;
|
|
7080
|
+
PEOPLE_SUSPENDED_REASON = "suspended";
|
|
7081
|
+
peopleModerationActionSchema = external_exports.enum(["remove_message", "suspend", "unsuspend", "dismiss"]);
|
|
7082
|
+
moderationNoteSchema = optionalTrimmedText(PEOPLE_MODERATION_NOTE_MAX_LENGTH);
|
|
7083
|
+
adminPeopleReportListQuery = external_exports.object({
|
|
7084
|
+
pending: external_exports.enum(["true", "false"]).optional().transform((value) => value === "true"),
|
|
7085
|
+
/** Lower bound on `created_at`. */
|
|
7086
|
+
since: timestampSchema.optional(),
|
|
7087
|
+
limit: external_exports.coerce.number().int().min(1).max(ADMIN_PEOPLE_REPORTS_PAGE_MAX).default(ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT),
|
|
7088
|
+
offset: external_exports.coerce.number().int().min(0).default(0)
|
|
6986
7089
|
});
|
|
6987
|
-
|
|
7090
|
+
adminPeopleReportIdParam = external_exports.object({ reportId: uuidSchema });
|
|
7091
|
+
adminPeopleMessageRemovalBody = external_exports.object({ report_id: uuidSchema, message_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
|
|
7092
|
+
adminPeopleSuspendBody = external_exports.object({ report_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
|
|
7093
|
+
adminPeopleNoteBody = external_exports.object({ note: moderationNoteSchema }).strict();
|
|
6988
7094
|
}
|
|
6989
7095
|
});
|
|
6990
7096
|
|
|
6991
|
-
// ../../packages/core/dist/chunk-
|
|
6992
|
-
var
|
|
6993
|
-
var
|
|
6994
|
-
"../../packages/core/dist/chunk-
|
|
7097
|
+
// ../../packages/core/dist/chunk-Y7CFCYX4.js
|
|
7098
|
+
var PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody;
|
|
7099
|
+
var init_chunk_Y7CFCYX4 = __esm({
|
|
7100
|
+
"../../packages/core/dist/chunk-Y7CFCYX4.js"() {
|
|
6995
7101
|
"use strict";
|
|
7102
|
+
init_chunk_ZVXO3XL6();
|
|
7103
|
+
init_chunk_HZ6CADSY();
|
|
6996
7104
|
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;
|
|
7105
|
+
PEOPLE_REPORT_DETAILS_MAX_LENGTH = 500;
|
|
7106
|
+
peopleReportReasonSchema = external_exports.enum(["spam", "harassment", "hate", "sexual", "violence", "other"]);
|
|
7107
|
+
reportDetailsSchema = optionalTrimmedText(PEOPLE_REPORT_DETAILS_MAX_LENGTH);
|
|
7108
|
+
reportFields = { reason: peopleReportReasonSchema, details: reportDetailsSchema };
|
|
7109
|
+
peopleReportBody = external_exports.discriminatedUnion("target", [
|
|
7110
|
+
external_exports.object({ target: external_exports.literal("message"), thread_id: uuidSchema, message_id: uuidSchema, ...reportFields }).strict(),
|
|
7111
|
+
external_exports.object({ target: external_exports.literal("thread"), thread_id: uuidSchema, ...reportFields }).strict(),
|
|
7112
|
+
external_exports.object({ target: external_exports.literal("user"), user_id: peopleUserIdSchema, thread_id: uuidSchema.optional(), ...reportFields }).strict(),
|
|
7113
|
+
external_exports.object({
|
|
7114
|
+
target: external_exports.literal("community_message"),
|
|
7115
|
+
community_id: uuidSchema,
|
|
7116
|
+
room_id: uuidSchema,
|
|
7117
|
+
message_id: uuidSchema,
|
|
7118
|
+
...reportFields
|
|
7119
|
+
}).strict(),
|
|
7120
|
+
external_exports.object({ target: external_exports.literal("community_member"), community_id: uuidSchema, user_id: peopleUserIdSchema, ...reportFields }).strict()
|
|
7121
|
+
]);
|
|
7047
7122
|
}
|
|
7048
7123
|
});
|
|
7049
7124
|
|
|
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)));
|
|
7125
|
+
// ../../packages/core/dist/chunk-S5SVBLGT.js
|
|
7126
|
+
function normalizeContactPhone(raw) {
|
|
7127
|
+
const compact = raw.trim().replace(/[\s\-.()]/g, "");
|
|
7128
|
+
const withPlus = compact.startsWith("00") ? `+${compact.slice(2)}` : compact;
|
|
7129
|
+
return /^\+[1-9]\d{7,14}$/.test(withPlus) ? withPlus : null;
|
|
7074
7130
|
}
|
|
7075
|
-
function
|
|
7076
|
-
|
|
7077
|
-
try {
|
|
7078
|
-
parsed = JSON.parse(raw);
|
|
7079
|
-
} catch {
|
|
7080
|
-
return false;
|
|
7081
|
-
}
|
|
7082
|
-
return accessSetSchema.safeParse(parsed).success;
|
|
7131
|
+
function normalizeContactLabel(raw) {
|
|
7132
|
+
return raw.trim().replace(/\s+/g, " ").toLowerCase();
|
|
7083
7133
|
}
|
|
7084
|
-
function
|
|
7085
|
-
return
|
|
7134
|
+
function importRowLabels(row, batchLabels) {
|
|
7135
|
+
return [.../* @__PURE__ */ new Set([...row.labels ?? [], ...batchLabels ?? []])];
|
|
7086
7136
|
}
|
|
7087
|
-
var
|
|
7088
|
-
var
|
|
7089
|
-
"../../packages/core/dist/chunk-
|
|
7137
|
+
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;
|
|
7138
|
+
var init_chunk_S5SVBLGT = __esm({
|
|
7139
|
+
"../../packages/core/dist/chunk-S5SVBLGT.js"() {
|
|
7090
7140
|
"use strict";
|
|
7091
|
-
init_chunk_L55XSECQ();
|
|
7092
|
-
init_chunk_HZ6CADSY();
|
|
7093
|
-
init_chunk_YROEDMVZ();
|
|
7094
7141
|
init_zod();
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
);
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
message: `"${PERSON_ACCESS_KEY}" holds only { "read": ["${ACCESS_UNRESTRICTED}"], "write": ["${ACCESS_UNRESTRICTED}"] }: every person's records`
|
|
7121
|
-
});
|
|
7122
|
-
}
|
|
7123
|
-
if (Object.keys(withoutPersonAccess(assignment)).length > MAX_ACCESS_DIMENSIONS_PER_ORG) {
|
|
7124
|
-
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: `An assignment names at most ${MAX_ACCESS_DIMENSIONS_PER_ORG} dimensions` });
|
|
7142
|
+
CONTACT_ENVIRONMENTS = ["production", "preview", "all"];
|
|
7143
|
+
CONTACT_NAME_MAX = 200;
|
|
7144
|
+
CONTACT_EMAIL_MAX = 320;
|
|
7145
|
+
CONTACT_PHONE_INPUT_MAX = 40;
|
|
7146
|
+
CONTACT_INSTAGRAM_SID_MAX = 64;
|
|
7147
|
+
CONTACT_METADATA_MAX_BYTES = 4096;
|
|
7148
|
+
CONTACT_LABEL_MAX = 64;
|
|
7149
|
+
CONTACT_LABELS_MAX = 20;
|
|
7150
|
+
CONTACT_SCOPE_TAGS_MAX = 20;
|
|
7151
|
+
CONTACT_PAGE_MAX = 100;
|
|
7152
|
+
CONTACT_IMPORT_BATCH_MAX = 500;
|
|
7153
|
+
CONTACT_SEARCH_MAX = 100;
|
|
7154
|
+
CONTACT_LIST_NAME_MAX = 64;
|
|
7155
|
+
CONTACT_LIST_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
7156
|
+
CONTACT_LIST_DESCRIPTION_MAX = 1e3;
|
|
7157
|
+
CONTACT_LIST_FILTER_MAX = 20;
|
|
7158
|
+
CONTACT_LIST_PINS_PER_REQUEST_MAX = 100;
|
|
7159
|
+
SUPPRESSION_SCOPES = ["all", "marketing"];
|
|
7160
|
+
SUPPRESSION_ID_REGEX = /^[0-9a-f]{64}$/;
|
|
7161
|
+
contactName = external_exports.string().trim().min(1).max(CONTACT_NAME_MAX);
|
|
7162
|
+
contactPhone = external_exports.string().max(CONTACT_PHONE_INPUT_MAX).transform((raw, ctx) => {
|
|
7163
|
+
const phone = normalizeContactPhone(raw);
|
|
7164
|
+
if (phone === null) {
|
|
7165
|
+
ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Phone must be an international number, e.g. +5511999999999" });
|
|
7166
|
+
return external_exports.NEVER;
|
|
7125
7167
|
}
|
|
7168
|
+
return phone;
|
|
7126
7169
|
});
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7170
|
+
contactEmail = external_exports.string().trim().toLowerCase().max(CONTACT_EMAIL_MAX).email();
|
|
7171
|
+
contactInstagramSid = external_exports.string().trim().min(1).max(CONTACT_INSTAGRAM_SID_MAX);
|
|
7172
|
+
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");
|
|
7173
|
+
contactLabels = external_exports.array(contactLabel).max(CONTACT_LABELS_MAX).transform((labels) => [...new Set(labels)]);
|
|
7174
|
+
contactMetadata = external_exports.record(external_exports.unknown()).refine(
|
|
7175
|
+
(metadata) => new TextEncoder().encode(JSON.stringify(metadata)).length <= CONTACT_METADATA_MAX_BYTES,
|
|
7176
|
+
`Metadata must serialize to at most ${CONTACT_METADATA_MAX_BYTES} bytes`
|
|
7177
|
+
);
|
|
7178
|
+
scopeTagIds = external_exports.array(external_exports.string().uuid()).min(1).max(CONTACT_SCOPE_TAGS_MAX).transform((ids) => [...new Set(ids)]);
|
|
7179
|
+
contactVisibilitySchema = external_exports.discriminatedUnion("scope", [
|
|
7180
|
+
external_exports.object({ scope: external_exports.literal("all_hubs") }).strict(),
|
|
7181
|
+
external_exports.object({ scope: external_exports.literal("tags"), tag_ids: scopeTagIds }).strict()
|
|
7182
|
+
]);
|
|
7183
|
+
hasIdentity = (row) => Boolean(row.phone || row.email || row.instagram_sid);
|
|
7184
|
+
IDENTITY_REQUIRED = "A contact needs a phone, an email or an Instagram id";
|
|
7185
|
+
contactBookOrgQuery = external_exports.object({
|
|
7186
|
+
organization_id: external_exports.string().uuid()
|
|
7130
7187
|
});
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
dimensionId: accessIdSchema
|
|
7134
|
-
});
|
|
7135
|
-
accessValueParam = accessDimensionParam.extend({
|
|
7136
|
-
valueId: accessIdSchema
|
|
7137
|
-
});
|
|
7138
|
-
orgMemberParam = external_exports.object({
|
|
7139
|
-
id: uuidSchema,
|
|
7140
|
-
userId: external_exports.string().min(1).max(256)
|
|
7188
|
+
contactBookContactParam = external_exports.object({
|
|
7189
|
+
contactId: external_exports.string().uuid()
|
|
7141
7190
|
});
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
hubId: uuidSchema
|
|
7191
|
+
contactBookListParam = external_exports.object({
|
|
7192
|
+
listId: external_exports.string().uuid()
|
|
7145
7193
|
});
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
label: accessLabelSchema
|
|
7194
|
+
contactBookHubParam = external_exports.object({
|
|
7195
|
+
hubId: external_exports.string().uuid()
|
|
7149
7196
|
});
|
|
7150
|
-
|
|
7151
|
-
|
|
7197
|
+
contactBookPageQuery = external_exports.object({
|
|
7198
|
+
cursor: external_exports.string().max(2048).optional(),
|
|
7199
|
+
limit: external_exports.coerce.number().int().min(1).max(CONTACT_PAGE_MAX).default(50)
|
|
7152
7200
|
});
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
label:
|
|
7201
|
+
listContactBookContactsQuery = contactBookOrgQuery.merge(contactBookPageQuery).extend({
|
|
7202
|
+
q: external_exports.string().trim().max(CONTACT_SEARCH_MAX).optional(),
|
|
7203
|
+
label: external_exports.string().max(CONTACT_LABEL_MAX).transform(normalizeContactLabel).optional(),
|
|
7204
|
+
scope_tag_id: external_exports.string().uuid().optional()
|
|
7156
7205
|
});
|
|
7157
|
-
|
|
7158
|
-
|
|
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"
|
|
7206
|
+
listHubContactBookContactsQuery = contactBookPageQuery.extend({
|
|
7207
|
+
q: external_exports.string().trim().max(CONTACT_SEARCH_MAX).optional()
|
|
7162
7208
|
});
|
|
7163
|
-
|
|
7164
|
-
|
|
7209
|
+
contactBookLinkCandidatesQuery = contactBookOrgQuery.extend({
|
|
7210
|
+
email: contactEmail
|
|
7165
7211
|
});
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7212
|
+
listContactBookListMembersQuery = contactBookOrgQuery.merge(contactBookPageQuery);
|
|
7213
|
+
contactRowFields = {
|
|
7214
|
+
name: contactName,
|
|
7215
|
+
phone: contactPhone.nullish(),
|
|
7216
|
+
email: contactEmail.nullish(),
|
|
7217
|
+
instagram_sid: contactInstagramSid.nullish(),
|
|
7218
|
+
labels: contactLabels.optional(),
|
|
7219
|
+
metadata: contactMetadata.optional()
|
|
7220
|
+
};
|
|
7221
|
+
createContactBookContactBody = external_exports.object({
|
|
7222
|
+
organization_id: external_exports.string().uuid(),
|
|
7223
|
+
...contactRowFields,
|
|
7224
|
+
visibility: contactVisibilitySchema,
|
|
7225
|
+
environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional()
|
|
7226
|
+
}).strict().refine(hasIdentity, IDENTITY_REQUIRED);
|
|
7227
|
+
updateContactBookContactBody = external_exports.object({
|
|
7228
|
+
name: contactName.optional(),
|
|
7229
|
+
phone: contactPhone.nullable().optional(),
|
|
7230
|
+
email: contactEmail.nullable().optional(),
|
|
7231
|
+
instagram_sid: contactInstagramSid.nullable().optional(),
|
|
7232
|
+
labels: contactLabels.optional(),
|
|
7233
|
+
metadata: contactMetadata.optional(),
|
|
7234
|
+
visibility: contactVisibilitySchema.optional(),
|
|
7235
|
+
environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional()
|
|
7236
|
+
}).strict();
|
|
7237
|
+
contactImportRowSchema = external_exports.object(contactRowFields).strict().refine(hasIdentity, IDENTITY_REQUIRED);
|
|
7238
|
+
importContactBookContactsBody = external_exports.object({
|
|
7239
|
+
organization_id: external_exports.string().uuid(),
|
|
7240
|
+
visibility: contactVisibilitySchema,
|
|
7241
|
+
environment: external_exports.enum(CONTACT_ENVIRONMENTS).optional(),
|
|
7242
|
+
labels: contactLabels.optional(),
|
|
7243
|
+
rows: external_exports.array(contactImportRowSchema).min(1).max(CONTACT_IMPORT_BATCH_MAX)
|
|
7244
|
+
}).strict().superRefine((batch, ctx) => {
|
|
7245
|
+
batch.rows.forEach((row, index) => {
|
|
7246
|
+
if (importRowLabels(row, batch.labels).length > CONTACT_LABELS_MAX) {
|
|
7247
|
+
ctx.addIssue({
|
|
7248
|
+
code: external_exports.ZodIssueCode.custom,
|
|
7249
|
+
path: ["rows", index, "labels"],
|
|
7250
|
+
message: `A contact holds at most ${CONTACT_LABELS_MAX} labels, the batch's included`
|
|
7251
|
+
});
|
|
7252
|
+
}
|
|
7253
|
+
});
|
|
7172
7254
|
});
|
|
7173
|
-
|
|
7174
|
-
|
|
7255
|
+
linkContactBookContactBody = external_exports.object({
|
|
7256
|
+
user_id: external_exports.string().min(1).max(128)
|
|
7257
|
+
}).strict();
|
|
7258
|
+
listName = external_exports.string().trim().min(1).max(CONTACT_LIST_NAME_MAX).regex(CONTACT_LIST_NAME_REGEX, {
|
|
7259
|
+
message: 'Must be lowercase alphanumeric with hyphens (e.g. "vip-customers")'
|
|
7175
7260
|
});
|
|
7176
|
-
|
|
7177
|
-
|
|
7261
|
+
contactListFilterSchema = external_exports.object({
|
|
7262
|
+
labels: external_exports.array(contactLabel).max(CONTACT_LIST_FILTER_MAX).transform((l) => [...new Set(l)]).default([]),
|
|
7263
|
+
scope_tag_ids: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_FILTER_MAX).transform((t) => [...new Set(t)]).default([])
|
|
7264
|
+
}).strict();
|
|
7265
|
+
createContactBookListBody = external_exports.object({
|
|
7266
|
+
organization_id: external_exports.string().uuid(),
|
|
7267
|
+
name: listName,
|
|
7268
|
+
description: external_exports.string().max(CONTACT_LIST_DESCRIPTION_MAX).nullish(),
|
|
7269
|
+
filter: contactListFilterSchema.optional()
|
|
7270
|
+
}).strict();
|
|
7271
|
+
updateContactBookListBody = external_exports.object({
|
|
7272
|
+
name: listName.optional(),
|
|
7273
|
+
description: external_exports.string().max(CONTACT_LIST_DESCRIPTION_MAX).nullable().optional(),
|
|
7274
|
+
filter: contactListFilterSchema.optional()
|
|
7275
|
+
}).strict();
|
|
7276
|
+
updateContactBookListPinsBody = external_exports.object({
|
|
7277
|
+
add: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_PINS_PER_REQUEST_MAX).default([]),
|
|
7278
|
+
remove: external_exports.array(external_exports.string().uuid()).max(CONTACT_LIST_PINS_PER_REQUEST_MAX).default([])
|
|
7279
|
+
}).strict().refine((b) => b.add.length + b.remove.length > 0, "Add or remove at least one contact");
|
|
7280
|
+
suppressionIdentitySchema = external_exports.discriminatedUnion("kind", [
|
|
7281
|
+
external_exports.object({ kind: external_exports.literal("phone"), value: contactPhone }).strict(),
|
|
7282
|
+
external_exports.object({ kind: external_exports.literal("email"), value: contactEmail }).strict(),
|
|
7283
|
+
external_exports.object({ kind: external_exports.literal("instagram"), value: contactInstagramSid }).strict()
|
|
7284
|
+
]);
|
|
7285
|
+
createContactBookSuppressionBody = external_exports.object({
|
|
7286
|
+
organization_id: external_exports.string().uuid(),
|
|
7287
|
+
identity: suppressionIdentitySchema,
|
|
7288
|
+
scope: external_exports.enum(SUPPRESSION_SCOPES)
|
|
7289
|
+
}).strict();
|
|
7290
|
+
contactBookSuppressionParam = external_exports.object({
|
|
7291
|
+
suppressionId: external_exports.string().regex(SUPPRESSION_ID_REGEX)
|
|
7178
7292
|
});
|
|
7293
|
+
listContactBookSuppressionsQuery = contactBookOrgQuery.merge(contactBookPageQuery);
|
|
7294
|
+
contactBookEmailUnsubscribeTokenSchema = external_exports.string().max(200).regex(/^[0-9a-f-]{36}\.[0-9a-f]{64}\.[0-9a-f]{64}$/i);
|
|
7295
|
+
contactBookEmailUnsubscribeQuery = external_exports.object({ token: contactBookEmailUnsubscribeTokenSchema });
|
|
7296
|
+
orgListReferenceSchema = listName;
|
|
7179
7297
|
}
|
|
7180
7298
|
});
|
|
7181
7299
|
|
|
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"() {
|
|
7300
|
+
// ../../packages/core/dist/chunk-3GUHAF3O.js
|
|
7301
|
+
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;
|
|
7302
|
+
var init_chunk_3GUHAF3O = __esm({
|
|
7303
|
+
"../../packages/core/dist/chunk-3GUHAF3O.js"() {
|
|
7198
7304
|
"use strict";
|
|
7199
|
-
|
|
7200
|
-
init_chunk_L55XSECQ();
|
|
7305
|
+
init_chunk_S5SVBLGT();
|
|
7201
7306
|
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(),
|
|
7307
|
+
PERSON_ID_PATTERN = /^prs_[a-z2-7]{52}$/;
|
|
7308
|
+
CONTACT_PERSON_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
7309
|
+
PERSON_LINKS_MAX = 15;
|
|
7310
|
+
PERSON_DENY_PAGE_MAX = 100;
|
|
7311
|
+
PERSON_ID_FORM_MESSAGE = "Must be a person id (prs_\u2026) or a contact id (a lowercase UUID)";
|
|
7312
|
+
userPersonIdSchema = external_exports.string().regex(PERSON_ID_PATTERN, { message: "Must be a person id (prs_\u2026)" });
|
|
7313
|
+
personIdSchema = external_exports.string().refine(
|
|
7314
|
+
(value) => PERSON_ID_PATTERN.test(value) || CONTACT_PERSON_ID_PATTERN.test(value),
|
|
7315
|
+
{ message: PERSON_ID_FORM_MESSAGE }
|
|
7316
|
+
);
|
|
7317
|
+
personParam = external_exports.object({
|
|
7318
|
+
personId: userPersonIdSchema
|
|
7319
|
+
});
|
|
7320
|
+
personLinkParam = personParam.extend({
|
|
7321
|
+
targetId: personIdSchema
|
|
7322
|
+
});
|
|
7323
|
+
deniedPersonParam = external_exports.object({
|
|
7324
|
+
personId: personIdSchema
|
|
7325
|
+
});
|
|
7326
|
+
listDeniedPersonsQuery = contactBookOrgQuery.extend({
|
|
7327
|
+
cursor: personIdSchema.optional(),
|
|
7328
|
+
limit: external_exports.coerce.number().int().min(1).max(PERSON_DENY_PAGE_MAX).default(50)
|
|
7329
|
+
});
|
|
7330
|
+
}
|
|
7331
|
+
});
|
|
7332
|
+
|
|
7333
|
+
// ../../packages/core/dist/chunk-5DGHIY7L.js
|
|
7334
|
+
var rekorBaseChangeMessageSchema;
|
|
7335
|
+
var init_chunk_5DGHIY7L = __esm({
|
|
7336
|
+
"../../packages/core/dist/chunk-5DGHIY7L.js"() {
|
|
7337
|
+
"use strict";
|
|
7338
|
+
init_zod();
|
|
7339
|
+
rekorBaseChangeMessageSchema = external_exports.object({
|
|
7340
|
+
/** The WayAI org UUID — one id namespace. */
|
|
7341
|
+
org_id: external_exports.string().uuid(),
|
|
7343
7342
|
/**
|
|
7344
|
-
*
|
|
7345
|
-
*
|
|
7343
|
+
* Not a UUID: a preview base id is `{prod_base_id}--{slug}`. Immutable per base — a
|
|
7344
|
+
* preview clone is its OWN base_id — so `(base_id, scope)` keys never collide across
|
|
7345
|
+
* environments. Empty is never a real base id, so it is non-conforming rather than a
|
|
7346
|
+
* frame keyed on nothing.
|
|
7346
7347
|
*/
|
|
7347
|
-
|
|
7348
|
+
base_id: external_exports.string().min(1),
|
|
7348
7349
|
/**
|
|
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).
|
|
7350
|
+
* Rides along so the client scopes its refetch without a lookup; the inspector scopes
|
|
7351
|
+
* by side.
|
|
7353
7352
|
*/
|
|
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
|
-
}
|
|
7353
|
+
environment: external_exports.enum(["production", "preview"]),
|
|
7354
|
+
/** Which pane refetches. `base` covers create/delete/promote/config changes. */
|
|
7355
|
+
scope: external_exports.enum(["records", "record_types", "files", "base"])
|
|
7364
7356
|
});
|
|
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()
|
|
7357
|
+
}
|
|
7358
|
+
});
|
|
7359
|
+
|
|
7360
|
+
// ../../packages/core/dist/chunk-YUZFHVB2.js
|
|
7361
|
+
var invitePreviewQuery, inviteRolePreviewResponse, inviteContactPreviewResponse, invitePreviewResponse, inviteUnsubscribeBody;
|
|
7362
|
+
var init_chunk_YUZFHVB2 = __esm({
|
|
7363
|
+
"../../packages/core/dist/chunk-YUZFHVB2.js"() {
|
|
7364
|
+
"use strict";
|
|
7365
|
+
init_zod();
|
|
7366
|
+
invitePreviewQuery = external_exports.object({
|
|
7367
|
+
token: external_exports.string().min(1).max(2048)
|
|
7420
7368
|
});
|
|
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()
|
|
7369
|
+
inviteRolePreviewResponse = external_exports.object({
|
|
7370
|
+
inviter_name: external_exports.string(),
|
|
7371
|
+
entity_id: external_exports.string().uuid(),
|
|
7372
|
+
entity_name: external_exports.string(),
|
|
7373
|
+
entity_type: external_exports.enum(["org", "hub"]),
|
|
7374
|
+
role: external_exports.enum(["org_admin", "admin", "team_user", "user"]),
|
|
7375
|
+
expires_at: external_exports.string().datetime()
|
|
7433
7376
|
});
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7377
|
+
inviteContactPreviewResponse = external_exports.object({
|
|
7378
|
+
inviter_name: external_exports.string().nullable(),
|
|
7379
|
+
entity_id: external_exports.string().uuid(),
|
|
7380
|
+
entity_type: external_exports.literal("contact"),
|
|
7381
|
+
role: external_exports.literal("contact"),
|
|
7382
|
+
expires_at: external_exports.string().datetime()
|
|
7383
|
+
});
|
|
7384
|
+
invitePreviewResponse = external_exports.union([inviteRolePreviewResponse, inviteContactPreviewResponse]);
|
|
7385
|
+
inviteUnsubscribeBody = external_exports.object({ token: external_exports.string().min(1).max(256) }).strict();
|
|
7386
|
+
}
|
|
7387
|
+
});
|
|
7388
|
+
|
|
7389
|
+
// ../../packages/core/dist/chunk-I3O2RACG.js
|
|
7390
|
+
var managedAgentsWebhookParams, MANAGED_AGENTS_WEBHOOK_BODY_MAX_BYTES;
|
|
7391
|
+
var init_chunk_I3O2RACG = __esm({
|
|
7392
|
+
"../../packages/core/dist/chunk-I3O2RACG.js"() {
|
|
7393
|
+
"use strict";
|
|
7394
|
+
init_zod();
|
|
7395
|
+
managedAgentsWebhookParams = external_exports.object({
|
|
7396
|
+
hub_id: external_exports.string().uuid(),
|
|
7397
|
+
connection_id: external_exports.string().uuid()
|
|
7398
|
+
});
|
|
7399
|
+
MANAGED_AGENTS_WEBHOOK_BODY_MAX_BYTES = 16 * 1024;
|
|
7400
|
+
}
|
|
7401
|
+
});
|
|
7402
|
+
|
|
7403
|
+
// ../../packages/core/dist/chunk-34LE6P7E.js
|
|
7404
|
+
var templateIdParam, listTemplatesQuery, deleteTemplateQuery, templateStatusQuery, createTemplateBody, updateTemplateBody, submitTemplateBody, testTemplateBody;
|
|
7405
|
+
var init_chunk_34LE6P7E = __esm({
|
|
7406
|
+
"../../packages/core/dist/chunk-34LE6P7E.js"() {
|
|
7407
|
+
"use strict";
|
|
7408
|
+
init_zod();
|
|
7409
|
+
templateIdParam = external_exports.object({
|
|
7410
|
+
id: external_exports.string().uuid()
|
|
7411
|
+
});
|
|
7412
|
+
listTemplatesQuery = external_exports.object({
|
|
7413
|
+
hub_id: external_exports.string().uuid(),
|
|
7414
|
+
connection_id: external_exports.string().uuid()
|
|
7415
|
+
});
|
|
7416
|
+
deleteTemplateQuery = external_exports.object({
|
|
7417
|
+
hub_id: external_exports.string().uuid(),
|
|
7418
|
+
connection_id: external_exports.string().uuid()
|
|
7419
|
+
});
|
|
7420
|
+
templateStatusQuery = external_exports.object({
|
|
7421
|
+
hub_id: external_exports.string().uuid(),
|
|
7422
|
+
connection_id: external_exports.string().uuid()
|
|
7423
|
+
});
|
|
7424
|
+
createTemplateBody = external_exports.object({
|
|
7425
|
+
hub_id: external_exports.string().uuid(),
|
|
7426
|
+
connection_id: external_exports.string().uuid()
|
|
7438
7427
|
}).passthrough();
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7428
|
+
updateTemplateBody = external_exports.object({}).passthrough();
|
|
7429
|
+
submitTemplateBody = external_exports.object({
|
|
7430
|
+
hub_id: external_exports.string().uuid(),
|
|
7431
|
+
connection_id: external_exports.string().uuid()
|
|
7432
|
+
}).passthrough();
|
|
7433
|
+
testTemplateBody = external_exports.object({
|
|
7434
|
+
hub_id: external_exports.string().uuid(),
|
|
7435
|
+
connection_id: external_exports.string().uuid()
|
|
7436
|
+
}).passthrough();
|
|
7437
|
+
}
|
|
7438
|
+
});
|
|
7439
|
+
|
|
7440
|
+
// ../../packages/core/dist/chunk-FPSDNS2E.js
|
|
7441
|
+
var noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema;
|
|
7442
|
+
var init_chunk_FPSDNS2E = __esm({
|
|
7443
|
+
"../../packages/core/dist/chunk-FPSDNS2E.js"() {
|
|
7444
|
+
"use strict";
|
|
7445
|
+
init_zod();
|
|
7446
|
+
noticeSeveritySchema = external_exports.enum(["critical", "warn", "info"]);
|
|
7447
|
+
noticeStatusSchema = external_exports.enum(["active", "resolved"]);
|
|
7448
|
+
NOTICE_SCOPE_REGEX = /^(global|provider:[a-z0-9_-]{1,40}|service:[a-z0-9_-]{1,40})$/;
|
|
7449
|
+
noticeScopeSchema = external_exports.string().regex(NOTICE_SCOPE_REGEX, "scope must be 'global', 'provider:<x>', or 'service:<x>'");
|
|
7450
|
+
noticeLinkSchema = external_exports.string().url().refine((u) => /^https?:\/\//i.test(u), { message: "link must be an http(s) URL" });
|
|
7451
|
+
createNoticeBody = external_exports.object({
|
|
7452
|
+
severity: noticeSeveritySchema.default("info"),
|
|
7453
|
+
scope: noticeScopeSchema.default("global"),
|
|
7454
|
+
title: external_exports.string().trim().min(1).max(200),
|
|
7455
|
+
body: external_exports.string().max(2e3).optional(),
|
|
7456
|
+
link: noticeLinkSchema.optional(),
|
|
7457
|
+
starts_at: external_exports.string().datetime().optional(),
|
|
7458
|
+
ends_at: external_exports.string().datetime().optional()
|
|
7446
7459
|
});
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7460
|
+
updateNoticeBody = external_exports.object({
|
|
7461
|
+
severity: noticeSeveritySchema.optional(),
|
|
7462
|
+
scope: noticeScopeSchema.optional(),
|
|
7463
|
+
title: external_exports.string().trim().min(1).max(200).optional(),
|
|
7464
|
+
body: external_exports.string().max(2e3).nullable().optional(),
|
|
7465
|
+
link: noticeLinkSchema.nullable().optional(),
|
|
7466
|
+
starts_at: external_exports.string().datetime().optional(),
|
|
7467
|
+
ends_at: external_exports.string().datetime().nullable().optional()
|
|
7468
|
+
}).refine((b) => Object.keys(b).length > 0, { message: "at least one field must be provided" });
|
|
7469
|
+
listNoticesQuery = external_exports.object({
|
|
7470
|
+
status: noticeStatusSchema.optional(),
|
|
7471
|
+
limit: external_exports.coerce.number().int().min(1).max(200).optional(),
|
|
7472
|
+
offset: external_exports.coerce.number().int().min(0).optional()
|
|
7453
7473
|
});
|
|
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`;
|
|
7474
|
+
noticeIdParamSchema = external_exports.object({ id: external_exports.string().min(1) });
|
|
7457
7475
|
}
|
|
7458
7476
|
});
|
|
7459
7477
|
|
|
@@ -12024,10 +12042,10 @@ var init_chunk_6J742GLA = __esm({
|
|
|
12024
12042
|
}
|
|
12025
12043
|
});
|
|
12026
12044
|
|
|
12027
|
-
// ../../packages/core/dist/chunk-
|
|
12045
|
+
// ../../packages/core/dist/chunk-LCBRIVIN.js
|
|
12028
12046
|
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-
|
|
12047
|
+
var init_chunk_LCBRIVIN = __esm({
|
|
12048
|
+
"../../packages/core/dist/chunk-LCBRIVIN.js"() {
|
|
12031
12049
|
"use strict";
|
|
12032
12050
|
init_chunk_S5SVBLGT();
|
|
12033
12051
|
init_chunk_6J742GLA();
|
|
@@ -12133,7 +12151,7 @@ var init_chunk_6YIKY5UC = __esm({
|
|
|
12133
12151
|
}
|
|
12134
12152
|
});
|
|
12135
12153
|
|
|
12136
|
-
// ../../packages/core/dist/chunk-
|
|
12154
|
+
// ../../packages/core/dist/chunk-MT4ITTI4.js
|
|
12137
12155
|
function parseCommunityLessonVideoUrl(url) {
|
|
12138
12156
|
const parts = /^https?:\/\/([^/?#]+)([^?#]*)(?:\?([^#]*))?(?:#.*)?$/i.exec(url.trim());
|
|
12139
12157
|
if (!parts) return null;
|
|
@@ -12159,10 +12177,10 @@ function communityLessonVideoWatchUrl(video) {
|
|
|
12159
12177
|
}
|
|
12160
12178
|
}
|
|
12161
12179
|
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-
|
|
12180
|
+
var init_chunk_MT4ITTI4 = __esm({
|
|
12181
|
+
"../../packages/core/dist/chunk-MT4ITTI4.js"() {
|
|
12164
12182
|
"use strict";
|
|
12165
|
-
|
|
12183
|
+
init_chunk_LCBRIVIN();
|
|
12166
12184
|
init_chunk_HZ6CADSY();
|
|
12167
12185
|
init_zod();
|
|
12168
12186
|
COMMUNITY_COURSES_MAX = 20;
|
|
@@ -12747,7 +12765,7 @@ var init_chunk_2ISUBJG7 = __esm({
|
|
|
12747
12765
|
}
|
|
12748
12766
|
});
|
|
12749
12767
|
|
|
12750
|
-
// ../../packages/core/dist/chunk-
|
|
12768
|
+
// ../../packages/core/dist/chunk-GMCEFUWT.js
|
|
12751
12769
|
function describeRole(role) {
|
|
12752
12770
|
if (typeof role === "string") {
|
|
12753
12771
|
return JSON.stringify(role.length > ROLE_ECHO_MAX ? `${role.slice(0, ROLE_ECHO_MAX)}\u2026` : role);
|
|
@@ -12921,8 +12939,8 @@ function terminalRunCount(counts) {
|
|
|
12921
12939
|
return counts.successful_runs + counts.failed_runs;
|
|
12922
12940
|
}
|
|
12923
12941
|
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-
|
|
12942
|
+
var init_chunk_GMCEFUWT = __esm({
|
|
12943
|
+
"../../packages/core/dist/chunk-GMCEFUWT.js"() {
|
|
12926
12944
|
"use strict";
|
|
12927
12945
|
init_chunk_4LXDRTO4();
|
|
12928
12946
|
init_chunk_WTOA3ANF();
|
|
@@ -13990,7 +14008,7 @@ var init_chunk_TU4Y4MEX = __esm({
|
|
|
13990
14008
|
}
|
|
13991
14009
|
});
|
|
13992
14010
|
|
|
13993
|
-
// ../../packages/core/dist/chunk-
|
|
14011
|
+
// ../../packages/core/dist/chunk-E7SXOYHO.js
|
|
13994
14012
|
function refineHubAsCodeCustomTools(config, ctx) {
|
|
13995
14013
|
const agents = config.agents;
|
|
13996
14014
|
if (!Array.isArray(agents)) return;
|
|
@@ -14600,12 +14618,12 @@ function skillSectionsAsResources(scope) {
|
|
|
14600
14618
|
};
|
|
14601
14619
|
}
|
|
14602
14620
|
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-
|
|
14621
|
+
var init_chunk_E7SXOYHO = __esm({
|
|
14622
|
+
"../../packages/core/dist/chunk-E7SXOYHO.js"() {
|
|
14605
14623
|
"use strict";
|
|
14606
14624
|
init_chunk_SARVKRZB();
|
|
14607
14625
|
init_chunk_XAYDRN6A();
|
|
14608
|
-
|
|
14626
|
+
init_chunk_GMCEFUWT();
|
|
14609
14627
|
init_chunk_LBDH7LCG();
|
|
14610
14628
|
init_chunk_4LXDRTO4();
|
|
14611
14629
|
init_chunk_TU4Y4MEX();
|
|
@@ -16140,15 +16158,15 @@ var init_chunk_EV3MAOEX = __esm({
|
|
|
16140
16158
|
var init_contracts = __esm({
|
|
16141
16159
|
"../../packages/core/dist/contracts/index.js"() {
|
|
16142
16160
|
"use strict";
|
|
16161
|
+
init_chunk_WL5QGKHN();
|
|
16143
16162
|
init_chunk_YVY2TZK2();
|
|
16144
16163
|
init_chunk_VXEAR36B();
|
|
16145
16164
|
init_chunk_RACEDHG6();
|
|
16146
16165
|
init_chunk_Q7KIQHAZ();
|
|
16147
16166
|
init_chunk_HA7CRZMX();
|
|
16167
|
+
init_chunk_MF2VVXBR();
|
|
16148
16168
|
init_chunk_IPXBFWUU();
|
|
16149
16169
|
init_chunk_NKLVUTFO();
|
|
16150
|
-
init_chunk_WL5QGKHN();
|
|
16151
|
-
init_chunk_MF2VVXBR();
|
|
16152
16170
|
init_chunk_ZC6YGHNX();
|
|
16153
16171
|
init_chunk_ACKF2MVU();
|
|
16154
16172
|
init_chunk_GPYAZPH7();
|
|
@@ -16156,9 +16174,10 @@ var init_contracts = __esm({
|
|
|
16156
16174
|
init_chunk_IPDOHAZ5();
|
|
16157
16175
|
init_chunk_GPM7PE44();
|
|
16158
16176
|
init_chunk_VEERWOZ6();
|
|
16177
|
+
init_chunk_OS6EZSUS();
|
|
16159
16178
|
init_chunk_ZXK6N2HN();
|
|
16160
16179
|
init_chunk_Y7CFCYX4();
|
|
16161
|
-
|
|
16180
|
+
init_chunk_3GUHAF3O();
|
|
16162
16181
|
init_chunk_5DGHIY7L();
|
|
16163
16182
|
init_chunk_YUZFHVB2();
|
|
16164
16183
|
init_chunk_I3O2RACG();
|
|
@@ -16175,8 +16194,8 @@ var init_contracts = __esm({
|
|
|
16175
16194
|
init_chunk_UI6YFSZL();
|
|
16176
16195
|
init_chunk_C4HEZ7ZI();
|
|
16177
16196
|
init_chunk_IR2NOSI3();
|
|
16178
|
-
|
|
16179
|
-
|
|
16197
|
+
init_chunk_MT4ITTI4();
|
|
16198
|
+
init_chunk_LCBRIVIN();
|
|
16180
16199
|
init_chunk_YULHXJ5M();
|
|
16181
16200
|
init_chunk_V4FRPRH5();
|
|
16182
16201
|
init_chunk_LWMLR2WI();
|
|
@@ -16187,11 +16206,11 @@ var init_contracts = __esm({
|
|
|
16187
16206
|
init_chunk_E4DIIOOE();
|
|
16188
16207
|
init_chunk_7CYHPF35();
|
|
16189
16208
|
init_chunk_BPCNB5RT();
|
|
16190
|
-
|
|
16209
|
+
init_chunk_E7SXOYHO();
|
|
16191
16210
|
init_chunk_SARVKRZB();
|
|
16192
16211
|
init_chunk_XAYDRN6A();
|
|
16193
16212
|
init_chunk_L55XSECQ();
|
|
16194
|
-
|
|
16213
|
+
init_chunk_GMCEFUWT();
|
|
16195
16214
|
init_chunk_LBDH7LCG();
|
|
16196
16215
|
init_chunk_4LXDRTO4();
|
|
16197
16216
|
init_chunk_JDJ4EUOL();
|
|
@@ -35719,13 +35738,16 @@ lookup-person Whom a person id (prs_\u2026) names: a hub of the organization
|
|
|
35719
35738
|
person-links The person ids and contacts a person is linked to, oldest first.
|
|
35720
35739
|
link-person Link a person to another person id (their earlier identity, say an old
|
|
35721
35740
|
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
|
|
35741
|
+
The target's own links are copied too. A person holds at most ${PERSON_LINKS_MAX} links.
|
|
35723
35742
|
unlink-person Remove one link. The links it copied stay.
|
|
35724
35743
|
denied-persons The organization's deny list: person ids and contacts no person set holds.
|
|
35725
35744
|
deny-person Deny a person id or a contact for the organization.
|
|
35726
35745
|
undeny-person Lift a denial.
|
|
35727
35746
|
|
|
35728
|
-
|
|
35747
|
+
Every toolset call reads the person links and the deny list of the people it is for: a person
|
|
35748
|
+
reaches the records naming an id they are linked to (a contact only where the hub sees it), and
|
|
35749
|
+
no one is matched by a denied id; a person whose own id is denied reaches none. An eval run's
|
|
35750
|
+
declared contact (on a preview hub) is used as declared, its links and the deny list unread.
|
|
35729
35751
|
|
|
35730
35752
|
The organization is --org, else this repo's (wayai-ws/wayai.yaml). Linking and unlinking
|
|
35731
35753
|
a person needs org:write over the organization; everything else here an organization
|